You are here

function _sms_sendtophone_filter_inline_settings in SMS Framework 6.2

Same name and namespace in other branches
  1. 5 modules/sms_sendtophone/sms_sendtophone.module \_sms_sendtophone_filter_inline_settings()
  2. 6 modules/sms_sendtophone/sms_sendtophone.module \_sms_sendtophone_filter_inline_settings()
  3. 7 modules/sms_sendtophone/sms_sendtophone.module \_sms_sendtophone_filter_inline_settings()
1 call to _sms_sendtophone_filter_inline_settings()
sms_sendtophone_filter in modules/sms_sendtophone/sms_sendtophone.module
Implementation of hook_filter().

File

modules/sms_sendtophone/sms_sendtophone.module, line 202

Code

function _sms_sendtophone_filter_inline_settings($format) {
  $form['sms_sendtophone_filter_inline'] = array(
    '#type' => 'fieldset',
    '#title' => t('Inline SMS'),
    '#collapsible' => TRUE,
  );
  $form['sms_sendtophone_filter_inline']["sms_sendtophone_filter_inline_display_{$format}"] = array(
    '#type' => 'radios',
    '#title' => t('Show link as'),
    '#description' => t('How to display the the "send to phone" link.'),
    '#options' => array(
      'text' => t('Text'),
      'icon' => t('Icon'),
    ),
    '#default_value' => variable_get("sms_sendtophone_filter_inline_display_{$format}", 'icon'),
  );
  $form['sms_sendtophone_filter_inline']["sms_sendtophone_filter_inline_display_text_{$format}"] = array(
    '#type' => 'textfield',
    '#title' => t('Text for link'),
    '#description' => t('If "Text" is selected above, the following text will be appended as a link.'),
    '#size' => 32,
    '#maxlength' => 32,
    '#default_value' => variable_get("sms_sendtophone_filter_inline_display_text_{$format}", 'Send to phone'),
  );
  $form['sms_sendtophone_filter_inline']["sms_sendtophone_filter_inline_default_icon_{$format}"] = array(
    '#type' => 'checkbox',
    '#title' => t('Use default icon'),
    '#description' => t('If "Icon" is selected above and this option is enabled, the default icon that came with the module will be used.'),
    '#default_value' => variable_get("sms_sendtophone_filter_inline_default_icon_{$format}", 1),
  );
  $form['sms_sendtophone_filter_inline']["sms_sendtophone_filter_inline_custom_icon_path_{$format}"] = array(
    '#type' => 'textfield',
    '#title' => t('Path to custom icon'),
    '#description' => t('Provide a path to a custom icon. This icon will be used if "Icon" is selected above and the "Use default icon" option is disabled.'),
    '#size' => 40,
    '#maxlength' => 255,
    '#default_value' => variable_get("sms_sendtophone_filter_inline_custom_icon_path_{$format}", ''),
    '#field_prefix' => url(NULL, array(
      'absolute' => TRUE,
    )),
  );
  return $form;
}