admin_display_degrees_popup_add_group

4.x admin.degrees.inc admin_display_degrees_popup_add_group()

File

modules/admin/admin.degrees.inc, line 5

Code

function admin_display_degrees_popup_add_group() {
  $semester_num = trim($_GET["semester_num"]);
  $de_catalog_year = admin_get_de_catalog_year();

  fp_add_js(fp_get_module_path("admin") . "/js/admin.js");

  $rtn = "";

  $rtn .= "<b>" . t("Add an elective group to semester: @semester_num in @de_catalog_year", array("@semester_num" => $semester_num, "@de_catalog_year" => $de_catalog_year)) . "</b><br>
        <span class='tenpt'>" . t("Use keyboard shortcut CTRL-F to find groups quickly.") . "</span>
        <br><br>
        First, select a group (from $de_catalog_year):
        <div class='tenpt' 
          style='height:200px; overflow-y: scroll; border: 1px solid black;
          margin:5px;'>
        <table border='0' cellspacing='5'>";

  $res = db_query("SELECT * FROM draft_groups
              WHERE catalog_year = '?'
              AND delete_flag = '0'
              ORDER BY title ", $de_catalog_year);
  while ($cur = db_fetch_array($res)) {
    extract($cur, 3, "db");
    $rtn .= "<tr><td valign='middle'>
                <input type='radio' name='rgroups' value='$db_group_id'></td>
          <td valign='top' class='tenpt'>
          $db_title<br><i>$db_group_name</i>
          </td>
        </tr>
          
        ";
  }


  $rtn .= "</table></div>
      " . t("Next, select properties for this group:") . "
      <a href='javascript: popupAlertHelp(\"group_properties\");'>?</a>
      <div class='tenpt' style='padding-top: 5px;'>
      Hrs: <input type='text' name='hours' id='hours' size='2'>
      Min Grade: <select name='min_grade' id='min_grade'>
              <option value=''>--</option>
              <option value='C'>C</option>
              <option value='B'>B</option>
              <option value='A'>A</option>
              
            </select>
      Type: <select name='type' id='type'>
          <option value='m'>m - Major</option>
          <option value='c'>c - Core</option>
          <option value='s'>s - Supporting</option>
          <option value='e'>e - Elective</option>
          </select>
        &nbsp; &nbsp;
        " . fp_render_button("Add group &raquo;", "adminPopupAddGroup(\"$semester_num\");") . "
      </div>";


  return $rtn;
}