forked from phpLicenseWatcher/phpLicenseWatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservers_edit_jquery.js
More file actions
35 lines (30 loc) · 1.22 KB
/
servers_edit_jquery.js
File metadata and controls
35 lines (30 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
let count_reserved_checked = $('#count_reserved').prop('checked');
function crt_checkbox() {
if ($('#license_manager').val() != "flexlm") {
$('#count_reserved').prop('checked', true);
$('#count_reserved').prop('disabled', true);
$('#count_reserved_label').css('color', "#767676");
} else {
$('#count_reserved').prop('checked', count_reserved_checked);
$('#count_reserved').prop('disabled', false);
$('#count_reserved_label').css('color', "inherit");
}
}
$('document').ready(crt_checkbox);
$('#license_manager').change(crt_checkbox);
$('#count_reserved').change(function() {
count_reserved_checked = $('#count_reserved').prop('checked');
});
$('#delete-button').click(function() {
let server_name = $('#server_name').val();
let server_label = $('#server_label').val();
let server_id = $('#server_id').val();
let msg = "Confirm removal for " + server_name + " (" + server_label + ")\n";
msg += "*** THIS WILL REMOVE USAGE HISTORY FOR EVERY FEATURE\n";
msg += "*** THIS CANNOT BE UNDONE";
if (confirm(msg)) {
$('#delete-server').attr('name', "delete_id");
$('#delete-server').attr('value', server_id);
$('form').submit();
}
});