function tmgmt_node_views_exposed_target_language_validate in Translation Management Tool 7
Form element validator for the missing target language views field handler.
1 string reference to 'tmgmt_node_views_exposed_target_language_validate'
- tmgmt_node_handler_filter_missing_translation::value_form in sources/
node/ views/ handlers/ tmgmt_node_handler_filter_missing_translation.inc - Options form subform for setting options.
File
- sources/
node/ tmgmt_node.module, line 31 - Source plugin for the Translation Management system that handles nodes.
Code
function tmgmt_node_views_exposed_target_language_validate($form, &$form_state) {
if (!empty($form_state['values']['tmgmt_node_missing_translation']) && $form_state['values']['language_1'] == $form_state['values']['tmgmt_node_missing_translation']) {
form_set_error('tmgmt_node_missing_translation', t('The source and target languages must not be the same.'));
}
}