Skip to content

Commit 9efe3ab

Browse files
committed
prevent login-form submition on enter
1 parent 24f373a commit 9efe3ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/js/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5016,7 +5016,7 @@ var ՐՏ_modules = ՐՏ_def_modules();
50165016
var __name__ = "components.login";
50175017

50185018
var templ_login, vc;
5019-
templ_login = "\n<XModal :can_cancel = 'false' max_width = '300px'>\n <template v-slot:title>\n Login\n </template>\n <template v-slot:body>\n <form ref = 'frm'>\n <div class = 'field'>\n <p class = 'control has-icons-left'>\n <input name = 'password' class = 'input' type = 'password' placeholder = 'password' @keydown.enter = \"ok\"/>\n <span class = \"icon is-small is-left\">\n <i class = \"fas fa-lock\"></i>\n </span>\n </p>\n </div>\n </form>\n </template>\n <template v-slot:footer>\n <div class = 'container buttons is-right'>\n <button class = 'button is-primary' @click.stop.prevent = 'ok'>OK</button>\n </div>\n </template>\n</XModal>\n";
5019+
templ_login = "\n<XModal :can_cancel = 'false' max_width = '300px'>\n <template v-slot:title>\n Login\n </template>\n <template v-slot:body>\n <form ref = 'frm' method = 'post' @submit.prevent.stop>\n <div class = 'field'>\n <p class = 'control has-icons-left'>\n <input name = 'password' class = 'input' type = 'password' placeholder = 'password' @keydown.enter = \"ok\"/>\n <span class = \"icon is-small is-left\">\n <i class = \"fas fa-lock\"></i>\n </span>\n </p>\n </div>\n </form>\n </template>\n <template v-slot:footer>\n <div class = 'container buttons is-right'>\n <button class = 'button is-primary' @click.stop.prevent = 'ok'>OK</button>\n </div>\n </template>\n</XModal>\n";
50205020
var V_collector = ՐՏ_modules["asset.rs_vue"].V_collector;var RS_vue = ՐՏ_modules["asset.rs_vue"].RS_vue;
50215021
var asyncer = ՐՏ_modules["asset.common"].asyncer;
50225022
vc = new V_collector();

vuepy/components/login.vuepy

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ v-def templ_login:
33
template(v-slot:title):
44
'Login'
55
template(v-slot:body):
6-
form(ref = 'frm'):
6+
form(ref = 'frm', method = 'post', @submit.prevent.stop):
77
div(class = 'field'):
88
p(class = 'control has-icons-left'):
99
input(

0 commit comments

Comments
 (0)