function notifications_destination_edit_form_submit in Notifications 6.4
Edit destinatin submission
File
- includes/
destination.inc, line 212 - Destination management
Code
function notifications_destination_edit_form_submit($form, $form_state) {
$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : NULL;
$destination = $form_state['values']['destination'];
switch ($op) {
case t('Update'):
$dest = notifications_destination_parse_submitted($form_state['values']);
if ($destination = Messaging_Destination::create($dest)) {
$object
->save();
drupal_set_message(t('The destination address has been updated.'));
}
else {
drupal_set_message(t('The destination cannot be updated.'), 'error');
}
break;
}
}