Skip to content
Snippets Groups Projects
Commit f9a6d7d6 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

improve form pre-completion

parent d55280dd
No related branches found
No related tags found
No related merge requests found
from odoo import http, tools, _ from odoo import http, tools, _
from odoo.addons.web.controllers.home import SIGN_UP_REQUEST_PARAMS
from odoo.addons.auth_signup.controllers.main import AuthSignupHome from odoo.addons.auth_signup.controllers.main import AuthSignupHome
# add firstname and lastname to qcontext whitelist
SIGN_UP_REQUEST_PARAMS.update({"firstname", "lastname"})
class SolagroAuthSignupHome(AuthSignupHome): class SolagroAuthSignupHome(AuthSignupHome):
@http.route('/web/signup', type='http', auth='public', website=True, sitemap=False) @http.route('/web/signup', type='http', auth='public', website=True, sitemap=False)
def web_auth_signup(self, **post): def web_auth_signup(self, **post):
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<xpath expr="//input[@id='login']" position="attributes"> <xpath expr="//input[@id='login']" position="attributes">
<attribute name="type">email</attribute> <attribute name="type">email</attribute>
<attribute name="name">email</attribute> <attribute name="name">email</attribute>
<attribute name="t-att-value">email</attribute>
<attribute name="t-attf-class">form-control {{'is-invalid' if error_email else ''}}</attribute> <attribute name="t-attf-class">form-control {{'is-invalid' if error_email else ''}}</attribute>
</xpath> </xpath>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment