Skip to content

Commit

Permalink
Stop setting guest submitter as POC for panels
Browse files Browse the repository at this point in the history
Fixes https://jira.magfest.net/browse/MAGDEV-676. Part of this was already done, we just needed to stop setting the guest group leader as the point of contact for the panel.
  • Loading branch information
kitsuta committed May 3, 2024
1 parent e04d2ab commit 4dd17eb
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
5 changes: 5 additions & 0 deletions uber/models/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ def submitter(self):
return a
return None

@property
def group(self):
if self.submitter and self.submitter.attendee:
return self.submitter.attendee.group

@property
def other_panelists(self):
return [a for a in self.applicants if not a.submitter]
Expand Down
9 changes: 4 additions & 5 deletions uber/site_sections/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def index(self, session, message='', **params):
'verify_unavailable': params.get('verify_unavailable')
}

def guest(self, session, poc_id, return_to='', message='', **params):
def guest(self, session, attendee_id, return_to='', message='', **params):
"""
In some cases, we want pre-existing attendees (e.g., guests) to submit panel ideas.
This submission form bypasses the need to enter in one's personal and contact info
Expand All @@ -109,8 +109,7 @@ def guest(self, session, poc_id, return_to='', message='', **params):

app = session.panel_application(
params, checkgroups=PanelApplication.all_checkgroups, restricted=True, ignore_csrf=True)
app.poc_id = poc_id
attendee = session.attendee(id=poc_id)
attendee = session.attendee(id=attendee_id)
if attendee.badge_type != c.GUEST_BADGE:
add_opt(attendee.ribbon_ints, c.PANELIST_RIBBON)
panelist = PanelApplicant(
Expand All @@ -124,7 +123,7 @@ def guest(self, session, poc_id, return_to='', message='', **params):
)
other_panelists = compile_other_panelists_from_params(session, app, **params)
go_to = return_to if 'ignore_return_to' not in params and return_to \
else 'guest?poc_id=' + poc_id + '&return_to=' + return_to
else 'guest?attendee_id=' + attendee_id + '&return_to=' + return_to

if cherrypy.request.method == 'POST':
message = process_panel_app(session, app, panelist, other_panelists, **params)
Expand All @@ -135,7 +134,7 @@ def guest(self, session, poc_id, return_to='', message='', **params):
'app': app,
'message': message,
'attendee': attendee,
'poc_id': poc_id,
'attendee_id': attendee_id,
'other_panelists': other_panelists,
'return_to': return_to
}
Expand Down
2 changes: 1 addition & 1 deletion uber/templates/guest_checklist/band_panel_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% endif %}
<script type="text/javascript">
$(function() {
$('a[href^="panel"]').prop("href", "../panels/guest?poc_id={{ guest.group.leader.id }}&return_to=../guests/index?id={{ guest.id }}");
$('a[href^="panel"]').prop("href", "../panels/guest?attendee_id={{ guest.group.leader.id }}&return_to=../guests/index?id={{ guest.id }}");
});
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion uber/templates/guest_checklist/guest_panel_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% endif %}
<script type="text/javascript">
$(function() {
$('a[href^="panel"]').prop("href", "../panels/guest?poc_id={{ guest.group.leader.id }}&return_to=../guests/index?id={{ guest.id }}");
$('a[href^="panel"]').prop("href", "../panels/guest?attendee_id={{ guest.group.leader.id }}&return_to=../guests/index?id={{ guest.id }}");
});
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion uber/templates/guest_checklist/panel_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{% endif %}
<script type="text/javascript">
$(function() {
$('a[href^="panel"]').prop("href", "../panels/guest?poc_id={{ guest.group.leader.id }}&return_to=../guests/index?id={{ guest.id }}");
$('a[href^="panel"]').prop("href", "../panels/guest?attendee_id={{ guest.group.leader.id }}&return_to=../guests/index?id={{ guest.id }}");
});
</script>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion uber/templates/panels/guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{% endif %}
<form method="post" action="guest" class="form-horizontal" role="form">

<input type="hidden" name="poc_id" value="{{ poc_id }}" />
<input type="hidden" name="attendee_id" value="{{ attendee_id }}" />
<input type="hidden" name="return_to" value="{{ return_to }}" />

<h3>Panel Information</h3>
Expand Down
4 changes: 2 additions & 2 deletions uber/templates/panels_admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ <h1>
<a href="assigned_to?id={{ app.poc_id }}">{{ app.poc.full_name }}</a>
{% endif %}
</td>
<td>{% if app.poc and app.poc.guest_group %}{{ app.poc.guest_group.group_type_label }} "{{ app.poc.group|form_link }}"{% else %}No{% endif %}</td>
<td>{% if app.submitter and app.group.guest %}{{ app.group.guest.group_type_label }} "{{ app.group|form_link }}"{% else %}No{% endif %}</td>
<td>{{ app.tabletop|yesno("Yes,No") }}</td>
{% if c.PANEL_RATING_OPTS|length > 1 %}<td>{{ app.rating }}</td>{% endif %}
{% if c.PANEL_RATING_OPTS|length > 1 %}<td>{{ app.rating_label }}</td>{% endif %}
{% if c.PANEL_CONTENT_OPTS|length > 1 %}<td>{{ "N/A" if app.magscouts_opt_in == c.NO_CHOICE else app.magscouts_opt_in_label }}</td>{% endif %}
</tr>
{% endfor %}
Expand Down

0 comments on commit 4dd17eb

Please sign in to comment.