mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 20:27:07 +09:00
Removed jQuery code from the cookie consent and servicelicense module (#908)
* Removed jQuery code from the cookie consent module * Removed jQuery code from the Servicelicense module
This commit is contained in:
1 parent
b7b7fb921f
commit
b9ff511e91
2 files changed
+12
-19
No files matched your search
@@ -4,13 +4,12 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
if (localStorage.getItem("cookie-consent") != 1) {
|
||||
$('#close-cookie-consent-block').show();
|
||||
}
|
||||
$('#close-cookie-consent-btn').click(function () {
|
||||
localStorage.setItem('cookie-consent', 1);
|
||||
$('#close-cookie-consent-block').hide();
|
||||
});
|
||||
if (localStorage.getItem("cookie-consent") != 1) {
|
||||
document.querySelector('#close-cookie-consent-block').style.display = '';
|
||||
}
|
||||
|
||||
document.querySelector('#close-cookie-consent-btn').addEventListener('click', () => {
|
||||
localStorage.setItem('cookie-consent', 1);
|
||||
document.querySelector('#close-cookie-consent-block').style.display = 'none';
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@@ -90,20 +90,14 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#license-reset').bind('click',function(event) {
|
||||
document.querySelector('#license-reset').addEventListener('click', (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
if (confirm("{{ 'Are you sure?'|trans }}")) {
|
||||
bb.post(
|
||||
'client/servicelicense/reset',
|
||||
{ order_id: {{ order.id }}, CSRFToken: "{{ CSRFToken }}" },
|
||||
function(result) {
|
||||
bb.msg('License was reset');
|
||||
}
|
||||
);
|
||||
API.client.post('servicelicense/reset', { order_id: {{ order.id }} }, function(result) {
|
||||
bb.msg("{{ 'License was reset'|trans }}");
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user