Skip to content
Snippets Groups Projects
Commit 5516d094 authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-4209 Make sure the preview option is disabled when creating new content types

parent 29c42318
No related branches found
No related tags found
1 merge request!14Feature/istwcms 4209 l26yan remove preview button
......@@ -211,3 +211,13 @@ function uw_cfg_common_preprocess_node(&$variables) {
$variables['uw_content_moderation_form'] = $render;
}
}
/**
* Implements hook_form_FORM_ID_alter().
*
* Set the default of preview mode disabled.
*/
function uw_cfg_common_form_node_type_add_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['submission']['preview_mode']['#default_value'] = 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment