Skip to content

Commit

Permalink
Merge pull request #4383 from magfest/fix-guest-panels
Browse files Browse the repository at this point in the history
Allow guests to submit panels after deadline
  • Loading branch information
kitsuta committed Jul 15, 2024
2 parents 1827cfd + 77f530e commit 8408199
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 0 additions & 6 deletions uber/model_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,12 +625,6 @@ def panel_other(app):
return 'Since you selected "Other" for your type of panel, please describe it'


@validation.PanelApplication
def app_deadline(app):
if localized_now() > c.PANELS_DEADLINE and not c.HAS_PANELS_ADMIN_ACCESS and not app.poc_id:
return 'We are now past the deadline and are no longer accepting panel applications'


@validation.PanelApplication
def specify_other_time(app):
if app.length == c.OTHER and not app.length_text:
Expand Down
7 changes: 5 additions & 2 deletions uber/site_sections/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from uber.decorators import all_renderable
from uber.errors import HTTPRedirect
from uber.models import PanelApplicant, PanelApplication
from uber.utils import add_opt, check
from uber.utils import add_opt, check, localized_now


OTHER_PANELISTS_FIELDS = [
Expand Down Expand Up @@ -78,7 +78,10 @@ def index(self, session, message='', **params):
other_panelists = compile_other_panelists_from_params(session, app, **params)

if cherrypy.request.method == 'POST':
message = check(panelist) or check_extra_verifications(**params)
if localized_now() > c.PANELS_DEADLINE and not c.HAS_PANELS_ADMIN_ACCESS:
message = 'We are now past the deadline and are no longer accepting panel applications.'
if not message:
message = check(panelist) or check_extra_verifications(**params)
if not message and other_panelists and 'verify_poc' not in params:
message = 'You must agree to being the point of contact for your group'
if not message:
Expand Down
2 changes: 1 addition & 1 deletion uber/templates/panels_admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1>
<a href="assigned_to?id={{ app.poc_id }}">{{ app.poc.full_name }}</a>
{% 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>{% if app.group 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_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 %}
Expand Down

0 comments on commit 8408199

Please sign in to comment.