forgejo/web_src/js
silverwind a01387f5b1
Add form field id generation, remove duplicated ids (#30546)
Fixes: https://github.com/go-gitea/gitea/issues/30384

On repo settings page, there id `repo_name` was used 5 times on the same
page, some in modal and such. I think we are better off just
auto-generating these IDs in the future so that labels link up with
their form element.

Ideally this id generation would be done in backend in a subtemplate,
but seeing that we already have similar JS patches for checkboxes, I
took the easy path for now.

I also checked that these `#repo_name` were not in use in JS and the
only case where this id appears in JS is on the migration page where
it's still there.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit d4ec6b3d16496ce3b479d5a08f79823122dc2b7b)

Conflicts:
	- templates/repo/settings/options.tmpl
	  Conflict resolved by manually removing all `id` and `for`
	  attributes from elements that had `repo_name` as their id.
2024-04-22 08:09:00 +02:00
..
components Action view mobile improvements and fixes (#30309) 2024-04-15 20:01:35 +02:00
features Merge pull request '[BUG] Fix archive button on release page' (#3248) from gusted/forgejo-release-btn into forgejo 2024-04-16 05:18:07 +00:00
markup Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
modules Add form field id generation, remove duplicated ids (#30546) 2024-04-22 08:09:00 +02:00
render Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
standalone lint: apply lint-frontend-fix 2024-03-26 19:04:28 +01:00
utils [PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs 2024-04-15 16:11:34 +02:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
webcomponents [PORT] gitea#29831: Prevent layout shift in <overflow-menu> items 2024-03-28 16:09:14 +01:00
bootstrap.js Fix JS error and improve error message styles (#29963) 2024-03-26 19:04:26 +01:00
bootstrap.test.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
htmx.js Auto-update the system status in admin dashboard (#29163) 2024-02-17 23:24:31 +01:00
index.js replace jquery-minicolors with coloris (#30055) 2024-04-07 11:02:33 +02:00
jquery.js Forbid variables containing jQuery collections not having the $ prefix (#29839) 2024-03-20 08:46:30 +01:00
svg.js Update JS any PY dependencies, remove workarounds (#30085) 2024-03-30 07:17:30 +01:00
svg.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
utils.js enforce maxlength in frontend (#29389) 2024-02-26 22:30:27 +01:00
utils.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
vitest.setup.js [BUG] Render emojis in labels in issue info popup 2024-03-30 11:18:46 +01:00