2 // only display this help message if we are being forced to change
4 notify( get_string('forcepasswordchangenotice') );
7 <p><b><?php print_string("allfieldsrequired") ?></b></p>
9 if (empty($frm->username
)) {
12 if (empty($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">
26 <td><?php print_string("username") ?>:
</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
") ?>" />
31 <input type=
"hidden" name=
"username" value=
"<?php p($frm->username)?>" /> <?php
p($frm->username
)?>
33 <?php if (!empty($err->username
)) { formerr($err->username
); } ?>
37 <?php if (!has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM
, SITEID
))) { ?>
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
); } ?>
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
); } ?>
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
); } ?>
60 <td><input type=
"hidden" name=
"id" value=
"<?php p($frm->id)?>" />
61 <input type
="submit" value
="<?php print_string("changepassword
") ?>" /></td
>