datatracker/ietf/secr/templates/includes/sessions_request_form.html
Mark Donnelly e1907d0b4d
Fix: Add 'back' button instead of 'cancel' to session request page (#4249)
* Fix: Add 'back' button instead of 'cancel' to session request page

The 'Cancel' button that goes back to the same page was confusing, so change it out for a 'Back' button instead.

Fixes #4007

* Fix: Change absolute target for going back with history.back()

This form can be included from multiple pages, which have differing
navigation for how to land on the form.  Therefore, history.back()
is the single way to navigate back to the previous page.
2022-07-24 10:36:01 -05:00

125 lines
7.1 KiB
HTML
Executable file

<span class="required">*</span> Required Field
<form id="session-request-form" action="." method="post" name="form_post">{% csrf_token %}
{{ form.session_forms.management_form }}
{% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
<table id="sessions-new-table">
<tbody>
<tr class="bg1"><td>Working Group Name:</td><td>{{ group.name }} ({{ group.acronym }})</td></tr>
<tr class="bg2"><td>Area Name:</td><td>{% if group.parent %}{{ group.parent.name }} ({{ group.parent.acronym }}){% endif %}</td></tr>
<tr class="bg1"><td>Number of Sessions:<span class="required">*</span></td><td>{{ form.num_session.errors }}{{ form.num_session }}</td></tr>
{% if group.features.acts_like_wg %}<tr class="bg2" id="session_row_0"><td>Session 1:<span class="required">*</span></td><td>{% include 'meeting/session_details_form.html' with form=form.session_forms.0 only %}</td></tr>
<tr class="bg2" id="session_row_1"><td>Session 2:<span class="required">*</span></td><td>{% include 'meeting/session_details_form.html' with form=form.session_forms.1 only %}</td></tr>
{% if not is_virtual %}
<tr class="bg2"><td>Time between two sessions:</td><td>{{ form.session_time_relation.errors }}{{ form.session_time_relation }}</td></tr>
{% endif %}
<tr class="bg2" id="third_session_row"><td>Additional Session Request:</td><td>{{ form.third_session }} Check this box to request an additional session.<br>
Additional slot may be available after agenda scheduling has closed and with the approval of an Area Director.<br>
<div id="session_row_2">
Third Session:
{% include 'meeting/session_details_form.html' with form=form.session_forms.2 only %}
</div>
</td></tr>
{% else %}{# else not group.features.acts_like_wg #}
{% for session_form in form.session_forms %}
<tr class="bg2" id="session_row_{{ forloop.counter0 }}"><td>Session {{ forloop.counter }}:<span class="required">*</span></td><td>{% include 'meeting/session_details_form.html' with form=session_form only %}</td></tr>
{% endfor %}
{% endif %}
<tr class="bg1"><td>Number of Attendees:{% if not is_virtual %}<span class="required">*</span>{% endif %}</td><td>{{ form.attendees.errors }}{{ form.attendees }}</td></tr>
<tr class="bg2"><td>People who must be present:</td><td>{{ form.bethere.errors }}{{ form.bethere }}</td></tr>
<tr class="bg1"><td>Conflicts to Avoid:</td>
<td>
<table>
<tbody>
<tr>
<td colspan="2">Other WGs that included {{ group.name }} in their conflict lists:</td>
<td>{{ session_conflicts.inbound|default:"None" }}</td>
</tr>
{% for cname, cfield, cselector in form.wg_constraint_fields %}
<tr class="bg1">
{% if forloop.first %}<td rowspan="{{ form.wg_constraint_count }}" >WG Sessions:<br>You may select multiple WGs within each category</td>{% endif %}
<td>{{ cname|title }}</td>
<td>{{ cselector }}
<button type="button" id="wg_delete_{{ cname.slug }}" onclick="ietf_sessions.delete_wg_constraint_clicked('{{ cname.slug }}')">Delete the last entry</button><br>
{{ cfield.errors }}{{ cfield }}
</td>
</tr>
{% empty %}{# shown if there are no constraint fields #}
<tr class="bg1"><td ></td><td colspan="2">No constraints are enabled for this meeting.</td></tr>
{% endfor %}
{% if form.inactive_wg_constraints %}
{% for cname, value, field in form.inactive_wg_constraints %}
<tr class="bg1">
{% if forloop.first %}
<td rowspan="{{ form.inactive_wg_constraint_count }}" >
Disabled for this meeting
</td>
{% endif %}
<td>{{ cname|title }}</td>
<td><input type="text" value="{{ value }}" maxlength="255" class="wg_constraint" disabled><br>{{ field }} {{ field.label }}</td>
</tr>
{% endfor %}
{% endif %}
<tr>
<td colspan="2">BOF Sessions:</td>
<td>If the sessions can not be found in the fields above, please enter free form requests in the Special Requests field below.</td>
</tr>
</tbody>
</table>
</td>
</tr>
{% if not is_virtual %}
<tr class="bg2"><td>Resources requested:</td>
<td>
{{ form.resources.errors }} {{ form.resources }}
</td>
</tr>
<tr class="bg1">
<td>Times during which this WG can <strong>not</strong> meet:</td>
<!-- [html-validate-disable-block no-redundant-for -- FIXME: form renders with redundant for attributes] -->
<td>{{ form.timeranges.errors }}{{ form.timeranges }}</td>
</tr>
<tr class="bg2">
<td>
Plan session adjacent with another WG:<br>
(Immediately before or after another WG, no break in between, in the same room.)
</td>
<td>{{ form.adjacent_with_wg.errors }}{{ form.adjacent_with_wg }}</td>
</tr>
<tr class="bg1">
<td>
Joint session with:<br>
(To request one session for multiple WGs together.)
</td>
<td>{{ form.joint_with_groups_selector }}
<button type="button" onclick="ietf_sessions.delete_last_joint_with_groups(); return 1;">Delete the last entry</button><br>
{{ form.joint_with_groups.errors }}{{ form.joint_with_groups }}
</td>
</tr>
<tr class="bg1">
<td>
Of the sessions requested by this WG, the joint session, if applicable, is:
</td>
<td>{{ form.joint_for_session.errors }}{{ form.joint_for_session }}</td>
</tr>
{% endif %}
<tr class="bg2">
<td>Special Requests:<br>&nbsp;<br>i.e. restrictions on meeting times / days, etc.<br> (limit 200 characters)</td>
<td>{{ form.comments.errors }}{{ form.comments }}</td>
</tr>
</tbody>
</table>
<div class="button-group">
<ul>
<li><button type="submit" name="submit" value="Save"{% if is_locked %} disabled{% endif %}>Save</button></li>
<li><button type="button" onclick="history.back()">Back</button></li>
</ul>
</div>
</form>