function rules_admin_form_edit_rule_set in Rules 6
Shows the rule set edit page form
1 string reference to 'rules_admin_form_edit_rule_set'
- rules_admin_menu in rules_admin/
rules_admin.module - Implementation of hook_menu().
File
- rules_admin/
rules_admin.sets.inc, line 113
Code
function rules_admin_form_edit_rule_set(&$form_state, $set_info) {
$form_state['set'] = $set_info;
$changable_name = $set_info['status'] == 'custom';
$rule_name = $set_info['name'];
// Does our name start with rules?
if (preg_match('/^rules_/', $set_info['name'])) {
$set_info['name'] = drupal_substr($set_info['name'], drupal_strlen('rules_'));
}
else {
$changable_name = FALSE;
}
$form = rules_admin_form_rule_set_settings($set_info, $changable_name);
$form['active_header'] = array(
'#value' => '<br /><h3>' . t('Active rules') . '</h3>',
);
$form['active'] = rules_admin_overview_table(array(
'set' => $rule_name,
'active' => TRUE,
));
$form['active']['#suffix'] = '<br />';
$form['inactive_header'] = array(
'#value' => '<h3>' . t('Inactive rules') . '</h3>',
);
$form['inactive'] = rules_admin_overview_table(array(
'set' => $rule_name,
'active' => FALSE,
));
if (variable_get('rules_show_fixed', FALSE)) {
$form['fixed_header'] = array(
'#value' => '<h3>' . t('Fixed rules') . '</h3>',
);
$form['fixed'] = rules_admin_overview_table(array(
'set' => $rule_name,
'active' => TRUE,
'fixed' => TRUE,
));
}
return $form;
}