jojo/web_src
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
..
css feat(ui): improve close/reopen/comment buttons (#9598) 2025-10-10 07:11:53 +02:00
fomantic Lock file maintenance (forgejo) (#9539) 2025-10-06 06:31:11 +02:00
js fix(ui): make it possible to post issues and comments w/o JS (#9614) 2025-10-11 10:38:48 +02:00
svg Add support for migrating from Pagure (#8513) 2025-08-11 16:56:26 +02:00