function word_link_add_form_save_submit in Word Link 8
Same name and namespace in other branches
- 7.2 word_link.admin.inc \word_link_add_form_save_submit()
- 7 word_link.admin.inc \word_link_add_form_save_submit()
Submit for save action.
1 string reference to 'word_link_add_form_save_submit'
- word_link_add_form in ./
word_link.admin.inc - Form builder for add or edit page.
File
- ./
word_link.admin.inc, line 394 - Administrative pages for the Word Link module.
Code
function word_link_add_form_save_submit($form, &$form_state) {
$values = array(
'text' => trim($form_state['values']['text']),
'case_sensitive' => $form_state['values']['case_sensitive'],
'url' => trim($form_state['values']['url']),
'url_title' => trim($form_state['values']['url_title']),
'class' => trim($form_state['values']['class']),
'visibility' => $form_state['values']['visibility'],
'except' => trim($form_state['values']['except']),
);
if (isset($form_state['values']['id'])) {
word_link_add_update_link('update', $values, $form_state['values']['id']);
drupal_set_message(t('Done'));
}
else {
word_link_add_update_link('insert', $values);
drupal_set_message(t('Link succesfuly added'));
}
$form_state['redirect'] = 'admin/config/content/word-link/list';
}