You are here

function sms_admin_default_form in SMS Framework 6.2

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

Select default sms gateway form.

1 string reference to 'sms_admin_default_form'
sms_menu in ./sms.module
Implements hook_menu().

File

./sms.admin.inc, line 11
The admin sms functions.

Code

function sms_admin_default_form() {
  $gateways = sms_gateways();
  foreach ($gateways as $identifier => $gateway) {
    $active = $identifier == variable_get('sms_default_gateway', 'log');
    $options[$identifier] = '';
    $form[$gateway['name']]['id'] = array(
      '#value' => $identifier,
    );
    if (function_exists($gateway['configure form'])) {
      $form[$gateway['name']]['configure'] = array(
        '#value' => l(t('configure'), 'admin/smsframework/gateways/' . $identifier),
      );
    }
    else {
      $form[$gateway['name']]['configure'] = array(
        '#value' => t('No configuration options'),
      );
    }
  }
  $form['default'] = array(
    '#type' => 'radios',
    '#options' => $options,
    '#default_value' => variable_get('sms_default_gateway', 'log'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Set default gateway'),
  );
  return $form;
}