Commit c169b13e authored by Clayton Dewey's avatar Clayton Dewey Committed by Jeff Hipp
Browse files

Issue #3259462 by cedewey, rkoller: Move Summary Maxlength setting above the...

Issue #3259462 by cedewey, rkoller: Move Summary Maxlength setting above the associated field Maxlength setting
parent 300ed07a
Loading
Loading
Loading
Loading
+15 −15
Changes for maxlength.module: 15 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -69,21 +69,6 @@ function maxlength_field_widget_third_party_settings_form(WidgetInterface $plugi
      '#open' => FALSE,
    ];
    
    if (!empty($allowed_settings['maxlength_setting'])) {
      $element['maxlength_js'] = [
        '#type' => 'number',
        '#title' => t('Maximum length'),
        '#description' => t('The maximum number of characters in the field.'),
        '#default_value' => $plugin->getThirdPartySetting('maxlength', 'maxlength_js'),
      ];
      $element['maxlength_js_label'] = [
        '#type' => 'textarea',
        '#rows' => 2,
        '#title' => t('Count down message'),
        '#default_value' => $plugin->getThirdPartySetting('maxlength', 'maxlength_js_label', t('Content limited to @limit characters, remaining: <strong>@remaining</strong>')),
        '#description' => t('The dynamic message under the input, where "@limit", "@remaining" and "@count" are replaced by the appropriate numbers.'),
      ];
    }
    if (!empty($allowed_settings['summary_maxlength_setting'])) {
      $element['maxlength_js_summary'] = [
        '#type' => 'number',
@@ -99,6 +84,21 @@ function maxlength_field_widget_third_party_settings_form(WidgetInterface $plugi
        '#description' => t('The dynamic message under the input field, where "@limit", "@remaining" and "@count" are replaced by the appropriate numbers.'),
      ];
    }
    if (!empty($allowed_settings['maxlength_setting'])) {
      $element['maxlength_js'] = [
        '#type' => 'number',
        '#title' => t('Maximum length'),
        '#description' => t('The maximum number of characters in the field.'),
        '#default_value' => $plugin->getThirdPartySetting('maxlength', 'maxlength_js'),
      ];
      $element['maxlength_js_label'] = [
        '#type' => 'textarea',
        '#rows' => 2,
        '#title' => t('Count down message'),
        '#default_value' => $plugin->getThirdPartySetting('maxlength', 'maxlength_js_label', t('Content limited to @limit characters, remaining: <strong>@remaining</strong>')),
        '#description' => t('The dynamic message under the input, where "@limit", "@remaining" and "@count" are replaced by the appropriate numbers.'),
      ];
    }
    if (!empty($allowed_settings['truncate_setting'])) {
      $element['maxlength_js_enforce'] = [
        '#type' => 'checkbox',