function node_convert_add_template_validate in Node Convert 7
Same name and namespace in other branches
- 6 node_convert.module \node_convert_add_template_validate()
Validation callback for adding a new template.
File
- ./
node_convert.admin.inc, line 289 - Administration page callbacks for the node_convert module.
Code
function node_convert_add_template_validate($form, &$form_state) {
if ($form_state['values']['step'] == 'choose_destination_type') {
if ($form_state['values']['source_type'] == $form_state['values']['dest_type']) {
form_set_error('source_type', t('Please select different node types.'));
form_set_error('dest_type', t('Please select different node types.'));
}
}
elseif ($form_state['values']['step'] == 'choose_destination_fields') {
node_convert_invoke_all('node_convert_change', array(
'dest_node_type' => $form_state['storage']['dest_type'],
'form_state' => $form_state,
), 'options validate');
}
}