function admin_add_degree_form

6.x admin.degrees.inc admin_add_degree_form()
4.x admin.degrees.inc admin_add_degree_form()
5.x admin.degrees.inc admin_add_degree_form()

This form lets the user add a degree to the database.

File

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

Code

function admin_add_degree_form() {
  $de_catalog_year = admin_get_de_catalog_year();

  fp_set_title(t("Add Degree for") . " " . $de_catalog_year);

  $form = array();

  $form ["markup" . $m++] = array(
    "type" => "markup",
    "value" => t("You may use this screen to add a new degree,
                  by entering a new major, concentration, or track (degree option)"),
  );


  $form ["de_catalog_year"] = array(
    "type" => "hidden",
    "value" => $de_catalog_year,
  );

  $form ["new_major"] = array(
    "type" => "radios",
    "label" => t("Please select: are you entering a new major code [and concentration] 
                  or an existing major code [and concentration] (so you can add a new track)?"),
    "options" => array(
      "new" => t("Entering a <b>new</b> major code [and concentration]"),
      "existing" => t("Entering an <b>existing</b> major code [and concentration] (only adding a new track)"),
    ),
    "required" => TRUE,
  );


  $form ["major_code"] = array(
    "type" => "textfield",
    "size" => 15,
    "label" => t("Major|Conc code:"),
    "description" => t("To enter a concentration code, use MAJOR|CONC. 
                      The | character is call the pipe, and it should under the backspace key. 
                      If adding a new concentration to an existing major, you still put this in as a 
                      NEW major code. Do not have any spaces in this box. The concentration code 
                      is optional. If the major does not have a concentration, 
                      then simply enter the major code by itself."),
    "required" => TRUE,
  );


  $form ["new_track"] = array(
    "type" => "radios",
    "label" => t("Please select: are you entering a new track code?"),
    "options" => array(
      "new" => t("Entering a <b>new</b> track code"),
      "none" => t("None - Not adding a track.  Leave blank"),
    ),
    "required" => TRUE,
  );


  $form ["track_code"] = array(
    "type" => "textfield",
    "size" => 15,
    "label" => t("Track code:"),
    "description" => t("Leave blank if you selected None above."),
  );



  // Our submit button.
  $form ["submit"] = array(
    "type" => "submit",
    "value" => "Submit",
    "prefix" => "<hr>",
  );


  return $form;

}