Skip to content
Snippets Groups Projects
Commit e04ddeaa authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] web: client action change password

1. To change the page title, you now have to call
`set_title` from `require('web.web_client')`

2. Without the `type="button"`, the `Change Password`
button is regarded as a `type="submit"`, therefore
submitting the form, on `web` on click,
and `web` doesn't expect this POST request.
The POST request must be done on
`/web/session/change_password` only.

opw-660567
parent f7dab86a
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ odoo.define('web.ChangePassword', function (require) {
var core = require('web.core');
var Dialog = require('web.Dialog');
var Widget = require('web.Widget');
var web_client = require('web.web_client');
var _t = core._t;
......@@ -11,7 +12,7 @@ var ChangePassword = Widget.extend({ // FIXME
template: "ChangePassword",
start: function() {
var self = this;
this.getParent().set_title(_t("Change Password"));
web_client.set_title(_t("Change Password"));
var $button = self.$el.find('.oe_form_button');
$button.appendTo(this.getParent().$footer);
$button.eq(1).click(function(){
......
......@@ -56,7 +56,7 @@
</tr>
<tr>
<td colspan="2" align="right">
<button class='oe_button oe_form_button'>Change Password</button>
<button type="button" class='oe_button oe_form_button'>Change Password</button>
<button type="button" class="oe_button oe_form_button_cancel oe_form_button oe_link" href="javascript:void(0)"><span>Cancel</span></button>
</td>
</tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment