Files
Froxlor/templates/Sparkle/assets/js/domains.js
Michael Kaufmann f1d91dfef8 interface adjustments for apikey interaction
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 08:21:27 +02:00

38 lines
1.0 KiB
JavaScript

$(document).ready(function() {
/**
* disable unusable php-configuration by customer settings
*/
$('#customerid').change(function() {
var cid = $(this).val();
var sid = getUrlParameter('s');
var page = getUrlParameter('page');
$.ajax({
url: "admin_domains.php?s="+sid+"&page="+page+"&action=jqGetCustomerPHPConfigs",
type: "POST",
data: {
customerid: cid
},
dataType: "json",
success: function(json) {
if (json.length > 0) {
$('#phpsettingid option').each(function() {
var pid = $(this).val();
$(this).attr("disabled", "disabled");
for (i in json) {
if (pid == json[i]) {
$(this).removeAttr("disabled");
}
}
});
}
},
error: function(a, b) {
console.log(a, b);
}
});
});
});