Skip to content

Commit

Permalink
Merge pull request #296 from colts661/signup_default
Browse files Browse the repository at this point in the history
Added Campaign Signup Form - Default Behavior
  • Loading branch information
cassidysymons authored Nov 14, 2023
2 parents fa5bdda + ac011aa commit 217768e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion microsetta_interface/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3275,7 +3275,14 @@ def get_submit_interest(campaign_id=None, source=None):
campaign_info = None
show_alt_info = False

if campaign_id is not None:
if campaign_id is None:
return _render_with_defaults('submit_interest.jinja2',
valid_campaign=valid_campaign,
campaign_id=campaign_id,
source=source,
campaign_info=campaign_info,
show_alt_info=show_alt_info)
else:
do_return, campaign_info, _ = ApiRequest.get_no_auth(
"/campaign_information",
params={"campaign_id": campaign_id}
Expand Down
5 changes: 4 additions & 1 deletion microsetta_interface/templates/submit_interest.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ $(document).ready(function(){

{% block content %}
<center>
{% if not valid_campaign %}
{% if campaign_id is none %}
{{ _('Sorry, it appears you\'ve followed a bad link. If you were trying to sign up for a project, please try copying the link again.') }}<br /><br />
{{ _('Otherwise, please visit our <a href="https://microsetta.ucsd.edu/">website</a> to learn about other opportunities to participate in The Microsetta Initiative.') }}
{% elif not valid_campaign %}
{{ _('Sorry, due to widespread interest, the sign-up list for this project is full.') }}<br /><br />
{{ _('Please visit our <a href="https://microsetta.ucsd.edu/">website</a> to learn about other opportunities to participate in The Microsetta Initiative.') }}
{% else %}
Expand Down

0 comments on commit 217768e

Please sign in to comment.