Commit 78375b79 by Carlos Andrés Rocha

Merge pull request #6738 from edx/rc/2015-01-20

Rc/2015 01 20
parents 6db7a7e6 d89f677f
......@@ -190,6 +190,7 @@ LOGGING = get_logger_config(LOG_DIR,
#theming start:
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', 'edX')
STUDIO_NAME = ENV_TOKENS.get('STUDIO_NAME', 'edX Studio')
TENDER_DOMAIN = ENV_TOKENS.get('TENDER_DOMAIN', TENDER_DOMAIN)
# Event Tracking
if "TRACKING_IGNORE_URL_PATTERNS" in ENV_TOKENS:
......
......@@ -369,24 +369,34 @@ class PDFInvoice(object):
totals_data = [
[(_('Total')), self.total_cost],
[(_('Payment Received')), self.payment_received],
[(_('Balance')), self.balance],
['', '{tax_label}: {tax_id}'.format(tax_label=self.tax_label, tax_id=self.tax_id)]
[(_('Balance')), self.balance]
]
if self.is_invoice:
# only print TaxID if we are generating an Invoice
totals_data.append(
['', '{tax_label}: {tax_id}'.format(tax_label=self.tax_label, tax_id=self.tax_id)]
)
heights = 8 * mm
totals_table = Table(totals_data, 40 * mm, heights)
totals_table.setStyle(TableStyle([
styles = [
# Styling for the totals table.
('ALIGN', (0, 0), (-1, -1), 'RIGHT'),
('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
('TEXTCOLOR', (0, 0), (-1, -1), colors.black),
# Styling for the Amounts cells
('RIGHTPADDING', (-1, 0), (-1, -2), 7 * mm),
('GRID', (-1, 0), (-1, -2), 3.0, colors.white),
('BACKGROUND', (-1, 0), (-1, -2), '#EEEEEE'),
]))
# NOTE: since we are not printing the TaxID for Credit Card
# based receipts, we need to change the cell range for
# these formatting rules
('RIGHTPADDING', (-1, 0), (-1, -2 if self.is_invoice else -1), 7 * mm),
('GRID', (-1, 0), (-1, -2 if self.is_invoice else -1), 3.0, colors.white),
('BACKGROUND', (-1, 0), (-1, -2 if self.is_invoice else -1), '#EEEEEE'),
]
totals_table.setStyle(TableStyle(styles))
__, rendered_height = totals_table.wrap(0, 0)
......
......@@ -83,7 +83,7 @@ class TestPdfFile(unittest.TestCase):
self.assertTrue(any(str(self.total_cost) in s for s in pdf_content))
self.assertTrue(any(str(self.payment_received) in s for s in pdf_content))
self.assertTrue(any(str(self.balance) in s for s in pdf_content))
self.assertTrue(any('edX Tax ID' in s for s in pdf_content))
self.assertFalse(any('edX Tax ID' in s for s in pdf_content))
# PDF_RECEIPT_TERMS_AND_CONDITIONS not displayed in the receipt pdf
self.assertFalse(any(
......
......@@ -1539,6 +1539,21 @@
width: 23px;
padding: 3px 0;
}
&.old-id-card {
width: 88px;
height: 88px;
.fa-list-alt {
left: -7px;
}
.id-photo {
top: 13px;
left: -3px;
line-height: 1.1em;
}
}
}
.copy {
......
......@@ -111,10 +111,10 @@
<li class="req req-1 req-id">
<h4 class="title">${_("Identification")}</h4>
<div class="placeholder-art">
<div class="placeholder-art old-id-card">
<span class="fa-stack">
<i class="icon fa fa-list-alt fa-stack-2x"></i>
<i class="icon fa fa-user fa-stack-1"></i>
<i class="icon fa fa-user fa-stack-1x id-photo"></i>
</span>
</div>
......@@ -129,7 +129,7 @@
<li class="req req-2 req-webcam">
<h4 class="title">${_("Webcam")}</h4>
<div class="placeholder-art">
<i class="icon fa fa-facetime-video"></i>
<i class="icon fa fa-video-camera"></i>
</div>
<div class="copy">
......
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