function better_field_descriptions_fields_submit in Better Field Descriptions 7
Implements hook_submit().
1 string reference to 'better_field_descriptions_fields_submit'
- better_field_descriptions_fields_form in ./
better_field_descriptions.admin.inc - Implements hook_form().
File
- ./
better_field_descriptions.admin.inc, line 321 - Functionality and helper functions for Better field descriptions.
Code
function better_field_descriptions_fields_submit($form, &$form_state) {
$bfd = variable_get('better_field_descriptions', array());
$template = $form_state['values']['bundles']['template'];
$template_uri = $form_state['complete form']['#templates'][$template . '.tpl']->uri;
$form_state['values']['bundles']['template_uri'] = $template_uri;
// If the template is changed, do a theme registry rebuild.
if (isset($bfd['template']) && $template != $bfd['template']) {
drupal_theme_rebuild();
}
// Setting variables.
variable_del('better_field_descriptions');
variable_set('better_field_descriptions', $form_state['values']['bundles']);
}