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

Commit

Permalink
Adapt Team application to deadline as well
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Sep 7, 2015
1 parent 2d1ce46 commit c58baf5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions www/new.spt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from aspen import Response
from datetime import datetime

from aspen import Response
from gratipay.models.community import slugize
from gratipay.models.team import Team
[---]
Expand All @@ -23,6 +24,11 @@ receiving, ntips = user.participant.get_old_stats()
title = _("Apply for a New Team")
banner = _("Apply")
suppress_sidebar = True

deadline = datetime(2015, 10, 2).date()
now = datetime.utcnow().date()
delta = (deadline - now).total_seconds() # will be zero on Oct 2
still_migrating = delta > 0
[---] text/html
{% extends "templates/base.html" %}

Expand Down Expand Up @@ -87,7 +93,7 @@ suppress_sidebar = True
) }}
</label>

{% if ntips %}
{% if ntips and still_migrating %}
<h2>{{ _("Migration of Payments") }}</h2>

<p>{{ _("The {ntips} weekly tips totalling {receiving} that previously were directed to your ~{username} user account under Gratipay 1.0 will be converted into weekly voluntary payments to your new Team under {a}Gratipay 2.0{_a}, pending approval of your application."
Expand All @@ -97,6 +103,9 @@ suppress_sidebar = True
, a='<a href="https://medium.com/gratipay-blog/gratipay-2-0-2453d3c53077">'|safe
, _a='</a>'|safe
) }}</p>
{% else %}
<br>
<br>
{% endif %}

<button type="submit">{{ _("Apply") }}</button>
Expand Down

0 comments on commit c58baf5

Please sign in to comment.