From d98f16333ad960a283298646fbf44d5c10a5fdfa Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sun, 17 Dec 2017 15:13:47 +0100 Subject: [PATCH] Display an infinite quota when necessary for users, fixes #345 --- core/admin/mailu/ui/templates/user/create.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/admin/mailu/ui/templates/user/create.html b/core/admin/mailu/ui/templates/user/create.html index 9f5d2065..053bfba5 100644 --- a/core/admin/mailu/ui/templates/user/create.html +++ b/core/admin/mailu/ui/templates/user/create.html @@ -20,8 +20,8 @@ {% call macros.box(_("Features and quotas"), theme="success") %} {{ macros.form_field(form.quota_bytes, step=1000000000, max=(max_quota_bytes or domain.max_quota_bytes or 50000000000), - prepend=''+(form.quota_bytes.data//1000000000).__str__()+' GiB', - oninput='$("#quota").text(this.value/1000000000);') }} + prepend=''+((form.quota_bytes.data//1000000000).__str__() if form.quota_bytes.data else '∞')+' GiB', + oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }} {{ macros.form_field(form.enable_imap) }} {{ macros.form_field(form.enable_pop) }} {% endcall %}