You are here

function sms_admin_gateway_form_submit in SMS Framework 6

Same name and namespace in other branches
  1. 5 sms.module \sms_admin_gateway_form_submit()
  2. 6.2 sms.admin.inc \sms_admin_gateway_form_submit()
  3. 7 sms.admin.inc \sms_admin_gateway_form_submit()

File

./sms.admin.inc, line 93
SMS Framework core module: Admin settings form functions

Code

function sms_admin_gateway_form_submit($form, &$form_state) {
  $gateway = $form_state['values']['gateway'];

  // Remove uneccesary values
  unset($form_state['values']['op'], $form_state['values']['submit'], $form_state['values']['gateway'], $form_state['values']['form_token'], $form_state['values']['form_id']);
  variable_set('sms_' . $gateway['identifier'] . '_settings', $form_state['values']);
  drupal_set_message(t('The gateway settings have been saved.'));
  $form_state['redirect'] = 'admin/smsframework/gateways';
}