Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cms/templates/asset_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@

<%block name="jsextra">
<script type="text/javascript">
require(["domReady", "jquery", "gettext", "js/models/asset", "js/collections/asset",
require(["domReady", "jquery", "js/models/asset", "js/collections/asset",
"js/views/assets", "js/views/feedback_prompt",
"js/views/feedback_notification", "js/views/paging_header", "js/views/paging_footer",
"js/utils/modal", "jquery.fileupload"],
function(domReady, $, gettext, AssetModel, AssetCollection, AssetsView, PromptView, NotificationView,
function(domReady, $, AssetModel, AssetCollection, AssetsView, PromptView, NotificationView,
PagingHeader, PagingFooter, ModalUtils) {
var assets = new AssetCollection();

assets.url = "${asset_callback_url}";
var assetsView = new AssetsView({collection: assets, el: $('#asset-library')});
assetsView.render();
Expand Down Expand Up @@ -74,7 +75,7 @@
var startUpload = function (e) {
var file = e.target.value;

$('.upload-modal h1').html(gettext('Uploading…'));
$('.upload-modal h1').text("${_(u'Uploading…')}");
$('.upload-modal .file-name').html(file.substring(file.lastIndexOf("\\") + 1));
$('.upload-modal .choose-file-button').hide();
$('.upload-modal .progress-bar').removeClass('loaded').show();
Expand All @@ -90,7 +91,7 @@

$('.upload-modal .file-name').show();
$('.upload-modal .file-name').html('');
$('.upload-modal .choose-file-button').html(gettext('Choose File'));
$('.upload-modal .choose-file-button').text("${_('Choose File')}");
$('.upload-modal .embeddable-xml-input').val('');
$('.upload-modal .embeddable').hide();
};
Expand All @@ -104,12 +105,12 @@
var displayFinishedUpload = function (resp) {
var asset = resp.asset;

$('.upload-modal h1').html(gettext('Upload New File'));
$('.upload-modal h1').text("${_('Upload New File')}");
$('.upload-modal .embeddable-xml-input').val(asset.portable_url);
$('.upload-modal .embeddable').show();
$('.upload-modal .file-name').hide();
$('.upload-modal .progress-fill').html(resp.msg);
$('.upload-modal .choose-file-button').html(gettext('Load Another File')).show();
$('.upload-modal .choose-file-button').text("${_('Load Another File')}").show();
$('.upload-modal .progress-fill').width('100%');

assetsView.addAsset(new AssetModel(asset));
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/textbooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$(window).on("beforeunload", function() {
var dirty = textbooks.find(function(textbook) { return textbook.isDirty(); });
if(dirty) {
return gettext("You have unsaved changes. Do you really want to leave this page?");
return "${_('You have unsaved changes. Do you really want to leave this page?')}";
}
})
})
Expand Down
2 changes: 1 addition & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
# Enables the student notes API and UI.
'ENABLE_STUDENT_NOTES': True,

# Provide a UI to allow users to submit feedback from the LMS
# Provide a UI to allow users to submit feedback from the LMS (left-hand help modal)
'ENABLE_FEEDBACK_SUBMISSION': False,

# Turn on a page that lets staff enter Python code to be run in the
Expand Down
42 changes: 21 additions & 21 deletions lms/templates/help_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ <h2>${_('{span_start}{platform_name}{span_end} Help').format(span_start='<span c
<form id="feedback_form" class="feedback_form" method="post" data-remote="true" action="/submit_feedback">
<div id="feedback_error" class="modal-form-error" tabindex="-1"></div>
% if not user.is_authenticated():
<label data-field="name" for="feedback_form_name">${_('Name*')}</label>
<label data-field="name" for="feedback_form_name">${_('Name')}*</label>
<input name="name" type="text" id="feedback_form_name" aria-required="true">
<label data-field="email" for="feedback_form_email">${_('E-mail*')}</label>
<label data-field="email" for="feedback_form_email">${_('E-mail')}*</label>
<input name="email" type="text" id="feedback_form_email" aria-required="true">
% endif
<label data-field="subject" for="feedback_form_subject">${_('Briefly describe your issue*')}</label>
<label data-field="subject" for="feedback_form_subject">${_('Briefly describe your issue')}*</label>
<input name="subject" type="text" id="feedback_form_subject" aria-required="true">
<label data-field="details" for="feedback_form_details">${_('Tell us the details*')}
<label data-field="details" for="feedback_form_details">${_('Tell us the details')}*
<span class="tip">${_('Include error messages, steps which lead to the issue, etc')}</span></label>
<textarea name="details" id="feedback_form_details" aria-required="true"></textarea>
<input name="issue_type" type="hidden">
% if course:
<input name="course_id" type="hidden" value="${course.id | h}">
% endif
<div class="submit">
<input name="submit" type="submit" value="Submit" id="feedback_submit">
<input name="submit" type="submit" value="${_('Submit')}" id="feedback_submit">
</div>
</form>
</div>
Expand Down Expand Up @@ -168,29 +168,29 @@ <h2>${_('Thank You!')}</h2>
$("#feedback_link_problem").click(function(event) {
showFeedback(
event,
gettext("problem"),
gettext("Report a Problem"),
gettext("Brief description of the problem*"),
gettext("Details of the problem you are encountering*") + "<span class='tip'>" +
gettext("Include error messages, steps which lead to the issue, etc.") + "</span>"
"${_('problem')}",
"${_('Report a Problem')}",
"${_('Brief description of the problem')}" + "*",
"${_('Details of the problem you are encountering')}" + "*" + "<span class='tip'>" +
"${_('Include error messages, steps which lead to the issue, etc.')}" + "</span>"
);
});
$("#feedback_link_suggestion").click(function(event) {
showFeedback(
event,
gettext("suggestion"),
gettext("Make a Suggestion"),
gettext("Brief description of your suggestion*"),
gettext("Details*")
"${_('suggestion')}",
"${_('Make a Suggestion')}",
"${_('Brief description of your suggestion')}" + "*",
"${_('Details')}" + "*"
);
});
$("#feedback_link_question").click(function(event) {
showFeedback(
event,
gettext("question"),
gettext("Ask a Question"),
gettext("Brief summary of your question*"),
gettext("Details*")
"${_('question')}",
"${_('Ask a Question')}",
"${_('Brief summary of your question')}" + "*",
"${_('Details')}" + "*"
);
});
$("#feedback_form").submit(function() {
Expand Down Expand Up @@ -218,16 +218,16 @@ <h2>${_('Thank You!')}</h2>
$("#feedback_error").html(responseData.error).stop().css("display", "block");
} else {
// If no data (or malformed data) is returned, a server error occurred
htmlStr = gettext("An error has occurred.");
htmlStr = "${_('An error has occurred.')}";
% if settings.FEEDBACK_SUBMISSION_EMAIL:
htmlStr += " " + _.template(
gettext("Please {link_start}send us e-mail{link_end}."),
"${_('Please {link_start}send us e-mail{link_end}.')}",
{link_start: '<a href="#" id="feedback_email">', link_end: '</a>'},
{interpolate: /\{(.+?)\}/g})
% else:
// If no email is configured, we can't do much other than
// ask the user to try again later
htmlStr += gettext(" Please try again later.");
htmlStr += "${_('Please try again later.')}";
% endif
$("#feedback_error").html(htmlStr).stop().css("display", "block");
% if settings.FEEDBACK_SUBMISSION_EMAIL:
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
$submitButton.
addClass('is-disabled').
prop('disabled', true).
html("${_(u'Processing your account information…')}");
text("${_(u'Processing your account information…')}");
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/manage_user_standing.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2>${_("Students whose accounts have been disabled")}</h2>
$(function() {
var form = $("#disable-form");
$("#submit-form").click(function(){
$("#account-change-status").html(gettext("working..."));
$("#account-change-status").text("${_('working...')}");
$.ajax({
type: "POST",
url: form.attr('action'),
Expand Down
4 changes: 2 additions & 2 deletions lms/templates/register-shib.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
$submitButton.
removeClass('is-disabled').
removeProp('disabled').
html("${_('Update my {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}");
text("${_('Update my {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}");
}
else {
$submitButton.
addClass('is-disabled').
prop('disabled', true).
html(gettext('Processing your account information &hellip;'));
text("${_(u'Processing your account information …')}");
}
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions lms/templates/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
$submitButton.
removeClass('is-disabled').
removeProp('disabled').
html("${_('Create My {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}");
text("${_('Create My {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}");
}
else {
$submitButton.
addClass('is-disabled').
prop('disabled', true).
html(gettext('Processing your account information &hellip;'));
text("${_(u'Processing your account information…')}");
}
}
</script>
Expand Down