forgejo/web_src/js
0ko edc6072da2 fix(ui): make it possible to post issues and comments w/o JS (#9614)
Fix regression of https://codeberg.org/forgejo/forgejo/pulls/5589 & https://codeberg.org/forgejo/forgejo/pulls/7006.

Both added invisible input fields with `required` attribute into the forms used for creating issues and adding comments via `combomarkdowneditor.tmpl`. These fields were not related to the form and were only used for the modal dialogs.
* When JS is on, modals are moved out of the form to the bottom of the page by JS that handles modals
* When JS is off, the forms are stuck with invisible inputs preventing form submission
    * Another side effect is that request data contains these unwanted fields

This was fixed by adding attribute `disabled` to unwanted inputs. Then JS removes it on initialization. Thanks to @Beowulf for helping with choosing the approach!
When a field is `disabled`, the browser doesn't consider it in form validation and doesn't even include it in the request data.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9614
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
2025-10-11 10:38:48 +02:00
..
components fix(ui): Don't use the subtle color for log text (#9507) 2025-10-06 16:34:14 +02:00
features fix(ui): make it possible to post issues and comments w/o JS (#9614) 2025-10-11 10:38:48 +02:00
markup fix: Fix invisible iframes with RENDER_CONTENT_MODE=iframe (#8378) 2025-09-06 16:23:01 +02:00
modules feat: first native dialog for modal (#8859) 2025-09-20 20:09:17 +02:00
render
standalone
utils fix: prevent page jumps due to textarea auto resizing (#7569) 2025-10-01 03:47:19 +02:00
vendor
webcomponents chore: fix a few typos in the documentation (#9134) 2025-09-04 01:53:40 +02:00
bootstrap.js
bootstrap.test.js
emoji.test.js chore: add javascript unit test 2025-08-10 23:11:39 +02:00
htmx.js
index.js fix(ui): make it possible to post issues and comments w/o JS (#9614) 2025-10-11 10:38:48 +02:00
jquery.js
svg.js
svg.test.js
types.d.ts feat: run tsc in CI (#9574) 2025-10-10 15:48:45 +02:00
utils.js
utils.test.js
vitest.setup.js feat: improve custom emojis (#8855) 2025-08-24 16:16:46 +02:00