Erase login IP addresses after seven days
[aur.git] / web / template / account_edit_form.php
blob833e74a89a4af791c44b19284a1090fbcc37b0cf
1 <?php if ($A == "UpdateAccount"): ?>
2 <p>
3 <?= __('Click %shere%s if you want to permanently delete this account.', '<a href="' . get_user_uri($N) . 'delete/' . '">', '</a>') ?>
4 <?= __('Click %shere%s for user details.', '<a href="' . get_user_uri($N) . '">', '</a>') ?>
5 </p>
7 <form id="edit-profile-form" action="<?= get_user_uri($N) . 'update/'; ?>" method="post">
8 <?php else: ?>
9 <form id="edit-profile-form" action="<?= get_uri('/register/'); ?>" method="post">
10 <?php endif; ?>
11 <fieldset>
12 <input type="hidden" name="Action" value="<?= $A ?>" />
13 <?php if ($UID): ?>
14 <input type="hidden" name="ID" value="<?= $UID ?>" />
15 <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
16 <?php endif; ?>
17 </fieldset>
18 <fieldset>
19 <p>
20 <label for="id_username"><?= __("Username") ?>:</label>
21 <input type="text" size="30" maxlength="<?= config_get_int('options', 'username_max_len'); ?>" name="U" id="id_username" value="<?= htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?= __("required") ?>)
22 </p>
23 <p>
24 <em><?= __("Your user name is the name you will use to login. It is visible to the general public, even if your account is inactive.") ?></em>
25 </p>
26 <?php
27 # Only TUs or Devs can promote/demote/suspend a user
28 if (has_credential(CRED_ACCOUNT_CHANGE_TYPE)):
30 <p>
31 <label for="id_type"><?= __("Account Type") ?>:</label>
32 <select name="T" id="id_type">
33 <?php if ($T == 1): ?>
34 <option value="1" selected="selected"><?= __("Normal user") ?></option>
35 <?php else: ?>
36 <option value="1"><?= __("Normal user") ?></option>
37 <?php endif; ?>
38 <?php if ($T == 2): ?>
39 <option value="2" selected="selected"><?= __("Trusted user") ?></option>
40 <?php else: ?>
41 <option value="2"><?= __("Trusted user") ?></option>
42 <?php endif; ?>
43 <?php if (has_credential(CRED_ACCOUNT_EDIT_DEV)): ?>
44 <option value="3"
45 <?php $T == 3 ? print " selected=\"selected\">" : print ">";
46 print __("Developer")."\n"; ?>
47 </option>
48 <option value="4"
49 <?php $T == 4 ? print " selected=\"selected\">" : print ">";
50 print __("Trusted User & Developer")."\n"; ?>
51 </option>
52 <?php endif; ?>
54 </select>
55 </p>
57 <p>
58 <label for="id_suspended"><?= __("Account Suspended") ?>:</label>
59 <?php if ($S): ?>
60 <input type="checkbox" name="S" id="id_suspended" checked="checked" />
61 <?php else: ?>
62 <input type="checkbox" name="S" id="id_suspended" />
63 <?php endif; ?>
64 </p>
65 <?php endif; ?>
67 <?php if ($A == "UpdateAccount"): ?>
68 <p>
69 <label for="id_inactive"><?= __("Inactive") ?>:</label>
70 <input type="checkbox" name="J" id="id_inactive" <?= $J ? 'checked="checked"' : '' ?> />
71 </p>
72 <?php endif; ?>
74 <p>
75 <label for="id_email"><?= __("Email Address") ?>:</label>
76 <input type="text" size="30" maxlength="254" name="E" id="id_email" value="<?= htmlspecialchars($E,ENT_QUOTES) ?>" /> (<?= __("required") ?>)
77 </p>
79 <p>
80 <em><?= __("Please ensure you correctly entered your email address, otherwise you will be locked out.") ?></em>
81 </p>
83 <p>
84 <label for="id_hide"><?= __("Hide Email Address") ?>:</label>
85 <input type="checkbox" name="H" id="id_hide" <?= $H ? 'checked="checked"' : '' ?> />
86 </p>
88 <?php if ($A == "UpdateAccount"): ?>
89 <p>
90 <label for="id_passwd1"><?= __("Password") ?>:</label>
91 <input type="password" size="30" name="P" id="id_passwd1" value="<?= $P ?>" />
92 </p>
94 <p>
95 <label for="id_passwd2"><?= __("Re-type password") ?>:</label>
96 <input type="password" size="30" name="C" id="id_passwd2" value="<?= $C ?>" />
97 </p>
98 <?php endif; ?>
101 <label for="id_realname"><?= __("Real Name") ?>:</label>
102 <input type="text" size="30" maxlength="32" name="R" id="id_realname" value="<?= htmlspecialchars($R,ENT_QUOTES) ?>" />
103 </p>
106 <label for="id_homepage"><?= __("Homepage") ?>:</label>
107 <input type="text" size="30" name="HP" id="id_homepage" value="<?= htmlspecialchars($HP,ENT_QUOTES) ?>" />
108 </p>
111 <label for="id_irc"><?= __("IRC Nick") ?>:</label>
112 <input type="text" size="30" maxlength="32" name="I" id="id_irc" value="<?= htmlspecialchars($I,ENT_QUOTES) ?>" />
113 </p>
116 <label for="id_pgp"><?= __("PGP Key Fingerprint") ?>:</label>
117 <input type="text" size="30" maxlength="50" name="K" id="id_pgp" value="<?= html_format_pgp_fingerprint($K) ?>" />
118 </p>
121 <label for="id_language"><?= __("Language") ?>:</label>
122 <select name="L" id="id_language">
123 <?php
124 reset($SUPPORTED_LANGS);
125 while (list($code, $lang) = each($SUPPORTED_LANGS)) {
126 if ($L == $code) {
127 print "<option value=\"".$code."\" selected=\"selected\"> ".$lang."</option>"."\n";
128 } else {
129 print "<option value=\"".$code."\"> ".$lang."</option>"."\n";
133 </select>
134 </p>
136 <label for="id_timezone"><?= __("Timezone") ?></label>
137 <select name="TZ" id="id_timezone">
138 <?php
139 $timezones = generate_timezone_list();
140 while (list($key, $val) = each($timezones)) {
141 if ($TZ == $key) {
142 print "<option value=\"".$key."\" selected=\"selected\"> ".$val."</option>\n";
143 } else {
144 print "<option value=\"".$key."\"> ".$val."</option>\n";
148 </select>
149 </p>
150 </fieldset>
152 <fieldset>
153 <legend><?= __("The following information is only required if you want to submit packages to the Arch User Repository.") ?></legend>
155 <label for="id_ssh"><?= __("SSH Public Key") ?>:</label>
156 <textarea name="PK" id="id_ssh" rows="5" cols="30"><?= htmlspecialchars($PK) ?></textarea>
157 </p>
158 </fieldset>
160 <fieldset>
161 <legend><?= __("Notification settings") ?>:</legend>
163 <label for="id_commentnotify"><?= __("Notify of new comments") ?>:</label>
164 <input type="checkbox" name="CN" id="id_commentnotify" <?= $CN ? 'checked="checked"' : '' ?> />
165 </p>
167 <label for="id_updatenotify"><?= __("Notify of package updates") ?>:</label>
168 <input type="checkbox" name="UN" id="id_updatenotify" <?= $UN ? 'checked="checked"' : '' ?> />
169 </p>
171 <label for="id_ownershipnotify"><?= __("Notify of ownership changes") ?>:</label>
172 <input type="checkbox" name="ON" id="id_ownershipnotify" <?= $ON ? 'checked="checked"' : '' ?> />
173 </p>
174 </fieldset>
176 <fieldset>
178 <label></label>
179 <?php if ($A == "UpdateAccount"): ?>
180 <input type="submit" class="button" value="<?= __("Update") ?>" /> &nbsp;
181 <?php else: ?>
182 <input type="submit" class="button" value="<?= __("Create") ?>" /> &nbsp;
183 <?php endif; ?>
184 <input type="reset" class="button" value="<?= __("Reset") ?>" />
185 </p>
186 </fieldset>
187 </form>