added proper labels and minor xhtml fix

This commit is contained in:
skodak
2006-12-02 09:30:45 +00:00
parent 2c41b2d72e
commit 990f50f2c0
3 changed files with 17 additions and 14 deletions
+1
View File
@@ -114,6 +114,7 @@
print_header($strchangepassword, $strchangepassword, $navstr);
echo '<br />';
print_simple_box_start('center');
include('change_password_form.html');
print_simple_box_end();
+12 -10
View File
@@ -21,10 +21,10 @@
}
?>
<form action="change_password.php" method="post" name="form" id="form">
<table cellpadding="10">
<table cellpadding="2">
<tr valign="top">
<td><label for="username"><?php print_string("username") ?></label>:</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" id="username" size="25" value="<?php p($frm->username) ?>" />
@@ -37,24 +37,22 @@
<?php if (!has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM, SITEID))) { ?>
<tr valign="top">
<td><label for="password"><?php print_string("oldpassword") ?></label>:</td>
<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><label for="newpassword1"><?php print_string("newpassword") ?></label>:</td>
<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><label for="newpassword2"><?php print_string("newpassword") ?> (<?php print_string("again") ?>)</label>:</td>
<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>
@@ -62,7 +60,11 @@
<tr>
<td></td>
<td><input type="hidden" name="id" value="<?php p($frm->id)?>" />
<input type="submit" value="<?php print_string("changepassword") ?>" /></td>
</tr>
</table>
<input type="submit" value="<?php print_string("changepassword") ?>" />
<?php if (has_capability('moodle/user:update',get_context_instance(CONTEXT_SYSTEM, SITEID))) { ?>
<input type="hidden" name="password" id="password" value="" />
<?php } ?>
</td>
</tr>
</table>
</form>
+4 -4
View File
@@ -29,18 +29,18 @@
<table align="center" class="loginform">
<tr class="username">
<td align="right" class="c0">
<?php print_string("username") ?>:
<label for="username"><?php print_string("username") ?></label>
</td>
<td class="c1">
<input type="text" name="username" size="15" value="<?php p($frm->username) ?>" alt="<?php print_string("username") ?>" />
<input type="text" name="username" id="username" size="15" value="<?php p($frm->username) ?>" alt="<?php print_string("username") ?>" />
</td>
</tr>
<tr class="password">
<td align="right" class="c0">
<?php print_string("password") ?>:
<label for="password"><?php print_string("password") ?></label>
</td>
<td class="c1">
<input type="password" name="password" size="15" value="" alt="<?php print_string("password") ?>" />
<input type="password" name="password" id="password" size="15" value="" alt="<?php print_string("password") ?>" />
</td>
</tr>
</table>