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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!3406
Keep machine name generation after both HTML and non-HTML validation failure + tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Keep machine name generation after both HTML and non-HTML validation failure + tests
issue/drupal-3038141:3038141-machine
into
10.1.x
Overview
10
Commits
34
Pipelines
0
Changes
3
Closed
Harumi Jang
requested to merge
issue/drupal-3038141:3038141-machine
into
10.1.x
2 years ago
Overview
10
Commits
34
Pipelines
0
Changes
3
Expand
Closes
#3038141
0
0
Merge request reports
Compare
10.1.x
version 16
008b654f
2 years ago
version 15
0e0e789b
2 years ago
version 14
6ea37c95
2 years ago
version 13
63f3dcc5
2 years ago
version 12
131c2eb6
2 years ago
version 11
a4f62638
2 years ago
version 10
5290a901
2 years ago
version 9
98230c49
2 years ago
version 8
f9d681d8
2 years ago
version 7
90b3e2c7
2 years ago
version 6
9fdd1e2d
2 years ago
version 5
15549fbf
2 years ago
version 4
336a2ee1
2 years ago
version 3
91af5e94
2 years ago
version 2
7da8d48b
2 years ago
version 1
ff48f4f2
2 years ago
10.1.x (base)
and
latest version
latest version
840019fe
34 commits,
2 years ago
version 16
008b654f
33 commits,
2 years ago
version 15
0e0e789b
32 commits,
2 years ago
version 14
6ea37c95
31 commits,
2 years ago
version 13
63f3dcc5
29 commits,
2 years ago
version 12
131c2eb6
28 commits,
2 years ago
version 11
a4f62638
27 commits,
2 years ago
version 10
5290a901
7 commits,
2 years ago
version 9
98230c49
6 commits,
2 years ago
version 8
f9d681d8
5 commits,
2 years ago
version 7
90b3e2c7
5 commits,
2 years ago
version 6
9fdd1e2d
4 commits,
2 years ago
version 5
15549fbf
4 commits,
2 years ago
version 4
336a2ee1
3 commits,
2 years ago
version 3
91af5e94
2 commits,
2 years ago
version 2
7da8d48b
1 commit,
2 years ago
version 1
ff48f4f2
1 commit,
2 years ago
3 files
+
88
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
core/misc/machine-name.js
+
18
−
6
Options
@@ -47,6 +47,11 @@
function
clickEditHandler
(
e
)
{
const
data
=
e
.
data
;
data
.
$wrapper
.
removeClass
(
'
hidden
'
);
if
(
data
.
$target
.
attr
(
'
data-machine-name-require-when-visible
'
))
{
data
.
$target
.
attr
(
'
required
'
,
true
)
.
removeAttr
(
'
data-machine-name-require-when-visible
'
);
}
data
.
$target
.
trigger
(
'
focus
'
);
data
.
$suffix
.
hide
();
data
.
$source
.
off
(
'
.machineName
'
);
@@ -110,14 +115,25 @@
)
{
return
;
}
// Skip processing upon a form validation error on the machine name.
if
(
$target
.
hasClass
(
'
error
'
))
{
// Skip processing upon a form validation error on a non-empty
// machine name.
if
(
$target
.
hasClass
(
'
error
'
)
&&
$target
[
0
].
value
&&
$target
[
0
].
value
.
trim
().
length
)
{
return
;
}
// Figure out the maximum length for the machine name.
options
.
maxlength
=
$target
.
attr
(
'
maxlength
'
);
// Hide the form item container of the machine name form element.
$wrapper
.
addClass
(
'
hidden
'
);
if
(
$target
.
attr
(
'
required
'
))
{
$target
.
removeAttr
(
'
required
'
)
.
attr
(
'
data-machine-name-require-when-visible
'
);
}
// Initial machine name from the target field default value.
const
machine
=
$target
[
0
].
value
;
// Append the machine name preview to the source field.
@@ -176,10 +192,6 @@
// Initialize machine name preview.
.
trigger
(
'
formUpdated.machineName
'
);
}
// Add a listener for an invalid event on the machine name input
// to show its container and focus it.
$target
.
on
(
'
invalid
'
,
eventData
,
clickEditHandler
);
});
},
Loading