summaryrefslogtreecommitdiff
path: root/addons/website_form/static/src/js
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/website_form/static/src/js
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/website_form/static/src/js')
-rw-r--r--addons/website_form/static/src/js/website_form_editor_registry.js57
1 files changed, 57 insertions, 0 deletions
diff --git a/addons/website_form/static/src/js/website_form_editor_registry.js b/addons/website_form/static/src/js/website_form_editor_registry.js
new file mode 100644
index 00000000..35acc904
--- /dev/null
+++ b/addons/website_form/static/src/js/website_form_editor_registry.js
@@ -0,0 +1,57 @@
+odoo.define('website_form.form_editor_registry', function (require) {
+'use strict';
+
+var Registry = require('web.Registry');
+
+return new Registry();
+
+});
+
+odoo.define('website_form.send_mail_form', function (require) {
+'use strict';
+
+var core = require('web.core');
+var FormEditorRegistry = require('website_form.form_editor_registry');
+
+var _t = core._t;
+
+FormEditorRegistry.add('send_mail', {
+ formFields: [{
+ type: 'char',
+ custom: true,
+ required: true,
+ name: 'Your Name',
+ }, {
+ type: 'tel',
+ custom: true,
+ name: 'Phone Number',
+ }, {
+ type: 'email',
+ modelRequired: true,
+ name: 'email_from',
+ string: 'Your Email',
+ }, {
+ type: 'char',
+ custom: true,
+ name: 'Your Company',
+ }, {
+ type: 'char',
+ modelRequired: true,
+ name: 'subject',
+ string: 'Subject',
+ }, {
+ type: 'text',
+ custom: true,
+ required: true,
+ name: 'Your Question',
+ }],
+ fields: [{
+ name: 'email_to',
+ type: 'char',
+ required: true,
+ string: _t('Recipient Email'),
+ defaultValue: 'info@yourcompany.example.com',
+ }],
+});
+
+});