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

<?cs def:print_description(desc) ?>
  <?cs if:desc ?><?cs var:desc ?><?cs else ?><?cs var:lang.no_description ?><?cs /if ?>
<?cs /def ?>



<?cs def:print_purge_postoffice_instructions() ?>
<hr />
<?cs var:lang.super_course_search_form.purge_postoffice_instructions ?>
<?cs /def ?>


<?cs def:print_search_form() ?>
<?cs with:lang=lang.super_course_search_form ?>
<table cellspacing="0" cellpadding="2"  >
  <tr>
    <td align="right"><b><?cs var:lang.internal_course_name_instructions ?></b></td>
    <td align="center">
    <input type="text" name="search" id="search" size="12" maxlength="<?cs var:max_search ?>" title="<?cs var:lang.internal_course_name_help ?>"  /></td>
    <td align="right"><b><?cs var:lang.course_group_prompt ?></b></td>
    <td>
     <select name="subdir" size="5" id="subdir" multiple="multiple" title="<?cs var:lang.course_group_help ?>" >
      <?cs if:temp_selected ?>
      <option value="<?cs var:course_group_templates ?>" selected="selected" ><?cs var:lang.template_selection ?></option>
     <?cs else ?>
      <option value="<?cs var:course_group_templates ?>" ><?cs var:lang.template_selection ?></option>
     <?cs /if ?>
     <?cs set:count = #1 ?>
    <?cs each:grp = course_group ?>
       <?cs if:grp.is_selected ?>
         <option value="<?cs var:grp.value ?>" selected="selected" ><?cs var:grp.value ?> (<?cs call:print_description(grp.description) ?>)</option>
       <?cs else ?>
         <option value="<?cs var:grp.value ?>" ><?cs var:grp.value ?> (<?cs call:print_description(grp.description) ?>)</option>
       <?cs /if ?>
       <?cs set:count = count + #1 ?>
    <?cs /each ?>

     </select>
  </td>
 
    <td valign="middle">
      
     <input type="hidden" name="dir_count" value="<?cs var:count ?>" />
     <input type="submit" value="<?cs var:lang.submit_button ?>" title="<?cs var:lang.submit_button_help ?>" />
  </td>
 </tr>

<?cs ### Include ___ courses  ### ?>

 <tr>
  <th align="right"><?cs var:lang.include_xxx_courses_label ?></th>
  <td colspan="4">
    <input type="radio" name="type" value="0" checked="checked"  title="<?cs var:lang.standalone_and_centralized ?>" /><?cs var:lang.standalone_and_centralized ?>
    <input type="radio" name="type" value="1" title="<?cs var:lang.only_standalone ?>" /><?cs var:lang.only_standalone ?>
    <input type="radio" name="type" value="2" title="<?cs var:lang.only_centralized ?>" /><?cs var:lang.only_centralized ?>
 </td>
</tr>


<?cs ### Matches must  ___ search string  ### ?>

 <tr>
  <th align="right"><?cs var:lang.matches_xxx_search_label ?></th>
  <td colspan="4">
    <input type="radio" name="where" value="0" checked="checked" title="<?cs var:lang.contain ?>" /><?cs var:lang.contain ?>
    <input type="radio" name="where" value="1"  title="<?cs var:lang.start_with ?>" /><?cs var:lang.start_with ?>
    <input type="radio" name="where" value="2"  title="<?cs var:lang.end_with ?>" /><?cs var:lang.end_with ?>
 </td>
</tr>


</table>
<?cs /with ?>
<script type="text/javascript">document.forms[0].search.focus();</script>
<?cs /def ?>


    
<?cs call:html_header() ?>
   <head>
      <title><?cs var:lang.super_course_search_form.title[action] ?></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() ?>
</head>

<body>
<div id="container">
  <?cs call:top_container() ?>
  <?cs call:doIMenu() ?>
  <div id="content">
  <fieldset>
  <legend><?cs var:lang.super_course_search_form.title[action] ?></legend>
  <div>
  <form  method="post" action="<?cs var:action ?>"  >
  <div>
   <input type="hidden" name="id" value="<?cs var:id ?>" />
  </div>
   <?cs call:print_search_form() ?>
  </form></div>
  <?cs if:action == "super_purge_postoffice_message_form" ?>
     <?cs call:print_purge_postoffice_instructions() ?>
  <?cs /if ?>
  </fieldset>
 </div>
</div> 
</body>
</html>
<?cs call:runtime() ?>
