diff --git a/templates/dispositivo/show.htm b/templates/dispositivo/show.htm index b20910a..e9b6e5c 100644 --- a/templates/dispositivo/show.htm +++ b/templates/dispositivo/show.htm @@ -46,8 +46,8 @@ window.onload = function () { {% for accesso in accessi %} adduser(); - $("#utente{{ loop.index }} option").prop("selected", false); - $("#utente{{ loop.index }} option[value={{ accesso.iid }}]").prop("selected", true); + $("#utente{{ loop.index - 1 }} option").prop("selected", false); + $("#utente{{ loop.index - 1 }} option[value={{ accesso.iid }}]").prop("selected", true); {% endfor %} }; {% endif %}