summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-01-03 11:10:54 +0000
committerRomain Derie <rde@odoo.com>2019-01-08 12:50:24 +0000
commitd3a7edaec4ad8224345a1f02f8add5547f27b359 (patch)
tree36de87b27c4e781e30d5ba336ac2c0f8b40d6ffd /addons/web/static/src
parent2299d2563bcf0567b3306f06cb35d2474390b14d (diff)
[FIX] web, website: set correct order on modal footer button
Since 12.0, some modal footer button order were changed. The primary button would not be the one in the modal footer corner. This is against bootstrap but more annoyingly, users are intuitively clicking on the secondary button, ending up closing the modal and losing form information they entered. This commit simply fix the regression from 12.0 as before 12.0 these buttons were positionned correctly. Note that a commit in master (saas-12.2) will fix all the other ones that were wrongly positionned before 12.0. Step to reproduce: - Go to an event having the possibility to register. - Click on 'Register Now', a modal is shown to write details (name, email..) - You intuitively click on 'Cancel' as it is the bottom right button |________________________________ CONFIRM _ CANCEL _| - The modal is closed, if you try to open it again your infos are lost Closes #29884 task-1922120
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/core/dialog.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core/dialog.js b/addons/web/static/src/js/core/dialog.js
index 492ea06c7bd..83eded92c8a 100644
--- a/addons/web/static/src/js/core/dialog.js
+++ b/addons/web/static/src/js/core/dialog.js
@@ -143,7 +143,11 @@ var Dialog = Widget.extend({
$.when(def).always(self.close.bind(self));
}
});
- self.$footer.append($button);
+ if (self.technical) {
+ self.$footer.append($button);
+ } else {
+ self.$footer.prepend($button);
+ }
});
},