Merge lp:~unifield-team/unifield-web/web_aio_41 into lp:unifield-web

Proposed by Xavier ALT
Status: Merged
Merged at revision: 4688
Proposed branch: lp:~unifield-team/unifield-web/web_aio_41
Merge into: lp:unifield-web
Diff against target: 41 lines (+15/-2)
2 files modified
addons/openerp/controllers/database.py (+7/-0)
addons/openerp/controllers/templates/database.mako (+8/-2)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/web_aio_41
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+140868@code.launchpad.net

Description of the change

Hi,

This implement requested feature of #AIO-41

Regards,
Xavier

To post a comment you must log in.
4681. By Xavier ALT

[IMP] AIO-41: add newline after 'files.' in information message on super admin password change

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/database.py'
2--- addons/openerp/controllers/database.py 2012-12-03 13:29:03 +0000
3+++ addons/openerp/controllers/database.py 2013-01-29 09:48:20 +0000
4@@ -301,6 +301,13 @@
5 self.msg = {}
6 try:
7 rpc.session.execute_db('change_admin_password', old_password, new_password)
8+ self.msg = {'message': _('The super admin password has been '
9+ 'successfully changed. As a consequence, '
10+ 'you must back up the configuration files.\\n'
11+ 'Please refer to the documentation on how to do it.'),
12+ 'title': _('Information'),
13+ 'redirect_to': '/openerp/login'}
14+ return self.password()
15 except openobject.errors.AccessDenied, e:
16 self.msg = {'message': _('Bad super admin password'),
17 'title' : e.title}
18
19=== modified file 'addons/openerp/controllers/templates/database.mako'
20--- addons/openerp/controllers/templates/database.mako 2010-11-10 13:11:32 +0000
21+++ addons/openerp/controllers/templates/database.mako 2013-01-29 09:48:20 +0000
22@@ -24,11 +24,17 @@
23
24 jQuery(document).ready(function () {
25 jQuery(document.body).append($error_tbl);
26- $error_tbl.dialog({
27+ var error_dialog_options = {
28 modal: true,
29 resizable: false,
30 title: '<div class="error_message_header">${error.get("title", "Warning")}</div>'
31- });
32+ };
33+ % if error.get('redirect_to'):
34+ error_dialog_options['close'] = function( event, ui ) {
35+ $(location).attr('href','${error['redirect_to']}');
36+ };
37+ % endif
38+ $error_tbl.dialog(error_dialog_options);
39 })
40 </script>
41 % endif

Subscribers

People subscribed via source and target branches

to all changes: