function quicktabs_form_submit in Quick Tabs 7.2
Same name and namespace in other branches
- 5 quicktabs.module \quicktabs_form_submit()
- 6.3 includes/admin.inc \quicktabs_form_submit()
- 6 quicktabs.module \quicktabs_form_submit()
- 6.2 includes/admin.inc \quicktabs_form_submit()
- 7.3 quicktabs.admin.inc \quicktabs_form_submit()
Submit handler for quicktabs admin page.
File
- includes/
admin.inc, line 560 - Provides the Quick Tabs' administrative interface.
Code
function quicktabs_form_submit($form, &$form_state) {
// We don't want it to submit when we're just adding or removing tabs.
$quicktab = _quicktabs_convert_form_to_quicktab($form_state);
$exists = quicktabs_load($quicktab->machine_name);
if ($exists && empty($exists->in_code_only)) {
$ret = drupal_write_record('quicktabs', $quicktab, 'machine_name');
if ($ret == SAVED_UPDATED) {
drupal_set_message(t('The quicktab block has been updated.'));
}
}
else {
$ret = drupal_write_record('quicktabs', $quicktab);
if ($ret == SAVED_NEW) {
drupal_set_message(t('The quicktab block has been created.'));
}
}
drupal_goto('admin/structure/quicktabs');
}