You are here

function flag_rules_condition_threshold_form in Flag 6.2

Same name and namespace in other branches
  1. 6 includes/flag.rules_forms.inc \flag_rules_condition_threshold_form()

File

includes/flag.rules_forms.inc, line 60
Rules integration for the Flag module.

Code

function flag_rules_condition_threshold_form($settings, &$form, &$form_state) {
  $form['settings']['operator'] = array(
    '#title' => t('Comparison operator'),
    '#type' => 'select',
    '#options' => array(
      '>' => t('Greater than'),
      '>=' => t('Greater than or equal'),
      '=' => t('Equal to'),
      '<=' => t('Less than or equal'),
      '<' => t('Less than'),
    ),
    '#default_value' => isset($settings['operator']) ? $settings['operator'] : '>=',
  );

  // Move argument to bottom of form.
  $form['settings']['number']['#weight'] = 2;

  // Move tokens help to bottom of form.
  $form['settings']['input_help'] = $form['input_help'];
  $form['settings']['input_help']['#weight'] = 3;
  unset($form['input_help']);
}