diff options
| author | qsm-odoo <qsm@odoo.com> | 2015-09-30 13:51:39 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2015-09-30 14:36:36 +0200 |
| commit | f72e9b99194cb4f5d4b21ff82d09ba305ad2e290 (patch) | |
| tree | 099e7264037a044a066f2b4625a47d73ab0fa598 | |
| parent | 580be0360ce0913caf6086cd4f4f77f420b6b450 (diff) | |
[FIX] web: reintroduce ChangePassword template
The template had been previously dropped by mistake.
+ the validation buttons were not correctly handled and so changing
his password was not possible (these buttons must be in the modal
footer).
| -rw-r--r-- | addons/web/static/src/js/widgets/change_password.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 30 |
2 files changed, 32 insertions, 2 deletions
diff --git a/addons/web/static/src/js/widgets/change_password.js b/addons/web/static/src/js/widgets/change_password.js index cded9dc9a4d..a3654e6d0a1 100644 --- a/addons/web/static/src/js/widgets/change_password.js +++ b/addons/web/static/src/js/widgets/change_password.js @@ -13,8 +13,8 @@ var ChangePassword = Widget.extend({ // FIXME var self = this; this.getParent().set_title(_t("Change Password")); var $button = self.$el.find('.oe_form_button'); - $button.appendTo(this.getParent().$buttons); - $button.eq(2).click(function(){ + $button.appendTo(this.getParent().$footer); + $button.eq(1).click(function(){ self.$el.parents('.modal').modal('hide'); }); $button.eq(0).click(function(){ diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 55ccb035735..cae5392cf3b 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -35,6 +35,36 @@ </div> </t> +<t t-name="ChangePassword"> + <form name="change_password_form" method="POST"> + <div class="oe_form"> + <table align="center"> + <tr> + <td class="oe_form_group_cell oe_form_group_cell_label"><label for="old_pwd" class="oe_form_label">Old Password:</label></td> + <td class="oe_form_group_cell"><input type="password" name="old_pwd" + minlength="1" autofocus="autofocus"/></td> + </tr> + <tr> + <td class="oe_form_group_cell oe_form_group_cell_label"><label for="new_password" class="oe_form_label">New Password:</label></td> + <td class="oe_form_group_cell"><input type="password" name="new_password" + minlength="1"/></td> + </tr> + <tr> + <td class="oe_form_group_cell oe_form_group_cell_label"><label for="confirm_pwd" class="oe_form_label">Confirm New Password:</label></td> + <td class="oe_form_group_cell"><input type="password" name="confirm_pwd" + minlength="1"/></td> + </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_cancel oe_form_button oe_link" href="javascript:void(0)"><span>Cancel</span></button> + </td> + </tr> + </table> + </div> + </form> +</t> + <t t-name="Menu.needaction_counter"> <div id="menu_counter" class="badge pull-right"> <t t-if="widget.needaction_counter > 99"> 99+ </t> |
