mirror of
https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
synced 2025-06-23 02:13:57 +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:
@ -48,7 +48,7 @@
|
||||
<tr>
|
||||
<td class="comlumn-name"></td>
|
||||
<td>
|
||||
<select name="select" onchange="changecat(this.value)">
|
||||
<select name="select" onchange="change_proxy(this.value)">
|
||||
<option selected id="new" value="{{ len }}">Create new proxy</option>
|
||||
{% for i in data %}
|
||||
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
|
||||
@ -81,25 +81,6 @@
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
function changecat(value) {
|
||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||
if (value == "{{len}}"){
|
||||
document.getElementById("submit").value = "Create";
|
||||
document.getElementById("address").value = "";
|
||||
document.getElementById("port").value = "";
|
||||
document.getElementById("name").value = "";
|
||||
}
|
||||
else {
|
||||
document.getElementById("submit").value = "Update";
|
||||
document.getElementById("address").value = data[parseInt(value)]["address"];
|
||||
document.getElementById("port").value = data[parseInt(value)]["port"];
|
||||
document.getElementById("name").value = data[parseInt(value)]["name"];
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user