diff --git a/generic/templates/generic/exam_cids.html b/generic/templates/generic/exam_cids.html
index 75994107..102e1777 100644
--- a/generic/templates/generic/exam_cids.html
+++ b/generic/templates/generic/exam_cids.html
@@ -15,6 +15,9 @@
CID candidates ({{ cid_user_count }})
+
+
+
{% if cid_users %}
@@ -37,13 +40,6 @@
{{ cid.name }}
Email: {{ cid.email }}
-
- {% if cid.login_email_sent %}
- Email sent
- {% else %}
- Not sent
- {% endif %}
-
{% endfor %}
@@ -59,6 +55,9 @@
User candidates ({{ user_user_count }})
+
+
+
{% if user_users %}
{% for user in user_users %}
@@ -148,6 +147,37 @@
}
}catch(e){ console.error(e); }
});
+
+ // Filtering helpers
+ function normalizeText(s){ return (s||'').toString().toLowerCase(); }
+
+ function filterList(inputElem, listSelector){
+ const q = normalizeText(inputElem.value.trim());
+ document.querySelectorAll(listSelector).forEach(function(li){
+ const text = normalizeText(li.textContent);
+ if(!q || text.indexOf(q) !== -1){
+ li.style.display = '';
+ } else {
+ li.style.display = 'none';
+ }
+ });
+ }
+
+ const cidFilter = document.getElementById('cid-filter');
+ if(cidFilter){
+ cidFilter.addEventListener('input', function(){
+ // target CID list items only (left column)
+ filterList(cidFilter, '.col-lg-6:first-of-type .list-group-item');
+ });
+ }
+
+ const userFilter = document.getElementById('user-filter');
+ if(userFilter){
+ userFilter.addEventListener('input', function(){
+ // target user list items only (right column)
+ filterList(userFilter, '.col-lg-6:nth-of-type(2) .list-group-item, .col-lg-6:nth-of-type(2) .list-group-item.d-flex');
+ });
+ }
});
{% endblock %}