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