function sms_clickatell_admin_form in SMS Framework 6
Same name and namespace in other branches
- 5 modules/sms_clickatell/sms_clickatell.module \sms_clickatell_admin_form()
Configuration form for gateway module
Parameters
$configuration:
Return value
Drupal form array
1 string reference to 'sms_clickatell_admin_form'
- sms_clickatell_gateway_info in modules/
sms_clickatell/ sms_clickatell.module - Implement hook_gateway_info()
File
- modules/
sms_clickatell/ sms_clickatell.module, line 90 - Clickatell gateway module for Drupal SMS Framework. Outbound+Inbound+Receipts
Code
function sms_clickatell_admin_form($configuration) {
$form['sms_clickatell_balance'] = array(
'#type' => 'item',
'#title' => t('Current balance'),
'#value' => sms_clickatell_balance(),
);
$form['sms_clickatell_ssl'] = array(
'#type' => 'checkbox',
'#title' => t('Use SSL Encyption'),
'#description' => t('Drupal\'s built-in HTTP client only supports SSL on PHP 4.3 compiled with OpenSSL.'),
'#default_value' => $configuration['sms_clickatell_ssl'],
);
$form['sms_clickatell_api_id'] = array(
'#type' => 'textfield',
'#title' => t('API ID'),
'#description' => t('Clickatell issues this number upon addition of an HTTP sub-product to your account.'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => $configuration['sms_clickatell_api_id'],
);
$form['sms_clickatell_user'] = array(
'#type' => 'textfield',
'#title' => t('User'),
'#description' => t('The username of your Clickatell account.'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => $configuration['sms_clickatell_user'],
);
$form['sms_clickatell_password'] = array(
'#type' => 'textfield',
'#title' => t('Password'),
'#description' => t('The current password on your Clickatell account.'),
'#size' => 30,
'#maxlength' => 64,
'#default_value' => $configuration['sms_clickatell_password'],
);
$form['sms_clickatell_from'] = array(
'#type' => 'textfield',
'#title' => t('Default Sender (from)'),
'#description' => t('Name/number of the default sender. Will be used if a sender is not specified on message send.<br /><em>This will only work with <strong>Approved</strong> Sender IDs in your Clickatell account | My Settings | Manage Sender IDs.</em><br />A valid international format number up to 16 characters (eg: 447911222333) or alphanumeric string of 11 characters (eg: My Service).<br />If empty / sender not specified on message send / not Approved Seender ID, then Clickatell will apply a gateway number.'),
'#size' => 16,
'#maxlength' => 16,
'#default_value' => $configuration['sms_clickatell_from'],
);
$form['sms_clickatell_callback'] = array(
'#type' => 'select',
'#title' => t('Status Callback (delivery receipts)'),
'#description' => t('Enable delivery receipts when message status changes in the gateway.'),
'#multiple' => FALSE,
'#options' => array(
0 => t('No message status returned'),
1 => t('Return only intermediate statuses'),
2 => t('Return only final statuses of a message'),
3 => t('Return both intermediate and final stauses of a message'),
),
'#default_value' => $configuration['sms_clickatell_callback'],
);
return $form;
}