Update wiki links to the new short URL
[aur.git] / web / template / account_edit_form.php
blob4ce6b875c60c633423f3965e2bc5890c07eb4056
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 <?= __('Click %shere%s to list the comments made by this account.', '<a href="' . get_user_uri($N) . 'comments/' . '">', '</a>') ?>
6 </p>
8 <form id="edit-profile-form" action="<?= get_user_uri($N) . 'update/'; ?>" method="post">
9 <?php else: ?>
10 <form id="edit-profile-form" action="<?= get_uri('/register/'); ?>" method="post">
11 <?php endif; ?>
12 <fieldset>
13 <input type="hidden" name="Action" value="<?= $A ?>" />
14 <?php if ($UID): ?>
15 <input type="hidden" name="ID" value="<?= $UID ?>" />
16 <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
17 <?php endif; ?>
18 </fieldset>
19 <fieldset>
20 <p>
21 <label for="id_username"><?= __("Username") ?>:</label>
22 <input type="text" size="30" maxlength="<?= config_get_int('options', 'username_max_len'); ?>" name="U" id="id_username" value="<?= htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?= __("required") ?>)
23 </p>
24 <p>
25 <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>
26 </p>
27 <?php
28 # Only TUs or Devs can promote/demote/suspend a user
29 if (has_credential(CRED_ACCOUNT_CHANGE_TYPE)):
31 <p>
32 <label for="id_type"><?= __("Account Type") ?>:</label>
33 <select name="T" id="id_type">
34 <?php if ($T == 1): ?>
35 <option value="1" selected="selected"><?= __("Normal user") ?></option>
36 <?php else: ?>
37 <option value="1"><?= __("Normal user") ?></option>
38 <?php endif; ?>
39 <?php if ($T == 2): ?>
40 <option value="2" selected="selected"><?= __("Trusted user") ?></option>
41 <?php else: ?>
42 <option value="2"><?= __("Trusted user") ?></option>
43 <?php endif; ?>
44 <?php if (has_credential(CRED_ACCOUNT_EDIT_DEV)): ?>
45 <option value="3"
46 <?php $T == 3 ? print " selected=\"selected\">" : print ">";
47 print __("Developer")."\n"; ?>
48 </option>
49 <option value="4"
50 <?php $T == 4 ? print " selected=\"selected\">" : print ">";
51 print __("Trusted User & Developer")."\n"; ?>
52 </option>
53 <?php endif; ?>
55 </select>
56 </p>
58 <p>
59 <label for="id_suspended"><?= __("Account Suspended") ?>:</label>
60 <?php if ($S): ?>
61 <input type="checkbox" name="S" id="id_suspended" checked="checked" />
62 <?php else: ?>
63 <input type="checkbox" name="S" id="id_suspended" />
64 <?php endif; ?>
65 </p>
66 <?php endif; ?>
68 <?php if ($A == "UpdateAccount"): ?>
69 <p>
70 <label for="id_inactive"><?= __("Inactive") ?>:</label>
71 <input type="checkbox" name="J" id="id_inactive" <?= $J ? 'checked="checked"' : '' ?> />
72 </p>
73 <?php endif; ?>
75 <p>
76 <label for="id_email"><?= __("Email Address") ?>:</label>
77 <input type="text" size="30" maxlength="254" name="E" id="id_email" value="<?= htmlspecialchars($E,ENT_QUOTES) ?>" /> (<?= __("required") ?>)
78 </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>
87 <p>
88 <em><?= __("If you do not hide your email address, it is visible to all registered AUR users. If you hide your email address, it is visible to members of the Arch Linux staff only.") ?></em>
89 </p>
91 <p>
92 <label for="id_backup_email"><?= __("Backup Email Address") ?>:</label>
93 <input type="text" size="30" maxlength="254" name="BE" id="id_backup_email" value="<?= htmlspecialchars($BE, ENT_QUOTES) ?>" />
94 </p>
95 <p>
96 <em>
97 <?= __("Optionally provide a secondary email address that can be used to restore your account in case you lose access to your primary email address.") ?>
98 <?= __("Password reset links are always sent to both your primary and your backup email address.") ?>
99 <?= __("Your backup email address is always only visible to members of the Arch Linux staff, independent of the %s setting.", "<em>" . __("Hide Email Address") . "</em>") ?>
100 </em>
101 </p>
104 <label for="id_realname"><?= __("Real Name") ?>:</label>
105 <input type="text" size="30" maxlength="32" name="R" id="id_realname" value="<?= htmlspecialchars($R,ENT_QUOTES) ?>" />
106 </p>
109 <label for="id_homepage"><?= __("Homepage") ?>:</label>
110 <input type="text" size="30" name="HP" id="id_homepage" value="<?= htmlspecialchars($HP,ENT_QUOTES) ?>" />
111 </p>
114 <label for="id_irc"><?= __("IRC Nick") ?>:</label>
115 <input type="text" size="30" maxlength="32" name="I" id="id_irc" value="<?= htmlspecialchars($I,ENT_QUOTES) ?>" />
116 </p>
119 <label for="id_pgp"><?= __("PGP Key Fingerprint") ?>:</label>
120 <input type="text" size="30" maxlength="50" name="K" id="id_pgp" value="<?= html_format_pgp_fingerprint($K) ?>" />
121 </p>
124 <label for="id_language"><?= __("Language") ?>:</label>
125 <select name="L" id="id_language">
126 <?php
127 reset($SUPPORTED_LANGS);
128 foreach ($SUPPORTED_LANGS as $code => $lang) {
129 if ($L == $code) {
130 print "<option value=\"".$code."\" selected=\"selected\"> ".$lang."</option>"."\n";
131 } else {
132 print "<option value=\"".$code."\"> ".$lang."</option>"."\n";
136 </select>
137 </p>
139 <label for="id_timezone"><?= __("Timezone") ?></label>
140 <select name="TZ" id="id_timezone">
141 <?php
142 $timezones = generate_timezone_list();
143 foreach ($timezones as $key => $val) {
144 if ($TZ == $key) {
145 print "<option value=\"".$key."\" selected=\"selected\"> ".$val."</option>\n";
146 } else {
147 print "<option value=\"".$key."\"> ".$val."</option>\n";
151 </select>
152 </p>
153 </fieldset>
155 <?php if ($A == "UpdateAccount"): ?>
156 <fieldset>
157 <legend><?= __("If you want to change the password, enter a new password and confirm the new password by entering it again.") ?></legend>
159 <label for="id_passwd1"><?= __("Password") ?>:</label>
160 <input type="password" size="30" name="P" id="id_passwd1" value="<?= htmlspecialchars($P, ENT_QUOTES) ?>" />
161 </p>
164 <label for="id_passwd2"><?= __("Re-type password") ?>:</label>
165 <input type="password" size="30" name="C" id="id_passwd2" value="<?= htmlspecialchars($C, ENT_QUOTES) ?>" />
166 </p>
167 </fieldset>
168 <?php endif; ?>
170 <fieldset>
171 <legend><?= __("The following information is only required if you want to submit packages to the Arch User Repository.") ?></legend>
173 <label for="id_ssh"><?= __("SSH Public Key") ?>:</label>
174 <textarea name="PK" id="id_ssh" rows="5" cols="30"><?= htmlspecialchars($PK) ?></textarea>
175 </p>
176 </fieldset>
178 <fieldset>
179 <legend><?= __("Notification settings") ?>:</legend>
181 <label for="id_commentnotify"><?= __("Notify of new comments") ?>:</label>
182 <input type="checkbox" name="CN" id="id_commentnotify" <?= $CN ? 'checked="checked"' : '' ?> />
183 </p>
185 <label for="id_updatenotify"><?= __("Notify of package updates") ?>:</label>
186 <input type="checkbox" name="UN" id="id_updatenotify" <?= $UN ? 'checked="checked"' : '' ?> />
187 </p>
189 <label for="id_ownershipnotify"><?= __("Notify of ownership changes") ?>:</label>
190 <input type="checkbox" name="ON" id="id_ownershipnotify" <?= $ON ? 'checked="checked"' : '' ?> />
191 </p>
192 </fieldset>
194 <fieldset>
195 <?php if ($A == "UpdateAccount"): ?>
196 <legend><?= __("To confirm the profile changes, please enter your current password:") ?></legend>
198 <label for="id_passwd_current"><?= __("Your current password") ?>:</label>
199 <input type="password" size="30" name="passwd" id="id_passwd_current" value="" />
200 </p>
201 <?php else: ?>
202 <legend><?= __("To protect the AUR against automated account creation, we kindly ask you to provide the output of the following command:") ?> <code><?= htmlspecialchars($captcha_challenge) ?></code></legend>
204 <label for="id_captcha"><?= __("Answer") ?>:</label>
205 <input type="text" size="30" maxlength="6" name="captcha" id="id_captcha" value="<?= htmlspecialchars($captcha, ENT_QUOTES) ?>" /> (<?= __("required") ?>)
206 <input type="hidden" name="captcha_salt" value="<?= htmlspecialchars($captcha_salt) ?>" />
207 </p>
208 <?php endif; ?>
209 </fieldset>
211 <fieldset>
213 <label></label>
214 <?php if ($A == "UpdateAccount"): ?>
215 <input type="submit" class="button" value="<?= __("Update") ?>" /> &nbsp;
216 <?php else: ?>
217 <input type="submit" class="button" value="<?= __("Create") ?>" /> &nbsp;
218 <?php endif; ?>
219 <input type="reset" class="button" value="<?= __("Reset") ?>" />
220 </p>
221 </fieldset>
222 </form>