function delta_layout_edit_submit in Delta 7.2
Submit handler for delta_template_edit()
This submit handler will insert or update the database with the appropriate settings provided by the form submission.
_state
Parameters
$form:
File
- ./
delta_ui.admin.inc, line 413 - Delta UI functionality
Code
function delta_layout_edit_submit($form, &$form_state) {
$values = $form_state['values'];
$item = array(
'tid' => isset($values['tid']) ? $values['tid'] : FALSE,
'name' => check_plain($values['title']),
'system_name' => check_plain($values['name']),
'theme' => check_plain($values['theme']),
'data' => array(),
);
// save record
if ($item['tid']) {
drupal_write_record('delta_theme_settings', $item, 'tid');
}
else {
drupal_write_record('delta_theme_settings', $item);
}
drupal_set_message('The custom theme settings layout <strong>' . $item['name'] . '</strong> has been saved for <em>' . $item['theme'] . '</em>...');
drupal_set_message('You may now configure the <strong>' . $item['name'] . '</strong> theme settings layout.');
drupal_goto('admin/appearance/delta/layouts/configure/' . $item['system_name']);
}