Commit c482fce9 by Sylvia Pearce Committed by Chris Dodge

Update UI text for Saudi e-commerce features on the Instructor Dashboard

parent bfe75276
......@@ -24,7 +24,7 @@ import pytz
<a id="query_registration_code_link" href="#invalidate_registration_code_modal" rel="leanModal" class="add blue-button">${_('Change Enrollment Code Status')}</a>
</span>
%endif
<p>${_('Download a .csv file of all enrollment codes for this course')}</p>
<p>${_('Download a .csv file of all enrollment codes for this course.')}</p>
<p>
<form action="${ section_data['get_registration_code_csv_url'] }" id="download_registration_codes" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
......@@ -32,7 +32,7 @@ import pytz
<input type="submit" name="list-registration-codes-csv" value="${_("Download All Enrollment Codes")}" data-csv="true">
</form>
</p>
<p>${_('Download a .csv file of all unused enrollment codes for this course')}</p>
<p>${_('Download a .csv file of all unused enrollment codes for this course.')}</p>
<p>
<form action="${ section_data['active_registration_code_csv_url'] }" id="active_registration_codes" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
......@@ -40,7 +40,7 @@ import pytz
<input type="submit" name="active-registration-codes-csv" value="${_("Download Unused Enrollment Codes")}" data-csv="true">
</form>
</p>
<p>${_('Download a .csv file of all used enrollment codes for this course')}</p>
<p>${_('Download a .csv file of all used enrollment codes for this course.')}</p>
<p>
<form action="${ section_data['spent_registration_code_csv_url'] }" id="spent_registration_codes" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
......@@ -56,9 +56,9 @@ import pytz
<div class="wrap">
<h2>${_("Course Price")}</h2>
<div>
<span class="tip">${_("Course Price: ")}<span>${section_data['currency_symbol']}${section_data['course_price']}</span>
<span class="tip">${_("Course price per seat: ")}<span>${section_data['currency_symbol']}${section_data['course_price']}</span>
%if section_data['access']['finance_admin'] is True:
<a id="course_price_link" href="#set-course-mode-price-modal" rel="leanModal" class="add blue-button">+ ${_('Set Price')}</a>
<a id="course_price_link" href="#set-course-mode-price-modal" rel="leanModal" class="add blue-button">+ ${_('Edit Price')}</a>
%endif
</span>
</div>
......@@ -74,7 +74,7 @@ import pytz
%endif
<span class="csv_tip">
<div>
<p>${_("Download a .csv file for all credit card purchases or for all invoices, regardless of status")}</p>
<p>${_("Download a .csv file for all credit card purchases or for all invoices, regardless of status.")}</p>
<input type="button" class="add blue-button" name="list-sale-csv" value="${_("Download All Invoices")}" data-endpoint="${ section_data['get_sale_records_url'] }" data-csv="true">
<input type="button" class="add blue-button" name="list-order-sale-csv" value="${_("Download All Credit Card Purchases")}" data-endpoint="${ section_data['get_sale_order_records_url'] }" data-csv="true">
</div>
......@@ -96,7 +96,7 @@ import pytz
<div>
<span class="csv_tip">
<div>
<p>${_("Download a .csv file for all credit card purchases or for all invoices, regardless of status")}</p>
<p>${_("Download a .csv file for all credit card purchases or for all invoices, regardless of status.")}</p>
<input type="button" class="add blue-button" name="user-enrollment-report" value="${_("Download Enrollment Report")}" data-endpoint="${ section_data['enrollment_report_url'] }">
</div>
<div class="request-response msg msg-confirm copy" id="report-request-response"></div>
......@@ -104,11 +104,11 @@ import pytz
<br>
</span>
<div class="reports-download-container action-type-container">
<p><b>${_("Reports Available for Download")}</b></p>
<p>${_("The reports listed below are available for download. A link to every report remains available on this page, identified by the UTC date and time of generation. Reports are not deleted, so you will always be able to access previously generated reports from this page.")}</p>
<p><b>${_("Available Reports")}</b></p>
<p>${_("The following reports are available for download. Reports are not deleted. A link to every report remains available on this page, identified by the date and time (in UTC) that the report was generated.")}</p>
## Translators: a table of URL links to report files appears after this sentence.
<p>${_("<b>Note</b>: To keep student data secure, you cannot save or email these links for direct access. Copies of links expire within 5 minutes.")}</p><br>
<p>${_("<b>Note</b>: To help protect learner data, links to these reports that you save outside of this page or that you send or receive in email expire after five minutes.")}</p><br>
<div class="report-downloads-table" id="report-downloads-table"
data-endpoint="${ section_data['list_financial_report_downloads_url'] }"></div>
......@@ -131,26 +131,26 @@ import pytz
%endif
%if section_data['coupons_enabled']:
<div class="wrap">
<h2>${_("Coupons List")}</h2>
<h2>${_("Discount Code List")}</h2>
<div>
<span class="csv_tip">${_("Click to generate a CSV file of all Coupon Codes:")}
<input class="add blue-button" type="button" name="download-coupon-codes-csv" value="${_("Download coupon codes")}" data-endpoint="${ section_data['download_coupon_codes_url'] }" data-csv="true">
<span class="csv_tip">${_("Download a .csv file of all discount codes for this course.")}
<input class="add blue-button" type="button" name="download-coupon-codes-csv" value="${_("Download Discount Codes")}" data-endpoint="${ section_data['download_coupon_codes_url'] }" data-csv="true">
</span>
<span class="tip">${_("Coupons Information")} <a id="add_coupon_link" href="#add-coupon-modal" rel="leanModal"
class="add blue-button">+ ${_("Add Coupon")}</a></span>
<span class="tip">${_("Discount Codes")} <a id="add_coupon_link" href="#add-coupon-modal" rel="leanModal"
class="add blue-button">+ ${_("Add Discount Code")}</a></span>
<div class="wrapper-content wrapper">
<section class="content">
%if len(section_data['coupons']):
<table class="coupons-table">
<thead>
<tr class="coupons-headings">
<th class="c_code">${_("Code")}</th>
<th class="c_code">${_("Discount Code")}</th>
<th class="c_dsc">${_("Description")}</th>
<th class="c_expiry">${_("Expiry Date")}</th>
<th class="c_expiry">${_("Expiration Date")}</th>
<th class="c_discount">${_("Discount (%)")}</th>
<th class="c_count">${_("Redeem Count")}</th>
<th class="c_count">${_("Number Redeemed")}</th>
<th class="c_action">${_("Actions")}</th>
</tr>
</thead>
......@@ -246,7 +246,7 @@ import pytz
}
if($('#invoice_number').val() == "") {
$('#error-msg').attr('class','error-msgs')
$('#error-msg').html("${_('Invoice number should not be empty.')}").show();
$('#error-msg').html("${_('The Invoice Number field cannot be empty.')}").show();
return
}
$.ajax({
......@@ -290,7 +290,7 @@ import pytz
$('input#edit_coupon_expiration_date').val(data.expiry_date);
}
else {
$('input#edit_coupon_expiration_date').val("${_('Never Expires')}");
$('input#edit_coupon_expiration_date').val("${_('No Expiration Date')}");
}
$('#edit-modal-trigger').click();
},
......@@ -350,91 +350,91 @@ import pytz
if (company_name == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the company name')}");
registration_code_error.text("${_('Enter the company name.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (($.isNumeric(company_name))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the non-numeric value for company name')}");
registration_code_error.text("${_('The company name cannot be a number.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (company_contact_name == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the company contact name')}");
registration_code_error.text("${_('Enter the company contact name.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (($.isNumeric(company_contact_name))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the non-numeric value for company contact name')}");
registration_code_error.text("${_('The company contact name cannot be a number.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (company_contact_email == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the company contact email')}");
registration_code_error.text("${_('Enter the email address for the company contact.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (!(validateEmail(company_contact_email))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the valid email address')}");
registration_code_error.text("${_('Enter a valid email address.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (recipient_name == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the recipient name')}");
registration_code_error.text("${_('Enter the recipient name.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (($.isNumeric(recipient_name))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the non-numeric value for recipient name')}");
registration_code_error.text("${_('The recipient name cannot be a number.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (recipient_email == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the recipient email')}");
registration_code_error.text("${_('Enter the recipient email address.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (!(validateEmail(recipient_email))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the valid email address')}");
registration_code_error.text("${_('Enter a valid email address.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (address_line == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the billing address')}");
registration_code_error.text("${_('Enter the billing address.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
if (unit_price == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the unit price')}");
registration_code_error.text("${_('Enter the price per course seat.')}");
generate_registration_button.removeAttr('disabled');
return false
}
if (!($.isNumeric(unit_price))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the numeric value for unit price')}");
registration_code_error.text("${_('Enter a numeric value for the price per course seat. Do not include currency symbols.')}");
generate_registration_button.removeAttr('disabled');
return false
}
if (total_registration_codes == '') {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the number of enrollment codes')}");
registration_code_error.text("${_('Enter the number of enrollment codes.')}");
generate_registration_button.removeAttr('disabled');
return false
}
if (!($.isNumeric(total_registration_codes))) {
registration_code_error.attr('style', 'display: block !important');
registration_code_error.text("${_('Please enter the numeric value for number of enrollment codes')}");
registration_code_error.text("${_('Enter a numeric value for the number of enrollment codes.')}");
generate_registration_button.removeAttr('disabled');
return false;
}
......@@ -489,19 +489,19 @@ import pytz
// Check if empty of not
if (course_price === '') {
$('#set_price_form #course_form_error').attr('style', 'display: block !important');
$('#set_price_form #course_form_error').text("${_('Please enter the course price')}");
$('#set_price_form #course_form_error').text("${_('Enter the price per course seat.')}");
$("#set_course_button").removeAttr('disabled');
return false;
}
if (!$.isNumeric(course_price)) {
$("#set_course_button").removeAttr('disabled');
$('#set_price_form #course_form_error').attr('style', 'display: block !important');
$('#set_price_form #course_form_error').text("${_('Please enter the numeric value for course price')}");
$('#set_price_form #course_form_error').text("${_('Enter a numeric value for the price per course seat. Do not include currency symbols.')}");
return false;
}
if (currency == '') {
$('#set_price_form #course_form_error').attr('style', 'display: block !important');
$('#set_price_form #course_form_error').text("${_('Please select the currency')}");
$('#set_price_form #course_form_error').text("${_('Select a currency.')}");
$("#set_course_button").removeAttr('disabled');
return false;
}
......@@ -536,19 +536,19 @@ import pytz
if (code === '') {
$("#add_coupon_button").removeAttr('disabled');
$('#add_coupon_form #coupon_form_error').attr('style', 'display: block !important');
$('#add_coupon_form #coupon_form_error').text("${_('Please enter the coupon code')}");
$('#add_coupon_form #coupon_form_error').text("${_('Enter a discount code.')}");
return false;
}
if (parseInt(coupon_discount) > 100) {
$('#add_coupon_form #coupon_form_error').attr('style', 'display: block !important');
$('#add_coupon_form #coupon_form_error').text("${_('Please enter the coupon discount value less than or equal to 100')}");
$('#add_coupon_form #coupon_form_error').text("${_('The discount percentage must be less than or equal to 100.')}");
$("#add_coupon_button").removeAttr('disabled');
return false;
}
if (!$.isNumeric(coupon_discount)) {
$("#add_coupon_button").removeAttr('disabled');
$('#add_coupon_form #coupon_form_error').attr('style', 'display: block !important');
$('#add_coupon_form #coupon_form_error').text("${_('Please enter the numeric value for discount')}");
$('#add_coupon_form #coupon_form_error').text("${_('Enter a numeric value for the discount amount. Do not include the percent sign.')}");
return false;
}
$.ajax({
......
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