function ca_actions_form_add_action_submit in Ubercart 6.2
Add action submit handler.
See also
1 string reference to 'ca_actions_form_add_action_submit'
- ca_actions_form in ca/
ca.admin.inc - Build a form for adding and editing actions on a predicate.
File
- ca/
ca.admin.inc, line 499 - Conditional actions overview UI.
Code
function ca_actions_form_add_action_submit($form, &$form_state) {
// Save the existing actions to preserve any changes.
$predicate = ca_actions_form_update_actions($form_state['values']['pid'], $form_state['values']['actions']);
// Store the presumed key of the new action.
$_SESSION['ca_action_focus'] = count($predicate['#actions']);
// Add the specified action to the predicate.
ca_add_action($form_state['values']['pid'], $form_state['values']['actions']['add_action']);
drupal_set_message(t('Action added.'));
}