From f1d9a3ba067fb5369ad156da23c166ea586604e8 Mon Sep 17 00:00:00 2001 From: costin Date: Sat, 28 Oct 2023 17:42:40 +0300 Subject: [PATCH] Added enable other in admin. --- lang/en.json | 1 + resources/js/components/Blocks/Form/Checkbox.vue | 2 ++ resources/js/components/Form/CheckboxGroup.vue | 16 ++++++++++++++++ .../components/blocks/form/checkbox.blade.php | 11 ++++++++++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index f343ded2..cf1d5c25 100644 --- a/lang/en.json +++ b/lang/en.json @@ -256,6 +256,7 @@ "field.question": "Question", "field.recipients": "Recipients", "field.required": "Required", + "field.enable_other": "Enable other", "field.role": "Role", "field.route": "Route", "field.send_submissions": "Send submissions by email", diff --git a/resources/js/components/Blocks/Form/Checkbox.vue b/resources/js/components/Blocks/Form/Checkbox.vue index 48471ba7..17515d71 100644 --- a/resources/js/components/Blocks/Form/Checkbox.vue +++ b/resources/js/components/Blocks/Form/Checkbox.vue @@ -20,6 +20,8 @@ :help="$t('field_help.one_per_line')" v-model="content.options" /> + +
@foreach ($block->options() as $option) @@ -21,5 +23,12 @@ @endforeach + + @if ($block->checkbox('enable_other')) +
+ + +
+ @endif