public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] Show warning, when domain exhausted and only an unlimited mailbox could be created
fd73bbc2
data/web/js/site/mailbox.js | 26 ++++++++++++++------------
data/web/lang/lang.de.json | 3 ++-
data/web/lang/lang.en.json | 3 ++-
3 files changed, 18 insertions(+), 14 deletions(-)
Diff
diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js
index bafe8644..33f5cb16 100644
--- a/data/web/js/site/mailbox.js
+++ b/data/web/js/site/mailbox.js
@@ -71,21 +71,23 @@ $(document).ready(function() {
});
// Auto-fill domain quota when adding new domain
auto_fill_quota = function(domain) {
- $.get("/api/v1/get/domain/" + domain, function(data){
+ $.get("/api/v1/get/domain/" + domain, function(data){
var result = $.parseJSON(JSON.stringify(data));
def_new_mailbox_quota = ( result.def_new_mailbox_quota / 1048576);
max_new_mailbox_quota = ( result.max_new_mailbox_quota / 1048576);
- if (max_new_mailbox_quota != '0') {
- $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB');
- $('#addInputQuota').attr({"disabled": false, "value": "", "type": "number", "max": max_new_mailbox_quota});
- $('#addInputQuota').val(def_new_mailbox_quota);
- }
- else {
- $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB');
- $('#addInputQuota').attr({"disabled": true, "value": "", "type": "text", "value": "n/a"});
- $('#addInputQuota').val(max_new_mailbox_quota);
- }
- });
+ if (max_new_mailbox_quota != '0') {
+ $('.addInputQuotaExhausted').hide();
+ $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB');
+ $('#addInputQuota').attr({"disabled": false, "value": "", "type": "number", "max": max_new_mailbox_quota});
+ $('#addInputQuota').val(def_new_mailbox_quota);
+ }
+ else {
+ $('.addInputQuotaExhausted').show();
+ $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB');
+ $('#addInputQuota').attr({"disabled": true, "value": "", "type": "text", "value": "n/a"});
+ $('#addInputQuota').val(max_new_mailbox_quota);
+ }
+ });
}
$('#addSelectDomain').on('change', function() {
auto_fill_quota($('#addSelectDomain').val());
diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json
index d49f7163..b0412874 100644
--- a/data/web/lang/lang.de.json
+++ b/data/web/lang/lang.de.json
@@ -220,7 +220,8 @@
"fuzzy_learn_error": "Fuzzy Lernfehler: %s",
"ip_invalid": "Ungültige IP übersprungen: %s",
"session_token": "Formular-Token ungültig: Token stimmt nicht überein",
- "session_ua": "Formular-Token ungültig: User-Agent-Validierungsfehler"
+ "session_ua": "Formular-Token ungültig: User-Agent-Validierungsfehler",
+ "quota_exceeded_scope": "Domain-Quota erschöpft: Es können nur noch unlimiterte Mailboxen in dieser Domain erstellt werden."
},
"user": {
"last_mail_login": "Letzter Mail-Login",
diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json
index 206236d5..f75d8b09 100644
--- a/data/web/lang/lang.en.json
+++ b/data/web/lang/lang.en.json
@@ -220,7 +220,8 @@
"no_active_admin": "Cannot deactivate last active admin",
"hash_not_found": "Hash not found or already deleted",
"fuzzy_learn_error": "Fuzzy hash learn error: %s",
- "ip_invalid": "Skipped invalid IP: %s"
+ "ip_invalid": "Skipped invalid IP: %s",
+ "quota_exceeded_scope": "Domain quota exceeded: Only unlimited/unrated mailboxes can be created in this domain scope."
},
"user": {
"no_last_login": "No last UI login information",