Problem/Motivation

The form element for the ID (name in the 2.0.x branch) property must be disabled when the user restriction is edited.

This is what done for other configuration entities, for example filter_format.

    $form['format'] = [
      '#type' => 'machine_name',
      '#required' => TRUE,
      '#default_value' => $format->id(),
      '#maxlength' => 255,
      '#machine_name' => [
        'exists' => [
          $this,
          'exists',
        ],
        'source' => [
          'name',
        ],
      ],
      '#disabled' => !$format->isNew(),
      '#weight' => -20,
    ];

Proposed resolution

Change the form element for the ID property to be disabled when the user restriction is edited.

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

Status: Active » Needs review

  • avpaderno committed b5315497 on 3.0.x
    Issue #3551647: The form element for the ID property must be disabled...
avpaderno’s picture

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

  • avpaderno committed 3c7ee2ab on 2.0.x
    Issue #3551647: The form element for the ID property must be disabled...
avpaderno’s picture

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.