function RulesDateOffsetProcessor::form

Overrides RulesDataProcessor::form().

Overrides RulesDataProcessor::form

File

modules/rules_core.eval.inc, line 152

Class

RulesDateOffsetProcessor
A data processor for applying date offsets.

Code

protected static function form($settings, $var_info) {
    $settings += array(
        'value' => '',
    );
    $form = array(
        '#type' => 'fieldset',
        '#title' => t('Add offset'),
        '#collapsible' => TRUE,
        '#collapsed' => empty($settings['value']),
        '#description' => t('Add an offset to the selected date.'),
    );
    $form['value'] = array(
        '#type' => 'rules_duration',
        '#title' => t('Offset'),
        '#description' => t('Note that you can also specify negative numbers.'),
        '#default_value' => $settings['value'],
        '#weight' => 5,
    );
    return $form;
}