kurs-app/Views/User/showUserChangeAccountSettings.phtml

36 lines
1.6 KiB
PHTML

<?php
include dirname(__DIR__).'/header.phtml';
?>
<div class="container">
<div class="row">
<div class="col-12">
<h1>Meine Daten ändern</h1>
<form method="post" class="form-grid form-user">
<?php foreach ($changeUserLabels as $key => $label): ?>
<div class="input">
<label for="reg_<?= $key ?>"><?= $label ?></label>
<?php if ($key === 'password'): ?>
<input type="password" name="<?= $key ?>" id="reg_<?= $key ?>">
<?php elseif($key === 'email'): ?>
<input type="email" name="<?= $key ?>" id="reg_<?= $key ?>" value="<?= htmlspecialchars($validData[$key] ?? '') ?>">
<?php else: ?>
<input type="text" name="<?= $key ?>" id="reg_<?= $key ?>" value="<?= htmlspecialchars($validData[$key] ?? $_SESSION['vorname']) ?>">
<?php endif; ?>
<?php if (!empty($errors[$key])): ?>
<div class="error"><?= $errors[$key] ?></div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<input type="hidden" name="controller" value="user">
<input type="hidden" name="do" value="updateAccountData">
<button type="submit" class="btn btn-primary btn-form" style="display: block">Meine Info ändern</button>
</form>
</div>
</div>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>