Skip to content
Snippets Groups Projects
Commit 5d88a36c authored by Bernd Oliver Suenderhauf's avatar Bernd Oliver Suenderhauf
Browse files

Issue #3048321 by Pancho: Visually improve filename pattern token link

parent ea7f8776
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
vertical-align: top; vertical-align: top;
} }
#edit-storage .form-item { #edit-storage .form-item,
#edit-title-wrapper .form-item {
margin-bottom: 0; margin-bottom: 0;
} }
......
...@@ -81,7 +81,7 @@ class FillPdfForm extends ContentEntityBase implements FillPdfFormInterface { ...@@ -81,7 +81,7 @@ class FillPdfForm extends ContentEntityBase implements FillPdfFormInterface {
$fields['title'] = BaseFieldDefinition::create('string') $fields['title'] = BaseFieldDefinition::create('string')
->setLabel(t('Filename pattern')) ->setLabel(t('Filename pattern'))
->setDescription(t('Enter a title for this mapping configuration. This will be used for deciding the filename of your PDF. <strong>This field supports tokens.</strong>')) ->setDescription(new TranslatableMarkup('This pattern will be used for deciding the filename of your PDF. This field supports tokens.'))
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'type' => 'string', 'type' => 'string',
'weight' => 10, 'weight' => 10,
......
...@@ -124,12 +124,7 @@ class FillPdfFormForm extends ContentEntityForm { ...@@ -124,12 +124,7 @@ class FillPdfFormForm extends ContentEntityForm {
/** @var \Drupal\fillpdf\FillPdfFormInterface $entity */ /** @var \Drupal\fillpdf\FillPdfFormInterface $entity */
$entity = $this->entity; $entity = $this->entity;
$form['tokens'] = [ $form['title']['token_tree'] = $this->adminFormHelper->getAdminTokenForm();
'#type' => 'fieldset',
'#title' => $this->t('Tokens'),
'#weight' => 11,
'token_tree' => $this->adminFormHelper->getAdminTokenForm(),
];
$entity_types = []; $entity_types = [];
$entity_type_definitions = $this->entityTypeManager->getDefinitions(); $entity_type_definitions = $this->entityTypeManager->getDefinitions();
......
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