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
9
static/css/captiveportal.css
Normal file
9
static/css/captiveportal.css
Normal file
|
@ -0,0 +1,9 @@
|
|||
.button-loading {
|
||||
background: #80c8ff url('/static/images/loader.gif') no-repeat 80% 80%;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#approveButtonDiv img {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
1
static/images/radio.svg
Normal file
1
static/images/radio.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><svg width='38px' height='38px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-blank"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><g transform="scale(0.55)"><circle cx="30" cy="150" r="30" fill="#eb8614"><animate attributeName="opacity" from="0" to="1" dur="1s" begin="0" repeatCount="indefinite" keyTimes="0;0.5;1" values="0;1;1"></animate></circle><path d="M90,150h30c0-49.7-40.3-90-90-90v30C63.1,90,90,116.9,90,150z" fill="#fb9610"><animate attributeName="opacity" from="0" to="1" dur="1s" begin="0.1" repeatCount="indefinite" keyTimes="0;0.5;1" values="0;1;1"></animate></path><path d="M150,150h30C180,67.2,112.8,0,30,0v30C96.3,30,150,83.7,150,150z" fill="#fb9610"><animate attributeName="opacity" from="0" to="1" dur="1s" begin="0.2" repeatCount="indefinite" keyTimes="0;0.5;1" values="0;1;1"></animate></path></g></svg>
|
After Width: | Height: | Size: 944 B |
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)
|
||||
});
|
||||
}
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function () {
|
||||
$('#resetForm').submit(function (event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue