Commit 9fb1f69f authored by Lily Yan's avatar Lily Yan
Browse files

FDSU-1750 Remove duplicate buttons when an error is displayed after editing or...

FDSU-1750 Remove duplicate buttons when an error is displayed after editing or creating uw_virtual_site_homepage_node_form.
parent bd540954
......@@ -98,6 +98,16 @@ function uw_virtual_site_homepage_form_uw_virtual_site_homepage_node_form_alter(
// Adding the redirect back to the homepage after the save of the uw_virtual_site_homepage.
$form['actions']['submit']['#submit'][] = 'uw_virtual_site_homepage_node_form_redirect';
// Adding the validate for removing duplicate buttons.
$form['#validate'][] = 'uw_virtual_site_homepage_button_validate';
}
/**
* The validate buttons by adding css in order to remove duplicate buttons.
*/
function uw_virtual_site_homepage_button_validate(&$form, &$form_state) {
drupal_add_css(drupal_get_path('module', 'uw_virtual_site_homepage') . '/css/uw_virtual_site_homepage.css');
}
/**
......
Supports Markdown
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