function simplenews_statistics_handler_unsubscribes::options_form in Simplenews Statistics 7
Same name and namespace in other branches
- 7.2 includes/views/handlers/simplenews_statistics_handler_unsubscribes.inc \simplenews_statistics_handler_unsubscribes::options_form()
Creates the form item for the options added.
Overrides views_handler_field::options_form
File
- includes/
views/ handlers/ simplenews_statistics_handler_unsubscribes.inc, line 56 - Definition of simplenews_statistics_handler_unsubscribes.
Class
- simplenews_statistics_handler_unsubscribes
- Description.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['number'] = array(
'#type' => 'checkbox',
'#title' => t('Show count'),
'#default_value' => $this->options['number'],
'#description' => t('Show the number of bounces for this newsletter.'),
);
$form['percentage'] = array(
'#type' => 'checkbox',
'#title' => t('Show percentage'),
'#default_value' => $this->options['percentage'],
'#description' => t('Show the bounce rate as a percentage.'),
);
$form['precision'] = array(
'#type' => 'textfield',
'#title' => t('Precision'),
'#default_value' => $this->options['precision'],
'#description' => t('Number of decimal places to which the bounce rate should be calculated.'),
'#states' => array(
'invisible' => array(
':input[name="options[percentage]"]' => array(
'checked' => FALSE,
),
),
),
);
$form['source'] = array(
'#type' => 'textfield',
'#title' => t('Source'),
'#default_value' => $this->options['source'],
'#description' => t('Specify the source from which to count unsubscribes. E.g. <em>unknown</em>, <em>website</em>, <em>mass unsubscribe</em>, <em>bounce</em>. Sources are defined by the module that cause the user to be unsubscribed. Leave this blank unless you know specifically what you are looking for.'),
);
}