2022-11-09 10:23:17 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-02-22 15:39:13 +00:00
|
|
|
<share-link class="mt-4" :form="form" :extra-query-param="shareUrlForQueryParams" />
|
2022-11-09 10:23:17 +00:00
|
|
|
|
2023-02-22 15:39:13 +00:00
|
|
|
<embed-code class="mt-6" :form="form" :extra-query-param="shareUrlForQueryParams" />
|
|
|
|
|
|
|
|
<advanced-form-url-settings :form="form" v-model="shareFormConfig" />
|
2022-11-09 10:23:17 +00:00
|
|
|
|
|
|
|
<div class="mt-6 pt-6 border-t w-full flex">
|
|
|
|
<regenerate-form-link class="sm:w-1/2 mr-4" :form="form" />
|
|
|
|
|
2023-02-22 15:39:13 +00:00
|
|
|
<url-form-prefill class="sm:w-1/2" :form="form" :extra-query-param="shareUrlForQueryParams" />
|
2022-11-09 10:23:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-01-21 11:57:37 +00:00
|
|
|
import ShareLink from '../../../components/pages/forms/show/ShareLink.vue'
|
|
|
|
import EmbedCode from '../../../components/pages/forms/show/EmbedCode.vue'
|
|
|
|
import UrlFormPrefill from '../../../components/pages/forms/show/UrlFormPrefill.vue'
|
|
|
|
import RegenerateFormLink from '../../../components/pages/forms/show/RegenerateFormLink.vue'
|
|
|
|
import SeoMeta from '../../../mixins/seo-meta.js'
|
2023-02-22 15:39:13 +00:00
|
|
|
import AdvancedFormUrlSettings from '../../../components/open/forms/components/AdvancedFormUrlSettings.vue'
|
2022-11-09 10:23:17 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
ShareLink,
|
|
|
|
EmbedCode,
|
|
|
|
UrlFormPrefill,
|
2023-02-22 15:39:13 +00:00
|
|
|
RegenerateFormLink,
|
|
|
|
AdvancedFormUrlSettings
|
2022-11-09 10:23:17 +00:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
form: { type: Object, required: true }
|
|
|
|
},
|
2022-12-22 10:55:17 +00:00
|
|
|
mixins: [SeoMeta],
|
2022-11-09 10:23:17 +00:00
|
|
|
|
|
|
|
data: () => ({
|
2023-02-22 15:39:13 +00:00
|
|
|
shareFormConfig: {
|
2023-02-25 09:26:06 +00:00
|
|
|
hide_title: false,
|
|
|
|
auto_submit: false
|
2023-02-22 15:39:13 +00:00
|
|
|
}
|
2022-11-09 10:23:17 +00:00
|
|
|
}),
|
|
|
|
|
|
|
|
mounted() {},
|
|
|
|
|
2022-12-22 10:55:17 +00:00
|
|
|
computed: {
|
|
|
|
metaTitle() {
|
|
|
|
return (this.form) ? 'Form Share - '+this.form.title : 'Form Share'
|
|
|
|
},
|
2023-02-22 15:39:13 +00:00
|
|
|
shareUrlForQueryParams () {
|
|
|
|
let queryStr = ''
|
|
|
|
for (const [key, value] of Object.entries(this.shareFormConfig)) {
|
|
|
|
if(value && value !== 'false' && value !== false){
|
|
|
|
queryStr += '&' + encodeURIComponent(key) + "=" + encodeURIComponent(value)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return queryStr.slice(1)
|
|
|
|
}
|
2022-12-22 10:55:17 +00:00
|
|
|
},
|
2022-11-09 10:23:17 +00:00
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|