Commit 92948294 authored by Ad Schellevis's avatar Ad Schellevis

(Captiveportal, new) alert user when no voucher auth is configured

parent 10d0ebf8
......@@ -40,12 +40,17 @@ POSSIBILITY OF SUCH DAMAGE.
$.each(data, function(key, value) {
$('#voucher-providers').append($("<option></option>").attr("value", value).text(value));
});
// link on change event
$('#voucher-providers').on('change', function(){
if ($('#voucher-providers option').size() > 0) {
// link on change event
$('#voucher-providers').on('change', function(){
updateVoucherGroupList();
});
// initial load voucher list
updateVoucherGroupList();
});
// initial load voucher list
updateVoucherGroupList();
} else {
// A voucher server is needed before we can add vouchers, alert user
BootstrapDialog.alert('{{ lang._('Please setup a voucher server first ') }} (<a href="/system_authservers.php">{{ lang._('goto auth servers') }}</a> )');
}
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment