mirror of
https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
synced 2025-06-13 14:34:45 +02:00
euh en gros :
- j'ai bougé plus de JS dans le fichier main.js - j'ai changé le css pour que les listes soient joli
This commit is contained in:
@ -47,7 +47,7 @@
|
||||
<tr>
|
||||
<td style="width: 10%;">config : </td>
|
||||
<td style="width: 40%;">
|
||||
<select onchange="changecat(this.value)" name="config">
|
||||
<select onchange="change_config(this.value)" 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>
|
||||
@ -136,41 +136,5 @@
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function changecat(value) {
|
||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||
document.getElementById("delete").style.visibility = "hidden";
|
||||
if (value == "{{len}}"){
|
||||
document.getElementById("submit").value = "Create !";
|
||||
document.getElementById("discord").value = "-1";
|
||||
document.getElementById("proxy").value = "-1";
|
||||
document.getElementById("name").value = "";
|
||||
for (let i = 1; i < 6; i++) {
|
||||
document.getElementById("mail"+ i).value = "";
|
||||
document.getElementById("pwd"+ i).value = "" ;
|
||||
document.getElementById("2fa"+ i).value = "" ;
|
||||
}
|
||||
}
|
||||
else {
|
||||
document.getElementById("delete").style.visibility = "visible";
|
||||
document.getElementById("submit").value = "Update !";
|
||||
document.getElementById("discord").value = data[parseInt(value)]["discord"];
|
||||
document.getElementById("proxy").value = data[parseInt(value)]["proxy"];
|
||||
document.getElementById("name").value = data[parseInt(value)]["name"];
|
||||
for (let i = 1; i < 6; i++) {
|
||||
document.getElementById("mail"+ i).value = data[parseInt(value)]['accounts'][i]["mail"] ;
|
||||
document.getElementById("pwd"+ i).value = data[parseInt(value)]['accounts'][i]["pwd"] ;
|
||||
document.getElementById("2fa"+ i).value = data[parseInt(value)]['accounts'][i]["2fa"] ;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user