Commit 55a60acf by pifagor

Task #939: The correct output an error message.

parent b0c9f064
......@@ -24,7 +24,7 @@ function drudesk_node_unique_form_candidate_lead_node_form_alter(&$form, &$form_
$form['#suffix'] = '</div>';
$form['error'] = array(
'#markup' => '<div class="inline-messages"></div>',
'#weight' => -10,
'#weight' => !empty($form['title']['#weight']) ? !empty($form['title']['#weight']) -1 : -50,
);
if (!empty($get['destination'])) {
$form['destination'] = array(
......@@ -32,6 +32,7 @@ function drudesk_node_unique_form_candidate_lead_node_form_alter(&$form, &$form_
'#value' => $get['destination'],
);
}
ksort($form);
$form['#validate'][0] = '_drudesk_node_unique_candidate_lead_form_validate';
ctools_include('modal');
ctools_modal_add_js();
......@@ -65,7 +66,7 @@ function _drudesk_node_unique_form_ajax_callback($form, &$form_state) {
if (form_get_errors()) {
$messages = theme('status_messages');
if ($messages) {
$form["wrapper"] = array("#markup" => "<div class='inline-messages'>$messages</div>");
$form["error"] = array("#markup" => "<div class='inline-messages'>$messages</div>");
}
return $form;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment