ITISAG-Git
5 years ago
11 changed files with 76 additions and 57 deletions
-
2.gitignore
-
0website_contact_extend/__manifest__.py
-
49website_contact_extend/controllers/contactby.py
-
43website_contact_extend/controllers/myfilter.py
-
0website_contact_extend/models/__init__.py
-
2website_contact_extend/models/res_partner.py
-
2website_contact_extend/security/ir.model.access.csv
-
29website_contact_extend/static/src/js/contactus.js
-
2website_contact_extend/views/disp_msg_template.xml
-
2website_contact_extend/views/email_template.xml
-
2website_contact_extend/views/website_contact.xml
@ -1,4 +1,4 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
|||
access_mail_template,access.mail.template.view,mail.model_mail_template,,1,0,0,0 |
|||
access_crm_lead_record,access.crm.lead.record,crm.model_crm_lead,,1,0,0,0 |
|||
access_mail_mail_record,access.mail.mail.record,mail.model_mail_mail,,1,1,1,0 |
|||
access_mail_mail_record,access.mail.mail.record,mail.model_mail_mail,,1,1,1,0 |
@ -1,41 +1,40 @@ |
|||
odoo.define('website_contact_extend.success_page', function (require) { |
|||
odoo.define('website_contact_extend.success_page', function(require) { |
|||
"use strict"; |
|||
|
|||
var ajax = require("web.ajax"); |
|||
|
|||
// function check_user_exists(){
|
|||
// }
|
|||
|
|||
$(document).on('blur', '.input_email_from', function (ev) { |
|||
$(document).on('blur', '.input_email_from', function(ev) { |
|||
var email_from = $('.input_email_from').val(); |
|||
var company_name = $('.input_company').val(); |
|||
|
|||
return ajax.jsonRpc('/check_user_exists', 'call', { |
|||
email_from: email_from, |
|||
email_from: email_from, |
|||
company_name: company_name, |
|||
}).then(function (res) { |
|||
}).then(function(res) { |
|||
var contactus_page = "/contactus-thank-you"; |
|||
if(res){ |
|||
if (res) { |
|||
contactus_page = "/contact-us-form-review"; |
|||
} |
|||
$('form[action="/website_form/"]').attr('data-success_page',contactus_page); |
|||
var formaction_webform = 'form[action="/website_form/"]'; |
|||
$(formaction_webform).attr('data-success_page', contactus_page); |
|||
}); |
|||
}); |
|||
|
|||
$(document).on('blur', '.input_company', function (ev) { |
|||
$(document).on('blur', '.input_company', function(ev) { |
|||
var email_from = $('.input_email_from').val(); |
|||
var company_name = $('.input_company').val(); |
|||
|
|||
return ajax.jsonRpc('/check_user_exists', 'call', { |
|||
email_from: email_from, |
|||
email_from: email_from, |
|||
company_name: company_name, |
|||
}).then(function (res) { |
|||
}).then(function(res) { |
|||
var contactus_page = "/contactus-thank-you"; |
|||
if(res){ |
|||
if (res) { |
|||
contactus_page = "/contact-us-form-review"; |
|||
} |
|||
$('form[action="/website_form/"]').attr('data-success_page',contactus_page); |
|||
var formaction_webform = 'form[action="/website_form/"]'; |
|||
$(formaction_webform).attr('data-success_page', contactus_page); |
|||
}); |
|||
}); |
|||
|
|||
}); |
|||
}); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue