This commit is contained in:
2019-12-05 23:29:21 +00:00
parent cb691bda68
commit 54e6eea0ab
2 changed files with 34 additions and 1 deletions

View File

@@ -43,11 +43,13 @@
{{ item.key }}
</v-card-subtitle>
<v-checkbox
v-model="item.hideable"
v-model="getTemplateItemForField(item.key).visible"
:label="lt('FormFieldVisible')"
:ref="item.key"
:disabled="!canHide(item)"
></v-checkbox>
<v-divider></v-divider>
{{ item }}
</v-card>
</v-col>
</template>
@@ -158,6 +160,29 @@ export default {
},
canDuplicate: function() {
return this.formState.valid && !this.formState.dirty;
},
getTemplateItemForField: function(customTemplateFieldKey) {
//first check template
var templateItem = window.$gz.formCustomTemplate.getFieldTemplateValue(
this.formCustomTemplateKey,
availableFieldItem.key
);
if(templateItem==undefined){
templateItem=
}
return templateItem;
},
fullName: {
// getter
get: function() {
return this.firstName + " " + this.lastName;
},
// setter
set: function(newValue) {
var names = newValue.split(" ");
this.firstName = names[0];
this.lastName = names[names.length - 1];
}
}
},
components: {},