Skip to content

Commit de7ff7e

Browse files
authored
test: fix more validation issues (ietf-tools#3975)
* fix: Avoid numeric IDs on NomCom pages * fix: Correctly group last names with lowercase/i18n parts * Remove some unneeded CSS * fix: Remove extra div closing tag
1 parent 4a55838 commit de7ff7e

6 files changed

Lines changed: 11 additions & 119 deletions

File tree

ietf/group/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ def meetings(request, acronym=None, group_type=None):
790790
def chair_photos(request, group_type=None):
791791
roles = sorted(Role.objects.filter(group__type=group_type, group__state='active', name_id='chair'),key=lambda x: x.person.last_name()+x.person.name+x.group.acronym)
792792
for role in roles:
793-
role.last_initial = role.person.last_name()[0]
793+
role.last_initial = role.person.last_name()[0].upper()
794794
return render(request, 'group/all_photos.html', {'group_type': group_type, 'role': 'Chair', 'roles': roles })
795795

796796
def reorder_roles(roles, role_names):
@@ -806,7 +806,7 @@ def group_photos(request, group_type=None, acronym=None):
806806

807807
roles = reorder_roles(roles, group.features.role_order)
808808
for role in roles:
809-
role.last_initial = role.person.last_name()[0]
809+
role.last_initial = role.person.last_name()[0].upper()
810810
return render(request, 'group/group_photos.html',
811811
construct_group_menu_context(request, group, "photos", group_type, {
812812
'group_type': group_type,

ietf/nomcom/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def index(request):
5757
else:
5858
nomcom.url = None
5959
if year >= 2002:
60-
nomcom.ann_url = "/nomcom/ann/#%4d" % year
60+
nomcom.ann_url = "/nomcom/ann/#nomcom-%4d" % year
6161
else:
6262
nomcom.ann_url = None
6363
return render(request, 'nomcom/index.html',
@@ -1324,4 +1324,4 @@ def volunteers(request, year, public=False):
13241324
v.eligible = v.person in eligible
13251325
decorate_volunteers_with_qualifications(volunteers,nomcom=nomcom)
13261326
volunteers = sorted(volunteers,key=lambda v:(not v.eligible,v.person.last_name()))
1327-
return render(request, 'nomcom/volunteers.html', dict(year=year, nomcom=nomcom, volunteers=volunteers, public=public))
1327+
return render(request, 'nomcom/volunteers.html', dict(year=year, nomcom=nomcom, volunteers=volunteers, public=public))

ietf/static/css/liaisons.css

Lines changed: 2 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,4 @@
1-
.baseform {
2-
font-size: 12px;
3-
}
4-
5-
.baseform .fieldset {
6-
margin: 1em 0px;
7-
border: none;
8-
border: 1px solid #8899dd;
9-
background-color: #edf5ff;
10-
}
11-
12-
.baseform .fieldset h2 {
13-
background-color: #2647a0;
14-
color: white;
15-
font-size: 14px;
16-
padding: 5px 10px;
17-
margin: 0px;
18-
}
19-
20-
.baseform .field {
21-
padding: 0.5em 10px;
22-
}
23-
24-
.baseform .field label {
25-
display: block;
26-
width: 150px;
27-
float: left;
28-
clear: left;
29-
}
30-
31-
.baseform .field .endfield {
32-
clear: left;
33-
}
34-
35-
.baseform .fieldWidget {
36-
margin-left: 150px;
37-
}
38-
39-
.baseform #baseform-fieldname-purpose_text,
40-
.baseform #baseform-fieldname-deadline_date {
41-
display: none;
42-
}
43-
44-
.baseform select,
45-
.baseform textarea,
46-
.baseform input {
47-
border: 1px solid #cccccc;
48-
}
49-
50-
.baseform input {
51-
font-size: 12px;
52-
}
53-
54-
#id_title,
55-
.baseformedit #id_from_field,
56-
.baseform #id_organization,
57-
.baseform #id_to_poc,
58-
.baseform #id_response_contacts,
59-
.baseform #id_technical_contact,
60-
.baseform #id_cc1,
61-
.attach_titleField input,
62-
.baseform textarea {
63-
width: 80%;
64-
}
1+
/* TODO: this should use bs5 styling and ideally be integrated into the code */
652

663
#id_purpose_text {
674
height: 100px;
@@ -71,49 +8,12 @@
718
height: 300px;
729
}
7310

74-
.baseform input.disabledAddAttachment {
75-
border: none;
76-
padding: none;
77-
background: none;
78-
padding: 0px;
79-
margin: 0px;
80-
color: black;
81-
font-weight: bold;
82-
}
83-
84-
span.fieldRequired {
85-
color: red;
86-
}
87-
88-
.fieldError {
89-
background-color: #ffcc66;
90-
}
91-
9211
th.sort {
93-
/*background-image: url(/images/sort-header-clear.png);*/
9412
background-repeat: no-repeat;
9513
background-position: right center;
9614
cursor: pointer;
9715
}
9816

99-
th.headerSortUp {
100-
/*background-image: url(/images/sort-header-up-filled.png);*/
101-
}
102-
103-
th.headerSortDown {
104-
/*background-image: url(/images/sort-header-filled.png);*/
105-
}
106-
107-
td span.awaiting {
108-
background-color: #ffcc33;
109-
border-radius: 3px;
110-
float: right;
111-
width: 35px;
112-
padding: 4px 8px;
113-
text-align: center;
114-
font-size: 10px;
115-
}
116-
11717
.noActionTaken, .actionTaken { padding: 2px 5px; }
11818
.actionTaken { border: 1px solid green; background-color: #ccffbb; }
11919
.noActionTaken { border: 1px solid red; background-color: #ffccbb; }
@@ -122,14 +22,6 @@ input[id$='DELETE'] {
12222
display: none;
12323
}
12424

125-
/*#id_from_groups + span {
126-
display: none;
127-
}
128-
129-
#id_to_groups + span {
130-
display: none;
131-
}
132-
*/
13325
.liaison-group-col {
13426
min-width: 10em;
135-
}
27+
}

ietf/static/js/ietf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ $(function () {
186186
<div class="col-xl-2 ps-0 small">
187187
<div id="righthand-panel" class="position-fixed col-xl-2 bg-light d-flex flex-column justify-content-between align-items-start">
188188
<nav id="righthand-nav" class="navbar navbar-light w-100 overflow-auto align-items-start flex-fill"></nav>
189-
</div></div>
189+
</div>
190190
</div>
191191
`));
192192

ietf/templates/group/all_photos.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
{% origin %}
77
{% load ietf_filters %}
88
<h1>{{ group_type | upper }} {{ role }} photos</h1>
9-
{% regroup roles by last_initial as alphabet_blocks %}
9+
{% regroup roles|dictsort:"last_initial" by last_initial as alphabet_blocks %}
1010
{% for letter in alphabet_blocks %}
11-
<h2 class="mt-4" id="{{ letter.grouper }}">{{ letter.grouper }}</h2>
11+
<h2 class="mt-4" {% if letter.grouper|slugify %}id="{{ letter.grouper|slugify }}"{% endif %}>{{ letter.grouper }}</h2>
1212
{% regroup letter.list by person as person_groups %}
1313
{# keep in sync with group_photos.html #}
1414
<div class="mt-0 row row-cols-2 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-4 row-cols-xxl-5 g-2">

ietf/templates/nomcom/announcements.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1>NomCom</h1>
1414
{% person_link curr_chair.person %}
1515
</p>
1616
{% for regime in regimes %}
17-
<h2 class="mt-5" id="{{ regime.group.start_year }}">
17+
<h2 class="mt-5" id="nomcom-{{ regime.group.start_year }}">
1818
Messages from {{ regime.group.start_year }}/{{ regime.group.end_year }}
1919
</h2>
2020
{# use person email address here rather than the generic nomcom-chair@ietf.org #}
@@ -68,4 +68,4 @@ <h2 class="mt-5" id="references">References</h2>
6868
{% endblock %}
6969
{% block js %}
7070
<script src="{% static "ietf/js/list.js" %}"></script>
71-
{% endblock %}
71+
{% endblock %}

0 commit comments

Comments
 (0)