function finder_admin_element_edit_submit in Finder 7
Same name and namespace in other branches
- 6 includes/finder.admin.inc \finder_admin_element_edit_submit()
Submit function for admin finder add/edit page.
File
- includes/
finder.admin.inc, line 825 - The finder admin screens.
Code
function finder_admin_element_edit_submit($form, &$form_state) {
$values =& $form_state['values'];
if ($form_state['clicked_button']['#id'] == 'edit-actions-delete') {
drupal_goto('admin/structure/finder/' . $values['finder_id'] . '/' . $values['finder_element_id'] . '/delete');
}
else {
$finder_element = (object) array(
'finder_element_id' => $values['finder_element_id'],
'finder_id' => $values['finder_id'],
'element' => $values['element'],
'title' => $values['title'],
'weight' => isset($values['weight']) ? $values['weight'] : NULL,
'settings' => $values['settings'],
);
finder_element_save($finder_element);
drupal_set_message(t('The finder element was saved.'));
drupal_goto('admin/structure/finder/' . $values['finder_id'] . '/edit');
}
}