function user_relationships_ui_type_edit_form_submit in User Relationships 5.3
Process the relationship edit page form submission.
File
- user_relationships_ui/
user_relationships_ui.actions.inc, line 49
Code
function user_relationships_ui_type_edit_form_submit($form_id, &$form_values) {
$rtype = (object) $form_values;
$action = $form_values['action'] == 'add' ? t('added') : t('updated');
if (user_relationships_type_save($rtype)) {
drupal_set_message(t('Relationship %name has been @action.', array(
'%name' => $rtype->name,
'@action' => $action,
)));
watchdog('u_relationship', t('User Relationships form: relationship %name @action.', array(
'%name' => $rtype->name,
'@action' => $action,
)), WATCHDOG_NOTICE, l(t('view'), 'admin/user/user_relationship/types'));
}
else {
drupal_set_message(t('Relationship %name has not been @action. There is a problem, please contact the site admin', array(
'%name' => $rtype->name,
'@action' => $action,
)));
}
return 'admin/user/relationships';
}