Commit ec67bf4b by Diana Huang

Only show start date on receipt if it's in the future.

parent 60844125
...@@ -52,7 +52,7 @@ class VerifyView(View): ...@@ -52,7 +52,7 @@ class VerifyView(View):
if course_id in request.session.get("donation_for_course", {}): if course_id in request.session.get("donation_for_course", {}):
chosen_price = request.session["donation_for_course"][course_id] chosen_price = request.session["donation_for_course"][course_id]
else: else:
chosen_price = verify_mode.min_price.format("{:g}") chosen_price = verify_mode.min_price
context = { context = {
"progress_state": progress_state, "progress_state": progress_state,
"user_full_name": request.user.profile.name, "user_full_name": request.user.profile.name,
......
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from student.views import course_from_id %> <%! from student.views import course_from_id %>
<%! from datetime import datetime %>
<%! import pytz %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%block name="bodyclass">register verification-process step-confirmation</%block> <%block name="bodyclass">register verification-process step-confirmation</%block>
...@@ -105,10 +107,14 @@ ...@@ -105,10 +107,14 @@
% for item in order_items: % for item in order_items:
<tr> <tr>
<td>${item.line_desc}</td> <td>${item.line_desc}</td>
<td>${_("Starts: {start_date}").format(start_date=course.start_date_text)} <td>
%if course.start > datetime.today().replace(tzinfo=pytz.utc):
${_("Starts: {start_date}").format(start_date=course.start_date_text)}
%else:
<ul class="list-actions"> <ul class="list-actions">
<li class="action action-course"><a href="${reverse('course_root', kwargs={'course_id': item.course_id})}">${_("Go to Course")}</a></li> <li class="action action-course"><a href="${reverse('course_root', kwargs={'course_id': item.course_id})}">${_("Go to Course")}</a></li>
</ul> </ul>
%endif
</td> </td>
</tr> </tr>
% endfor % endfor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment