You are here

function skinr_rule_edit_submit in Skinr 6.2

File

./skinr_ui.rules.inc, line 144
Admin page callbacks for the skinr module.

Code

function skinr_rule_edit_submit($form, &$form_state) {
  $rule = new stdClass();
  $rule->rid = !empty($form_state['values']['rid']) ? $form_state['values']['rid'] : NULL;
  $rule->title = $form_state['values']['title'];
  $rule->roles = $form_state['values']['roles'];
  $rule->visibility = $form_state['values']['visibility'];
  $rule->pages = $form_state['values']['pages'];
  skinr_rule_save($rule);
  $form_state['redirect'] = 'admin/build/skinr/rules';
}