function sms_actions_edit_command_form_submit in SMS Framework 6.2
Same name and namespace in other branches
- 6 modules/sms_actions/sms_actions.module \sms_actions_edit_command_form_submit()
- 7 modules/sms_actions/sms_actions.module \sms_actions_edit_command_form_submit()
File
- modules/
sms_actions/ sms_actions.module, line 422 - Provides a "Send SMS" action and the ability to define custom triggers for incoming messages.
Code
function sms_actions_edit_command_form_submit($form, &$form_state) {
// $commands = sms_actions_get_commands();
$command = new stdClass();
$command->discriminator = $form_state['values']['discriminator'];
$command->old_discriminator = $form_state['values']['old_discriminator'];
if ($form_state['clicked_button']['#value'] == t('Delete')) {
if ($form_state['values']['delete'] === TRUE) {
return sms_actions_command_confirm_delete_submit($form, $form_state);
}
$form_state['rebuild'] = TRUE;
$form_state['confirm_delete'] = TRUE;
return;
}
sms_actions_command_save($command);
// $commands[$command->discriminator] = $command;
// variable_set('sms_actions_commands', $commands);
$form_state['redirect'] = 'admin/smsframework/actions';
}