<table cellpadding="10">
<tr valign="top">
- <td><?php print_string("username") ?>:</td>
+ <td><label for="username"><?php print_string("username") ?></label>:</td>
<td>
<?php if (has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM, SITEID)) || empty($frm->username)) { ?>
- <input type="text" name="username" size="25" value="<?php p($frm->username) ?>" />
+ <input type="text" name="username" id="username" size="25" value="<?php p($frm->username) ?>" />
<?php } else { ?>
- <input type="hidden" name="username" value="<?php p($frm->username)?>" /> <?php p($frm->username)?>
+ <input type="hidden" name="username" id="username" value="<?php p($frm->username)?>" /> <?php p($frm->username)?>
<?php } ?>
<?php if (!empty($err->username)) { formerr($err->username); } ?>
</td>
<?php if (!has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM, SITEID))) { ?>
<tr valign="top">
- <td><?php print_string("oldpassword") ?>:</td>
- <td><input type="password" name="password" size="25" value="<?php p($frm->password) ?>" />
+ <td><label for="password"><?php print_string("oldpassword") ?></label>:</td>
+ <td><input type="password" name="password" id="password" size="25" value="<?php p($frm->password) ?>" />
<?php if (!empty($err->password)) { formerr($err->password); } ?>
</td>
</tr>
+<?php } else { ?>
+ <input type="hidden" name="password" id="password" value="" />
<?php } ?>
+
<tr valign="top">
- <td><?php print_string("newpassword") ?>:</td>
- <td><input type="password" name="newpassword1" size="25" value="<?php p($frm->newpassword1) ?>" />
+ <td><label for="newpassword1"><?php print_string("newpassword") ?></label>:</td>
+ <td><input type="password" name="newpassword1" id="newpassword1" size="25" value="<?php p($frm->newpassword1) ?>" />
<?php if (!empty($err->newpassword1)) { formerr($err->newpassword1); } ?>
</td>
</tr>
<tr valign="top">
- <td><?php print_string("newpassword") ?> (<?php print_string("again") ?>):</td>
- <td><input type="password" name="newpassword2" size="25" value="<?php p($frm->newpassword2) ?>" />
+ <td><label for="newpassword2"><?php print_string("newpassword") ?> (<?php print_string("again") ?>)</label>:</td>
+ <td><input type="password" name="newpassword2" id="newpassword2" size="25" value="<?php p($frm->newpassword2) ?>" />
<?php if (!empty($err->newpassword2)) { formerr($err->newpassword2); } ?>
</td>
</tr>