]> source.dussan.org Git - gitea.git/commit
Make "cancel" buttons have proper type in modal forms (#25618) (#25641)
authorwxiaoguang <wxiaoguang@gmail.com>
Mon, 3 Jul 2023 09:09:38 +0000 (17:09 +0800)
committerGitHub <noreply@github.com>
Mon, 3 Jul 2023 09:09:38 +0000 (17:09 +0800)
commitf51c8e0008c37644a332da990b791e299130d375
treeb32d9087c8f273bef0a3096503f9128c32c41ca0
parentd8a59d5f12fba9bfe8fff1b424ff279a81e817a6
Make "cancel" buttons have proper type in modal forms (#25618) (#25641)

Replace #25446, fix #25438

All "cancel" buttons which do not have "type" should not submit the
form, should not be triggered by "Enter".

This is a complete fix for all modal dialogs.

The major change is "modules/aria/modal.js", "devtest" related code is
for demo/test purpose.
routers/web/devtest/devtest.go
templates/devtest/fomantic-modal.tmpl
web_src/js/modules/aria/modal.js [new file with mode: 0644]
web_src/js/modules/fomantic.js