Profildaten bearbeiten
This commit is contained in:
+48
-10
@@ -1,36 +1,74 @@
|
||||
<?php
|
||||
include_once 'php/controller/profile-controller.php';
|
||||
|
||||
$user = $user ?? null;
|
||||
$isEditMode = isset($_GET["edit"]) && $_GET["edit"] === "1";
|
||||
?>
|
||||
|
||||
<main class="form-page">
|
||||
<div class="flexbox">
|
||||
|
||||
<div class="container">
|
||||
<form>
|
||||
|
||||
<?php if (isset($error) && $error): ?>
|
||||
<p style="color:red;">
|
||||
<?php echo htmlspecialchars($error); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" action="index.php?pfad=profile">
|
||||
|
||||
<label class="input-label">Vorname</label>
|
||||
<input type="text"
|
||||
name="vorname"
|
||||
class="login-input"
|
||||
readonly
|
||||
value="<?php echo htmlspecialchars($user["vorname"] ?? ""); ?>">
|
||||
value="<?php echo htmlspecialchars($user["vorname"] ?? ""); ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>
|
||||
required>
|
||||
|
||||
<label class="input-label">Nachname</label>
|
||||
<input type="text"
|
||||
name="nachname"
|
||||
class="login-input"
|
||||
readonly
|
||||
value="<?php echo htmlspecialchars($user["nachname"] ?? ""); ?>">
|
||||
value="<?php echo htmlspecialchars($user["nachname"] ?? ""); ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>
|
||||
required>
|
||||
|
||||
<label class="input-label">Email-Adresse</label>
|
||||
<input type="email"
|
||||
name="email"
|
||||
class="login-input"
|
||||
readonly
|
||||
value="<?php echo htmlspecialchars($user["email"] ?? ""); ?>">
|
||||
value="<?php echo htmlspecialchars($user["email"] ?? ""); ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>
|
||||
required>
|
||||
|
||||
<label class="input-label">Passwort</label>
|
||||
<label class="input-label">
|
||||
<?php echo $isEditMode ? "Neues Passwort" : "Passwort"; ?>
|
||||
</label>
|
||||
<input type="password"
|
||||
name="password"
|
||||
class="login-input"
|
||||
readonly
|
||||
value="********">
|
||||
placeholder="<?php echo $isEditMode ? "Leer lassen, wenn es gleich bleiben soll" : "********"; ?>"
|
||||
<?php echo $isEditMode ? "" : "readonly"; ?>>
|
||||
|
||||
<br><br>
|
||||
|
||||
<?php if ($isEditMode): ?>
|
||||
<button type="submit"
|
||||
name="saveProfile"
|
||||
class="button">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
<a href="index.php?pfad=profile" class="button">
|
||||
Abbrechen
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="index.php?pfad=profile&edit=1" class="button">
|
||||
Bearbeiten
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
</form>
|
||||
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user