Skip to content

Beautiful Open-Source Form Builder

Bug fixes & UI polish 💅

Julien Nahumaebe5f5738ec
diff --git a/resources/js/components/open/forms/components/FormSubmissions.vue b/resources/js/components/open/forms/components/FormSubmissions.vue
index 78b68d019..0c50f6450 100644
--- a/resources/js/components/open/forms/components/FormSubmissions.vue
+++ b/resources/js/components/open/forms/components/FormSubmissions.vue
@@ -3,10 +3,6 @@
class="my-4 w-full mx-auto">
<h3 class="font-semibold mb-4 text-xl">
Form Submissions
- <span v-if="form && !isLoading && tableData.length > 0" class="text-right text-xs uppercase mb-2"> - <a
- :href="exportUrl" target="_blank">Export as CSV</a></span>
- <span v-if="form && !isLoading && formInitDone" class="float-right text-xs uppercase mb-2"> <a
- href="javascript:void(0);" @click="showColumnsModal=true">Display columns</a></span>
</h3>
<!-- Table columns modal -->
@@ -41,8 +37,16 @@
<loader v-if="!form || isLoading" class="h-6 w-6 text-nt-blue mx-auto"/>
<div v-else>
- <div class="m-auto w-64">
- <text-input :form="searchForm" name="search" placeholder="Search..." />
+ <div class="flex flex-wrap items-end">
+ <div class="flex-grow">
+ <text-input class="w-64" :form="searchForm" name="search" placeholder="Search..." />
+ </div>
+ <div class="font-semibold flex gap-4">
+ <p v-if="form && !isLoading && formInitDone" class="float-right text-xs uppercase mb-2"> <a
+ href="javascript:void(0);" class="text-gray-500" @click="showColumnsModal=true">Display columns</a></p>
+ <p v-if="form && !isLoading && tableData.length > 0" class="text-right text-xs uppercase"><a
+ :href="exportUrl" target="_blank">Export as CSV</a></p>
+ </div>
</div>
<scroll-shadow
diff --git a/resources/js/components/open/forms/components/form-components/components/FormNotificationsSubmissionConfirmation.vue b/resources/js/components/open/forms/components/form-components/components/FormNotificationsSubmissionConfirmation.vue
index 87e7d58d2..c4a7c8aed 100644
--- a/resources/js/components/open/forms/components/form-components/components/FormNotificationsSubmissionConfirmation.vue
+++ b/resources/js/components/open/forms/components/form-components/components/FormNotificationsSubmissionConfirmation.vue
@@ -84,6 +84,7 @@ export default {
}
},
emailSubmissionConfirmationField () {
+ if (!this.form.properties || !Array.isArray(this.form.properties)) return null
const emailFields = this.form.properties.filter((field) => {
return field.type === 'email' && !field.hidden
})
diff --git a/resources/js/components/pages/forms/show/UrlFormPrefill.vue b/resources/js/components/pages/forms/show/UrlFormPrefill.vue
index 33cf1b329..e0240c654 100644
--- a/resources/js/components/pages/forms/show/UrlFormPrefill.vue
+++ b/resources/js/components/pages/forms/show/UrlFormPrefill.vue
@@ -1,5 +1,5 @@
<template>
- <div>
+ <div class="flex">
<v-button
class="w-full"
color="light-gray"
@@ -27,7 +27,7 @@
<span>Url Form Prefill</span>
</template>
- <div class="p-4">
+ <div class="p-4" ref="content">
<p>
Create dynamic links when sharing your form (whether it's embedded or not), that allows you to prefill
your form fields. You can use this to personalize the form when sending it to multiple contacts for instance.
@@ -89,7 +89,9 @@ export default {
generateUrl (formData, onFailure) {
this.prefillFormData = formData
this.$nextTick().then(() => {
- this.$refs.content.parentElement.parentElement.parentElement.scrollTop = (this.$refs.content.offsetHeight - this.$refs.content.parentElement.parentElement.parentElement.offsetHeight + 50)
+ if (this.$refs.content) {
+ this.$refs.content.parentElement.parentElement.parentElement.scrollTop = this.$refs.content.offsetHeight
+ }
})
}
}
diff --git a/resources/js/middleware/check-auth.js b/resources/js/middleware/check-auth.js
index 36987179d..e5924f2bd 100644
--- a/resources/js/middleware/check-auth.js
+++ b/resources/js/middleware/check-auth.js
@@ -4,6 +4,10 @@ import * as Sentry from '@sentry/vue'
export function initCrisp (user) {
return new Promise((resolve, reject) => {
const intervalId = window.setInterval(function () {
+ if (!user) {
+ resolve()
+ return
+ }
if (window.$crisp) {
window.$crisp.push(['set', 'user:email', user.email])
window.$crisp.push(['set', 'user:nickname', user.name])
@@ -19,7 +23,7 @@ export function initCrisp (user) {
}
export function initSentry (user) {
- if (!window.config.sentry_dsn) {
+ if (!window.config.sentry_dsn || !user) {
return
}
Sentry.configureScope((scope) => {