From aa7ac58c7386a2294fc80502bf8dc223f700a950 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 8 Aug 2022 13:02:19 +0100 Subject: [PATCH] add display only type --- .../admin/ang/afGuiEditor/elements/afGuiField.component.js | 3 +++ ext/afform/admin/ang/afGuiEditor/inputType/DisplayOnly.html | 3 +++ ext/afform/core/ang/af/fields/DisplayOnly.html | 1 + 3 files changed, 7 insertions(+) create mode 100644 ext/afform/admin/ang/afGuiEditor/inputType/DisplayOnly.html create mode 100644 ext/afform/core/ang/af/fields/DisplayOnly.html diff --git a/ext/afform/admin/ang/afGuiEditor/elements/afGuiField.component.js b/ext/afform/admin/ang/afGuiEditor/elements/afGuiField.component.js index 0102c32e9b..4951624715 100644 --- a/ext/afform/admin/ang/afGuiEditor/elements/afGuiField.component.js +++ b/ext/afform/admin/ang/afGuiEditor/elements/afGuiField.component.js @@ -167,6 +167,9 @@ case 'Number': return !(defn.options || defn.data_type === 'Boolean'); + case 'DisplayOnly': + return true; + default: return false; } diff --git a/ext/afform/admin/ang/afGuiEditor/inputType/DisplayOnly.html b/ext/afform/admin/ang/afGuiEditor/inputType/DisplayOnly.html new file mode 100644 index 0000000000..c44ad2b7cf --- /dev/null +++ b/ext/afform/admin/ang/afGuiEditor/inputType/DisplayOnly.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/ext/afform/core/ang/af/fields/DisplayOnly.html b/ext/afform/core/ang/af/fields/DisplayOnly.html new file mode 100644 index 0000000000..7d4a696471 --- /dev/null +++ b/ext/afform/core/ang/af/fields/DisplayOnly.html @@ -0,0 +1 @@ +{{dataProvider.getFieldData()[$ctrl.fieldName]}} -- 2.25.1