From 0f6b403904dabc12718e52de48acba4af493deb0 Mon Sep 17 00:00:00 2001
From: Lars Eggert <lars@eggert.org>
Date: Thu, 12 Oct 2023 14:15:14 +0300
Subject: [PATCH] fix: Fix "Is Accepting Feedback: yes" action for NomCom
 (#6467)

Fixes #6466

While I'm here, apply list styling more consistently across NomCom pages.
---
 ietf/templates/nomcom/eligible.html           |  6 ----
 ietf/templates/nomcom/list_positions.html     | 32 ++++++++-----------
 .../templates/nomcom/nomcom_private_base.html |  6 +++-
 ietf/templates/nomcom/nomcom_public_base.html |  8 +++--
 ietf/templates/nomcom/private_index.html      |  6 ----
 ietf/templates/nomcom/view_feedback.html      |  8 +----
 ietf/templates/nomcom/volunteers.html         |  6 ----
 7 files changed, 26 insertions(+), 46 deletions(-)

diff --git a/ietf/templates/nomcom/eligible.html b/ietf/templates/nomcom/eligible.html
index fcf06e6e5..f5cfc2e2d 100644
--- a/ietf/templates/nomcom/eligible.html
+++ b/ietf/templates/nomcom/eligible.html
@@ -4,9 +4,6 @@
 {% load django_bootstrap5 textfilters person_filters %}
 {% load static %}
 {% block subtitle %}- Eligible People{% endblock %}
-{% block pagehead %}
-    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
-{% endblock %}
 {% block nomcom_content %}
     {% origin %}
     <h2>Eligible People for {{ nomcom.group }}</h2>
@@ -41,7 +38,4 @@
         {% endif %}
     </table>
 }
-{% endblock %}
-{% block js %}
-    <script src="{% static "ietf/js/list.js" %}"></script>
 {% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/nomcom/list_positions.html b/ietf/templates/nomcom/list_positions.html
index 476dce967..59e549fc3 100644
--- a/ietf/templates/nomcom/list_positions.html
+++ b/ietf/templates/nomcom/list_positions.html
@@ -24,23 +24,24 @@
             <thead>
                 <tr>
                     {% if nomcom.group.state_id == 'active' %}
-                        <th scope="colgroup" colspan="3">
-                            <i class="bi bi-check"></i>
+                        <th scope="col">
+                            ✓
                         </th>
+                        <th scope="col"></th>
                     {% endif %}
                     <th scope="col" data-sort="position">
                         Position
                     </th>
-                    <th scope="col" data-sort="iesg">
+                    <th class="text-center" scope="col" data-sort="iesg">
                         IESG
                     </th>
-                    <th scope="col" data-sort="open">
+                    <th class="text-center" scope="col" data-sort="open">
                         Open
                     </th>
-                    <th scope="col" data-sort="accept_nom">
+                    <th class="text-center" scope="col" data-sort="accept_nom">
                         Accepting Nominations
                     </th>
-                    <th scope="col" data-sort="accept_fb">
+                    <th class="text-center" scope="col" data-sort="accept_fb">
                         Accepting Feedback
                     </th>
                 </tr>
@@ -58,13 +59,11 @@
                                        aria-label="position.name"
                                        name="selected">
                             </td>
-                            <td class="edit">
+                            <td class="text-nowrap">
                                 <a class="btn btn-primary btn-sm"
                                    href="{% url 'ietf.nomcom.views.edit_position' year position.id %}">
                                     Edit
                                 </a>
-                            </td>
-                            <td class="remove">
                                 <a class="btn btn-danger btn-sm"
                                    href="{% url 'ietf.nomcom.views.remove_position' year position.id %}">
                                     Remove
@@ -74,16 +73,16 @@
                         <td>
                             {{ position.name }}
                         </td>
-                        <td>
+                        <td class="text-center">
                             {{ position.is_iesg_position|yesno:"✓," }}
                         </td>
-                        <td>
+                        <td class="text-center">
                             {{ position.is_open|yesno:"✓," }}
                         </td>
-                        <td>
+                        <td class="text-center">
                             {{ position.accepting_nominations|yesno:"✓," }}
                         </td>
-                        <td>
+                        <td class="text-center">
                             {{ position.accepting_feedback|yesno:"✓," }}
                         </td>
                     </tr>
@@ -117,7 +116,7 @@
                     <option value="unset_accept_nom">
                         Is Accepting Nominations: No
                     </option>
-                    <option value="set_accept_bf">
+                    <option value="set_accept_fb">
                         Is Accepting Feedback: Yes
                     </option>
                     <option value="unset_accept_fb">
@@ -135,7 +134,4 @@
             There are no positions defined.
         </p>
     {% endif %}
-{% endblock %}
-{% block js %}
-    <script src="{% static "ietf/js/list.js" %}"></script>
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/nomcom/nomcom_private_base.html b/ietf/templates/nomcom/nomcom_private_base.html
index b92102e7f..6b12f5136 100644
--- a/ietf/templates/nomcom/nomcom_private_base.html
+++ b/ietf/templates/nomcom/nomcom_private_base.html
@@ -1,8 +1,11 @@
 {% extends "base.html" %}
 {# Copyright The IETF Trust 2015, All Rights Reserved #}
-{% load origin %}
+{% load origin static %}
 {% load nomcom_tags %}
 {% load ietf_filters %}
+{% block pagehead %}
+    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
+{% endblock %}
 {% block title %}
     NomCom {{ year }} Private
     {% block subtitle %}{% endblock %}
@@ -153,6 +156,7 @@
     {% endwith %}
 {% endblock %}
 {% block js %}
+    <script src="{% static "ietf/js/list.js" %}"></script>
     <script>
         // Javascript to enable link to tab
         var url=document.location.toString();
diff --git a/ietf/templates/nomcom/nomcom_public_base.html b/ietf/templates/nomcom/nomcom_public_base.html
index 27c34fb77..f2448c9ee 100644
--- a/ietf/templates/nomcom/nomcom_public_base.html
+++ b/ietf/templates/nomcom/nomcom_public_base.html
@@ -1,8 +1,11 @@
 {% extends "base.html" %}
 {# Copyright The IETF Trust 2015, All Rights Reserved #}
-{% load origin %}
+{% load origin static %}
 {% load nomcom_tags %}
 {% load ietf_filters %}
+{% block pagehead %}
+    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
+{% endblock %}
 {% block title %}
     NomCom {{ year }}
     {% block subtitle %}{% endblock %}
@@ -67,6 +70,7 @@
     {% endwith %}
 {% endblock %}
 {% block js %}
+    <script src="{% static "ietf/js/list.js" %}"></script>
     <script>
         $(document)
             .ready(function () {
@@ -83,4 +87,4 @@
                     });
             });
     </script>
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/nomcom/private_index.html b/ietf/templates/nomcom/private_index.html
index 82aadf6a1..a7cd0c6f9 100644
--- a/ietf/templates/nomcom/private_index.html
+++ b/ietf/templates/nomcom/private_index.html
@@ -2,9 +2,6 @@
 {# Copyright The IETF Trust 2015-2020, All Rights Reserved #}
 {% load origin static %}
 {% block subtitle %}- Administration{% endblock %}
-{% block pagehead %}
-    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
-{% endblock %}
 {% block nomcom_content %}
     {% origin %}
     <h2 class="mt-3">Nomination status</h2>
@@ -251,7 +248,4 @@
             {% endif %}
         {% endif %}
     {% endif %}
-{% endblock %}
-{% block js %}
-    <script src="{% static "ietf/js/list.js" %}"></script>
 {% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/nomcom/view_feedback.html b/ietf/templates/nomcom/view_feedback.html
index 7506c3504..93d61b7f4 100644
--- a/ietf/templates/nomcom/view_feedback.html
+++ b/ietf/templates/nomcom/view_feedback.html
@@ -3,9 +3,6 @@
 {% load origin static %}
 {% load nomcom_tags %}
 {% block subtitle %}- View feedback{% endblock %}
-{% block pagehead %}
-    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
-{% endblock %}
 {% block nomcom_content %}
     {% origin %}
     <h2 class="mt-3">Feedback related to nominees</h2>
@@ -113,7 +110,4 @@
             </tbody>
         </table>
     {% endif %}
-{% endblock %}
-{% block js %}
-    <script src="{% static "ietf/js/list.js" %}"></script>
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/nomcom/volunteers.html b/ietf/templates/nomcom/volunteers.html
index 8fc1e41e9..008951c44 100644
--- a/ietf/templates/nomcom/volunteers.html
+++ b/ietf/templates/nomcom/volunteers.html
@@ -4,9 +4,6 @@
 {% load django_bootstrap5 textfilters person_filters ietf_filters%}
 {% load static %}
 {% block subtitle %}- Volunteers{% endblock %}
-{% block pagehead %}
-    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
-{% endblock %}
 {% block nomcom_content %}
     {% origin %}
     <h2>Volunteers for {{ nomcom.group }}</h2>
@@ -46,7 +43,4 @@
             </tbody>
         </table>
     {% endfor %}
-{% endblock %}
-{% block js %}
-    <script src="{% static "ietf/js/list.js" %}"></script>
 {% endblock %}
\ No newline at end of file