<?cs include:"util.cs" ?>

<?cs def:print_row(label, value) ?>
 <tr>
    <td class="regheading"><?cs var:label.msg ?></td>
    <td><?cs var:value ?></td>
 </tr>
<?cs /def ?>

<?cs def:print_passwd(name, label , max) ?>
  <tr>
    <td class="regheading"><?cs var:label.msg ?></td>
    <td><input type="password" name="<?cs var:name ?>" id="<?cs var:name ?>" title="<?cs var:label.help ?>" size="10" maxlength="<?cs var:max ?>" /></td>
  </tr> 
<?cs /def ?>

<?cs def:print_form(data) ?>
 <table width="100%">
 <tr><td align="center">
  <div><form method="post" action="passwd">
   <div>
     <input type="hidden" name="crs" value="<?cs var:Query.crs ?>" />
     <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
   </div>
  <table cellspacing="0" cellpadding="4" border="1">
   <?cs call:print_row(data.form[0], username) ?>
   <?cs call:print_row(data.form[1], realname) ?>
   <?cs call:print_passwd("current", data.form[2] , max_pass) ?>
   <?cs call:print_passwd("new", data.form[3] , max_pass) ?>
   <?cs call:print_passwd("verify", data.form[4] , max_pass) ?>
   <tr><td colspan="2" align="center">
     <input type="submit" value="<?cs var:data.form[5].msg ?>" title="<?cs var:data.form[5].help ?>" />
     </td>
   </tr>
  </table>
  </form></div>
 </td></tr>
</table>
<?cs /def ?>

<?cs call:html_heading() ?>
   <head>
      <title><?cs var:lang.passwd_form.title ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>common.css" type="text/css"  />
   <link rel="StyleSheet" href="<?cs var:image_path ?>manhattan.css" type="text/css"  />
  </head>
<?cs call:define_onload_body("current") ?>
<?cs if:Query.crs ?>
<?cs call:course_info() ?>
<?cs /if ?>
<div>
    <a href="javascript:history.back()" title="<?cs var:lang.passwd_form.goback ?>"><img src="<?cs var:image_path ?>/back_arrow.gif" width="50" height="34" alt="<?cs var:lang.passwd_form.goback ?>" /></a>
</div> 

<div class="center_msg">
   <span class="alert_color"><?cs var:lang.passwd_form.title ?></span>
</div>
<?cs if:!Query.crs ?>
<div class="center_msg">
   <span class="common_course"><?cs var:current_time ?></span>
</div>
<?cs /if ?>

<?cs if:depass_warn ?>
  <div class="center_msg"><span class="error"><?cs var:lang.passwd_form.default_warning ?></span></div>
<?cs /if ?>
<?cs each:notes = lang.passwd_form.note ?>
  <div class="menu_entry">
   <span class="regheading"><?cs var:notes.msg ?></span>
  </div>
  <div class="menu_entry_desc">
  <ul>
  <?cs each:this = notes.desc ?>
   <li><?cs var:this ?></li>
  <?cs /each ?>
 </ul>
 </div>
<?cs /each ?>
 
<?cs call:print_form(lang.passwd_form) ?>
</body>
</html>
<?cs call:runtime() ?>
