Skip to content
Snippets Groups Projects
Commit b6d54a5e authored by Liam Morland's avatar Liam Morland
Browse files

Merge branch 'feature/ISTWCMS-4209-l26yan-Remove-preview-button' into '8.x-1.x'

Feature/istwcms 4209 l26yan remove preview button

See merge request !14
parents 29c42318 9702c360
No related branches found
No related tags found
1 merge request!14Feature/istwcms 4209 l26yan remove preview button
......@@ -104,7 +104,7 @@ class UwContentModerationForm extends ConfirmFormBase {
$node = $this->entityTypeManager->getStorage('node')->load($this->nid);
// Return the question to see if they want to publish the node.
return t('Are you sure you want to unpublish %node_title?', ['%node_title' => $node->getTitle()]);
return $this->t('Are you sure you want to unpublish %node_title?', ['%node_title' => $node->getTitle()]);
}
/**
......
......@@ -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