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 a954c93a68.
This commit is contained in:
wxiaoguang 2023-06-25 10:03:09 +08:00 committed by GitHub
parent 77e449f0be
commit b8253607fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,