Skip to content
Permalink
Browse files

feat: add jexl textarea for isRequired (#232)

  • Loading branch information...
fkm authored and czosel committed May 13, 2019
1 parent 020f9c8 commit 7b3e16aaf4338b4cf0c6a603a755227a8b48eca5
@@ -3,6 +3,7 @@ import layout from "../templates/components/cfb-jexl-boolean-toggle-switch";
import jexl from "jexl";
import { reads } from "@ember/object/computed";
import { task } from "ember-concurrency";
import { computed } from "@ember/object";

export default RenderComponent.extend({
layout,
@@ -19,6 +20,11 @@ export default RenderComponent.extend({
return yield jexl.eval(this.get("value"));
}),

disabled: computed("value", function() {
const value = this.get("value");
return !(value === "true" || value === "false");
}),

actions: {
toggle(boolValue) {
this.get("update")(String(boolValue));
@@ -271,6 +271,13 @@
name="isHidden"
class="jexl-textarea"
}}

{{f.input
type="textarea"
label=(t "caluma.form-builder.question.isRequired")
name="isRequired"
class="jexl-textarea"
}}
{{/if}}

<div class="uk-text-right">
@@ -5,5 +5,6 @@
value=boolValue
size=size
name=name
disabled=disabled
update=(action "toggle")
}}
@@ -5,6 +5,7 @@
value=value
size=size
name=name
disabled=disabled
on-toggle=(action "toggle")
}}
</div>

0 comments on commit 7b3e16a

Please sign in to comment.
You can’t perform that action at this time.