Commit 0a4c40c8 by Adam Stankiewicz

ENT-938 fix for verification banner

parent b2cf223c
......@@ -182,17 +182,19 @@ class ReceiptResponseView(ThankYouView):
def get_context_data(self, **kwargs):
context = super(ReceiptResponseView, self).get_context_data(**kwargs)
order = context[self.context_object_name]
has_enrollment_code_product = any(
line.product.is_enrollment_code_product for line in order.basket.all_lines()
)
context.update({
'payment_method': self.get_payment_method(order),
'display_credit_messaging': self.order_contains_credit_seat(order),
})
context.update(self.get_order_dashboard_context(order))
context.update(self.get_order_verification_context(order))
context.update(self.get_show_verification_banner_context(context))
context.update({
'explore_courses_url': get_lms_explore_courses_url(),
'has_enrollment_code_product': any(
line.product.is_enrollment_code_product for line in order.basket.all_lines()
)
'has_enrollment_code_product': has_enrollment_code_product
})
return context
......@@ -254,3 +256,15 @@ class ReceiptResponseView(ThankYouView):
})
return context
def get_show_verification_banner_context(self, original_context):
context = {}
verification_url = original_context.get('verification_url')
user_verified = original_context.get('user_verified')
if verification_url and not user_verified:
context.update({
'show_verification_banner': True
})
return context
......@@ -142,20 +142,17 @@
text-align: right;
}
#dashboard-link {
margin: 20px;
text-align: center;
padding-bottom: 3em;
#cta-nav-links {
margin: 40px 0;
.nav-link {
font-size: 16px;
}
.dashboard-link {
font-size: 18px;
padding: 10px 15px;
margin-right: 40px;
}
}
#find-more-courses-link {
margin: 20px;
float: right;
}
.dashboard-link {
line-height: 20px;
......
......@@ -29,7 +29,7 @@
<li>{% trans "Pro tip: Track which code is associated with which person." %}</li>
<li>{% trans "Learners sign-in/register with edX and enroll for the course." %}</li>
</ol>
<p>{% blocktrans with link_start='<a href="' link_middle='">' link_end='</a>' %}To view your payment information, log in to see your Order History, under {{ link_start }}{{order_history_url}}{{ link_middle }}Account Settings{{ link_end }}{% endblocktrans %}</p>
<p>{% blocktrans with link_start='<a href="' link_middle='">' link_end='</a>' %}To view your payment information, log in to see your Order History, under {{ link_start }}{{order_history_url}}{{ link_middle }}Account Settings{{ link_end }}.{% endblocktrans %}</p>
<p>{% blocktrans with link_start='<a href="mailto:info@edx.org">' link_end='</a>' %}For more information and assistance, contact {{ link_start }}info@edx.org.{{ link_end }}{% endblocktrans %}</p>
<p>{% trans "Thank You" %}</p>
</td>
......
......@@ -163,21 +163,22 @@
{% endif %}
</div>
{% if verification_url and not user_verified %}
{% if not has_enrollment_code_product and show_verification_banner %}
<div class="nav-wizard row">
{% include 'oscar/checkout/_verification_data.html' %}
</div>
{% else %}
<div id="dashboard-link">
{% endif %}
<div id="cta-nav-links" class="row">
<div class="col-xs-12 text-right">
{% if not show_verification_banner %}
<a class="dashboard-link nav-link" href="{{ order_dashboard_url }}">
{% trans "Go to Dashboard" %}
{% trans "Go to dashboard" %}
</a>
</div>
{% endif %}
<div id="find-more-courses-link">
<a class="find-more-courses-link nav-link" href="{{ explore_courses_url }}" target="_blank">
{% endif %}
<a class="find-more-courses-link nav-link" href="{{ explore_courses_url }}">
{% trans "Find more courses" %}
</a>
</div>
</div>
</div>
</div>
......
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