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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-01-30 17:54:43 -08:00 committed by James Valleroy
parent ff8d85a88f
commit 6e188524e2
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -33,12 +33,17 @@
backup file.
{% endblocktrans %}
</p>
<div class="alert alert-warning" role="alert">
{% blocktrans trimmed %}
WARNING: You have {{ max_filesize }} available to restore a backup.<br />
Exceeding this limit can leave your {{ box_name }} unusable.
{% endblocktrans %}
</div>
{% if max_filesize %}
<div class="alert alert-warning" role="alert">
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
<span class="sr-only">{% trans "Caution:" %}</span>
{% blocktrans trimmed %}
You have {{ max_filesize }} available to restore a backup.
Exceeding this limit can leave your {{ box_name }} unusable.
{% endblocktrans %}
</div>
{% endif %}
<form class="form" enctype="multipart/form-data" method="post">
{% csrf_token %}