Multiple bug fixing
This commit is contained in:
@@ -97,6 +97,7 @@ import FormCustomSeo from './form-components/FormCustomSeo.vue'
|
||||
import FormAccess from './form-components/FormAccess.vue'
|
||||
import {validatePropertiesLogic} from "~/composables/forms/validatePropertiesLogic.js"
|
||||
import opnformConfig from "~/opnform.config.js";
|
||||
import {captureException} from "@sentry/vue";
|
||||
|
||||
export default {
|
||||
name: 'FormEditor',
|
||||
@@ -255,9 +256,12 @@ export default {
|
||||
this.amplitude.logEvent('form_saved', { form_id: this.form.id, form_slug: this.form.slug })
|
||||
this.displayFormModificationAlert(data)
|
||||
}).catch((error) => {
|
||||
if (error.response.status === 422) {
|
||||
if (error?.response.status === 422) {
|
||||
this.validationErrorResponse = error.response.data
|
||||
this.showValidationErrors()
|
||||
} else {
|
||||
useAlert().error('An error occurred while saving the form, please try again.')
|
||||
captureException(error)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.updateFormLoading = false
|
||||
@@ -282,10 +286,12 @@ export default {
|
||||
this.displayFormModificationAlert(response)
|
||||
useRouter().push({ name: 'forms-slug-show-share', params: { slug: this.createdFormSlug, new_form: response.users_first_form } })
|
||||
}).catch((error) => {
|
||||
console.error(error)
|
||||
if (error.response && error.response.status === 422) {
|
||||
if (error?.response?.status === 422) {
|
||||
this.validationErrorResponse = error.response
|
||||
this.showValidationErrors()
|
||||
} else {
|
||||
useAlert().error('An error occurred while saving the form, please try again.')
|
||||
captureException(error)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.updateFormLoading = false
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
]"
|
||||
:form="form" label="Form Theme"
|
||||
/>
|
||||
<div class="-mt-3 mb-3 text-gray-400 dark:text-gray-500">
|
||||
<small>
|
||||
Need another theme? <a href="#" @click.prevent="crisp.openAndShowChat">Send us some suggestions!</a>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<select-input name="dark_mode" class="mt-4"
|
||||
help="To see changes, save your form and open it"
|
||||
|
||||
Reference in New Issue
Block a user