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

Issue #3053261 by Pancho: Visually improve FillPdfFormFieldForm

parent d264cac3
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ class FillPdfFormField extends ContentEntityBase implements FillPdfFormFieldInte ...@@ -78,7 +78,7 @@ class FillPdfFormField extends ContentEntityBase implements FillPdfFormFieldInte
$fields['value'] = BaseFieldDefinition::create('string_long') $fields['value'] = BaseFieldDefinition::create('string_long')
->setLabel(t('Fill pattern')) ->setLabel(t('Fill pattern'))
->setDescription(t('Text and tokens with which to fill in the PDF.')) ->setDescription(t('Text and tokens with which to fill in the PDF. This field supports tokens.'))
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'type' => 'string_long', 'type' => 'string_long',
'weight' => 0, 'weight' => 0,
......
...@@ -49,7 +49,17 @@ class FillPdfFormFieldForm extends ContentEntityForm { ...@@ -49,7 +49,17 @@ class FillPdfFormFieldForm extends ContentEntityForm {
public function form(array $form, FormStateInterface $form_state) { public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state); $form = parent::form($form, $form_state);
$form['token_help'] = $this->adminFormHelper->getAdminTokenForm(); $form['prefix']['widget']['0']['value']['#rows'] = 3;
$form['value']['token_help'] = $this->adminFormHelper->getAdminTokenForm();
$form['suffix']['widget']['0']['value']['#rows'] = 3;
$form['extra'] = [
'#type' => 'details',
'#title' => $this->t('Transform values'),
];
$form['replacements']['#group'] = 'extra';
return $form; return $form;
} }
......
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