Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!4816
Issue
#3388071
: Disabled and readonly form element attributes should be boolean HTML5 attributes
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Open
Issue
#3388071
: Disabled and readonly form element attributes should be boolean HTML5 attributes
issue/drupal-3388071:3388071-disabled-and-readonly
into
11.x
Overview
0
Commits
2
Pipelines
3
Changes
5
Open
Issue #3388071: Disabled and readonly form element attributes should be boolean HTML5 attributes
Dave Reid
requested to merge
issue/drupal-3388071:3388071-disabled-and-readonly
into
11.x
Sep 18, 2023
Overview
0
Commits
2
Pipelines
3
Changes
5
0
0
Merge request reports
Compare
11.x
version 2
8d039c2b
2 months ago
version 1
291e3450
Sep 18, 2023
11.x (HEAD)
and
latest version
latest version
6a854228
2 commits,
2 months ago
version 2
8d039c2b
1 commit,
2 months ago
version 1
291e3450
1 commit,
Sep 18, 2023
5 files
+
5
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
core/lib/Drupal/Core/Form/FormBuilder.php
+
2
−
2
View file @ 23a06a9e
Edit in single-file editor
Open in Web IDE
Show full file
@@ -1209,10 +1209,10 @@ protected function handleInputElement($form_id, &$element, FormStateInterface &$
// JavaScript on document ready.
if
(
!
empty
(
$element
[
'#disabled'
]))
{
if
(
!
empty
(
$element
[
'#allow_focus'
]))
{
$element
[
'#attributes'
][
'readonly'
]
=
'readonly'
;
$element
[
'#attributes'
][
'readonly'
]
=
TRUE
;
}
else
{
$element
[
'#attributes'
][
'disabled'
]
=
'disabled'
;
$element
[
'#attributes'
][
'disabled'
]
=
TRUE
;
}
}
Loading