Add url to plugin
This commit is contained in:
parent
e44ebac43f
commit
f5a94fde96
@ -7,13 +7,13 @@ Plugins
|
|||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
$(function(){
|
$(function(){
|
||||||
$("input[type=checkbox]").change(function(e) {
|
$('input[type=checkbox]').change(function(e) {
|
||||||
var checkbox = $(this);
|
var checkbox = $(this);
|
||||||
var form = checkbox.closest("form");
|
var form = checkbox.closest('form');
|
||||||
var url = form.attr('action');
|
var url = form.attr('action');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
data: form.serialize(),
|
data: form.serialize(),
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
@ -28,7 +28,9 @@ $(function(){
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div style="padding: 1em">
|
<div style="padding: 1em">
|
||||||
{% for name in database.keys() %}
|
{% for name in database.keys() %}
|
||||||
<h4>{{name}}</h4>
|
<h4>
|
||||||
|
<a {% if name in loaded and loaded[name].on_webhook is defined %} href="/plugins/{{name}}" {% endif %}>{{name}}</a>
|
||||||
|
</h4>
|
||||||
<form method="POST" action="/plugins/toggle">
|
<form method="POST" action="/plugins/toggle">
|
||||||
<input type="checkbox" data-role="flipswitch" name="enabled" id="flip-checkbox-{{name}}" data-on-text="Enabled" data-off-text="Disabled" data-wrapper-class="custom-size-flipswitch" {% if name in loaded %} checked {% endif %}>
|
<input type="checkbox" data-role="flipswitch" name="enabled" id="flip-checkbox-{{name}}" data-on-text="Enabled" data-off-text="Disabled" data-wrapper-class="custom-size-flipswitch" {% if name in loaded %} checked {% endif %}>
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user