diff --git a/ccp/js/inputwidgetcontroller.js b/ccp/js/inputwidgetcontroller.js index 996814c..1aedbc2 100644 --- a/ccp/js/inputwidgetcontroller.js +++ b/ccp/js/inputwidgetcontroller.js @@ -64,6 +64,10 @@ class Renderer{ get required(){ return this.#input.minOccurs > 0 } + + get readOnly(){ + return this.#input.schema.readOnly + } static instance(input){ if(this.isEnum(input)){ diff --git a/ccp/js/inputwidgeteditorcontroller.js b/ccp/js/inputwidgeteditorcontroller.js index d0f7c10..6ded546 100644 --- a/ccp/js/inputwidgeteditorcontroller.js +++ b/ccp/js/inputwidgeteditorcontroller.js @@ -65,27 +65,27 @@ class CCPInputWidgetEditorController extends HTMLElement{ this.innerHTML = `
- + ${ input.id !== 'ccpimage' ? this.renderDeleteButton() : ''}
- +
- +
- @@ -94,13 +94,13 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
- +
@@ -108,7 +108,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
- @@ -122,7 +122,13 @@ class CCPInputWidgetEditorController extends HTMLElement{
- + +
+
+
+ +
+
@@ -195,6 +201,9 @@ class CCPInputWidgetEditorController extends HTMLElement{ else if(ename === "default"){ this.#input.schema.default = val } + else if(ename === "readonly"){ + this.#input.schema.readOnly = ev.target.checked + } else if(ename === "type"){ this.#type = ev.target.value if(this.#type === "enum"){