Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow secretariat to edit/cancel sreqs when the tool is locked #4676

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ietf/secr/sreq/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,8 @@ def view(request, acronym, num = None):
session = get_initial_session(sessions)

return render(request, 'sreq/view.html', {
'is_locked': is_locked,
'can_edit': (not is_locked) or has_role(request.user, 'Secretariat'),
'can_cancel': (not is_locked) or has_role(request.user, 'Secretariat'),
'session': session, # legacy processed data
'sessions': sessions, # actual session instances
'activities': activities,
Expand Down
4 changes: 2 additions & 2 deletions ietf/secr/templates/sreq/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ <h2>Sessions - View (meeting: {{ meeting.number }})</h2>

<div class="button-group">
<ul>
<li><button type="button" name="edit" onclick="window.location='{% url "ietf.secr.sreq.views.edit" acronym=group.acronym num=meeting.number %}'"{% if is_locked %} disabled{% endif %}>Edit</button></li>
<li><button type="button" name="edit" onclick="window.location='{% url "ietf.secr.sreq.views.edit" acronym=group.acronym num=meeting.number %}'"{% if not can_edit %} disabled{% endif %}>Edit</button></li>
{% if show_approve_button %}
<li><button type="button" onclick="window.location='approve/'">Approve Third Session</button></li>
{% endif %}
<li><button type="button" onclick="if (window.confirm('Do you really want to cancel this session?')) { window.location='cancel/' };" {% if is_locked %} disabled{% endif %}>Cancel this Request</button></li>
<li><button type="button" onclick="if (window.confirm('Do you really want to cancel this session?')) { window.location='cancel/' };" {% if not can_cancel %} disabled{% endif %}>Cancel this Request</button></li>
<li><button type="button" onclick="window.location='{% url "ietf.secr.sreq.views.main" %}'">Back</button></li>
</ul>
</div> <!-- button-group -->
Expand Down