Problem/Motivation

There are some form elements that are related to the Pattern form element, like

  • Restriction type
    The values to which the pattern is applied.
  • Values matching the pattern are allowed
    Whether the values are allowed.
  • Forms
    The forms where the pattern is applied.

Proposed resolution

  • Group those form elements under a details element (pattern_details)
  • Show the form elements following this order
    • Restriction type
    • Pattern
    • Values matching the pattern are allowed
    • Forms

There are also some properties that needs to be removed:

  • #required for Expiration (A details element cannot be required, since it is just a container.)
  • #open for the container element (It is not a details element.)
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Assigned: Unassigned » avpaderno
avpaderno’s picture

I am working on it.

avpaderno’s picture

Status: Active » Needs review
avpaderno’s picture

Status: Needs review » Needs work

For some reasons, it tries to assign an array to UserRestriction::$expiration.

This is the logged exception.

TypeError: Cannot assign array to property Drupal\user_restrictions\Entity\UserRestriction::$expiration of type int in Drupal\Core\Config\Entity\ConfigEntityBase->set() (line 173 of /var/www/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php).

avpaderno’s picture

Status: Needs work » Needs review

That is not caused by the changes done in this issue. I will investigate and create a new issue to fix that.

avpaderno’s picture

Version: 3.0.x-dev » 2.1.x-dev

avpaderno’s picture

Issue summary: View changes

  • avpaderno committed 6e6e2d3a on 2.1.x
    Issue #3551764: Add a details form element for pattern and related form...
avpaderno’s picture

Assigned: avpaderno » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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