function sms_admin_default_form in SMS Framework 6
Same name and namespace in other branches
- 5 sms.module \sms_admin_default_form()
- 6.2 sms.admin.inc \sms_admin_default_form()
- 7 sms.admin.inc \sms_admin_default_form()
@file SMS Framework core module: Admin settings form functions
@package sms
1 string reference to 'sms_admin_default_form'
- sms_menu in ./
sms.module - Implementation of hook_menu().
File
- ./
sms.admin.inc, line 10 - SMS Framework core module: Admin settings form 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;
}