Problem/Motivation

The configuration form at /admin/config/development/performance/minifyhtml defines its own form actions. However, the \Drupal\Core\Form\ConfigFormBase contains its own set of form actions you can use in your form. This results in a more consistent user experience for site administrators.

Proposed resolution

Reuse Drupal config form components for a consistent user experience

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

The form actions are defined using default Drupal form action elements.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 3103711-2-after.png64.87 KBidebr
#2 3103711-2-before.png63.23 KBidebr
#2 3103711-2.patch2.44 KBidebr

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new2.44 KB
new63.23 KB
new64.87 KB

Attached patch implements the following changes:

  1. Reuses Drupal form actions supplied by \Drupal\Core\Form\ConfigFormBase::buildForm()
  2. Applies the injected StringTranslation methods to the t() calls.
  3. Removes duplicate calls to $this->config('minifyhtml.config')
  4. Removes redundant type casting in \Drupal\minifyhtml\Form\SettingsForm::submitForm() as this is already handled through its configuration schema.

Before

After

  • idebr authored 05529ac on 8.x-1.x
    Issue #3103711 by idebr: Reuse Drupal config form components for a...
slydevil’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.