1<?php
2/**
3 * Change password.
4 *
5 * Prepared by changepassword.php:
6 * $formState 'success' | 'errors' | 'form'
7 * $errors array of messages, when $formState is 'errors'
8 *
9 * The password write happens in changepassword.php, never here.
10 */
11?>
12<div class="znx-acct">
13
14<div class="znx-acct-head"><?= t('changepw.title') ?></div>
15
16<?php if ($formState === 'success'): ?>
17
18 <div class="znx-acct-info znx-editchar-notice znx-editchar-notice--ok"><?= t('changepw.success') ?><br><?= t('changepw.relogin') ?></div>
19
20<?php else: ?>
21
22 <?php if ($formState === 'errors'): ?>
23 <div class="znx-acct-info znx-editchar-notice znx-editchar-notice--error"><?= output_errors($errors) ?></div>
24 <?php endif; ?>
25
26 <form action="" method="post" class="znx-editchar-box">
27 <div class="znx-settings-field">
28 <label><?= t('changepw.current') ?></label>
29 <input type="password" name="current_password" class="znx-acct-select">
30 </div>
31 <div class="znx-settings-field">
32 <label><?= t('changepw.new') ?></label>
33 <input type="password" name="new_password" class="znx-acct-select">
34 </div>
35 <div class="znx-settings-field">
36 <label><?= t('changepw.new_again') ?></label>
37 <input type="password" name="new_password_again" class="znx-acct-select">
38 </div>
39 <?php Token::create(); ?>
40 <button type="submit" class="znx-acct-btn"><?= t('changepw.title') ?></button>
41 </form>
42
43<?php endif; ?>
44
45</div><!-- .znx-acct -->
46