@@ -392,7 +392,6 @@
|
||||
<header>
|
||||
<h2 id="unenrollment-modal-title">
|
||||
<span id='track-info'></span>
|
||||
<span id='unenroll_course_number'></span>?
|
||||
<span id='refund-info'></span>
|
||||
<span class="sr">,
|
||||
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
|
||||
|
||||
@@ -168,63 +168,81 @@ from student.helpers import (
|
||||
% if is_paid_course and show_refund_option:
|
||||
## Translators: The course name will be added to the end of this sentence.
|
||||
% if not is_course_blocked:
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the purchased course")}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('You will be refunded the amount you paid.')">
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message('${_("Are you sure you want to unenroll from the purchased course %(course_number)s?")}', '${_("You will be refunded the amount you paid.")}')">
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% else:
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the purchased course")}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('You will be refunded the amount you paid.')">
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message('${_("Are you sure you want to unenroll from the purchased course %(course_number)s?")}', '${_("You will be refunded the amount you paid.")}')">
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% endif
|
||||
% elif is_paid_course and not show_refund_option:
|
||||
## Translators: The course's name will be added to the end of this sentence.
|
||||
% if not is_course_blocked:
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the purchased course")}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('You will not be refunded the amount you paid.')">
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message('${_("Are you sure you want to unenroll from the purchased course %(course_number)s?")}', '${_("You will not be refunded the amount you paid.")}')">
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% else:
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the purchased course")}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('You will not be refunded the amount you paid.')">
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message('${_("Are you sure you want to unenroll from the purchased course %(course_number)s?")}', '${_("You will not be refunded the amount you paid.")}')">
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% endif
|
||||
% elif enrollment.mode != "verified":
|
||||
## Translators: The course's name will be added to the end of this sentence.
|
||||
% if not is_course_blocked:
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from")}'; document.getElementById('refund-info').innerHTML=''">
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message('${_("Are you sure you want to unenroll from %(course_number)s?")}', '')">
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% else:
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from")}'; document.getElementById('refund-info').innerHTML=''">
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message('${_("Are you sure you want to unenroll from %(course_number)s?")}', '')">
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% endif
|
||||
% elif show_refund_option:
|
||||
## Translators: The course's name will be added to the end of this sentence.
|
||||
% if not is_course_blocked:
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the verified {cert_name_long} track of").format(cert_name_long=cert_name_long)}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('You will be refunded the amount you paid.')">
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message(
|
||||
'${_("Are you sure you want to unenroll from the verified {cert_name_long} track of %(course_number)s?").format(cert_name_long=cert_name_long)}',
|
||||
'${_("You will be refunded the amount you paid.")}'
|
||||
)"
|
||||
>
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% else:
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the verified {cert_name_long} track of").format(cert_name_long=cert_name_long)}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('You will be refunded the amount you paid.')">
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message(
|
||||
'${_("Are you sure you want to unenroll from the verified {cert_name_long} track of %(course_number)s?").format(cert_name_long=cert_name_long)}',
|
||||
'${_("You will be refunded the amount you paid.")}'
|
||||
)"
|
||||
>
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% endif
|
||||
% else:
|
||||
## Translators: The course's name will be added to the end of this sentence.
|
||||
% if not is_course_blocked:
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the verified {cert_name_long} track of").format(cert_name_long=cert_name_long)}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('The refund deadline for this course has passed, so you will not receive a refund.')">
|
||||
<a href="#unenroll-modal" class="action action-unenroll" rel="leanModal" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message(
|
||||
'${_("Are you sure you want to unenroll from the verified {cert_name_long} track of %(course_number)s?").format(cert_name_long=cert_name_long)}',
|
||||
'${_("The refund deadline for this course has passed, so you will not receive a refund.")}'
|
||||
)"
|
||||
>
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% else:
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}" onclick="document.getElementById('track-info').innerHTML='${_("Are you sure you want to unenroll from the verified {cert_name_long} track of").format(cert_name_long=cert_name_long)}';
|
||||
document.getElementById('refund-info').innerHTML=gettext('The refund deadline for this course has passed, so you will not receive a refund.')">
|
||||
<a class="action action-unenroll is-disabled" data-course-id="${course.id | h}" data-course-number="${course.number | h}" data-dashboard-index="${dashboard_index}"
|
||||
onclick="set_unenroll_message(
|
||||
'${_("Are you sure you want to unenroll from the verified {cert_name_long} track of %(course_number)s?").format(cert_name_long=cert_name_long)}',
|
||||
'${_("The refund deadline for this course has passed, so you will not receive a refund.")}'
|
||||
)"
|
||||
>
|
||||
${_('Unenroll')}
|
||||
</a>
|
||||
% endif
|
||||
@@ -365,4 +383,9 @@ from student.helpers import (
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function set_unenroll_message(track_info, refund_info) {
|
||||
document.getElementById('track-info').innerHTML = interpolate(track_info, {course_number: "<span id='unenroll_course_number'></span>"}, true);
|
||||
document.getElementById('refund-info').innerHTML = refund_info;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -70,7 +70,8 @@ site_status_msg = get_site_status_msg(course_id)
|
||||
% endif
|
||||
%if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff:
|
||||
<li>
|
||||
<a href="${reverse('sysadmin')}">Sysadmin</a>
|
||||
## Translators: This is short for "System administration".
|
||||
<a href="${reverse('sysadmin')}">${_("Sysadmin")}</a>
|
||||
</li>
|
||||
%endif
|
||||
</%block>
|
||||
|
||||
@@ -21,8 +21,11 @@ from courseware.courses import course_image_url, get_course_about_section
|
||||
alt="${course.display_number_with_default | h} ${get_course_about_section(course, 'title')} Cover Image"/>
|
||||
</div>
|
||||
<div class="enrollment-details">
|
||||
<div class="sub-title">${_("Confirm your enrollment for:")}
|
||||
<span class="course-date-label">${_("course dates")}</span>
|
||||
<div class="sub-title">
|
||||
${_("Confirm your enrollment for: {span_start}course dates{span_end}").format(
|
||||
span_start='<span class="course-date-label">',
|
||||
span_end='</span>'
|
||||
)}
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
@@ -37,11 +40,14 @@ from courseware.courses import course_image_url, get_course_about_section
|
||||
<hr>
|
||||
<div>
|
||||
% if reg_code_already_redeemed:
|
||||
<% dashboard_url = reverse('dashboard')%>
|
||||
<p class="enrollment-text">
|
||||
${_("You've clicked a link for an enrollment code that has already been used."
|
||||
" Check your <a href={dashboard_url}>course dashboard</a> to see if you're enrolled in the course,"
|
||||
" or contact your company's administrator.").format(dashboard_url=dashboard_url)}
|
||||
" Check your {link_start}course dashboard{link_end} to see if you're enrolled in the course,"
|
||||
" or contact your company's administrator."
|
||||
).format(
|
||||
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
|
||||
link_end='</a>'
|
||||
)}
|
||||
</p>
|
||||
% elif redemption_success:
|
||||
<p class="enrollment-text">
|
||||
@@ -49,23 +55,23 @@ from courseware.courses import course_image_url, get_course_about_section
|
||||
" This course has now been added to your dashboard.").format(course_name=course.display_name)}
|
||||
</p>
|
||||
% elif registered_for_course:
|
||||
<% dashboard_url = reverse('dashboard')%>
|
||||
<p class="enrollment-text">
|
||||
${_("You're already enrolled for this course."
|
||||
" Visit your <a href={dashboard_url}>dashboard</a> to see the course.").format(dashboard_url=dashboard_url)}
|
||||
" Visit your {link_start}dashboard{link_end} to see the course."
|
||||
).format(
|
||||
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
|
||||
link_end='</a>'
|
||||
)}
|
||||
</p>
|
||||
% elif course_full:
|
||||
<% dashboard_url = reverse('dashboard')%>
|
||||
<p class="enrollment-text">
|
||||
${_("The course you are enrolling for is full.")}
|
||||
</p>
|
||||
% elif enrollment_closed:
|
||||
<% dashboard_url = reverse('dashboard')%>
|
||||
<p class="enrollment-text">
|
||||
${_("The course you are enrolling for is closed.")}
|
||||
</p>
|
||||
% elif redeem_code_error:
|
||||
<% dashboard_url = reverse('dashboard')%>
|
||||
<p class="enrollment-text">
|
||||
${_("There was an error processing your redeem code.")}
|
||||
</p>
|
||||
|
||||
@@ -24,8 +24,11 @@ from courseware.courses import course_image_url, get_course_about_section
|
||||
)}" />
|
||||
</div>
|
||||
<div class="enrollment-details">
|
||||
<div class="sub-title">${_("Confirm your enrollment for:")}
|
||||
<span class="course-date-label">${_("course dates")}</span>
|
||||
<div class="sub-title">
|
||||
${_("Confirm your enrollment for: {span_start}course dates{span_end}").format(
|
||||
span_start='<span class="course-date-label">',
|
||||
span_end='</span>'
|
||||
)}
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
@@ -50,7 +53,7 @@ from courseware.courses import course_image_url, get_course_about_section
|
||||
"to see if you're enrolled in the course, or contact your "
|
||||
"company's administrator."
|
||||
).format(
|
||||
link_start='<a href="{url}">'.format(url=reverse('dashboard')),
|
||||
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
|
||||
link_end='</a>',
|
||||
)}
|
||||
</p>
|
||||
@@ -69,7 +72,7 @@ from courseware.courses import course_image_url, get_course_about_section
|
||||
"You're already enrolled for this course. "
|
||||
"Visit your {link_start}dashboard{link_end} to see the course."
|
||||
).format(
|
||||
link_start='<a href="{url}">'.format(url=reverse('dashboard')),
|
||||
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
|
||||
link_end='</a>',
|
||||
)}
|
||||
</p>
|
||||
|
||||
@@ -113,16 +113,14 @@ from django.utils.translation import ugettext as _
|
||||
${form_html}
|
||||
</div>
|
||||
<p>
|
||||
${_('After this purchase is complete,')}<br/><b>${order.user.username}</b>
|
||||
${_('will be enrolled in this course.')}
|
||||
${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'<br/><b>{username}</b>'.format(username=order.user.username))}
|
||||
</p>
|
||||
</div>
|
||||
% else:
|
||||
<div name="payment">
|
||||
${form_html}
|
||||
<p>
|
||||
${_('After this purchase is complete,')}<br/><b>${order.user.username}</b>
|
||||
${_('will be enrolled in this course.')}
|
||||
${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'<br/><b>{username}</b>'.format(username=order.user.username))}
|
||||
</p>
|
||||
</div>
|
||||
<div name="billing" class="hidden">
|
||||
|
||||
Reference in New Issue
Block a user