diff --git a/app/Http/Resources/FormResource.php b/app/Http/Resources/FormResource.php index 9cdc44c..0cc8949 100644 --- a/app/Http/Resources/FormResource.php +++ b/app/Http/Resources/FormResource.php @@ -29,6 +29,7 @@ class FormResource extends JsonResource 'views_count' => $this->views_count, 'submissions_count' => $this->submissions_count, 'notifies' => $this->notifies, + 'notifies_webhook' => $this->notifies_webhook, 'notifies_slack' => $this->notifies_slack, 'notifies_discord' => $this->notifies_discord, 'send_submission_confirmation' => $this->send_submission_confirmation, diff --git a/app/Models/Forms/Form.php b/app/Models/Forms/Form.php index 2e2ae0d..ede1be7 100644 --- a/app/Models/Forms/Form.php +++ b/app/Models/Forms/Form.php @@ -279,6 +279,11 @@ class Form extends Model } + public function getNotifiesWebhookAttribute() + { + return !empty($this->webhook_url); + } + public function getNotifiesDiscordAttribute() { return !empty($this->discord_webhook_url); diff --git a/resources/js/components/common/Button.vue b/resources/js/components/common/Button.vue index f393d75..85e21d8 100644 --- a/resources/js/components/common/Button.vue +++ b/resources/js/components/common/Button.vue @@ -1,5 +1,8 @@ - + + + @@ -61,6 +64,11 @@ export default { default: null }, + href: { + type: String, + default: null + }, + target: { type: String, default: '_self' diff --git a/resources/js/components/open/forms/components/FormEditor.vue b/resources/js/components/open/forms/components/FormEditor.vue index 06ef37a..9c8f8c8 100644 --- a/resources/js/components/open/forms/components/FormEditor.vue +++ b/resources/js/components/open/forms/components/FormEditor.vue @@ -58,12 +58,12 @@ - + + - @@ -95,10 +95,10 @@ import FormCustomization from './form-components/FormCustomization.vue' import FormCustomCode from './form-components/FormCustomCode.vue' import FormAboutSubmission from './form-components/FormAboutSubmission.vue' import FormNotifications from './form-components/FormNotifications.vue' -import FormIntegrations from './form-components/FormIntegrations.vue' import FormEditorPreview from './form-components/FormEditorPreview.vue' import FormSecurityPrivacy from './form-components/FormSecurityPrivacy.vue' import FormCustomSeo from './form-components/FormCustomSeo.vue' +import FormAccess from './form-components/FormAccess.vue' import saveUpdateAlert from '../../../../mixins/forms/saveUpdateAlert.js' import fieldsLogic from '../../../../mixins/forms/fieldsLogic.js' @@ -108,7 +108,6 @@ export default { AddFormBlockSidebar, FormFieldEditSidebar, FormEditorPreview, - FormIntegrations, FormNotifications, FormAboutSubmission, FormCustomCode, @@ -117,7 +116,8 @@ export default { FormInformation, FormErrorModal, FormSecurityPrivacy, - FormCustomSeo + FormCustomSeo, + FormAccess }, mixins: [saveUpdateAlert, fieldsLogic], props: { diff --git a/resources/js/components/open/forms/components/form-components/FormAboutSubmission.vue b/resources/js/components/open/forms/components/form-components/FormAboutSubmission.vue index acae96d..4407c4a 100644 --- a/resources/js/components/open/forms/components/form-components/FormAboutSubmission.vue +++ b/resources/js/components/open/forms/components/form-components/FormAboutSubmission.vue @@ -129,30 +129,6 @@ label="Text After Submission" :required="false" /> - - - - diff --git a/resources/js/components/open/forms/components/form-components/FormAccess.vue b/resources/js/components/open/forms/components/form-components/FormAccess.vue new file mode 100644 index 0000000..e98c9e2 --- /dev/null +++ b/resources/js/components/open/forms/components/form-components/FormAccess.vue @@ -0,0 +1,74 @@ + + + + + + + + Form Access + + + + + + + + + + + + diff --git a/resources/js/components/open/forms/components/form-components/FormIntegrations.vue b/resources/js/components/open/forms/components/form-components/FormIntegrations.vue deleted file mode 100644 index 7d7ac77..0000000 --- a/resources/js/components/open/forms/components/form-components/FormIntegrations.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - Integrations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/js/components/open/forms/components/form-components/FormNotifications.vue b/resources/js/components/open/forms/components/form-components/FormNotifications.vue index 016e874..f76513a 100644 --- a/resources/js/components/open/forms/components/form-components/FormNotifications.vue +++ b/resources/js/components/open/forms/components/form-components/FormNotifications.vue @@ -6,8 +6,7 @@ :class="{'text-blue-600':isCollapseOpen, 'text-gray-500':!isCollapseOpen}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> - - Notifications + Notifications & Integrations @@ -16,6 +15,22 @@ + + + + + + + + Zapier Integration + + + @@ -27,9 +42,10 @@ import FormNotificationsOption from './components/FormNotificationsOption.vue' import FormNotificationsSlack from './components/FormNotificationsSlack.vue' import FormNotificationsDiscord from './components/FormNotificationsDiscord.vue' import FormNotificationsSubmissionConfirmation from './components/FormNotificationsSubmissionConfirmation.vue' +import FormNotificationsWebhook from './components/FormNotificationsWebhook.vue' export default { - components: { FormNotificationsSubmissionConfirmation, FormNotificationsSlack, FormNotificationsDiscord, FormNotificationsOption, Collapse, ProTag }, + components: { FormNotificationsSubmissionConfirmation, FormNotificationsSlack, FormNotificationsDiscord, FormNotificationsOption, Collapse, ProTag, FormNotificationsWebhook }, props: { }, data () { @@ -47,7 +63,8 @@ export default { set (value) { this.$store.commit('open/working_form/set', value) } - } + }, + zapierUrl: () => window.config.links.zapier_integration }, watch: { diff --git a/resources/js/components/open/forms/components/form-components/FormSecurityPrivacy.vue b/resources/js/components/open/forms/components/form-components/FormSecurityPrivacy.vue index 1c54110..3186629 100644 --- a/resources/js/components/open/forms/components/form-components/FormSecurityPrivacy.vue +++ b/resources/js/components/open/forms/components/form-components/FormSecurityPrivacy.vue @@ -17,9 +17,6 @@ label="Protect your form with a Captcha" help="If enabled we will make sure respondant is a human" /> - diff --git a/resources/js/components/open/forms/components/form-components/components/FormNotificationsWebhook.vue b/resources/js/components/open/forms/components/form-components/components/FormNotificationsWebhook.vue new file mode 100644 index 0000000..eec9102 --- /dev/null +++ b/resources/js/components/open/forms/components/form-components/components/FormNotificationsWebhook.vue @@ -0,0 +1,82 @@ + + + + + + + + + Webhook Notifications + + + + + + + + + + + Webhook Notifications + + + + + + + + +
+ Zapier Integration +
+ Webhook Notifications +