aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-06-25 10:03:09 +0800
committerGitHub <noreply@github.com>2023-06-25 10:03:09 +0800
commitb8253607fea3a20d371ec1f6a30133e0ad72a2be (patch)
treece85662483af8861010bfc596f78726be8c0edaf /web_src/js
parent77e449f0be43050bf63db718989140f0a75760d7 (diff)
downloadgitea-b8253607fea3a20d371ec1f6a30133e0ad72a2be.tar.gz
gitea-b8253607fea3a20d371ec1f6a30133e0ad72a2be.zip
Revert "Make buttons in a modal form have proper type. (#25446)" (#25485)
There is a side effect because some modal doesn't have a proper "ok" button. This reverts commit a954c93a68072042aa7dad717b6fa002c83a58fb.
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/common-global.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index 8bbf202eff..e5fd7c29fc 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -395,8 +395,6 @@ function initGlobalShowModal() {
if (colorPickers.length > 0) {
initCompColorPicker(); // FIXME: this might cause duplicate init
}
- // all non-"ok" buttons which do not have "type" should not submit the form, should not be triggered by "Enter"
- $modal.find('form button:not(.ok):not([type])').attr('type', 'button');
$modal.modal('setting', {
onApprove: () => {
// "form-fetch-action" can handle network errors gracefully,