update_21.09.23
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
<div class="card-header">
|
||||
<p class="card-title">{{trans('messages.elements')}}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="collapse show" id="basicElements">
|
||||
<div class="card-body pr-1 pl-1 elements_sidebar_height">
|
||||
<draggable class="dragArea list-group"
|
||||
@@ -16,8 +16,8 @@
|
||||
:sort="false"
|
||||
@change="change"
|
||||
>
|
||||
<div class="list-group-item"
|
||||
v-for="element in basic_elements"
|
||||
<div class="list-group-item"
|
||||
v-for="element in basic_elements"
|
||||
:key="element.type"
|
||||
>
|
||||
<button type="button"
|
||||
@@ -53,24 +53,25 @@
|
||||
handle=".handle"
|
||||
@change="change"
|
||||
:animation="200"
|
||||
>
|
||||
>
|
||||
<transition-group
|
||||
name="custom-classes-transition"
|
||||
enter-active-class="animated zoomIn"
|
||||
leave-active-class="animated fadeOut"
|
||||
leave-active-class="animated fadeOut"
|
||||
tag="div"
|
||||
class="row"
|
||||
:class="[(selected_elements.length < 3) ? 'transition-card-body' : '']">
|
||||
<div
|
||||
v-for="(element, index) in selected_elements"
|
||||
v-for="(element, index) in selected_elements"
|
||||
:key="element.id"
|
||||
:class="element.col"
|
||||
:class="element.col"
|
||||
@click="toggleConfigurator(index, true)"
|
||||
>
|
||||
<fieldGenerator
|
||||
:element="element"
|
||||
<fieldGenerator
|
||||
:element="element"
|
||||
:settings="settings"
|
||||
:applyValidations="applyValidations"
|
||||
action=""
|
||||
></fieldGenerator>
|
||||
<div class="element-config-action-btn float-right"
|
||||
v-show="element.extras.showConfigurator">
|
||||
@@ -146,7 +147,7 @@
|
||||
</div>
|
||||
<form-layout
|
||||
:selected_elements="selected_elements"
|
||||
:settings="settings">
|
||||
:settings="settings">
|
||||
</form-layout>
|
||||
<div class="row">
|
||||
<!-- form custom attribute -->
|
||||
@@ -178,7 +179,7 @@
|
||||
<div class="tab-pane fade mb-2" :class="isConfiguratorOpen ? 'active show' : ''" id="configuration" role="tabpanel" aria-labelledby="configuration-tab">
|
||||
<template v-for="(element, index) in selected_elements"
|
||||
v-if="element.extras.showConfigurator && isConfiguratorOpen">
|
||||
<fieldConfigurator
|
||||
<fieldConfigurator
|
||||
v-if="!_.includes(['page_break'], element.type)"
|
||||
:key="element.id"
|
||||
:element="element"
|
||||
@@ -232,7 +233,7 @@
|
||||
return {
|
||||
applyValidations: false,
|
||||
basic_elements: [
|
||||
{ type: 'text',
|
||||
{ type: 'text',
|
||||
subtype:'text',
|
||||
label: self.trans('messages.input'),
|
||||
help_text: '',
|
||||
@@ -248,16 +249,16 @@
|
||||
tooltip: self.trans('messages.text_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
},
|
||||
allowed_input:{
|
||||
values:'',
|
||||
error_msg: 'This value is not allowed.'
|
||||
}
|
||||
},
|
||||
{ type: 'textarea',
|
||||
{ type: 'textarea',
|
||||
label: self.trans('messages.textarea'),
|
||||
help_text: '',
|
||||
help_text: '',
|
||||
display_icon: 'list',
|
||||
prefix_icon: 'none',
|
||||
suffix_icon: 'none',
|
||||
@@ -271,10 +272,10 @@
|
||||
tooltip: self.trans('messages.textarea_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{ type: 'dropdown',
|
||||
{ type: 'dropdown',
|
||||
label: self.trans('messages.dropdown'),
|
||||
help_text: '',
|
||||
display_icon: 'caret-square-down',
|
||||
@@ -290,12 +291,12 @@
|
||||
tooltip: self.trans('messages.dropdown_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{ type: 'radio',
|
||||
{ type: 'radio',
|
||||
label: self.trans('messages.radio'),
|
||||
help_text: '',
|
||||
help_text: '',
|
||||
spread_to_col: {
|
||||
enable: false,
|
||||
column: 2
|
||||
@@ -308,12 +309,12 @@
|
||||
tooltip: self.trans('messages.radio_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{ type: 'checkbox',
|
||||
{ type: 'checkbox',
|
||||
label: self.trans('messages.checkbox'),
|
||||
help_text: '',
|
||||
help_text: '',
|
||||
spread_to_col: {
|
||||
enable: false,
|
||||
column: 2
|
||||
@@ -326,10 +327,10 @@
|
||||
tooltip: self.trans('messages.checkbox_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{ type: 'heading',
|
||||
{ type: 'heading',
|
||||
label: self.trans('messages.heading_paragrahp'),
|
||||
tag: 'h1',
|
||||
text_color: '#212529',
|
||||
@@ -342,7 +343,7 @@
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{ type: 'range',
|
||||
{ type: 'range',
|
||||
label: self.trans('messages.range'),
|
||||
help_text: '',
|
||||
display_icon: 'arrows-alt-h',
|
||||
@@ -356,7 +357,7 @@
|
||||
tooltip: self.trans('messages.range_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{ type: 'calendar',
|
||||
@@ -380,7 +381,7 @@
|
||||
tooltip: self.trans('messages.datetime_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -401,7 +402,7 @@
|
||||
tooltip: self.trans('messages.file_upload_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -417,7 +418,7 @@
|
||||
tooltip: self.trans('messages.text_editor_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -432,7 +433,7 @@
|
||||
tooltip: self.trans('messages.terms_condition_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -451,7 +452,7 @@
|
||||
tooltip: self.trans('messages.rating_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -466,7 +467,7 @@
|
||||
tooltip: self.trans('messages.switch_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -510,7 +511,7 @@
|
||||
tooltip: self.trans('messages.signature_tooltip'),
|
||||
popover_help_text:{
|
||||
enable: false,
|
||||
content: ''
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -636,7 +637,7 @@
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
change: function(evt) {
|
||||
window.console.log(evt);
|
||||
@@ -681,7 +682,7 @@
|
||||
}
|
||||
this.selected_elements[index].extras.showConfigurator = show;
|
||||
},
|
||||
toggleConfiguratorEvent(values){
|
||||
toggleConfiguratorEvent(values){
|
||||
this.toggleConfigurator(values.index, values.show);
|
||||
this.openElementConfigurator();
|
||||
},
|
||||
@@ -770,4 +771,4 @@
|
||||
.transition-card-body{
|
||||
min-height: 392px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
:key="index"
|
||||
:class="[element.col ? element.col : 'col-md-12']"
|
||||
v-show="togglePageVisibility(element.page_num)">
|
||||
<fieldGenerator
|
||||
<fieldGenerator
|
||||
:element="element"
|
||||
:settings="settings"
|
||||
:submitted_data="submitted_data"
|
||||
:action="action"
|
||||
:action-by="actionBy"
|
||||
@apply_conditions="applyConditions">
|
||||
</fieldGenerator>
|
||||
</div>
|
||||
@@ -64,7 +66,7 @@
|
||||
import fieldGenerator from "./FieldGenerator";
|
||||
|
||||
export default{
|
||||
props: ['form', 'actionBy'],
|
||||
props: ['form', 'actionBy', 'action'],
|
||||
components: {
|
||||
fieldGenerator
|
||||
},
|
||||
@@ -121,7 +123,9 @@
|
||||
messages: messages,
|
||||
submitHandler: function(form, e) {
|
||||
e.preventDefault();
|
||||
let disabled = $('#show_form :input:disabled').removeAttr('disabled');
|
||||
var form_data = $('#show_form').serialize();
|
||||
disabled.attr('disabled', 'disabled');
|
||||
$("button.submit_btn, button.draft_btn").attr('disabled', 'disabled');
|
||||
var status = $("input[name=status]").val();
|
||||
if (status == 'complete') {
|
||||
@@ -139,9 +143,9 @@
|
||||
}
|
||||
|
||||
let url = '/form-data/' + self.form_parsed.id + '?token=' + self.token + '&form_data_id=' + self.form_data_id;
|
||||
if (self.actionBy.length && self.actionBy == 'admin') {
|
||||
url = '/update/'+self.form_parsed.id+'/data/'+self.form_data_id;
|
||||
}
|
||||
// if (self.actionBy.length && self.actionBy === 'admin') {
|
||||
// url = '/update/'+self.form_parsed.id+'/data/'+self.form_data_id;
|
||||
// }
|
||||
|
||||
axios
|
||||
.post(url, {form_data})
|
||||
@@ -209,11 +213,15 @@
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
window.location.href = document.referrer;
|
||||
}, 3000);
|
||||
} else {
|
||||
toastr.error(response.data.msg);
|
||||
}
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function(error) {
|
||||
toastr.error(error);
|
||||
});
|
||||
}
|
||||
@@ -301,7 +309,7 @@
|
||||
} else {
|
||||
form_element_value = document.getElementById(element.condition).value;
|
||||
}
|
||||
|
||||
|
||||
//check if condition_satisfied or not
|
||||
if(logical_operator == 'AND') {
|
||||
if (element.operator == '==') {
|
||||
@@ -430,7 +438,7 @@
|
||||
isCardFormLayout() {
|
||||
const self = this;
|
||||
if (
|
||||
self.settings.layout &&
|
||||
self.settings.layout &&
|
||||
_.includes(['card_form'], self.settings.layout)
|
||||
) {
|
||||
return true
|
||||
@@ -493,7 +501,7 @@
|
||||
) {
|
||||
is_element_valid = $('[name="' + element_name + '"]').valid();
|
||||
}
|
||||
|
||||
|
||||
return is_element_valid;
|
||||
},
|
||||
copyLink(){
|
||||
@@ -509,4 +517,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user