From 3c6591e06555f0b932088fc3d87f72e74c7b1e16 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Wed, 9 Oct 2013 11:06:02 +0300 Subject: [PATCH] Addressing comments by auraz and singingwolfboy. Removed JS check for empty url and default url. In template added i18n support for several strings. --- common/lib/xmodule/xmodule/js/src/lti/lti.js | 12 +----------- lms/templates/lti.html | 6 +++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/lti/lti.js b/common/lib/xmodule/xmodule/js/src/lti/lti.js index 9454b0c346..96ad075220 100644 --- a/common/lib/xmodule/xmodule/js/src/lti/lti.js +++ b/common/lib/xmodule/xmodule/js/src/lti/lti.js @@ -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(). diff --git a/lms/templates/lti.html b/lms/templates/lti.html index b1f1b2a220..e816e37b47 100644 --- a/lms/templates/lti.html +++ b/lms/templates/lti.html @@ -34,7 +34,7 @@ % if open_in_a_new_page:

- ${display_name} (External resource) + ${display_name} (${_('External resource')}) @@ -51,8 +51,8 @@ % endif % else:

- Please provide launch_url. Click "Edit", and fill in the - required fields. + ${_('Please provide launch_url. Click "Edit", and fill in the + required fields.')}

%endif