Sync account editing page with archweb

Synchronize the layout of the account editing page with the profiles
page from archweb.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-09-19 11:43:16 +02:00
parent c28459fbb1
commit 65cc6d3e2d

View file

@ -1,7 +1,7 @@
<?php if ($A == "UpdateAccount"): ?> <?php if ($A == "UpdateAccount"): ?>
<form action="<?= get_user_uri($U) . 'update/'; ?>" method="post"> <form id="edit-profile-form" action="<?= get_user_uri($U) . 'update/'; ?>" method="post">
<?php else: ?> <?php else: ?>
<form action="<?= get_uri('/register/'); ?>" method="post"> <form id="edit-profile-form" action="<?= get_uri('/register/'); ?>" method="post">
<?php endif; ?> <?php endif; ?>
<fieldset> <fieldset>
<input type="hidden" name="Action" value="<?= $A ?>" /> <input type="hidden" name="Action" value="<?= $A ?>" />
@ -10,23 +10,18 @@
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
<?php endif; ?> <?php endif; ?>
</fieldset> </fieldset>
<table> <fieldset>
<tr> <p>
<td colspan="2">&nbsp;</td> <label for="id_username"><?= __("Username") ?>:</label>
</tr> <input type="text" size="30" maxlength="64" name="U" id="id_username" value="<?= htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?= __("required") ?>)
</p>
<tr>
<td align="left"><?= __("Username") ?>:</td>
<td align="left"><input type="text" size="30" maxlength="64" name="U" value="<?= htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?= __("required") ?>)</td>
</tr>
<?php <?php
# Only TUs or Devs can promote/demote/suspend a user # Only TUs or Devs can promote/demote/suspend a user
if ($UTYPE == "Trusted User" || $UTYPE == "Developer"): if ($UTYPE == "Trusted User" || $UTYPE == "Developer"):
?> ?>
<tr> <p>
<td align="left"><?= __("Account Type") ?>:</td> <label for="id_type"><?= __("Account Type") ?>:</label>
<td align="left"> <select name="T" id="id_type">
<select name=T>
<?php if ($T == "User"): ?> <?php if ($T == "User"): ?>
<option value="1" selected><?= __("Normal user") ?> <option value="1" selected><?= __("Normal user") ?>
<?php else: ?> <?php else: ?>
@ -46,70 +41,53 @@
print __("Developer")."\n"; ?> print __("Developer")."\n"; ?>
<?php endif; ?> <?php endif; ?>
</select> </select>
</td> </p>
</tr>
<tr>
<td align="left"><?= __("Account Suspended") ?>:</td>
<p>
<label for="id_suspended"><?= __("Account Suspended") ?>:</label>
<?php if ($S): ?> <?php if ($S): ?>
<td align="left"><input type="checkbox" name="S" checked="checked" /> <input type="checkbox" name="S" id="id_suspended" checked="checked" />
<?php else: ?> <?php else: ?>
<td align="left"><input type="checkbox" name="S" /> <input type="checkbox" name="S" id="id_suspended" />
<?php endif; ?> <?php endif; ?>
</tr> </p>
<?php endif; ?> <?php endif; ?>
<tr> <p>
<td align="left"><?= __("Email Address") ?>:</td> <label for="id_email"><?= __("Email Address") ?>:</label>
<td align="left"><input type="text" size="30" maxlength="64" name="E" value="<?= htmlspecialchars($E,ENT_QUOTES) ?>" /> (<?= __("required") ?>)</td> <input type="text" size="30" maxlength="64" name="E" id="id_email" value="<?= htmlspecialchars($E,ENT_QUOTES) ?>" /> (<?= __("required") ?>)
</tr> </p>
<tr> <p>
<td align="left"><?= __("Password") ?>:</td> <label for="id_passwd1"><?= __("Password") ?>:</label>
<td align="left"> <input type="password" size="30" maxlength="32" name="P" id="id_passwd1" value="<?= $P ?>" />
<input type="password" size="30" maxlength="32" name="P" value="<?= $P ?>" /> <?php if ($A != "UpdateAccount"): print " (".__("required").")"; endif; ?>
<?php if ($A != "UpdateAccount"): </p>
print " (".__("required").")";
endif; ?>
</td>
</tr>
<tr> <p>
<td align="left"><?= __("Re-type password") ?>:</td> <label for="id_passwd2"><?= __("Re-type password") ?>:</label>
<td align="left"> <input type="password" size="30" maxlength="32" name="C" id="id_passwd2" value="<?= $C ?>" />
<input type="password" size="30" maxlength="32" name="C" value="<?= $C ?>" /> <?php if ($A != "UpdateAccount"): print " (".__("required").")"; endif; ?>
<?php if ($A != "UpdateAccount"): </p>
print " (".__("required").")";
endif; ?>
</td>
</tr>
<tr> <p>
<td align="left"><?= __("Real Name") ?>:</td> <label for="id_realname"><?= __("Real Name") ?>:</label>
<td align="left"> <input type="text" size="30" maxlength="32" name="R" id="id_realname" value="<?= htmlspecialchars($R,ENT_QUOTES) ?>" />
<input type="text" size="30" maxlength="32" name="R" value="<?= htmlspecialchars($R,ENT_QUOTES) ?>" /> </p>
</td>
</tr>
<tr> <p>
<td align="left"><?= __("IRC Nick") ?>:</td> <label for="id_irc"><?= __("IRC Nick") ?>:</label>
<td align="left"> <input type="text" size="30" maxlength="32" name="I" id="id_irc" value="<?= htmlspecialchars($I,ENT_QUOTES) ?>" />
<input type="text" size="30" maxlength="32" name="I" value="<?= htmlspecialchars($I,ENT_QUOTES) ?>" /> </p>
</td>
</tr>
<tr> <p>
<td align="left"><?= __("PGP Key Fingerprint") ?>:</td> <label for="id_pgp"><?= __("PGP Key Fingerprint") ?>:</label>
<td align="left"> <input type="text" size="30" maxlength="50" name="K" id="id_pgp" value="<?= html_format_pgp_fingerprint($K) ?>" />
<input type="text" size="30" maxlength="50" name="K" value="<?= html_format_pgp_fingerprint($K) ?>" /> </p>
</td>
</tr>
<tr> <p>
<td align="left"><?= __("Language") ?>:</td> <label for="id_language"><?= __("Language") ?>:</label>
<td align="left"> <select name="L" id="id_language">
<select name=L>
<?php <?php
reset($SUPPORTED_LANGS); reset($SUPPORTED_LANGS);
while (list($code, $lang) = each($SUPPORTED_LANGS)) { while (list($code, $lang) = each($SUPPORTED_LANGS)) {
@ -121,23 +99,16 @@
} }
?> ?>
</select> </select>
</td> </p>
</tr>
<tr> <p>
<td colspan="2">&nbsp;</td> <label></label>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left">
<?php if ($A == "UpdateAccount"): ?> <?php if ($A == "UpdateAccount"): ?>
<input type="submit" class="button" value="<?= __("Update") ?>" /> &nbsp; <input type="submit" class="button" value="<?= __("Update") ?>" /> &nbsp;
<?php else: ?> <?php else: ?>
<input type="submit" class="button" value="<?= __("Create") ?>" /> &nbsp; <input type="submit" class="button" value="<?= __("Create") ?>" /> &nbsp;
<?php endif; ?> <?php endif; ?>
<input type="reset" class="button" value="<?= __("Reset") ?>" /> <input type="reset" class="button" value="<?= __("Reset") ?>" />
</td> </p>
</tr> </fieldset>
</table>
</form> </form>