You are here

function rules_ui_parameter_replace_submit in Rules 7.2

Submit handler for switching the parameter input mode.

1 string reference to 'rules_ui_parameter_replace_submit'
RulesPluginUI::getParameterForm in ui/ui.core.inc
Actually generates the parameter form for the given data type.

File

ui/ui.forms.inc, line 30
Rules User Interface forms.

Code

function rules_ui_parameter_replace_submit($form, &$form_state) {
  if (isset($form_state['triggering_element'])) {
    $name = $form_state['triggering_element']['#parameter'];
    $form_state['parameter_mode'][$name] = $form_state['parameter_mode'][$name] == 'selector' ? 'input' : 'selector';
  }
  $form_state['rebuild'] = TRUE;
}