Polish UX (#100)
This commit is contained in:
parent
43020939ed
commit
5df4488c25
|
@ -22,9 +22,12 @@
|
||||||
class="nf-code w-full px-2 mb-3"
|
class="nf-code w-full px-2 mb-3"
|
||||||
v-html="field.content"
|
v-html="field.content"
|
||||||
/>
|
/>
|
||||||
<div v-if="field.type === 'nf-divider'" :id="field.id" :key="field.id" class="border-b my-4 w-full mx-2"/>
|
<div v-if="field.type === 'nf-divider'" :id="field.id" :key="field.id"
|
||||||
|
class="border-b my-4 w-full mx-2"
|
||||||
|
/>
|
||||||
<div v-if="field.type === 'nf-image' && (field.image_block || !isPublicFormPage)" :id="field.id"
|
<div v-if="field.type === 'nf-image' && (field.image_block || !isPublicFormPage)" :id="field.id"
|
||||||
:key="field.id" class="my-4 w-full px-2">
|
:key="field.id" class="my-4 w-full px-2"
|
||||||
|
>
|
||||||
<div v-if="!field.image_block" class="p-4 border border-dashed">
|
<div v-if="!field.image_block" class="p-4 border border-dashed">
|
||||||
Open <b>{{ field.name }}'s</b> block settings to upload image.
|
Open <b>{{ field.name }}'s</b> block settings to upload image.
|
||||||
</div>
|
</div>
|
||||||
|
@ -249,7 +252,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initForm()
|
this.initForm()
|
||||||
|
|
||||||
if(window.location.href.includes('auto_submit=true')){
|
if (window.location.href.includes('auto_submit=true')) {
|
||||||
this.isAutoSubmit = true
|
this.isAutoSubmit = true
|
||||||
this.submitForm()
|
this.submitForm()
|
||||||
}
|
}
|
||||||
|
@ -381,7 +384,7 @@ export default {
|
||||||
String(dateObj.getDate()).padStart(2, '0')
|
String(dateObj.getDate()).padStart(2, '0')
|
||||||
if(field.with_time === true){
|
if(field.with_time === true){
|
||||||
currentDate += 'T' + String(dateObj.getHours()).padStart(2, '0') + ':' +
|
currentDate += 'T' + String(dateObj.getHours()).padStart(2, '0') + ':' +
|
||||||
String(dateObj.getMinutes()).padStart(2, '0');
|
String(dateObj.getMinutes()).padStart(2, '0')
|
||||||
}
|
}
|
||||||
formData[field.id] = currentDate
|
formData[field.id] = currentDate
|
||||||
} else { // Default prefill if any
|
} else { // Default prefill if any
|
||||||
|
@ -482,17 +485,19 @@ export default {
|
||||||
},
|
},
|
||||||
previousPage() {
|
previousPage() {
|
||||||
this.currentFieldGroupIndex -= 1
|
this.currentFieldGroupIndex -= 1
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
nextPage() {
|
nextPage() {
|
||||||
this.currentFieldGroupIndex += 1
|
this.currentFieldGroupIndex += 1
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang='scss'>
|
||||||
.nf-text {
|
.nf-text {
|
||||||
ol {
|
ol {
|
||||||
@apply list-decimal list-inside;
|
@apply list-decimal list-inside;
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<template #title>
|
<template #title>
|
||||||
Copy Settings from another form
|
Copy Settings from another form
|
||||||
</template>
|
</template>
|
||||||
<div class="p-4">
|
<div class="p-4 min-h-[450px]">
|
||||||
<p class="text-gray-600">
|
<p class="text-gray-600">
|
||||||
If you already have another form that you like to use as a base for this form, you can do that here.
|
If you already have another form that you like to use as a base for this form, you can do that here.
|
||||||
Select another form, confirm, and we will copy all of the other form settings (except the form structure)
|
Select another form, confirm, and we will copy all of the other form settings (except the form structure)
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<modal :show="showCopyFormModal" @close="showCopyFormModal = false">
|
<modal :show="showCopyFormModal" @close="showCopyFormModal = false">
|
||||||
|
<div class="min-h-[450px]">
|
||||||
<h3 class="font-semibold block text-lg">
|
<h3 class="font-semibold block text-lg">
|
||||||
Copy logic from another field
|
Copy logic from another field
|
||||||
</h3>
|
</h3>
|
||||||
|
@ -61,6 +62,7 @@
|
||||||
Close
|
Close
|
||||||
</v-button>
|
</v-button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -101,7 +103,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
copyFromOptions() {
|
copyFromOptions() {
|
||||||
return this.form.properties.filter((field) => {
|
return this.form.properties.filter((field) => {
|
||||||
return field.id !== this.field.id
|
return field.id !== this.field.id && field.hasOwnProperty('logic') && field.logic !== null && field.logic !== {}
|
||||||
}).map((field) => {
|
}).map((field) => {
|
||||||
return {name: field.name, value: field.id}
|
return {name: field.name, value: field.id}
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="flex flex-wrap px-4 py-1 -ml-1 -mt-1">
|
<div class="flex flex-wrap px-4 py-1 -ml-1 -mt-1">
|
||||||
<select-input ref="ruleSelect" v-model="selectedRule" class="flex-grow ml-1 mr-1 mt-1"
|
<select-input ref="ruleSelect" v-model="selectedRule" class="flex-grow ml-1 mr-1 mt-1"
|
||||||
wrapper-class="relative" placeholder="Add condition on input field"
|
wrapper-class="relative" placeholder="Add condition on input field"
|
||||||
:options="groupCtrl.rules" margin-bottom=""
|
:options="groupCtrl.rules" margin-bottom="" :searchable="groupCtrl.rules.length > 5"
|
||||||
emit-key="identifier"
|
emit-key="identifier"
|
||||||
option-key="identifier"
|
option-key="identifier"
|
||||||
name="group-control-slot-rule"
|
name="group-control-slot-rule"
|
||||||
|
|
Loading…
Reference in New Issue