File tree 4 files changed +55
-9
lines changed
4 files changed +55
-9
lines changed Original file line number Diff line number Diff line change @@ -77,16 +77,22 @@ private function getProtectedForm()
77
77
return [
78
78
'id ' => $ this ->id ,
79
79
'title ' => $ this ->title ,
80
+ 'description ' => $ this ->description ,
80
81
'slug ' => $ this ->slug ,
81
82
'custom_code ' => $ this ->custom_code ,
82
83
'dark_mode ' => $ this ->dark_mode ,
83
84
'transparent_background ' => $ this ->transparent_background ,
84
85
'color ' => $ this ->color ,
86
+ 'theme ' => $ this ->theme ,
85
87
'is_password_protected ' => true ,
86
88
'has_password ' => $ this ->has_password ,
87
89
'width ' => 'centered ' ,
88
90
'no_branding ' => $ this ->no_branding ,
89
- 'properties ' => []
91
+ 'properties ' => [],
92
+ 'logo_picture ' => $ this ->logo_picture ,
93
+ 'seo_meta ' => $ this ->seo_meta ,
94
+ 'cover_picture ' => $ this ->cover_picture ,
95
+
90
96
];
91
97
}
92
98
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div v-if =" form" class =" open-complete-form" >
3
3
<h1 v-if =" !isHideTitle" class =" mb-4 px-2" :class =" {'mt-4':isEmbedPopup}" v-text =" form.title" />
4
+ <div v-if =" form.description" v-html =" form.description"
5
+ class =" form-description mb-4 text-gray-700 dark:text-gray-300 whitespace-pre-wrap px-2" />
4
6
5
7
<div v-if =" isPublicFormPage && form.is_password_protected" >
6
8
<p class =" form-description mb-4 text-gray-700 dark:text-gray-300 px-2" >
7
9
This form is protected by a password.
8
10
</p >
9
11
<div class =" form-group flex flex-wrap w-full" >
10
12
<div class =" relative mb-3 w-full px-2" >
11
- <text-input :form =" passwordForm" name =" password" native-type =" password" label =" Password" />
13
+ <text-input :theme = " theme " : form =" passwordForm" name =" password" native-type =" password" label =" Password" />
12
14
</div >
13
15
</div >
14
16
<div class =" flex flex-wrap justify-center w-full text-center" >
15
- <v- button @click =" passwordEntered" >
17
+ <open-form- button :theme = " theme " :color = " form.color " class = " my-4 " @click =" passwordEntered" >
16
18
Submit
17
- </v -button >
19
+ </open-form -button >
18
20
</div >
19
21
</div >
20
22
62
64
mode =" out-in"
63
65
>
64
66
<div v-if =" !submitted" key =" form" >
65
- <div v-if =" form.description" v-html =" form.description"
66
- class =" form-description mb-4 text-gray-700 dark:text-gray-300 whitespace-pre-wrap px-2" />
67
67
<open-form v-if =" form"
68
68
:form =" form"
69
69
:loading =" loading"
Original file line number Diff line number Diff line change 24
24
</svg >
25
25
</v-button >
26
26
</template >
27
- <a v-if =" isMainPage && user" v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" :href =" form.share_url"
27
+ <span v-if =" form.visibility === 'draft'"
28
+ class =" block px-4 py-2 text-md text-gray-700 cursor-pointer dark:text-white hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
29
+ @click =" showDraftFormWarningNotification"
30
+ >
31
+ <svg class =" w-4 h-4 mr-2" viewBox =" 0 0 24 24" fill =" none"
32
+ xmlns =" http://www.w3.org/2000/svg"
33
+ >
34
+ <path d =" M1 12C1 12 5 4 12 4C19 4 23 12 23 12C23 12 19 20 12 20C5 20 1 12 1 12Z"
35
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
36
+ />
37
+ <path
38
+ d =" M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z"
39
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
40
+ />
41
+ </svg >
42
+ View form
43
+ </span >
44
+
45
+ <a v-else-if =" isMainPage && user" v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" :href =" form.share_url"
28
46
target =" _blank"
29
47
class =" block px-4 py-2 text-md text-gray-700 dark:text-white hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
30
48
>
133
151
</div >
134
152
</div >
135
153
</modal >
136
-
137
154
<form-template-modal v-if =" !isMainPage && user" :form =" form" :show =" showFormTemplateModal" @close =" showFormTemplateModal=false" />
138
155
</div >
139
156
</template >
@@ -185,4 +202,8 @@ const deleteForm = () => {
185
202
loadingDelete .value = false
186
203
})
187
204
}
205
+
206
+ const showDraftFormWarningNotification = () => {
207
+ useAlert ().warning (' This form is currently in Draft mode and is not publicly accessible, You can change the form status on the edit form page.' )
208
+ }
188
209
</script >
Original file line number Diff line number Diff line change 22
22
<div class =" flex" >
23
23
<extra-menu class =" mr-2" :form =" form" />
24
24
25
- <v-button v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" target =" _blank"
25
+ <v-button v-if =" form.visibility === 'draft'" color =" white"
26
+ class =" mr-2 text-blue-600 hidden sm:block" @click =" showDraftFormWarningNotification"
27
+ >
28
+ <svg class =" w-6 h-6 inline -mt-1" viewBox =" 0 0 24 24" fill =" none"
29
+ xmlns =" http://www.w3.org/2000/svg"
30
+ >
31
+ <path d =" M1 12C1 12 5 4 12 4C19 4 23 12 23 12C23 12 19 20 12 20C5 20 1 12 1 12Z"
32
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
33
+ />
34
+ <path
35
+ d =" M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z"
36
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
37
+ />
38
+ </svg >
39
+ </v-button >
40
+ <v-button v-else v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" target =" _blank"
26
41
:href =" form.share_url" color =" white"
27
42
class =" mr-2 text-blue-600 hidden sm:block"
28
43
>
@@ -196,4 +211,8 @@ watch(() => form?.value?.id, (id) => {
196
211
const goBack = () => {
197
212
useRouter ().push ({name: ' home' })
198
213
}
214
+
215
+ const showDraftFormWarningNotification = () => {
216
+ useAlert ().warning (' This form is currently in Draft mode and is not publicly accessible, You can change the form status on the edit form page.' )
217
+ }
199
218
< / script>
You can’t perform that action at this time.
0 commit comments