Fix pull/push mirror authentication fields
What does this MR do and why?
This fixes the pull/push mirror authentication fields that were not showing.
The issue was related to a toggle on the page that was being initialized but not present on the page at the time of initialization.
The fact that the toggles were not present at the time of initialization is due to the HTML not being available in the DOM at the time of initialization (likely license-related or a timing issue).
To prevent it from happening again I've added a null-safe check around the initialization of the toggles.
Screenshots or screen recordings
before | after |
---|---|
How to set up and validate locally
-
Create a GitLab instance with the Bronze tier
-
Navigate to
{project} > settings > repository > Mirroring repositories
-
Notice the Authentication fields are not missing
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #353433 (closed)