diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-11-18 10:21:51 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2013-02-10 12:11:36 +0100 |
commit | 21e6c3f65ff4b0daeac75d6d66dcdd33fb98d646 (patch) | |
tree | cc66d40640a13116a0344dd5a38303cc49282555 /web/template | |
parent | ecf2caf7fb137d0cd37746cd5db7c14b5599a2e3 (diff) | |
download | aurweb-21e6c3f65ff4b0daeac75d6d66dcdd33fb98d646.tar.xz |
Fix default selection on the account edit page
We used a mixture of account type IDs and account type descriptions on
the account edit page. This resulted in the account type field always
defaulting to "Normal user" after an invalid form had been submitted.
Consistently use account type IDs to avoid this.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/account_edit_form.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index 6c39d53..a41b34c 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -22,12 +22,12 @@ <p> <label for="id_type"><?= __("Account Type") ?>:</label> <select name="T" id="id_type"> - <?php if ($T == "User"): ?> + <?php if ($T == 1): ?> <option value="1" selected="selected"><?= __("Normal user") ?></option> <?php else: ?> <option value="1"><?= __("Normal user") ?></option> <?php endif; ?> - <?php if ($T == "Trusted User"): ?> + <?php if ($T == 2): ?> <option value="2" selected="selected"><?= __("Trusted user") ?></option> <?php else: ?> <option value="2"><?= __("Trusted user") ?></option> @@ -37,7 +37,7 @@ if ($UTYPE == "Developer"): ?> <option value="3" - <?php $T == "Developer" ? print " selected=\"selected\">" : print ">"; + <?php $T == 3 ? print " selected=\"selected\">" : print ">"; print __("Developer")."\n"; ?> </option> <?php endif; ?> |