function ac_update_form1 in Availability Calendars 7.2
Retrieve form callback for the admin/config/content/availability-calendars/update1 page.
Return value
array The form
1 string reference to 'ac_update_form1'
- ac_update_menu in ac_update/
ac_update.module
File
- ac_update/
ac_update.module, line 125 - Availability Calendars update: admin update code
Code
function ac_update_form1($form) {
$state = ac_update_current_step_state();
$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 <strong>backup your current database</strong>.
</p>
<ol class="acu_list">
<li class="{<span class="php-variable">$state</span>}">Check prerequisites.</li>
<li class="acu_inactive">Clean split day states.</li>
<li class="acu_inactive">Copy data.</li>
</ol>
LITERAL
,
);
$form['next'] = array(
'#type' => 'markup',
'#markup' => <<<LITERAL
<h2>Next step: Check prerequisites</h2>
<p>
The schema version of the current module will be checked, as well as some other
checks that look for incompatibilities between your current settings and the new
version. If settings are found that are not currently supported, you will get a
warning, but you may continue.
</p>
LITERAL
,
);
// Add form submit button.
$form['actions'] = array(
'#type' => 'actions',
'submit' => array(
'#type' => 'submit',
'#value' => t('Execute next step ...'),
),
);
$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-callback'] = 'ac_update_check_prerequisites';
$form['#submit-redirect'] = 'admin/config/content/availability-calendars/update/2';
return $form;
}