summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2014-02-05 10:23:54 +0100
committerFabien Meghazi <fme@openerp.com>2014-02-05 10:23:54 +0100
commit9ffb9d56322949ef7db0afea44f6e4b9c856c01a (patch)
treef489b20c7b4d3098da82d49525959cca32b41ac1
parent6400ffb5e548d91548c828e14f980060b9fae191 (diff)
[REM] Removed LoginForm javascript related
bzr revid: fme@openerp.com-20140205092354-oa6qxm0fsuojhuc2
-rw-r--r--addons/auth_signup/__openerp__.py2
-rw-r--r--addons/auth_signup/controllers/main.py6
-rw-r--r--addons/auth_signup/static/src/js/auth_signup.js19
-rw-r--r--addons/auth_signup/views/auth_signup_login.xml15
4 files changed, 4 insertions, 38 deletions
diff --git a/addons/auth_signup/__openerp__.py b/addons/auth_signup/__openerp__.py
index 50402207018..2aaaf61d3dd 100644
--- a/addons/auth_signup/__openerp__.py
+++ b/addons/auth_signup/__openerp__.py
@@ -42,6 +42,6 @@ Allow users to sign up and reset their password
'res_users_view.xml',
'views/auth_signup_login.xml',
],
- 'js': ['static/src/js/auth_signup.js'],
+ 'js': [],
'bootstrap': True,
}
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py
index 2db1e3dff65..06c916d9580 100644
--- a/addons/auth_signup/controllers/main.py
+++ b/addons/auth_signup/controllers/main.py
@@ -30,7 +30,7 @@ from openerp.tools import exception_to_unicode
_logger = logging.getLogger(__name__)
-class Home(openerp.addons.web.controllers.main.Home):
+class AuthSignup(openerp.addons.web.controllers.main.Home):
@http.route()
def web_login(self, *args, **kw):
@@ -60,7 +60,7 @@ class Home(openerp.addons.web.controllers.main.Home):
qcontext.update(config)
if 'error' in qcontext or mode not in ('reset', 'signup') or (not token and not config[mode]):
- response = super(Home, self).web_login(*args, **kw)
+ response = super(AuthSignup, self).web_login(*args, **kw)
if isinstance(response, LazyResponse):
response.params['values'].update(config)
return response
@@ -86,7 +86,7 @@ class Home(openerp.addons.web.controllers.main.Home):
request.cr.commit()
except SignupError, e:
qcontext['error'] = exception_to_unicode(e)
- return super(Home, self).web_login(*args, **kw)
+ return super(AuthSignup, self).web_login(*args, **kw)
return response
diff --git a/addons/auth_signup/static/src/js/auth_signup.js b/addons/auth_signup/static/src/js/auth_signup.js
deleted file mode 100644
index a317440fd6b..00000000000
--- a/addons/auth_signup/static/src/js/auth_signup.js
+++ /dev/null
@@ -1,19 +0,0 @@
-openerp.auth_signup = function(instance) {
- openerp.web.LoginForm.include({
- start: function () {
- var self = this;
- this.$el.on('submit', function () {
- var password = self.get_password_field('password');
- var confirm_password = self.get_password_field('confirm_password');
- if (password && confirm_password && (password.value != confirm_password.value)) {
- alert("Passwords do not match; please retype them.");
- return false;
- }
- });
- },
- get_password_field: function (field) {
- var selector = 'input[name="' + field + '"][type="password"]:visible';
- return this.$(selector)[0];
- },
- });
-};
diff --git a/addons/auth_signup/views/auth_signup_login.xml b/addons/auth_signup/views/auth_signup_login.xml
index bdc093e3c27..cf1f96d49e9 100644
--- a/addons/auth_signup/views/auth_signup_login.xml
+++ b/addons/auth_signup/views/auth_signup_login.xml
@@ -12,21 +12,6 @@
<template id="auth_signup.signup" name="Sign up">
<t t-call="web.login_layout">
- <t t-set="head">
- <t t-foreach="css" t-as="css_file">
- <link rel="stylesheet" t-att-href="css_file"/>
- </t>
- <t t-foreach="js" t-as="js_file">
- <script type="text/javascript" t-att-src="js_file"></script>
- </t>
- </t>
- <script type="text/javascript">
- $(function() {
- var s = new openerp.init(<t t-raw="modules"/>);
- var login_form = new openerp.web.LoginForm($('.oe_signup_form'));
- });
- </script>
-
<t t-set="reset_without_token" t-value="mode == 'reset' and not token"/>
<form class="oe_signup_form" role="form" t-attf-action="/web/login{{ '?debug' if debug else '' }}" method="post">