You are here

function sms_admin_gateway_form_submit in SMS Framework 5

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

Save the gateway settings.

File

./sms.module, line 208
The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.

Code

function sms_admin_gateway_form_submit($form_id, $form_values) {
  $gateway = $form_values['gateway'];

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