function sms_admin_default_form in SMS Framework 5
Same name and namespace in other branches
- 6.2 sms.admin.inc \sms_admin_default_form()
- 6 sms.admin.inc \sms_admin_default_form()
- 7 sms.admin.inc \sms_admin_default_form()
Form for selecting the default gateway.
1 string reference to 'sms_admin_default_form'
- sms_menu in ./
sms.module - Implementation of hook_menu().
File
- ./
sms.module, line 123 - The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.
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/edit/' . $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;
}