You are here

function ac_update_form0 in Availability Calendars 7.2

Retrieve form callback for the admin/config/content/availability-calendars/update page.

Return value

array The form

1 string reference to 'ac_update_form0'
ac_update_menu in ac_update/ac_update.module

File

ac_update/ac_update.module, line 88
Availability Calendars update: admin update code

Code

function ac_update_form0($form) {
  $language = new stdClass();
  $language->language = '';
  $text_file_link = l('UPGRADE.txt', drupal_get_path('module', 'ac_update') . '/UPGRADE.txt', array(
    'language' => $language,
  ));
  $form['intro'] = array(
    '#type' => 'markup',
    '#markup' => <<<LITERAL
<h2>Availability Calendars update</h2>
<p>
This module will update Availability Calendars to the new field based storage.
It will do so in a number of steps and checks.
But please, first make sure you have read {<span class="php-variable">$text_file_link</span>}.
</p>
LITERAL
,
  );

  // Add form submit button.
  $form['actions'] = array(
    '#type' => 'actions',
    'submit' => array(
      '#type' => 'submit',
      '#value' => t("I've read UPGRADE.txt ..."),
    ),
  );
  $form['#attached']['css'] = array(
    drupal_get_path('module', 'ac_update') . '/ac_update.css',
  );
  $form['#method'] = 'POST';
  $form['#submit'] = array(
    'ac_update_form_submit',
  );
  $form['#submit-redirect'] = 'admin/config/content/availability-calendars/update/1';
  return $form;
}