forgejo/web_src/js
silverwind 2072ff75e8 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.
(cherry picked from commit a01387f5b1)
2024-04-22 07:46:30 +00:00
..
components Action view mobile improvements and fixes (#30309) (#30320) 2024-04-15 16:13:18 +02:00
features Merge pull request '[v1.22/gitea] week 16 cherry pick to v7.0' (#3235) from earl-warren/forgejo:wip-v7.0-gitea-cherry-pick into v7.0/forgejo 2024-04-16 09:31:46 +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 07:46:30 +00: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 Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01: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 When the title in the issue has a value, set the text cursor at the end of the text. (#30090) 2024-03-30 07:17:31 +01: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 14:31:06 +00:00