From b791d0699c5b19765df32def743645d77c62d5b2 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sat, 6 Apr 2024 21:55:46 +0300 Subject: [PATCH] fix replace button file types --- app/javascript/template_builder/builder.vue | 1 + app/javascript/template_builder/controls.vue | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index bb80edc4..cdf74092 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -175,6 +175,7 @@ :with-arrows="template.schema.length > 1" :item="template.schema.find((item) => item.attachment_uuid === document.uuid)" :with-replace-button="withUploadButton" + :accept-file-types="acceptFileTypes" :document="document" :template="template" class="pb-2 mb-2 border-b border-base-300 border-dashed" diff --git a/app/javascript/template_builder/controls.vue b/app/javascript/template_builder/controls.vue index 1a1991e0..a192f31b 100644 --- a/app/javascript/template_builder/controls.vue +++ b/app/javascript/template_builder/controls.vue @@ -9,6 +9,7 @@ @@ -62,6 +63,11 @@ export default { type: Object, required: true }, + acceptFileTypes: { + type: String, + required: false, + default: 'image/*, application/pdf' + }, withReplaceButton: { type: Boolean, required: true,