Skip to content
Snippets Groups Projects
Commit 53bae083 authored by lkmorlan's avatar lkmorlan Committed by Liam Morland
Browse files

Issue #2966921 by Liam Morland: Display the token tree in a dialog

parent 796730c7
No related branches found
No related tags found
No related merge requests found
...@@ -344,14 +344,10 @@ function fillpdf_form_edit($form, &$form_state, $fid) { ...@@ -344,14 +344,10 @@ function fillpdf_form_edit($form, &$form_state, $fid) {
field supports tokens.</strong>'), field supports tokens.</strong>'),
); );
$form['title_tokens_fieldset'] = array( $form['title_tokens'] = array(
'#type' => 'fieldset', '#type' => 'item',
'#title' => 'Tokens', '#title' => 'Tokens',
'#collapsible' => TRUE, ) + _fillpdf_admin_token_form(TRUE);
'#collapsed' => TRUE,
);
$form['title_tokens_fieldset']['tokens'] = _fillpdf_admin_token_form();
$form['default_nid'] = array( $form['default_nid'] = array(
'#type' => 'textfield', '#type' => 'textfield',
...@@ -441,13 +437,10 @@ function fillpdf_form_edit($form, &$form_state, $fid) { ...@@ -441,13 +437,10 @@ function fillpdf_form_edit($form, &$form_state, $fid) {
'#description' => t("<strong>This setting is applicable only if a <em>Custom path for generated PDFs</em> is set.</strong> Instead of redirecting your visitors to the front page, it will redirect them directly to the PDF. However, if you pass Drupal's <em>destination</em> query string parameter, that will override this setting."), '#description' => t("<strong>This setting is applicable only if a <em>Custom path for generated PDFs</em> is set.</strong> Instead of redirecting your visitors to the front page, it will redirect them directly to the PDF. However, if you pass Drupal's <em>destination</em> query string parameter, that will override this setting."),
'#default_value' => $pdf_form->destination_redirect, '#default_value' => $pdf_form->destination_redirect,
); );
$form['extra']['tokens_fieldset'] = array( $form['extra']['tokens'] = array(
'#type' => 'fieldset', '#type' => 'item',
'#title' => 'Tokens', '#title' => 'Tokens',
'#collapsible' => TRUE, ) + _fillpdf_admin_token_form(TRUE);
'#collapsed' => TRUE,
);
$form['extra']['tokens_fieldset']['tokens'] = _fillpdf_admin_token_form();
$form['extra']['replacements'] = array( $form['extra']['replacements'] = array(
'#type' => 'textarea', '#type' => 'textarea',
'#title' => t('Transform filled PDF field values'), '#title' => t('Transform filled PDF field values'),
...@@ -840,14 +833,11 @@ function fillpdf_field_edit($form, &$form_state, $pdf_form, $field) { ...@@ -840,14 +833,11 @@ function fillpdf_field_edit($form, &$form_state, $pdf_form, $field) {
<strong>[stamp:field_image]</strong>.</p>'), <strong>[stamp:field_image]</strong>.</p>'),
'#weight' => 4, '#weight' => 4,
); );
$form['tokens_fieldset'] = array( $form['tokens'] = array(
'#type' => 'fieldset', '#type' => 'item',
'#title' => 'Tokens', '#title' => 'Tokens',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#weight' => 5, '#weight' => 5,
); ) + _fillpdf_admin_token_form(TRUE);
$form['tokens_fieldset']['tokens'] = _fillpdf_admin_token_form();
$form['suffix'] = array( $form['suffix'] = array(
'#type' => 'textarea', '#type' => 'textarea',
'#title' => t('Suffix'), '#title' => t('Suffix'),
......
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