You are here

function better_messages_admin_submit in Better Messages 7

Same name and namespace in other branches
  1. 6 better_messages.inc \better_messages_admin_submit()
1 string reference to 'better_messages_admin_submit'
better_messages_admin in ./better_messages.inc

File

./better_messages.inc, line 228

Code

function better_messages_admin_submit($form, &$form_state) {
  $settings = array(
    'position' => $form_state['values']['pos'],
    'vertical' => $form_state['values']['vertical'],
    'horizontal' => $form_state['values']['horizontal'],
    'fixed' => $form_state['values']['fixed'],
    'width' => $form_state['values']['width'],
    'autoclose' => $form_state['values']['autoclose'],
    'opendelay' => $form_state['values']['open_delay'],
    'disable_autoclose' => $form_state['values']['disable_autoclose'],
    'show_countdown' => $form_state['values']['show_countdown'],
    'hover_autoclose' => $form_state['values']['hover_autoclose'],
    'popin' => array(
      'effect' => $form_state['values']['popin_effect'],
      'duration' => $form_state['values']['popin_duration'],
    ),
    'popout' => array(
      'effect' => $form_state['values']['popout_effect'],
      'duration' => $form_state['values']['popout_duration'],
    ),
    'jquery_ui' => array(
      'draggable' => $form_state['values']['draggable'],
      'resizable' => $form_state['values']['resizable'],
    ),
    'extra' => array(
      'pages' => $form_state['values']['pages'],
      'visibility' => $form_state['values']['visibility'],
      'admin' => $form_state['values']['admin'],
      'themes' => $form_state['values']['themes'],
    ),
  );
  variable_set('better_messages', $settings);
  drupal_set_message(t('The configuration options have been saved.'));
  cache_clear_all();
}