diff --git a/ietf/secr/sreq/forms.py b/ietf/secr/sreq/forms.py index 840b235490..0c112a063a 100644 --- a/ietf/secr/sreq/forms.py +++ b/ietf/secr/sreq/forms.py @@ -3,6 +3,7 @@ from django import forms +from django.template.defaultfilters import pluralize import debug # pyflakes:ignore @@ -235,6 +236,25 @@ def clean_joint_with_groups(self): def clean_comments(self): return clean_text_field(self.cleaned_data['comments']) + def clean_bethere(self): + bethere = self.cleaned_data["bethere"] + if bethere: + extra = set( + Person.objects.filter( + role__group=self.group, role__name__in=["chair", "ad"] + ) + & bethere + ) + if extra: + extras = ", ".join(e.name for e in extra) + raise forms.ValidationError( + ( + f"Please remove the following person{pluralize(len(extra))}, the system " + f"tracks their availability due to their role{pluralize(len(extra))}: {extras}." + ) + ) + return bethere + def clean_send_notifications(self): return True if not self.notifications_optional else self.cleaned_data['send_notifications'] diff --git a/ietf/secr/templates/includes/session_info.txt b/ietf/secr/templates/includes/session_info.txt index eea4a5f174..bffc13e3ef 100644 --- a/ietf/secr/templates/includes/session_info.txt +++ b/ietf/secr/templates/includes/session_info.txt @@ -14,7 +14,7 @@ Conflicts to Avoid: {% if session.adjacent_with_wg %} Adjacent with WG: {{ session.adjacent_with_wg }}{% endif %} {% if session.timeranges_display %} Can't meet: {{ session.timeranges_display|join:", " }}{% endif %} -People who must be present: +Participants who must be present: {% for person in session.bethere %} {{ person.ascii_name }} {% endfor %} Resources Requested: diff --git a/ietf/secr/templates/includes/sessions_request_form.html b/ietf/secr/templates/includes/sessions_request_form.html index f05bee3db1..7a8c90855f 100755 --- a/ietf/secr/templates/includes/sessions_request_form.html +++ b/ietf/secr/templates/includes/sessions_request_form.html @@ -28,12 +28,12 @@ {% endif %} Number of Attendees:{% if not is_virtual %}*{% endif %}{{ form.attendees.errors }}{{ form.attendees }} - People who must be present: + Participants who must be present: {{ form.bethere.errors }} {{ form.bethere }}

- You should not include the Area Directors; they will be added automatically. + Do not include Area Directors and WG Chairs; the system already tracks their availability.

diff --git a/ietf/secr/templates/includes/sessions_request_view.html b/ietf/secr/templates/includes/sessions_request_view.html index 596338c47d..bc6aef0611 100644 --- a/ietf/secr/templates/includes/sessions_request_view.html +++ b/ietf/secr/templates/includes/sessions_request_view.html @@ -35,7 +35,7 @@ {% endif %} - People who must be present: + Participants who must be present: {% if session.bethere %}{% else %}None{% endif %} @@ -70,4 +70,4 @@ {% endif %} - + \ No newline at end of file diff --git a/ietf/static/js/session_details_form.js b/ietf/static/js/session_details_form.js index 29b481999f..04b11875a7 100644 --- a/ietf/static/js/session_details_form.js +++ b/ietf/static/js/session_details_form.js @@ -123,4 +123,4 @@ } } window.addEventListener('load', on_load, false); -})(); \ No newline at end of file +})();