summaryrefslogtreecommitdiff
path: root/addons/website_crm/static/src/js
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2020-02-04 17:31:40 +0000
committerqsm-odoo <qsm@odoo.com>2020-02-05 16:13:25 +0000
commit617eba941785aa680edb826e14b0009637d60dee (patch)
tree8a4828c7287e1da320453e6436c86e105d78ef33 /addons/website_crm/static/src/js
parentf434e02f3d965cae754f0c6a0134a56f3f77021b (diff)
[IMP] website_form, *: entirely review s_website_form snippet
*: web_editor, website_crm, website_form_project, website_hr_recruitment, website_sale The form builder is now using the left panel option system. Many new options are introduced to build better forms more quickly. The tests are now running with the new website_form implementation. Part of: https://github.com/odoo/odoo/pull/42189 task-2092425 closes odoo/odoo#42189 Related: odoo/enterprise#7365 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website_crm/static/src/js')
-rw-r--r--addons/website_crm/static/src/js/website_crm_editor.js32
1 files changed, 30 insertions, 2 deletions
diff --git a/addons/website_crm/static/src/js/website_crm_editor.js b/addons/website_crm/static/src/js/website_crm_editor.js
index 44762e58c38..a0492d0eee5 100644
--- a/addons/website_crm/static/src/js/website_crm_editor.js
+++ b/addons/website_crm/static/src/js/website_crm_editor.js
@@ -7,8 +7,36 @@ var FormEditorRegistry = require('website_form.form_editor_registry');
var _t = core._t;
FormEditorRegistry.add('create_lead', {
- defaultTemplateName: 'website_crm.default_crm_form',
- defaultTemplatePath: '/website_crm/static/src/xml/website_crm.xml',
+ formFields: [{
+ type: 'char',
+ required: true,
+ name: 'contact_name',
+ string: 'Your Name',
+ }, {
+ type: 'char',
+ name: 'phone',
+ string: 'Phone Number',
+ }, {
+ type: 'email',
+ required: true,
+ name: 'email_from',
+ string: 'Your Email',
+ }, {
+ type: 'char',
+ required: true,
+ name: 'partner_name',
+ string: 'Your Company',
+ }, {
+ type: 'char',
+ modelRequired: true,
+ name: 'name',
+ string: 'Subject',
+ }, {
+ type: 'text',
+ required: true,
+ name: 'description',
+ string: 'Your Question',
+ }],
fields: [{
name: 'team_id',
type: 'many2one',