From e9e3b1efc33b35280464ba2f40d96fdd6560e3c1 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 14 Feb 2024 10:56:08 +0300 Subject: Extract upload progress indication code * Extract the UI elements and code for indicating upload progress into separate, reusable "modules". * Fix bugs arising from changes. --- qc_app/templates/index.html | 50 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'qc_app/templates/index.html') diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html index b9638d2..588133a 100644 --- a/qc_app/templates/index.html +++ b/qc_app/templates/index.html @@ -1,5 +1,6 @@ {%extends "base.html"%} -{%from "flash_messages.html" import flash_all_messages%} +{%from "flash_messages.html" import flash_messages%} +{%from "upload_progress_indicator.html" import upload_progress_indicator%} {%block title%}Data Upload{%endblock%} @@ -54,17 +55,11 @@
+ method="POST" + enctype="multipart/form-data" + id="frm-upload-expression-data"> upload expression data - {%with messages = get_flashed_messages(with_categories=True) %} - {%if messages %} -
- {%for category, message in messages %} - {{message}} - {%endfor%} -
- {%endif%} - {%endwith%} + {{flash_messages("error-expr-data")}}
@@ -108,20 +103,7 @@
- +{{upload_progress_indicator()}}

samples/cases

@@ -155,6 +137,22 @@ {%block javascript%} {%endblock%} -- cgit v1.2.3