diff --git a/js/build.templates.js b/js/build.templates.js index ae6d60c0..d029bed4 100644 --- a/js/build.templates.js +++ b/js/build.templates.js @@ -7,15 +7,15 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.buttons"] = Handleb },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.checkbox"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "\n"; + return "\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.date"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n
\n
\n \n
\n\n \n
\n
\n
\n \n
\n\n \n
\n

Field is required.

\n"; + return "
{{ description }}
\n
\n \n\n \n
\n
\n\n \n\n \n
\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.email"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

The input is not a valid email address.

\n

Field is required.

\n"; + return "
{{ description }}
\n\n\n

The input is not a valid email address.

\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.field"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -39,7 +39,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.image"] = Handlebar },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.input"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

Field is required.

\n"; + return "
{{ description }}
\n\n\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.interface"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -51,7 +51,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.interface"] = Handl },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.number"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

This field only accept up to 15 digits.

\n

Field is required.

\n

Only positive digits are allowed.

\n

Only integer digits are allowed.

\n

Only digits or {{decimals}} digits after point are allowed.

\n"; + return "
{{ description }}
\n\n\n\n\n

This field only accept up to 15 digits.

\n

Field is required.

\n

Only positive digits are allowed.

\n

Only integer digits are allowed.

\n

Only digits or {{decimals}} digits after point are allowed.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.paragraph"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -63,11 +63,11 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.password"] = Handle },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.radio"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "\n"; + return "\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.select"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

Field is required.

\n"; + return "
{{ description }}
\n\n\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.signature"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -75,19 +75,19 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.signature"] = Handl },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.starRating"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n
\n \n
\n

Field is required.

\n"; + return "
{{ description }}
\n
\n \n
\n
\n \n
\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.telephone"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

Field is required.

\n

Phone could contain ; , . ( ) - + SPACE * # and numbers.

\n"; + return "
{{ description }}
\n
\n

{{ value }}

\n \n
\n\n\n

Field is required.

\n

Phone could contain ; , . ( ) - + SPACE * # and numbers.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.textarea"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

Field is required.

\n"; + return "
{{ description }}
\n\n\n\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.time"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n
\n
\n \n
\n\n \n
\n

Field is required.

\n"; + return "
{{ description }}
\n
\n \n\n \n
\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.title"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -95,7 +95,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.title"] = Handlebar },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.url"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
{{ description }}
\n\n

The input is not a valid URL.

\n

Field is required.

\n"; + return "
{{ description }}
\n\n\n\n

The input is not a valid URL.

\n

Field is required.

\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.components.wysiwyg"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -103,5 +103,5 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.wysiwyg"] = Handleb },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.configurations.radio"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n \n \n
\n
\n \n \n
\n"; + return "
\n \n \n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n"; },"useData":true}); \ No newline at end of file diff --git a/js/components/textarea.js b/js/components/textarea.js index 93142e1d..ef54d4aa 100644 --- a/js/components/textarea.js +++ b/js/components/textarea.js @@ -22,5 +22,10 @@ Fliplet.FormBuilder.field('textarea', { rules.value.required = window.validators.required; } return rules; + }, + methods: { + replaceNewLines: function(value) { + return value.replace(/(?:\r\n|\r|\n)/g, '
') + } } }); diff --git a/js/interface.templates.js b/js/interface.templates.js index a278abef..a68b2a19 100644 --- a/js/interface.templates.js +++ b/js/interface.templates.js @@ -7,15 +7,15 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.buttons"] = Han },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.configurations.checkbox"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n"; + return "
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.configurations.time"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n"; + return "
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.configurations.title"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -92,7 +92,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.title"] = Handl },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.configurations.url"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n"; + return "
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.configurations.wysiwyg"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { diff --git a/js/libs/core.js b/js/libs/core.js index 5674b7cf..d2b85127 100644 --- a/js/libs/core.js +++ b/js/libs/core.js @@ -161,6 +161,10 @@ Fliplet.FormBuilder = (function() { canHide: { type: Boolean, default: true + }, + readonly: { + type: Boolean, + default: false } }, component.props); diff --git a/templates/components/checkbox.build.hbs b/templates/components/checkbox.build.hbs index 87297d95..235dfd8d 100644 --- a/templates/components/checkbox.build.hbs +++ b/templates/components/checkbox.build.hbs @@ -1,18 +1,34 @@ +\{{ description }} - +

\{{ value }}

+ + +\{{ description }} - +

\{{ value }}

+ + + +
\{{ description }}
- diff --git a/templates/components/select.build.hbs b/templates/components/select.build.hbs index f3d289d4..a8701991 100644 --- a/templates/components/select.build.hbs +++ b/templates/components/select.build.hbs @@ -1,4 +1,20 @@
\{{ description }}
+ + diff --git a/templates/components/starRating.build.hbs b/templates/components/starRating.build.hbs index 70bd0cc7..5f0211c9 100644 --- a/templates/components/starRating.build.hbs +++ b/templates/components/starRating.build.hbs @@ -1,5 +1,23 @@
\{{ description }}
-
+
+ +
+