admin_duplicate_year_form

4.x admin.module admin_duplicate_year_form()

This form will allow the user to duplicate an entire year's worth of data to a new catalog year.

File

modules/admin/admin.module, line 488
The administrative configurations for FlightPath.

Code

function admin_duplicate_year_form() {
  $form = array();

  $form["mark" . $m++] = array(
    "value" => "<p>" . t("This form will allow you to duplicate an entire year's worth of data
                 (courses, degrees, groups) into a new year.  This is used to create a new
                 year of data, based on the previous year, for example. <b>It will completely
                 delete the 'destination' year data, if it already exists!</b>  Use carefully.
                 <br><br>
                 The new year will be placed in DRAFT, and will not be visible in FlightPath
                 until draft changes are applied.
                 <br><br>
                 <u>It would be wise</u> to back up your database before proceeding.") . "</p><hr>",
  );

  $form["source_year"] = array(
    "type" => "textfield",
    "label" => t("Source year:"),
    "size" => 10,
    "required" => TRUE,
    "description" => t("Enter the 4-digit source year you are copying FROM.  For example,
                        2007.  If you are copying from '2007-2008' then just enter
                        2007."),
  );

  $form["destination_year"] = array(
    "type" => "textfield",
    "label" => t("Destination year:"),
    "size" => 10,
    "required" => TRUE,
    "description" => t("Enter the 4-digit source year you are copying TO.  <b><u>If this year
                        all ready exists in the system, all data for this year will be DELETED.</u></b>
                        If you are copying to '2009-2010' then just enter
                        2009."),
  );

  $form["passcode"] = array(
    "type" => "password",
    "label" => t("For added security, you must enter the Apply Draft Changes password:"),
    "required" => TRUE,
    "description" => t("This is a password set up in FlightPath's settings, to provide an extra layer
                        of security for this powerful action.  Draft changes will not actually be applied,
                        this is simply used as an added layer of security."),
  );

  $form["submit"] = array(
    "type" => "submit",
    "value" => t("Submit"),
    "description" => t("This action may take several minutes to complete!  Click only ONCE!"),
    "prefix" => "<hr>",
  );



  return $form;
}