diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-01-08 16:06:15 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-01-11 12:08:24 +0100 |
commit | 48b74071f0eb787ced7dd6dd6a9063c1461debc6 (patch) | |
tree | 3692310c2f87edabb6a9fb62b1fba983003956dd /web/html | |
parent | 72e4d5417836faa3bc23e21d1054bc6c298bf4ae (diff) | |
download | aurweb-48b74071f0eb787ced7dd6dd6a9063c1461debc6.tar.xz |
passreset.php: Refactor HTML
* Use the "errorlist" class for errors.
* Refactor some code.
* Properly display error messages when requesting a key.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/passreset.php | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/web/html/passreset.php b/web/html/passreset.php index 94a1ad9..59fd4bc 100644 --- a/web/html/passreset.php +++ b/web/html/passreset.php @@ -56,16 +56,14 @@ html_header(__("Password Reset")); <div class="box"> <h2><?= __("Password Reset"); ?></h2> + <?php if ($step == 'confirm'): ?> + <p>Check your e-mail for the confirmation link.</p> + <?php elseif ($step == 'complete'): ?> + <p>Your password has been reset successfully.</p> + <?php elseif (isset($_GET['resetkey'])): ?> <?php if ($error): ?> - <p><span class="error"><?= $error ?></span></p> - <?php endif;?> - <?php - if ($step == 'confirm') { - echo __('Check your e-mail for the confirmation link.'); - } elseif ($step == 'complete') { - echo __('Your password has been reset successfully.'); - } elseif (isset($_GET['resetkey'])) { - ?> + <ul class="errorlist"><li><?= $error ?></li></ul> + <?php endif; ?> <form action="" method="post"> <table> <tr> @@ -84,18 +82,19 @@ html_header(__("Password Reset")); <br /> <input type="submit" class="button" value="<?= __('Continue') ?>" /> </form> - <?php - } else { - ?> + <?php else: ?> <p><?= __('If you have forgotten the e-mail address you used to register, please send a message to the %saur-general%s mailing list.', '<a href="https://mailman.archlinux.org/mailman/listinfo/aur-general">', '</a>'); ?></p> + <?php if ($error): ?> + <ul class="errorlist"><li><?= $error ?></li></ul> + <?php endif; ?> <form action="" method="post"> <p><?= __("Enter your e-mail address:"); ?> <input type="text" name="email" size="30" maxlength="64" /></p> <input type="submit" class="button" value="<?= __('Continue') ?>" /> </form> - <?php } ?> + <?php endif; ?> </div> <?php |