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

Allow guests to submit panels after deadline #4383

Merged
merged 1 commit into from
Jul 15, 2024
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
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
Loading