Form visibility closed (#91)

This commit is contained in:
Chirag Chhatrala
2023-02-19 17:41:50 +05:30
committed by GitHub
parent 9137282eba
commit d6930d0dc2
7 changed files with 22 additions and 5 deletions

View File

@@ -33,7 +33,7 @@
</div>
</v-transition>
<div v-if="isPublicFormPage && form.is_closed"
<div v-if="isPublicFormPage && (form.is_closed || form.visibility=='closed')"
class="border shadow-sm p-2 my-4 flex items-center rounded-md bg-yellow-100 border-yellow-500"
>
<div class="flex-grow">
@@ -68,7 +68,7 @@
</div>
<transition
v-if="!form.is_password_protected && (!isPublicFormPage || (!form.is_closed && !form.max_number_of_submissions_reached))"
v-if="!form.is_password_protected && (!isPublicFormPage || (!form.is_closed && !form.max_number_of_submissions_reached && form.visibility!='closed'))"
enter-active-class="duration-500 ease-out"
enter-class="translate-x-full opacity-0"
enter-to-class="translate-x-0 opacity-100"

View File

@@ -126,7 +126,7 @@
help="If filled, then the form won't accept submissions after the given date"
:required="false"
/>
<rich-text-area-input v-if="form.closes_at" name="closed_text"
<rich-text-area-input v-if="form.closes_at || form.visibility=='closed'" name="closed_text"
:form="form"
label="Closed form text"
help="This message will be shown when the form will be closed"

View File

@@ -90,6 +90,10 @@ export default {
{
name: "Draft (form won't be accessible)",
value: "draft"
},
{
name: "Closed",
value: "closed"
}
],
isCollapseOpen: true

View File

@@ -50,6 +50,7 @@
submission{{ form.submissions_count > 0 ? 's' : '' }}
</li>
<li class="list-disc ml-6 pr-1 text-blue-500" v-if="form.visibility=='draft'">Draft (not public)</li>
<li class="list-disc ml-6 pr-1 text-blue-500" v-if="form.visibility=='closed'">Closed</li>
<li class="list-disc ml-6">Edited {{ form.last_edited_human }}</li>
</ul>