Addressing comments by auraz and singingwolfboy.
Removed JS check for empty url and default url. In template added i18n support for several strings.
This commit is contained in:
@@ -37,7 +37,7 @@ window.LTI = (function () {
|
||||
//
|
||||
// @return undefined
|
||||
function initialize(element) {
|
||||
var form, openInANewPage, formAction;
|
||||
var form, openInANewPage;
|
||||
|
||||
// In cms (Studio) the element is already a jQuery object. In lms it is
|
||||
// a DOM object.
|
||||
@@ -47,16 +47,6 @@ window.LTI = (function () {
|
||||
element = $(element);
|
||||
|
||||
form = element.find('.ltiLaunchForm');
|
||||
formAction = form.attr('action');
|
||||
|
||||
// If action is empty string, or action is the default URL that should
|
||||
// not cause a form submit.
|
||||
if (!formAction || formAction === 'http://www.example.com') {
|
||||
|
||||
// Nothing to do - no valid action provided. Error message will be
|
||||
// displaced in browser (HTML).
|
||||
return;
|
||||
}
|
||||
|
||||
// We want a Boolean 'true' or 'false'. First we will retrieve the data
|
||||
// attribute, and then we will parse it via native JSON.parse().
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
% if open_in_a_new_page:
|
||||
<p>
|
||||
<span class="description">
|
||||
${display_name} (External resource)
|
||||
${display_name} (${_('External resource')})
|
||||
</span>
|
||||
<a href="#" class='link_lti_new_window'>
|
||||
<i class="icon-external-link"></i>
|
||||
@@ -51,8 +51,8 @@
|
||||
% endif
|
||||
% else:
|
||||
<h3 class="error_message">
|
||||
Please provide launch_url. Click "Edit", and fill in the
|
||||
required fields.
|
||||
${_('Please provide launch_url. Click "Edit", and fill in the
|
||||
required fields.')}
|
||||
</h3>
|
||||
%endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user