diff --git a/lms/static/js/mustache.js b/lms/static/js/mustache.js deleted file mode 100644 index aab62f9ddc..0000000000 --- a/lms/static/js/mustache.js +++ /dev/null @@ -1,613 +0,0 @@ -/*! - * mustache.js - Logic-less {{mustache}} templates with JavaScript - * http://github.com/janl/mustache.js - */ - -var Mustache; - -(function (exports) { - if (typeof module !== "undefined") { - module.exports = exports; // CommonJS - } else if (typeof define === "function") { - define(exports); // AMD - } else { - Mustache = exports; // - + diff --git a/lms/templates/student_account/account_settings.html b/lms/templates/student_account/account_settings.html index b52600414d..e70e13194d 100644 --- a/lms/templates/student_account/account_settings.html +++ b/lms/templates/student_account/account_settings.html @@ -37,21 +37,16 @@ from microsite_configuration import microsite <%block name="headextra"> <%static:css group='style-course'/> - - - + + +<%block name="js_extra"> +<%static:require_module module_name="js/student_account/views/account_settings_factory" class_name="AccountSettingsFactory"> + var fieldsData = ${ json.dumps(fields) }; + var authData = ${ json.dumps(auth) }; + var platformName = ${ json.dumps(microsite.get_value('platform_name', settings.PLATFORM_NAME))}; + + AccountSettingsFactory( + fieldsData, authData, '${user_accounts_api_url}', '${user_preferences_api_url}', ${user.id}, platformName + ); + diff --git a/lms/templates/student_profile/learner_profile.html b/lms/templates/student_profile/learner_profile.html index bdc4530084..0539ef2122 100644 --- a/lms/templates/student_profile/learner_profile.html +++ b/lms/templates/student_profile/learner_profile.html @@ -34,16 +34,11 @@ from openedx.core.lib.json_utils import EscapedEdxJSONEncoder <%block name="headextra"> <%static:css group='style-course'/> - - - - - + + +<%block name="js_extra"> +<%static:require_module module_name="js/student_profile/views/learner_profile_factory" class_name="LearnerProfileFactory"> + var options = ${ json.dumps(data, cls=EscapedEdxJSONEncoder) }; + LearnerProfileFactory(options); +