From 8cf5ef556e8874e5a954b4681f4ffe31718a8a0b Mon Sep 17 00:00:00 2001 From: HannaKurban <96909212+HannaKurban@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:13:32 +0300 Subject: [PATCH] FIO-9377 added progressbar for for file upload with Display as image (#113) --- src/templates/bootstrap4/file/form.ejs | 12 ++++++++++++ src/templates/bootstrap5/file/form.ejs | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/templates/bootstrap4/file/form.ejs b/src/templates/bootstrap4/file/form.ejs index c1b37136..23062c4c 100644 --- a/src/templates/bootstrap4/file/form.ejs +++ b/src/templates/bootstrap4/file/form.ejs @@ -124,6 +124,18 @@ {% }) %} + {% ctx.filesToUpload.forEach(function(file) { %} + {% if (file.status === 'progress') { %} +
{{ctx.fileSize(file.size)}}
+
+
+ {{file.progress}}% {{ctx.t('Complete')}} +
+
+ {% } else { %} +
{{ctx.t(file.message)}}
+ {% } %} + {% }) %} {% } %} {% if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { %} diff --git a/src/templates/bootstrap5/file/form.ejs b/src/templates/bootstrap5/file/form.ejs index 602a130b..61bc0123 100644 --- a/src/templates/bootstrap5/file/form.ejs +++ b/src/templates/bootstrap5/file/form.ejs @@ -124,6 +124,18 @@ {% }) %} + {% ctx.filesToUpload.forEach(function(file) { %} + {% if (file.status === 'progress') { %} +
{{ctx.fileSize(file.size)}}
+
+
+ {{file.progress}}% {{ctx.t('Complete')}} +
+
+ {% } else { %} +
{{ctx.t(file.message)}}
+ {% } %} + {% }) %} {% } %} {% if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { %}