]> rtime.felk.cvut.cz Git - coffee/coffee-flask.git/commitdiff
Add missing quotes in JS handler for disabling identifier
authorMichal Sojka <michal.sojka@cvut.cz>
Mon, 19 Aug 2019 10:53:17 +0000 (12:53 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 19 Aug 2019 10:53:17 +0000 (12:53 +0200)
The identifier should always be treated as string, never as a number.

templates/user.html

index 790dab20e8cd8cf835d41bd60457be080cf42e7a..3b549be10747061ac89ce7757204f14280e9ced6 100644 (file)
@@ -40,7 +40,7 @@
                 <td><input type="text" id="identifier_name_{{ loop.index }}" value="{{ id[2] }}" /></td>
                 <td {% if iid == id[1] %} style="font-weight: bold" {% endif %}>#<span id="identifier_{{ loop.index }}">{{ id[1] }}</span></td>
                 <td><input type="button" value="rename" onclick="renameIdentifier({{ loop.index }})" /></td>
-                <td><input type="button" value="remove" onclick="disableIdentifier({{ id[1] }})" /></td>
+                <td><input type="button" value="remove" onclick="disableIdentifier('{{ id[1] }}')" /></td>
             </tr>
             {% endfor %}
             <tr>