Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Add
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Aug 20, 2015
1 parent 980b150 commit e90ce89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
27 changes: 20 additions & 7 deletions www/new.spt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ title = _("Apply for a New Team")
<form action="/teams/create.json" method="POST" id="new-team">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">

<p>Your answers to these questions will be public, and your application
will be <a href="https://github.com/gratipay/review/issues">reviewed publicly
on GitHub</a>.</p>

<label><h2>{{ _("Team Name") }}</h2></label>
<input type="text" name="name" required autofocus>

Expand All @@ -75,18 +71,35 @@ title = _("Apply for a New Team")
<input type="text" name="onboarding_url" required>

<br>
<br>
<input type="checkbox" value="true" name="agree_public" id="agree_public">
<label for="agree_public">
{{ _( "I agree to have my application {0}publicly reviewed{1}."
, '<a href="https://github.com/gratipay/applications/issues">'|safe
, '</a>'|safe
) }}
</label>

<br>
<input type="checkbox" value="true" name="agree_payroll" id="agree_payroll">
<label for="agree_payroll">
{{ _( "I agree to be responsible for {0}payroll{1}."
, '<a href="/about/features/payroll">'|safe
, '</a>'|safe
) }}
</label>

<br>
<input type="checkbox" value="true" name="agree_terms" id="agree_terms">
<label for="agree_terms">
{{ _( "I agree to the {0}terms of service{1}"
{{ _( "I agree to the {0}terms of service{1}."
, '<a href="/about/policies/terms-of-service">'|safe
, '</a>'|safe
) }}
</label>
<br>
<br>

{% if ntips %}
<h2>Migration of Payments</h2>
<p>The {{ ntips }} weekly payments totalling ${{ receiving }} that
previously were directed at you will be <b>redirected to your new Team</b>,
pending approval of your application.</p>
Expand Down
6 changes: 5 additions & 1 deletion www/teams/create.json.spt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ or user.participant.is_suspicious is True \
or user.participant.is_closed: # sanity checks
raise Response(400, _("How are you applying for a team!?"))

if not request.body.get('agree_public', False):
raise Response(400, _("Sorry, you must agree to have your application publicly reviewed."))
if not request.body.get('agree_payroll', False):
raise Response(400, _("Sorry, you must agree to be responsible for payroll."))
if not request.body.get('agree_terms', False):
raise Response(400, _("Please agree to the terms of service."))
raise Response(400, _("Sorry, you must agree to the terms of service."))

if request.method == 'POST':
fields = {}
Expand Down

0 comments on commit e90ce89

Please sign in to comment.