Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
geolocation
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
geolocation
Commits
cc7a1377
Commit
cc7a1377
authored
3 days ago
by
Christian Adamski
Browse files
Options
Downloads
Patches
Plain Diff
#3511987
address selector
parent
29501442
No related branches found
No related tags found
No related merge requests found
Pipeline
#444748
failed
3 days ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/geolocation_address/js/WidgetSubscriber/GeolocationAddressWidget.js
+5
-3
5 additions, 3 deletions
...n_address/js/WidgetSubscriber/GeolocationAddressWidget.js
with
5 additions
and
3 deletions
modules/geolocation_address/js/WidgetSubscriber/GeolocationAddressWidget.js
+
5
−
3
View file @
cc7a1377
...
...
@@ -47,15 +47,17 @@ export default class GeolocationAddressWidget extends FieldWidgetBase {
getAllInputElements
(
returnElements
=
false
)
{
const
hyphenatedFieldName
=
this
.
settings
.
field_name
.
replaceAll
(
"
_
"
,
"
-
"
);
const
pattern
=
new
RegExp
(
`
^edit-
${
hyphenatedFieldName
}
-
\\
d+$`
);
const
pattern
=
new
RegExp
(
`
${
hyphenatedFieldName
}
-
\\
d+$`
);
const
map
=
new
Map
();
const
elements
=
this
.
form
.
querySelectorAll
(
`details[data-drupal-selector*="
${
this
.
settings
.
field_name
.
replaceAll
(
"
_
"
,
"
-
"
)}
-"]`
);
const
elements
=
Array
.
from
(
this
.
form
.
querySelectorAll
(
`[data-drupal-selector*="
${
hyphenatedFieldName
}
-"]`
)).
filter
((
element
)
=>
{
return
pattern
.
test
(
element
.
getAttribute
(
"
data-drupal-selector
"
));
});
if
(
returnElements
)
{
return
elements
;
}
const
map
=
new
Map
();
elements
.
forEach
((
element
)
=>
{
map
.
set
(
this
.
getIndexByElement
(
element
),
element
);
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment