Merge pull request #1970 from Kasalehlia/fix-form-reset

gluon-web-model: update inputs on form reset
This commit is contained in:
Matthias Schiffer 2020-04-09 23:17:39 +02:00 committed by GitHub
commit 7b7cde7256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>">
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" data-update="reset">
<input type="hidden" name="token" value="<%=token%>" />
<input type="hidden" name="<%=id%>" value="1" />

File diff suppressed because one or more lines are too long

View File

@ -517,7 +517,7 @@
for (var i = 0, node; (node = nodes[i]) !== undefined; i++) {
var events = node.getAttribute('data-update').split(' ');
for (var j = 0, event; (event = events[j]) !== undefined; j++) {
bind(node, event, update);
bind(node, event, function () {setTimeout(update, 0);});
}
}