From f9513e384455ee0a455c9839601be4c386c88f01 Mon Sep 17 00:00:00 2001 From: Katrin Khilko Date: Tue, 22 Apr 2025 12:16:53 +0300 Subject: [PATCH] FIO-10007: fixed display of file validation errors --- src/templates/bootstrap4/file/form.ejs | 37 +++++++++++++++++++------- src/templates/bootstrap5/file/form.ejs | 37 ++++++++++++++++++++------ 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/src/templates/bootstrap4/file/form.ejs b/src/templates/bootstrap4/file/form.ejs index 0891e3d62..b0bf2d1f8 100644 --- a/src/templates/bootstrap4/file/form.ejs +++ b/src/templates/bootstrap4/file/form.ejs @@ -125,16 +125,35 @@ {% }) %} {% ctx.filesToUpload.forEach(function(file) { %} - {% if (file.status === 'progress') { %} -
{{ctx.fileSize(file.size)}}
-
-
- {{file.progress}}% {{ctx.t('completeStatus')}} +
  • +
    +
    +
    {{file.originalName || file.name}}
    + {% if (file.status === 'progress') { %} +
    +
    + {{file.progress}}% {{ctx.t('completeStatus')}} +
    +
    + {% } else { %} +
    {{ctx.t(file.message)}}
    + {% } %} +
    +
    {{ctx.fileSize(file.size)}}
    + {% if (ctx.self.hasTypes) { %} +
    + +
    + {% } %} + {% if (!ctx.isSyncing && file.status !== 'success') { %} +
    + {% } %}
    -
  • - {% } else { %} -
    {{ctx.t(file.message)}}
    - {% } %} + {% }) %}
    {% } %} diff --git a/src/templates/bootstrap5/file/form.ejs b/src/templates/bootstrap5/file/form.ejs index f28902fb9..eb2f05937 100644 --- a/src/templates/bootstrap5/file/form.ejs +++ b/src/templates/bootstrap5/file/form.ejs @@ -125,16 +125,37 @@ {% }) %} {% ctx.filesToUpload.forEach(function(file) { %} - {% if (file.status === 'progress') { %} -
    {{ctx.fileSize(file.size)}}
    -
    -
    - {{file.progress}}% {{ctx.t('completeStatus')}} +
  • +
    +
    +
    {{file.originalName || file.name}}
    + {% if (file.status === 'progress') { %} +
    +
    + {{file.progress}}% {{ctx.t('completeStatus')}} +
    +
    + {% } else { %} +
    {{ctx.t(file.message)}}
    + {% } %}
    +
    {{ctx.fileSize(file.size)}}
    + {% if (ctx.self.hasTypes) { %} +
    + +
    + {% } %} + {% if (file.status === 'progress') { %} +
    + {% } else if (!ctx.isSyncing && file.status !== 'success') { %} +
    + {% } %}
    - {% } else { %} -
    {{ctx.t(file.message)}}
    - {% } %} +
  • {% }) %}
    {% } %}