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

<?cs def:print_content() ?>
  <fieldset>
    <legend>
      <?cs var:lang.super_delete_student_form2.notice ?> <?cs var:course_title ?> <?cs var:semester ?>
    </legend>

    <div>
     <form method="post" action="super_delete_group_students" onsubmit="return delete_warn()">
    <div>
      <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
      <input type="hidden" name="course_dir" value="<?cs var:Query.course_dir ?>" />
    </div>
      <table width="100%">
      <tr><td align="center">
       <table cellspacing="0" cellpadding="4" border="1">
       <tr>
       <?cs each:this = lang.super_delete_student_form2.label ?>
         <th><?cs var:this ?></th>
       <?cs /each ?>
       </tr>
     <?cs set:num = #0 ?>
     <?cs each:student = std ?>
       <tr>
          <td><input type="checkbox" name="list" value="<?cs var:student.username ?>:<?cs var:student.realname ?>:<?cs var:student.id ?>" />
          </td>
          <td><?cs var:student.username ?></td> 
          <td><?cs var:student.realname ?></td> 
          <td><?cs var:student.id ?></td> 
       </tr>
       <?cs set:num = num + #1 ?>
    <?cs /each ?>
       <tr>
          <td colspan="4" align="center">
           <input type="hidden" name="num" value="<?cs var:num ?>" />
             <input  type="submit" value="<?cs var:lang.super_delete_student_form2.delete_button ?>" />
          </td>
      </tr>
     </table>
    </td></tr>
   </table>
   </form></div> 
   <div class="instruction">
    <?cs var:lang.super_delete_student_form2.notes ?>
   </div>
 </fieldset>
<?cs /def ?>


<?cs call:html_header() ?>
   <head>
      <title><?cs var:lang.super_delete_student_form2.page_title ?></title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <link rel="StyleSheet" href="<?cs var:image_path ?>super_template.css" type="text/css"  />
    <?cs call:addDoIMenu() ?> 
   <script type="text/javascript" >
   function validate_list()
   {
      var obj = document.forms[0].list;
      if(obj.checked)
             return true;
      else 
      {
             if(obj.length >0)
             {
                 for(i =0; i<obj.length; i++)
                 {
                    if(obj[i].checked)
                      return true;
                 }
             }
             return false;
      }
   }
   function delete_warn()
   {
       if(validate_list() == false)
       {
            window.alert('<?cs var:lang.super_delete_student_form2.must_select_one ?>');
            return false;
       }
       return window.confirm('<?cs var:lang.super_delete_student_form2.delete_msg ?>');
       
   }
  </script> 
    </head>
<body>
 <div id="container">
  <?cs call:top_container() ?>
  <?cs call:doIMenu() ?>
  <div id="content">
   <?cs call:print_content() ?>
  </div>
</div>
</body>
</html>
<?cs call:runtime() ?>
