From 6e188524e2014455f096eb79512213c0750228a0 Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa
Date: Wed, 30 Jan 2019 17:54:43 -0800
Subject: [PATCH] backups: Fix styling for upload size warning
Make it conditional such that when the disk space information is not available
due to errors, we don't display the warning.
Signed-off-by: Sunil Mohan Adapa
Reviewed-by: James Valleroy
---
.../backups/templates/backups_upload.html | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/plinth/modules/backups/templates/backups_upload.html b/plinth/modules/backups/templates/backups_upload.html
index 608f36328..0623caf99 100644
--- a/plinth/modules/backups/templates/backups_upload.html
+++ b/plinth/modules/backups/templates/backups_upload.html
@@ -33,12 +33,17 @@
backup file.
{% endblocktrans %}
-
- {% blocktrans trimmed %}
- WARNING: You have {{ max_filesize }} available to restore a backup.
- Exceeding this limit can leave your {{ box_name }} unusable.
- {% endblocktrans %}
-
+
+ {% if max_filesize %}
+
+
+ {% trans "Caution:" %}
+ {% blocktrans trimmed %}
+ You have {{ max_filesize }} available to restore a backup.
+ Exceeding this limit can leave your {{ box_name }} unusable.
+ {% endblocktrans %}
+
+ {% endif %}