Skip to content
Snippets Groups Projects
Unverified Commit 2d338b34 authored by Farhanah Sheets's avatar Farhanah Sheets Committed by GitHub
Browse files

Merge pull request #18992 from open-craft/josh/progress_data_block

Put certificate data message into it's own block for overriding
parents 7e1cc16b 7ad589f6
No related branches found
No related tags found
No related merge requests found
......@@ -66,26 +66,28 @@ username = get_enterprise_learner_generic_name(request) or student.username
<div class="wrapper-msg wrapper-auto-cert">
<div id="errors-info" class="errors-info"></div>
%if certificate_data:
<div class="auto-cert-message" id="course-success">
<div class="has-actions">
<% post_url = reverse('generate_user_cert', args=[unicode(course.id)]) %>
<div class="msg-content">
<h4 class="hd hd-4 title">${_(certificate_data.title)}</h4>
<p class="copy">${_(certificate_data.msg)}</p>
</div>
<div class="msg-actions">
%if certificate_data.cert_web_view_url:
<a class="btn" href="${certificate_data.cert_web_view_url}" target="_blank">${_("View Certificate")} <span class="sr">${_("Opens in a new browser window")}</span></a>
%elif certificate_data.cert_status == CertificateStatuses.downloadable and certificate_data.download_url:
<a class="btn" href="${certificate_data.download_url}" target="_blank">${_("Download Your Certificate")} <span class="sr">${_("Opens in a new browser window")}</span></a>
%elif certificate_data.cert_status == CertificateStatuses.requesting:
<button class="btn generate_certs" data-endpoint="${post_url}" id="btn_generate_cert">${_('Request Certificate')}</button>
%endif
<%block name="certificate_block">
%if certificate_data:
<div class="auto-cert-message" id="course-success">
<div class="has-actions">
<% post_url = reverse('generate_user_cert', args=[unicode(course.id)]) %>
<div class="msg-content">
<h4 class="hd hd-4 title">${_(certificate_data.title)}</h4>
<p class="copy">${_(certificate_data.msg)}</p>
</div>
<div class="msg-actions">
%if certificate_data.cert_web_view_url:
<a class="btn" href="${certificate_data.cert_web_view_url}" target="_blank">${_("View Certificate")} <span class="sr">${_("Opens in a new browser window")}</span></a>
%elif certificate_data.cert_status == CertificateStatuses.downloadable and certificate_data.download_url:
<a class="btn" href="${certificate_data.download_url}" target="_blank">${_("Download Your Certificate")} <span class="sr">${_("Opens in a new browser window")}</span></a>
%elif certificate_data.cert_status == CertificateStatuses.requesting:
<button class="btn generate_certs" data-endpoint="${post_url}" id="btn_generate_cert">${_('Request Certificate')}</button>
%endif
</div>
</div>
</div>
</div>
%endif
%endif
</%block>
</div>
%if not course.disable_progress_graph:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment