This commit is contained in:
Ross
2022-04-21 16:30:50 +01:00
parent f90b5eb85a
commit bcc2edf273
+11 -3
View File
@@ -5,7 +5,7 @@
{% for cid in current_cid_users %} {% for cid in current_cid_users %}
<li><a href="{% url 'generic:update_cid' cid.pk %}">{{cid.cid}}</a> [{{cid.passcode}}] {{cid.name}} / <li><a href="{% url 'generic:update_cid' cid.pk %}">{{cid.cid}}</a> [{{cid.passcode}}] {{cid.name}} /
Email: {{cid.email}} Email: {{cid.email}} <button class="toggle-btn" data-pk="{{cid.pk}}">Toggle<button>
</li> </li>
{% endfor %} {% endfor %}
@@ -21,6 +21,14 @@
{% endfor %} {% endfor %}
</ol> </ol>
<a href="{% url 'generic:manage_cids' %}">Manage CIDs here</a> <a href="{% url 'generic:manage_cids' %}">Manage CIDs here</a>
<script>
$(document).ready(() => {
$(".toggle-btn").click((el) => {
console.log(el);
console.log(el.dataset.pk);
});
})