You are here

function rules_admin_form_edit_op_submit in Rules 6

Apply the changes to the element

1 string reference to 'rules_admin_form_edit_op_submit'
rules_admin_form_edit_op in rules_admin/rules_admin.rule_forms.inc
Returns the edit form of a logical operation

File

rules_admin/rules_admin.rule_forms.inc, line 616

Code

function rules_admin_form_edit_op_submit($form, &$form_state) {
  $element =& $form_state['element'];
  foreach (array(
    'negate',
    'weight',
  ) as $key) {
    $element['#' . $key] = $form_state['values'][$key];
  }
  $element['#type'] = $form_state['values']['operation'];
  drupal_set_message(t('The condition group %label has been saved.', array(
    '%label' => $element['#type'],
  )));
}