feat: allow secretariat to edit/cancel sreqs when the tool is locked (#4676)
* feat: allow secretariat to edit/cancel sreqs when the tool is locked * chore: remove unused template var
This commit is contained in:
parent
9752fabf85
commit
1841d15104
|
@ -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,
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
<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 -->
|
||||
|
|
Loading…
Reference in a new issue