[Web] display human readable domainnames instead of punycode
This commit is contained in:
parent
3cb9c2ece5
commit
288dbfa37c
@ -4316,6 +4316,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||||||
$domaindata['mboxes_in_domain'] = $MailboxDataDomain['count'];
|
$domaindata['mboxes_in_domain'] = $MailboxDataDomain['count'];
|
||||||
$domaindata['mboxes_left'] = $row['mailboxes'] - $MailboxDataDomain['count'];
|
$domaindata['mboxes_left'] = $row['mailboxes'] - $MailboxDataDomain['count'];
|
||||||
$domaindata['domain_name'] = $row['domain'];
|
$domaindata['domain_name'] = $row['domain'];
|
||||||
|
$domaindata['domain_h_name'] = idn_to_utf8($row['domain']);
|
||||||
$domaindata['description'] = $row['description'];
|
$domaindata['description'] = $row['description'];
|
||||||
$domaindata['max_num_aliases_for_domain'] = $row['aliases'];
|
$domaindata['max_num_aliases_for_domain'] = $row['aliases'];
|
||||||
$domaindata['max_num_mboxes_for_domain'] = $row['mailboxes'];
|
$domaindata['max_num_mboxes_for_domain'] = $row['mailboxes'];
|
||||||
|
@ -451,6 +451,10 @@ jQuery(function($){
|
|||||||
dataSrc: function(json){
|
dataSrc: function(json){
|
||||||
$.each(json.data, function(i, item) {
|
$.each(json.data, function(i, item) {
|
||||||
item.domain_name = escapeHtml(item.domain_name);
|
item.domain_name = escapeHtml(item.domain_name);
|
||||||
|
item.domain_h_name = escapeHtml(item.domain_h_name);
|
||||||
|
if (item.domain_name != item.domain_h_name){
|
||||||
|
item.domain_h_name = item.domain_h_name + '<small class="d-block">' + item.domain_name + '</small>';
|
||||||
|
}
|
||||||
|
|
||||||
item.aliases = item.aliases_in_domain + " / " + item.max_num_aliases_for_domain;
|
item.aliases = item.aliases_in_domain + " / " + item.max_num_aliases_for_domain;
|
||||||
item.mailboxes = item.mboxes_in_domain + " / " + item.max_num_mboxes_for_domain;
|
item.mailboxes = item.mboxes_in_domain + " / " + item.max_num_mboxes_for_domain;
|
||||||
@ -489,11 +493,11 @@ jQuery(function($){
|
|||||||
|
|
||||||
if (item.backupmx == 1) {
|
if (item.backupmx == 1) {
|
||||||
if (item.relay_unknown_only == 1) {
|
if (item.relay_unknown_only == 1) {
|
||||||
item.domain_name = '<div class="badge fs-6 bg-info">Relay Non-Local</div> ' + item.domain_name;
|
item.domain_h_name = '<div class="badge fs-7 bg-info">Relay Non-Local</div> ' + item.domain_h_name;
|
||||||
} else if (item.relay_all_recipients == 1) {
|
} else if (item.relay_all_recipients == 1) {
|
||||||
item.domain_name = '<div class="badge fs-6 bg-info">Relay All</div> ' + item.domain_name;
|
item.domain_h_name = '<div class="badge fs-7 bg-info">Relay All</div> ' + item.domain_h_name;
|
||||||
} else {
|
} else {
|
||||||
item.domain_name = '<div class="badge fs-6 bg-info">Relay</div> ' + item.domain_name;
|
item.domain_h_name = '<div class="badge fs-7 bg-info">Relay</div> ' + item.domain_h_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -521,7 +525,7 @@ jQuery(function($){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.domain,
|
title: lang.domain,
|
||||||
data: 'domain_name',
|
data: 'domain_h_name',
|
||||||
responsivePriority: 3,
|
responsivePriority: 3,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
|
@ -26,6 +26,15 @@
|
|||||||
<input type="hidden" value="0" name="gal">
|
<input type="hidden" value="0" name="gal">
|
||||||
<input type="hidden" value="0" name="relay_all_recipients">
|
<input type="hidden" value="0" name="relay_all_recipients">
|
||||||
<input type="hidden" value="0" name="relay_unknown_only">
|
<input type="hidden" value="0" name="relay_unknown_only">
|
||||||
|
<div class="row mb-4">
|
||||||
|
<label class="control-label col-sm-2" for="domain">{{ lang.mailbox.domain }}</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<span class="d-block"><strong>{{ result.domain_h_name }}</strong></span>
|
||||||
|
{% if result.domain_h_name != result.domain_name %}
|
||||||
|
<small>{{ result.domain_name }}</small>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-2" data-acl="{{ acl.domain_desc }}">
|
<div class="row mb-2" data-acl="{{ acl.domain_desc }}">
|
||||||
<label class="control-label col-sm-2" for="description">{{ lang.edit.description }}</label>
|
<label class="control-label col-sm-2" for="description">{{ lang.edit.description }}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
|
Loading…
Reference in New Issue
Block a user