Commit 0f511fe2 authored by Matt Obert's avatar Matt Obert Committed by Eduardo Morales Alberti
Browse files

Resolve #3147477 "Automated drupal 9"

parent 1b430e63
Loading
Loading
Loading
Loading
+1 −1
Changes for fgam_example/fgam_example.info.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
name: Field Group Ajaxified Multipage Example
type: module
description: Set of example for Field Group Ajaxified Multipage (Visit examples/field_group_ajaxified_multipage)
core: 8.x
core_version_requirement: ^8 || ^9
package: Fields
core_version_requirement: ^8 || ^9
+2 −4
Changes for fgam_example/src/Form/Example.php: 2 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -150,8 +150,7 @@ class Example extends FormBase {
          '@address' => $values['address'],
          '@description' => $values['description'],
        ]
        )
      );
      ));
    }
    elseif (!is_null($form_state->getValues())) {
      $values = $form_state->getValues();
@@ -162,8 +161,7 @@ class Example extends FormBase {
          '@address' => $values['address'],
          '@description' => $values['description'],
        ]
        )
      );
      ));
    }
    else {
      $this->messenger()->addStatus($this->t('There are no values or the form failed'));
+2 −2
Changes for field_group_ajaxified_multipage.info.yml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
name: Field Group Ajaxified Multipage
type: module
description: Turns javascript multipage groups to ajaxified version
core: 8.x
description: 'Turns javascript multipage groups to ajaxified version.'
core_version_requirement: '^8.8 || ^9.0'
package: Fields
dependencies:
  - field_group:field_group
+1 −2
Changes for field_group_ajaxified_multipage.module: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
 */

use Drupal\Core\Routing\RouteMatchInterface;

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\Core\Entity\EntityFormInterface;
@@ -24,7 +23,7 @@ function field_group_ajaxified_multipage_help($route_name, RouteMatchInterface $
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Turns javascript multipage groups to ajaxified version') . '</p>';
      $output .= '<p>' . t('Form example:') . $link . '</br><b>' . t('Before use this example, please enable fgam_example module.') . '</b></p>';
      $output .= '<p>' . t('Form example:') . $link->toString() . '</br><b>' . t('Before using this example, please enable fgam_example module.') . '</b></p>';
      return $output;

    default:
+25 −25
Changes for src/Plugin/field_group/FieldGroupFormatter/MultipageGroup.php: 25 added lines, 25 removed lines.
Original line number Diff line number Diff line
@@ -62,13 +62,13 @@ class MultipageGroup extends FieldGroupFormatterBase {
    $form = parent::settingsForm();

    $options = [
      t('None'),
      t('Label only'),
      t('Step 1 of 10'),
      t('Step 1 of 10 [Label]'),
      $this->t('None'),
      $this->t('Label only'),
      $this->t('Step 1 of 10'),
      $this->t('Step 1 of 10 [Label]'),
    ];
    $form['page_header'] = [
      '#title' => t('Format page title'),
      '#title' => $this->t('Format page title'),
      '#type' => 'select',
      '#default_value' => $this->getSetting('page_header'),
      '#options' => $options,
@@ -76,12 +76,12 @@ class MultipageGroup extends FieldGroupFormatterBase {
    ];

    $options = [
      t('No'),
      t('Format 1 / 10'),
      t('The count number only'),
      $this->t('No'),
      $this->t('Format 1 / 10'),
      $this->t('The count number only'),
    ];
    $form['page_counter'] = [
      '#title' => t('Add a page counter at the bottom'),
      '#title' => $this->t('Add a page counter at the bottom'),
      '#type' => 'select',
      '#default_value' => $this->getSetting('page_counter'),
      '#options' => $options,
@@ -89,31 +89,31 @@ class MultipageGroup extends FieldGroupFormatterBase {
    ];

    $form['move_button'] = [
      '#title' => t('Move submit button to last multipage'),
      '#title' => $this->t('Move submit button to last multipage'),
      '#type' => 'select',
      '#default_value' => $this->getSetting('move_button'),
      '#weight' => 22,
      '#options' => [
        t('No'),
        t('Yes'),
        $this->t('No'),
        $this->t('Yes'),
      ],
    ];

    $form['ajaxify'] = [
      '#title' => t('Ajaxify'),
      '#title' => $this->t('Ajaxify'),
      '#type' => 'select',
      '#default_value' => $this->getSetting('ajaxify'),
      '#weight' => 23,
      '#options' => [0 => t('No'), 1 => t('Yes')],
      '#description' => t('If enabled navigation to next/prev pages will be done using ajax instead of simple javascript'),
      '#options' => [0 => $this->t('No'), 1 => $this->t('Yes')],
      '#description' => $this->t('If enabled navigation to next/prev pages will be done using ajax instead of simple javascript'),
    ];
    $form['nonjs_multistep'] = [
      '#title' => t('Non Javascript Multistep'),
      '#title' => $this->t('Non Javascript Multistep'),
      '#type' => 'select',
      '#default_value' => $this->getSetting('nonjs_multistep'),
      '#weight' => 24,
      '#options' => [0 => t('No'), 1 => t('Yes')],
      '#description' => t('If enabled and ajaxify option is disabled no javascript will be used for form submision or navigration between steps, the form will be refreshed. useful for debugging or very complex multistep forms'),
      '#options' => [0 => $this->t('No'), 1 => $this->t('Yes')],
      '#description' => $this->t('If enabled and ajaxify option is disabled no javascript will be used for form submision or navigration between steps, the form will be refreshed. useful for debugging or very complex multistep forms'),
      '#states' => [
        'visible' => [
          ':input[name*="[settings][ajaxify]"]' => ['value' => 1],
@@ -122,15 +122,15 @@ class MultipageGroup extends FieldGroupFormatterBase {
    ];

    $form['scroll_top'] = [
      '#title' => t('Scroll to top'),
      '#title' => $this->t('Scroll to top'),
      '#type' => 'select',
      '#default_value' => $this->getSetting('scroll_top'),
      '#weight' => 25,
      '#options' => [
        t('No'),
        t('Yes'),
        $this->t('No'),
        $this->t('Yes'),
      ],
      '#description' => t('Scroll to the top of the page on step change.'),
      '#description' => $this->t('Scroll to the top of the page on step change.'),
      '#states' => [
        'visible' => [
          ':input[name*="[settings][ajaxify]"]' => ['value' => 1],
@@ -139,7 +139,7 @@ class MultipageGroup extends FieldGroupFormatterBase {
    ];

    $form['button_label'] = [
      '#title' => t('Change button label?'),
      '#title' => $this->t('Change button label?'),
      '#type' => 'checkbox',
      '#default_value' => $this->getSetting('button_label'),
      '#weight' => 26,
@@ -151,7 +151,7 @@ class MultipageGroup extends FieldGroupFormatterBase {
    ];

    $form['button_label_next'] = [
      '#title' => t('Button label next'),
      '#title' => $this->t('Button label next'),
      '#type' => 'textfield',
      '#default_value' => $this->getSetting('button_label_next'),
      '#weight' => 27,
@@ -164,7 +164,7 @@ class MultipageGroup extends FieldGroupFormatterBase {
    ];

    $form['button_label_prev'] = [
      '#title' => t('Button label prev'),
      '#title' => $this->t('Button label prev'),
      '#type' => 'textfield',
      '#default_value' => $this->getSetting('button_label_prev'),
      '#weight' => 28,
+1 −1

File changed.

Contains only whitespace changes.