file installer.php was added on branch MOODLE_17_STABLE on 2008-05-10 02:58:25 +0000
[moodle.git] / login / change_password_form.html
blob678cb17b2a6bcbff53094fc05893c220fa9b03fb
1 <?php
2 // only display this help message if we are being forced to change
3 if ($forcepassword) {
4 notify( get_string('forcepasswordchangenotice') );
6 ?>
7 <p><b><?php print_string("allfieldsrequired") ?></b></p>
8 <?php
9 if (empty($frm->username)) {
10 $frm->username = "";
12 if (empty($frm->password)) {
13 $frm->password = "";
15 if (empty($frm->newpassword1)) {
16 $frm->newpassword1 = "";
18 if (empty($frm->newpassword2)) {
19 $frm->newpassword2 = "";
22 <form action="change_password.php" method="post" name="form" id="form">
23 <table cellpadding="10">
25 <tr valign="top">
26 <td><?php print_string("username") ?>:</td>
27 <td>
28 <?php if (has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM, SITEID)) || empty($frm->username)) { ?>
29 <input type="text" name="username" size="25" value="<?php p($frm->username) ?>" alt="<?php print_string("username") ?>" />
30 <?php } else { ?>
31 <input type="hidden" name="username" value="<?php p($frm->username)?>" /> <?php p($frm->username)?>
32 <?php } ?>
33 <?php if (!empty($err->username)) { formerr($err->username); } ?>
34 </td>
35 </tr>
37 <?php if (!has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM, SITEID))) { ?>
38 <tr valign="top">
39 <td><?php print_string("oldpassword") ?>:</td>
40 <td><input type="password" name="password" size="25" value="<?php p($frm->password) ?>" alt="<?php print_string("password") ?>" />
41 <?php if (!empty($err->password)) { formerr($err->password); } ?>
42 </td>
43 </tr>
44 <?php } ?>
46 <tr valign="top">
47 <td><?php print_string("newpassword") ?>:</td>
48 <td><input type="password" name="newpassword1" size="25" value="<?php p($frm->newpassword1) ?>" alt="<?php print_string("newpassword") ?>" />
49 <?php if (!empty($err->newpassword1)) { formerr($err->newpassword1); } ?>
50 </td>
51 </tr>
52 <tr valign="top">
53 <td><?php print_string("newpassword") ?> (<?php print_string("again") ?>):</td>
54 <td><input type="password" name="newpassword2" size="25" value="<?php p($frm->newpassword2) ?>" alt="<?php print_string("newpassword") ?> (<?php print_string("again") ?>)" />
55 <?php if (!empty($err->newpassword2)) { formerr($err->newpassword2); } ?>
56 </td>
57 </tr>
58 <tr>
59 <td></td>
60 <td><input type="hidden" name="id" value="<?php p($frm->id)?>" />
61 <input type="submit" value="<?php print_string("changepassword") ?>" /></td>
62 </tr>
63 </table>
64 </form>