mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
changed plugin management to simple rq jobs instead of using pkg_resources.
This commit is contained in:
parent
fe5e85f96c
commit
1bf19c791b
13 changed files with 156 additions and 77 deletions
23
static/js/captiveportal.js
Normal file
23
static/js/captiveportal.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
$('#approveForm').submit(function (event) {
|
||||
var api_url = '/approve';
|
||||
event.preventDefault();
|
||||
|
||||
// Had some issues trying to set a background image on the button.
|
||||
if ($('#approveCheckbox').is(':checked')) {
|
||||
$('#approveButton').prop('disabled', true);
|
||||
$('#approveButton').val('');
|
||||
$('#approveButton').addClass('button-loading');
|
||||
|
||||
$('#approveButtonDiv').replaceWith('<img src="/static/images/radio.svg" alt="Loading, please wait..." />');
|
||||
|
||||
var ajaxReq = $.post(api_url);
|
||||
|
||||
ajaxReq.done(function(data) {
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
ajaxReq.fail(function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('Request Error: '+ XMLHttpRequest.responseText + ', status:' + XMLHttpRequest.status + ', status text: ' + XMLHttpRequest.statusText)
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue