diff --git a/ietf/doc/templatetags/ballot_icon.py b/ietf/doc/templatetags/ballot_icon.py index ebcc605cd5..5f59822c7b 100644 --- a/ietf/doc/templatetags/ballot_icon.py +++ b/ietf/doc/templatetags/ballot_icon.py @@ -96,9 +96,14 @@ def sort_key(t): positions = list(ballot.active_balloter_positions().items()) positions.sort(key=sort_key) + request = context.get("request") + ballot_edit_return_point_param = f"ballot_edit_return_point={request.path}" + right_click_string = '' if has_role(user, "Area Director"): - right_click_string = 'oncontextmenu="window.location.href=\'%s\';return false;"' % urlreverse('ietf.doc.views_ballot.edit_position', kwargs=dict(name=doc.name, ballot_id=ballot.pk)) + right_click_string = 'oncontextmenu="window.location.href=\'{}?{}\';return false;"'.format( + urlreverse('ietf.doc.views_ballot.edit_position', kwargs=dict(name=doc.name, ballot_id=ballot.pk)), + ballot_edit_return_point_param) my_blocking = False for i, (balloter, pos) in enumerate(positions): @@ -113,10 +118,14 @@ def sort_key(t): typename = "RSAB" else: typename = "IESG" + + modal_url = "{}?{}".format( + urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)), + ballot_edit_return_point_param) res = ['