Format now uses defaultquestion(). Bug #4752
[moodle-linuxchix.git] / login / change_password_form.html
blob32d5648a848da973244ef263687d3cd81e58cfe2
2 <?php
3 // only display this help message if we are being forced to change
4 if ($forcepassword) {
5 notify( get_string('forcepasswordchangenotice') );
7 ?>
8 <p><b><?php print_string("allfieldsrequired") ?></b></p>
9 <?php
10 if (empty($frm->username)) {
11 $frm->username = "";
13 if (empty($frm->password)) {
14 $frm->password = "";
16 if (empty($frm->newpassword1)) {
17 $frm->newpassword1 = "";
19 if (empty($frm->newpassword2)) {
20 $frm->newpassword2 = "";
23 <form action="change_password.php" method="post" name="form" id="form">
24 <table cellpadding="10">
26 <tr valign="top">
27 <td><?php print_string("username") ?>:</td>
28 <td>
29 <?php if (isadmin()) { ?>
30 <input type="text" name="username" size="25" value="<?php p($frm->username) ?>" alt="<?php print_string("username") ?>" />
31 <?php } else { ?>
32 <input type="hidden" name="username" value="<?php p($frm->username)?>" /> <?php p($frm->username)?>
33 <?php } ?>
34 <?php if (!empty($err->username)) { formerr($err->username); } ?>
35 </td>
36 </tr>
38 <?php if (!isadmin()) { ?>
39 <tr valign="top">
40 <td><?php print_string("oldpassword") ?>:</td>
41 <td><input type="password" name="password" size="25" value="<?php p($frm->password) ?>" alt="<?php print_string("password") ?>" />
42 <?php if (!empty($err->password)) { formerr($err->password); } ?>
43 </td>
44 </tr>
45 <?php } ?>
47 <tr valign="top">
48 <td><?php print_string("newpassword") ?>:</td>
49 <td><input type="password" name="newpassword1" size="25" value="<?php p($frm->newpassword1) ?>" alt="<?php print_string("newpassword") ?>" />
50 <?php if (!empty($err->newpassword1)) { formerr($err->newpassword1); } ?>
51 </td>
52 </tr>
53 <tr valign="top">
54 <td><?php print_string("newpassword") ?> (<?php print_string("again") ?>):</td>
55 <td><input type="password" name="newpassword2" size="25" value="<?php p($frm->newpassword2) ?>" alt="<?php print_string("newpassword") ?> (<?php print_string("again") ?>)" />
56 <?php if (!empty($err->newpassword2)) { formerr($err->newpassword2); } ?>
57 </td>
58 </tr>
59 <tr>
60 <td></td>
61 <td><input type="hidden" name="id" value="<?php p($frm->id)?>" />
62 <input type="submit" value="<?php print_string("changepassword") ?>" /></td>
63 </tr>
64 </table>
65 </form>