From 9ff21bb58baea518f623a7e1cd9eb28494357ed4 Mon Sep 17 00:00:00 2001 From: Montana Date: Wed, 2 Jan 2019 13:47:00 -0500 Subject: [PATCH] Toggle other text input --- js/components/multi_checkbox_input.js | 6 +++++- templates/components/multi_checkbox_input.html | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/js/components/multi_checkbox_input.js b/js/components/multi_checkbox_input.js index f5e7ccbd..1f41637b 100644 --- a/js/components/multi_checkbox_input.js +++ b/js/components/multi_checkbox_input.js @@ -18,6 +18,7 @@ export default { default: () => [] }, initialValue: Array, + otherChecked: Boolean, }, @@ -26,7 +27,7 @@ export default { return { showError: showError, showValid: !showError && !!this.initialValue, - validationError: this.initialErrors.join(' ') + validationError: this.initialErrors.join(' '), } }, @@ -39,6 +40,9 @@ export default { }) this.showError = false this.showValid = true + }, + otherToggle: function() { + this.otherChecked = !this.otherChecked } } } diff --git a/templates/components/multi_checkbox_input.html b/templates/components/multi_checkbox_input.html index b11ec0ae..3adc0891 100644 --- a/templates/components/multi_checkbox_input.html +++ b/templates/components/multi_checkbox_input.html @@ -29,10 +29,16 @@