Commit 698872a8 by Diana Huang

Clean up names and links for receipts/emails.

parent 4175db0a
...@@ -2,6 +2,7 @@ from datetime import datetime ...@@ -2,6 +2,7 @@ from datetime import datetime
import pytz import pytz
import logging import logging
import smtplib import smtplib
import textwrap
from django.db import models from django.db import models
from django.conf import settings from django.conf import settings
...@@ -347,8 +348,9 @@ class CertificateItem(OrderItem): ...@@ -347,8 +348,9 @@ class CertificateItem(OrderItem):
item.status = order.status item.status = order.status
item.qty = 1 item.qty = 1
item.unit_cost = cost item.unit_cost = cost
item.line_desc = _("Certificate of Achievement, {mode_name} for course {course_id}").format(mode_name=mode_info.name, course_name = course_from_id(course_id).display_name
course_id=course_id) item.line_desc = _("Certificate of Achievement, {mode_name} for course {course}").format(mode_name=mode_info.name,
course=course_name)
item.currency = currency item.currency = currency
order.currency = currency order.currency = currency
order.save() order.save()
...@@ -372,6 +374,7 @@ class CertificateItem(OrderItem): ...@@ -372,6 +374,7 @@ class CertificateItem(OrderItem):
@property @property
def additional_instruction_text(self): def additional_instruction_text(self):
return _("Note - you have up to 2 weeks into the course to unenroll from the Verified Certificate option \ return textwrap.dedent(
_("Note - you have up to 2 weeks into the course to unenroll from the Verified Certificate option \
and receive a full refund. To receive your refund, contact {billing_email}.").format( and receive a full refund. To receive your refund, contact {billing_email}.").format(
billing_email=settings.PAYMENT_SUPPORT_EMAIL) billing_email=settings.PAYMENT_SUPPORT_EMAIL))
<%! 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 django.conf import settings %> <%! from student.views import course_from_id %>
<%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>
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
${notification} ${notification}
</section> </section>
% endif % endif
<% course_id = order_items[0].course_id %>
<% course = course_from_id(course_id) %>
<div class="container"> <div class="container">
<section class="wrapper cart-list"> <section class="wrapper cart-list">
...@@ -21,7 +23,7 @@ ...@@ -21,7 +23,7 @@
<h2 class="title"> <h2 class="title">
<span class="wrapper-sts"> <span class="wrapper-sts">
<span class="sts">${_("You are registering for")}</span> <span class="sts">${_("You are registering for")}</span>
<span class="sts-course">[Course Name]</span> <span class="sts-course">${course.display_name}</span>
</span> </span>
<span class="sts-track"> <span class="sts-track">
<span class="sts-track-value"> <span class="sts-track-value">
...@@ -103,9 +105,9 @@ ...@@ -103,9 +105,9 @@
% for item in order_items: % for item in order_items:
<tr> <tr>
<td>${item.line_desc}</td> <td>${item.line_desc}</td>
<td>Starts: [date] <td>${_("Starts: {start_date}").format(start_date=course.start_date_text)}
<ul class="list-actions"> <ul class="list-actions">
<li class="action action-course"><a href="">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>
</td> </td>
</tr> </tr>
...@@ -114,7 +116,7 @@ ...@@ -114,7 +116,7 @@
</table> </table>
<ul class="list-actions"> <ul class="list-actions">
<li class="action action-dashboard"><a href="">Go to your Dashboard</a></li> <li class="action action-dashboard"><a href="${reverse('dashboard')}">Go to your Dashboard</a></li>
</ul> </ul>
</div> </div>
...@@ -178,7 +180,6 @@ ...@@ -178,7 +180,6 @@
% endif % endif
</div> </div>
<%doc>
<h4 class="title">${_("Billing details:")}</h4> <h4 class="title">${_("Billing details:")}</h4>
<div class="copy"> <div class="copy">
<p> <p>
...@@ -189,7 +190,6 @@ ...@@ -189,7 +190,6 @@
${order.bill_to_country.upper()} ${order.bill_to_country.upper()}
</p> </p>
</div> </div>
</%doc>
</li> </li>
</ul> </ul>
......
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