Reviewnacharbeitung
This commit is contained in:
+7
-7
@@ -2,7 +2,7 @@
|
||||
include_once 'php/controller/profile-controller.php';
|
||||
|
||||
$user = $user ?? null;
|
||||
$isEditMode = isset($_GET["edit"]) && $_GET["edit"] === "1";
|
||||
$isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
?>
|
||||
|
||||
<main class="form-page">
|
||||
@@ -10,19 +10,19 @@ $isEditMode = isset($_GET["edit"]) && $_GET["edit"] === "1";
|
||||
|
||||
<div class="container">
|
||||
|
||||
<?php if (isset($error) && $error): ?>
|
||||
<p style="color:red;">
|
||||
<?php if (!empty($error)): ?>
|
||||
<p class="alert-message is-error">
|
||||
<?php echo htmlspecialchars($error); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" action="index.php?pfad=profile">
|
||||
<form method="post" action="index.php?pfad=profile&edit=1">
|
||||
|
||||
<label class="input-label">Vorname</label>
|
||||
<input type="text"
|
||||
name="vorname"
|
||||
class="login-input"
|
||||
value="<?php echo htmlspecialchars($user["vorname"] ?? ""); ?>"
|
||||
value="<?php echo htmlspecialchars($_POST["vorname"] ?? $user["vorname"] ?? ""); ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>
|
||||
required>
|
||||
|
||||
@@ -30,7 +30,7 @@ $isEditMode = isset($_GET["edit"]) && $_GET["edit"] === "1";
|
||||
<input type="text"
|
||||
name="nachname"
|
||||
class="login-input"
|
||||
value="<?php echo htmlspecialchars($user["nachname"] ?? ""); ?>"
|
||||
value="<?php echo htmlspecialchars($_POST["nachname"] ?? $user["nachname"] ?? ""); ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>
|
||||
required>
|
||||
|
||||
@@ -38,7 +38,7 @@ $isEditMode = isset($_GET["edit"]) && $_GET["edit"] === "1";
|
||||
<input type="email"
|
||||
name="email"
|
||||
class="login-input"
|
||||
value="<?php echo htmlspecialchars($user["email"] ?? ""); ?>"
|
||||
value="<?php echo htmlspecialchars($_POST["email"] ?? $user["email"] ?? ""); ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>
|
||||
required>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user