Resolve "Elements with non-unique id on on projects new"
What does this MR do?
The project form on /projects/new is rendered four times on /projects/new
. This PR adds a namespace to each form so that the element ids are unique again. I tried to keep the functionality the same. Where id selectors were ambiguous (e.g. #project_new
) I used the corresponding id selector for a blank project. Where context was needed (e.g. generic id element within a tab) I introduced a new js-
selector class.
Following nested form elements have their id now prefixed with #blank_project_
, #template_project_
, #import_url_
. Need to check and update references in js/css.
-
#project_ci_cd_only
-
#new_project
-
#project_name
-
#project_namespace_id (hidden)
-
#project_path
-
#project_description
-
#project_visibility_level_n
-
#project_import_url
-
#project_use_custom_template
-
#project_mirror
Background: An newer version of select2 refuses to work with multiple select
elements that share the same id out of the box (#32100 (closed)).
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Closes #200001 (closed)
Edited by 🤖 GitLab Bot 🤖