let's go ca marche je pense
This commit is contained in:
parent
6e25dcd115
commit
fd8f972cf8
|
@ -4,9 +4,7 @@ function addline(ligne){
|
|||
}
|
||||
|
||||
|
||||
function change_discord(value) {
|
||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||
|
||||
function change_discord(value, data) {
|
||||
if (value == "{{len}}"){
|
||||
document.getElementById("name").value = "";
|
||||
document.getElementById("submit").value = "Create !";
|
||||
|
@ -26,8 +24,7 @@ function change_discord(value) {
|
|||
}
|
||||
}
|
||||
|
||||
function change_config(value) {
|
||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||
function change_config(value, data) {
|
||||
document.getElementById("delete").style.visibility = "hidden";
|
||||
if (value == "{{len}}"){
|
||||
document.getElementById("submit").value = "Create !";
|
||||
|
@ -73,6 +70,5 @@ function change_proxy(value, data) {
|
|||
|
||||
|
||||
function change_logs(value) {
|
||||
console.log(value);
|
||||
document.getElementById("embed").src = "/static/logs/" + value + ".txt";
|
||||
}
|
||||
|
|
|
@ -42,17 +42,16 @@
|
|||
|
||||
|
||||
{% block content %}
|
||||
<script>data = JSON.parse('{{data|tojson}}'); </script>
|
||||
{%if not current_user.is_authenticated %}
|
||||
<button class="unselected" onclick="location.href = '/login';">login</button>
|
||||
{% else %}
|
||||
<form method="post" action="/config/">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 10%;">config : </td>
|
||||
<td style="width: 40%;">
|
||||
<select onchange="change_config(this.value)" name="config">
|
||||
<select onchange="change_config(this.value, data)" name="config">
|
||||
<option id="config" value="{{len}}">New config</option>
|
||||
{% for i in configs %}
|
||||
<option id="{{configs[i]['name']}}" value="{{i}}">{{configs[i]['name']}}</option>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</table>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<script>data = JSON.parse('{{data|tojson}}'); </script>
|
||||
{%if not current_user.is_authenticated %}
|
||||
<button class="unselected" onclick="location.href = '/login';">login</button>
|
||||
{% else %}
|
||||
|
@ -49,7 +49,7 @@
|
|||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<select name="select" onchange="change_discord(this.value)">
|
||||
<select name="select" onchange="change_discord(this.value, data)">
|
||||
<option selected id="new" value="{{ len }}">Create new Discord config</option>
|
||||
{% for i in data %}
|
||||
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
|
||||
|
|
Loading…
Reference in New Issue