This commit is contained in:
2020-04-17 18:46:33 +00:00
parent 768dfc2dd6
commit d916440e3d
3 changed files with 22 additions and 7 deletions

View File

@@ -564,6 +564,17 @@ export default {
// NOTE: that in a form this should only be used with non stock-required fields, if they are already required they cannot be hidden
//
showMe(vm, formCustomTemplateFieldName) {
//special check for wikiContent
//if read only then can't add any content and if no content then no reason to show it at all
if (formCustomTemplateFieldName == "wikiContent") {
if (
vm.formState.readOnly &&
(vm.obj.wikiContent == null || vm.obj.wikiContent.length == 0)
) {
return false;
}
}
let template =
window.$gz.store.state.formCustomTemplate[vm.formCustomTemplateKey];
if (template === undefined) {

View File

@@ -205,13 +205,7 @@
></gz-custom-fields>
</v-col>
<!-- Show the wiki unless hidden by form customization or not read only, or if it has content -->
<v-col
v-if="
form().showMe(this, 'wikiContent') &&
(!formState.ReadOnly || obj.wikiContent)
"
cols="12"
>
<v-col v-if="form().showMe(this, 'wikiContent')" cols="12">
<gz-wiki
ref="wikiContent"
v-model="obj.wikiContent"