function add_to_head_edit_profile_submit in Add To Head 6
Same name and namespace in other branches
- 7 add_to_head.admin.inc \add_to_head_edit_profile_submit()
Submit handler for the add/edit form
1 string reference to 'add_to_head_edit_profile_submit'
- add_to_head_edit_profile in ./
add_to_head.admin.inc - This function provides the edit form. The Add Profile form also uses this.
File
- ./
add_to_head.admin.inc, line 140 - This file contains all the admin-related callbacks
Code
function add_to_head_edit_profile_submit($form, &$form_state) {
$settings = variable_get('add_to_head_profiles', array());
if ($form_state['values']['name'] != $form_state['values']['name_orig']) {
unset($settings[$form_state['values']['name_orig']]);
}
$settings[$form_state['values']['name']] = array(
'name' => $form_state['values']['name'],
'code' => trim($form_state['values']['code']),
'paths' => trim($form_state['values']['paths']),
'scope' => $form_state['values']['scope'],
'path_visibility' => $form_state['values']['path_visibility'],
);
variable_set('add_to_head_profiles', $settings);
$form_state['redirect'] = 'admin/settings/add-to-head';
}