aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/change_password_form.php
diff options
context:
space:
mode:
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