function noderelationships_admin_settings_noderef_submit in Node Relationships 6
Submit handler for the node reference extras form.
File
- ./
noderelationships.admin.inc, line 302 - Implementation of the administration pages of the module.
Code
function noderelationships_admin_settings_noderef_submit($form, &$form_state) {
$form_values = $form_state['values'];
$settings = noderelationships_settings_load($form['#noderelationships-type']);
// Move form values to settings array.
$settings['noderef'] = array(
'search_and_reference_view' => array_filter($form_values['search_and_reference_view']),
'view_in_new_window' => array_filter($form_values['view_in_new_window']),
'edit_reference' => array_filter($form_values['edit_reference']),
'create_and_reference' => array_filter($form_values['create_and_reference']),
'translate_and_reference' => isset($form_values['translate_and_reference']) ? array_filter($form_values['translate_and_reference']) : array(),
);
// Update settings and clear caches if changes exist.
if (noderelationships_settings_save($form['#noderelationships-type'], $settings)) {
noderelationships_cache_clear_all();
}
drupal_set_message(t('The settings have been saved.'));
}