View source
<?php
function webform_steps_w3_schema() {
$schema['webform_steps_w3_progressbar'] = array(
'description' => 'Table for storing progressbar settings for webforms.',
'fields' => array(
'nid' => array(
'description' => 'The node identifier of a webform.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'progressbar_bar' => array(
'description' => 'Boolean value indicating if the bar should be shown as part of the progress bar.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'progressbar_page_number' => array(
'description' => 'Boolean value indicating if the page number should be shown as part of the progress bar.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'progressbar_percent' => array(
'description' => 'Boolean value indicating if the percentage complete should be shown as part of the progress bar.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'progressbar_pagebreak_labels' => array(
'description' => 'Boolean value indicating if the pagebreak labels should be included as part of the progress bar.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'progressbar_label_first' => array(
'description' => 'Label for the first page of the progress bar.',
'type' => 'varchar',
'length' => 255,
),
),
'primary key' => array(
'nid',
),
);
return $schema;
}
function webform_steps_w3_disable() {
if (db_field_exists('webform', 'progressbar_bar')) {
webform_steps_w3_migrate();
}
}
function webform_steps_w3_uninstall() {
if (!db_table_exists('webform') || !db_field_exists('webform', 'progressbar_bar')) {
variable_del('webform_progressbar_style');
variable_del('webform_progressbar_label_first');
variable_del('webform_progressbar_label_confirmation');
}
}