Commit 2835d06a authored by dragonwize's avatar dragonwize
Browse files

Added validation for per node type form

parent 2aecb113
......@@ -155,12 +155,18 @@ function better_formats_content_type_admin_form(&$form, $form_state) {
$form[$key]['better_formats_defaults'] = array_merge($dform, $nform, $cform);
// Attach our submit handler.
// Attach our validate and submit handlers.
// Prepending to the submit array because core will auto save the values in the
// variable table if the values are not removed before hand.
array_unshift($form['#validate'], 'better_formats_content_type_admin_form_validate');
array_unshift($form['#submit'], 'better_formats_content_type_admin_form_submit');
function better_formats_content_type_admin_form_validate($form, &$form_state) {
include(drupal_get_path('module', 'better_formats') . '/');
better_formats_defaults_admin_form_validate($form, $form_state);
function better_formats_content_type_admin_form_submit($form, &$form_state) {
$node_type = $form['#node_type']->type;
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