ccp-features #10

Merged
m.lettere merged 6 commits from ccp-features into master 2023-10-03 16:28:52 +02:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 650cc75df0 - Show all commits

View File

@ -402,7 +402,7 @@ class CCPFileInputWidgetController extends CCPBaseInputWidgetController{
if(this.value.length <= 1){
const v = this.value.length ? this.value[0] : ''
return `
<input type="file" data-index="0" class="my-2 form-control" placeholder="${this.title}" name="${this.name}" ${this.readonly ? 'readonly' : ''} ${this.required ? 'required' : ''} value="${v}"/>
<input type="file" data-index="0" class="my-2 form-control" placeholder="${this.title}" name="${this.name}" ${this.readonly ? 'readonly' : ''} ${this.required && !v ? 'required' : ''} value="${v}"/>
<small name ="preview" class="form-text text-muted">${v.substr(0,5) + "..." + v.substr(v.length-5)}</small>
`
}