Closed (fixed)
Project:
User Restrictions
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2025 at 22:11 UTC
Updated:
25 Oct 2025 at 23:34 UTC
Jump to comment: Most recent
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,
];
Change the form element for the ID property to be disabled when the user restriction is edited.
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
Comment #3
avpadernoComment #7
avpadernoComment #10
avpaderno