fixed readonly which was missing and made readonly ccpimage fields

This commit is contained in:
dcore94 2023-06-07 18:06:19 +02:00
parent 466b427367
commit 63d6d57956
1 changed files with 7 additions and 7 deletions

View File

@ -72,20 +72,20 @@ class CCPInputWidgetEditorController extends HTMLElement{
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class="col">
<div class="form-field" title="Title"> <div class="form-field" title="Title">
<input name="title" class="form-control" placeholder="title" value="${this.#input.title}" required="required" ${ input.id !== 'ccpimage' ? 'readonly : ''}/> <input name="title" class="form-control" placeholder="title" value="${this.#input.title}" required="required" ${ input.id === 'ccpimage' ? 'readonly' : ''}/>
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<div class="form-field" title="description"> <div class="form-field" title="description">
<input name="description" class="form-control" placeholder="description" value="${this.#input.description}" required="required" ${ input.id !== 'ccpimage' ? 'readonly : ''}/> <input name="description" class="form-control" placeholder="description" value="${this.#input.description}" required="required" ${ input.id === 'ccpimage' ? 'readonly' : ''}/>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-3"> <div class="col-3">
<div class="form-field" title="Type"> <div class="form-field" title="Type">
<label>Type</label> <label>Type</label>
<select name="type" class="form-control" placeholder="type" value="${this.#input.schema.type}" ${ input.id !== 'ccpimage' ? 'readonly : ''}> <select name="type" class="form-control" placeholder="type" value="${this.#input.schema.type}" ${ input.id === 'ccpimage' ? 'readonly' : ''}>
<option value="string">String</option> <option value="string">String</option>
<option value="enum">Enum</option> <option value="enum">Enum</option>
</select> </select>
@ -94,13 +94,13 @@ class CCPInputWidgetEditorController extends HTMLElement{
<div class="col"> <div class="col">
<div class="form-field" title="Minimum"> <div class="form-field" title="Minimum">
<label>Min</label> <label>Min</label>
<input value="${this.#input.minOccurs}" type="number" min="0" step="1" name="minOccurs" value="${this.#input.minOccurs}" required="required" class="form-control" placeholder="minOccurs" ${ input.id !== 'ccpimage' ? 'readonly : ''}/> <input value="${this.#input.minOccurs}" type="number" min="0" step="1" name="minOccurs" value="${this.#input.minOccurs}" required="required" class="form-control" placeholder="minOccurs" ${ input.id === 'ccpimage' ? 'readonly' : ''}/>
</div> </div>
</div> </div>
<div class="col"> <div class="col">
<div class="form-field" title="Maximum"> <div class="form-field" title="Maximum">
<label>Max</label> <label>Max</label>
<input value="${this.#input.maxOccurs}" type="number" min="0" step="1" name="maxOccurs" value="${this.#input.maxOccurs}" required="required" class="form-control" placeholder="maxOccurs" ${ input.id !== 'ccpimage' ? 'readonly : ''}/> <input value="${this.#input.maxOccurs}" type="number" min="0" step="1" name="maxOccurs" value="${this.#input.maxOccurs}" required="required" class="form-control" placeholder="maxOccurs" ${ input.id === 'ccpimage' ? 'readonly' : ''}/>
</div> </div>
</div> </div>
</div> </div>
@ -108,7 +108,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
<div class="col-3"> <div class="col-3">
<div class="form-field" title="Format"> <div class="form-field" title="Format">
<label>Format</label> <label>Format</label>
<select value="${this.#input.schema.format}" name="format" class="form-control" ${ input.id !== 'ccpimage' ? 'readonly : ''}> <select value="${this.#input.schema.format}" name="format" class="form-control" ${ input.id === 'ccpimage' ? 'readonly' : ''}>
<option value="none" ${this.isSelectedFormat('none') ? "selected" : ""}>None</option> <option value="none" ${this.isSelectedFormat('none') ? "selected" : ""}>None</option>
<option value="date" ${this.isSelectedFormat('date') ? "selected" : ""}>Date</option> <option value="date" ${this.isSelectedFormat('date') ? "selected" : ""}>Date</option>
<option value="time" ${this.isSelectedFormat('time') ? "selected" : ""}>Time</option> <option value="time" ${this.isSelectedFormat('time') ? "selected" : ""}>Time</option>
@ -122,7 +122,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
<div class="col" title="Mime type"> <div class="col" title="Mime type">
<label>Mime</label> <label>Mime</label>
<div class="form-field"> <div class="form-field">
<input value="${this.#input.schema.contentMediaType}" name="contentMediaType" class="form-control" placeholder="mime" ${ input.id !== 'ccpimage' ? 'readonly : ''}/> <input value="${this.#input.schema.contentMediaType}" name="contentMediaType" class="form-control" placeholder="mime" ${ input.id === 'ccpimage' ? 'readonly' : ''}/>
</div> </div>
</div> </div>
<div class="col" title="Read only"> <div class="col" title="Read only">