1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-14 10:52:49 +02:00
mailcow-dockerized/data/web/js/add.js
2016-12-09 20:39:02 +01:00

17 lines
620 B
JavaScript

$(document).ready(function() {
// add.php
// Get max. possible quota for a domain when domain field changes
$('#addSelectDomain').on('change', function() {
$.get("add.php", { js:"remaining_specs", domain:this.value, object:"new" }, function(data){
if (data != '0') {
$("#quotaBadge").html('max. ' + data + ' MiB');
$('#addInputQuota').attr({"disabled": false, "value": "", "type": "number", "max": data});
}
else {
$("#quotaBadge").html('max. ' + data + ' MiB');
$('#addInputQuota').attr({"disabled": true, "value": "", "type": "text", "value": "n/a"});
}
});
});
});