aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/change_password_form.php
diff options
context:
space:
mode:
authorwinter2025-01-27 21:11:53 +0000
committerwinter2025-01-27 21:11:53 +0000
commit4fcc3ed7ca5ea5f3154086ac0ce7327b2386562e (patch)
tree55f8caf30a56a83619ab153c942d685a1078a587 /templates/change_password_form.php
parent78536f774cacece20c22c1b26a7c4840d9e10794 (diff)
implement changing password
Diffstat (limited to 'templates/change_password_form.php')
-rw-r--r--templates/change_password_form.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/change_password_form.php b/templates/change_password_form.php
new file mode 100644
index 0000000..7a463fd
--- /dev/null
+++ b/templates/change_password_form.php
@@ -0,0 +1,24 @@
+<form method="post" action="/todo" hx-post="/fragment/changePassword" hx-disabled-elt="find button" hx-swap="outerHTML">
+ <div class="row">
+ <label for="changePassword-current"><?= __('changePassword.currentPassword') ?></label>
+ <input type="password" id="changePassword-current" name="current" autocomplete="off" required
+ value="<?= $current ?? '' ?>">
+ </div>
+ <div class="row">
+ <label for="changePassword-new"><?= __('changePassword.newPassword') ?></label>
+ <input type="password" id="changePassword-new" name="new" autocomplete="off" required value="<?= $new ?? '' ?>">
+ </div>
+ <div class="row">
+ <label for="changePassword-newRepeat"><?= __('changePassword.newPassword.repeat') ?></label>
+ <input type="password" id="changePassword-newRepeat" name="newRepeat" autocomplete="off" required
+ value="<?= $newRepeat ?? '' ?>">
+ </div>
+ <div class="row">
+ <button class="primary"><?= __('changePassword.action') ?></button>
+ </div>
+ <?php if (isset($error)): ?>
+ <p class="error"><?= htmlspecialchars($error) ?></p>
+ <?php elseif ($success ?? false): ?>
+ <span class="temporaryIndicator"><?= __('changePassword.success') ?></span>
+ <?php endif; ?>
+</form> \ No newline at end of file