You are here

function sms_txtlocal_admin_form in SMS Framework 6

Configuration form for gateway module

Parameters

$configuration:

Return value

Drupal form array

1 string reference to 'sms_txtlocal_admin_form'
sms_txtlocal_gateway_info in modules/sms_txtlocal/sms_txtlocal.module
Implement hook_gateway_info()

File

modules/sms_txtlocal/sms_txtlocal.module, line 78
Txtlocal gateway module for Drupal SMS Framework. Outbound+Inbound

Code

function sms_txtlocal_admin_form($configuration) {
  $form['sms_txtlocal_balance'] = array(
    '#type' => 'item',
    '#title' => t('Current balance'),
    '#value' => sms_txtlocal_balance(),
  );
  $form['sms_txtlocal_user'] = array(
    '#type' => 'textfield',
    '#title' => t('Username'),
    '#description' => t('The username of your Txtlocal account.'),
    '#size' => 40,
    '#maxlength' => 255,
    '#default_value' => $configuration['sms_txtlocal_user'],
  );
  $form['sms_txtlocal_password'] = array(
    '#type' => 'textfield',
    '#title' => t('Password'),
    '#description' => t('The current password on your Txtlocal account.'),
    '#size' => 30,
    '#maxlength' => 64,
    '#default_value' => $configuration['sms_txtlocal_password'],
  );
  $form['sms_txtlocal_defaultsender'] = array(
    '#type' => 'textfield',
    '#title' => t('Default sender of SMS messages'),
    '#description' => t('Required min=3 max=11 chars. May be an MSISDN or text. Will be used only if the SMS send call does not specify a sender.'),
    '#size' => 11,
    '#maxlength' => 11,
    '#default_value' => $configuration['sms_txtlocal_defaultsender'] ? $configuration['sms_txtlocal_defaultsender'] : 'anonymous',
  );
  $form['sms_txtlocal_receipts'] = array(
    '#type' => 'checkbox',
    '#title' => t('Request message delivery receipts'),
    '#description' => t('Click to enable receipt requests when messages are sent.'),
    '#default_value' => $configuration['sms_txtlocal_receipts'] ? $configuration['sms_txtlocal_receipts'] : FALSE,
  );
  $form['sms_txtlocal_ssl'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use SSL encyption'),
    '#description' => t('SSL is recommended so you should at least try this. Requires that PHP has enabled OpenSSL support.'),
    '#default_value' => $configuration['sms_txtlocal_ssl'] ? $configuration['sms_txtlocal_ssl'] : FALSE,
  );
  $form['sms_txtlocal_test'] = array(
    '#type' => 'checkbox',
    '#title' => t('Test mode'),
    '#description' => t('If set, txtlocal will not actually perform actions and will not deduct credit.'),
    '#default_value' => $configuration['sms_txtlocal_test'] ? $configuration['sms_txtlocal_test'] : FALSE,
  );
  return $form;
}