You are here

function sms_admin_gateway_form in SMS Framework 7

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

Form builder for the sms gateway configuration form.

Parameters

@gateway_id: The ID of the sms gateway.

See also

sms_admin_gateway_form_validate()

sms_admin_gateway_form_submit()

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

File

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

Code

function sms_admin_gateway_form($form, &$form_state, $gateway_id) {
  $gateway = sms_gateways('gateway', $gateway_id);
  if ($gateway && function_exists($gateway['configure form'])) {
    drupal_set_title(t('@gateway configuration', array(
      '@gateway' => $gateway['name'],
    )), PASS_THROUGH);
    $form = $gateway['configure form']($gateway['configuration']);
    $form['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Save'),
    );
    $form['gateway'] = array(
      '#type' => 'value',
      '#value' => $gateway,
    );
    return $form;
  }
  drupal_not_found();
  exit;
}