function _entityconnect_admin_form_submit in Entity connect 7.2
Same name and namespace in other branches
- 7 includes/entityconnect.admin.inc \_entityconnect_admin_form_submit()
The settings form submit.
File
- includes/
entityconnect.admin.inc, line 125 - Handles all form alters and submit functions for entityconnect.
Code
function _entityconnect_admin_form_submit($form, &$form_state) {
if ($form_state['clicked_button']['#id'] == 'edit-reset') {
variable_set('entityconnect_cache_lifetime', CACHE_PERMANENT);
variable_set('entityconnect_unload_add_default', 1);
variable_set('entityconnect_unload_edit_default', 1);
variable_set('entityconnect_show_add_icon_default', 0);
variable_set('entityconnect_show_edit_icon_default', 0);
drupal_set_message(t('The settings were reset to default.'));
}
else {
variable_set('entityconnect_cache_lifetime', $form_state['values']['cache_lifetime']);
variable_set('entityconnect_unload_add_default', $form_state['values']['button_add']);
variable_set('entityconnect_unload_edit_default', $form_state['values']['button_edit']);
variable_set('entityconnect_show_add_icon_default', $form_state['values']['icon_add']);
variable_set('entityconnect_show_edit_icon_default', $form_state['values']['icon_edit']);
drupal_set_message(t('The settings were saved.'));
}
}