You are here

function ca_condition_date_form in Ubercart 6.2

See also

ca_condition_date()

File

ca/ca.ca.inc, line 141
This file includes some generic conditions and actions.

Code

function ca_condition_date_form($form_state, $settings = array()) {
  $form = array();
  $form['operator'] = array(
    '#type' => 'radios',
    '#title' => t('Comparison'),
    '#options' => array(
      'before' => t('Before'),
      'only' => t('Only'),
      'after' => t('After'),
    ),
    '#default_value' => $settings['operator'],
    '#description' => t('Example: "The current date is before the date below."'),
  );
  $form['date'] = array(
    '#type' => 'date',
    '#title' => t('Date'),
    '#default_value' => $settings['date'],
    '#description' => t('When the predicate is evaluated, the current date is compared to this date.'),
  );
  return $form;
}