Skip to content

Commit

Permalink
Merge pull request #287 from City-of-Helsinki/UHF-9950
Browse files Browse the repository at this point in the history
UHF-9950 Preview on new translations
  • Loading branch information
khalima authored Jun 20, 2024
2 parents e4f4deb + 7970c17 commit a13f692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hdbt_admin.theme
Original file line number Diff line number Diff line change
@@ -128,8 +128,8 @@ function hdbt_admin_form_node_form_alter(&$form, FormStateInterface $form_state)
/** @var \Drupal\node\NodeInterface $node */
$node = $formObject->getEntity();

// Disable "Preview" button on new nodes.
if ($node->isNew()) {
// Disable "Preview" button on new nodes and new translations.
if ($node->isNew() || $node->isNewTranslation()) {
$form['gin_actions']['actions']['preview']['#access'] = FALSE;
}

0 comments on commit a13f692

Please sign in to comment.