Commit 9e06290b by muzaffaryousaf Committed by Andy Armstrong

Fixing the micro-sites naming issues for account settings page.

TNL-2071
parent ebd56eda
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
], function (gettext, $, _, Backbone, Logger, FieldViews, UserAccountModel, UserPreferencesModel, ], function (gettext, $, _, Backbone, Logger, FieldViews, UserAccountModel, UserPreferencesModel,
AccountSettingsFieldViews, AccountSettingsView) { AccountSettingsFieldViews, AccountSettingsView) {
return function (fieldsData, authData, userAccountsApiUrl, userPreferencesApiUrl, accountUserId) { return function (fieldsData, authData, userAccountsApiUrl, userPreferencesApiUrl, accountUserId, platformName) {
var interpolate_text = window.interpolate_text;
var accountSettingsElement = $('.wrapper-account-settings'); var accountSettingsElement = $('.wrapper-account-settings');
var userAccountModel = new UserAccountModel(); var userAccountModel = new UserAccountModel();
...@@ -29,7 +30,9 @@ ...@@ -29,7 +30,9 @@
model: userAccountModel, model: userAccountModel,
title: gettext('Username'), title: gettext('Username'),
valueAttribute: 'username', valueAttribute: 'username',
helpMessage: gettext('The name that identifies you on the edX site. You cannot change your username.') helpMessage: interpolate_text(
gettext('The name that identifies you on the {platformName} site. You cannot change your username.'), {platformName: platformName}
)
}) })
}, },
{ {
...@@ -37,7 +40,9 @@ ...@@ -37,7 +40,9 @@
model: userAccountModel, model: userAccountModel,
title: gettext('Full Name'), title: gettext('Full Name'),
valueAttribute: 'name', valueAttribute: 'name',
helpMessage: gettext('The name that appears on your edX certificates. Other learners never see your full name.') helpMessage: interpolate_text(
gettext('The name that appears on your {platformName} certificates. Other learners never see your full name.'), {platformName: platformName}
)
}) })
}, },
{ {
...@@ -45,7 +50,9 @@ ...@@ -45,7 +50,9 @@
model: userAccountModel, model: userAccountModel,
title: gettext('Email Address'), title: gettext('Email Address'),
valueAttribute: 'email', valueAttribute: 'email',
helpMessage: gettext('The email address you use to sign in to edX. Communications from edX and your courses are sent to this address.') helpMessage: interpolate_text(
gettext('The email address you use to sign in to {platformName}. Communications from {platformName} and your courses are sent to this address.'), {platformName: platformName}
)
}) })
}, },
{ {
...@@ -67,8 +74,9 @@ ...@@ -67,8 +74,9 @@
valueAttribute: 'pref-lang', valueAttribute: 'pref-lang',
required: true, required: true,
refreshPageOnSave: true, refreshPageOnSave: true,
helpMessage: helpMessage: interpolate_text(
gettext('The language used for the edX site. The site is currently available in a limited number of languages.'), gettext('The language used for the {platformName} site. The site is currently available in a limited number of languages.'), {platformName: platformName}
),
options: fieldsData.language.options options: fieldsData.language.options
}) })
}, },
......
<%! import json %> <%! import json %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from django.conf import settings %>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%! from microsite_configuration import microsite %>
<!--<%namespace name='static' file='/static_content.html'/>--> <!--<%namespace name='static' file='/static_content.html'/>-->
...@@ -40,9 +42,11 @@ ...@@ -40,9 +42,11 @@
var fieldsData = ${ json.dumps(fields) }; var fieldsData = ${ json.dumps(fields) };
var authData = ${ json.dumps(auth) }; var authData = ${ json.dumps(auth) };
var platformName = ${ json.dumps(microsite.get_value('platform_name', settings.PLATFORM_NAME))};
setupAccountSettingsSection( setupAccountSettingsSection(
fieldsData, authData, '${user_accounts_api_url}', '${user_preferences_api_url}', ${user.id} fieldsData, authData, '${user_accounts_api_url}', '${user_preferences_api_url}', ${user.id},
platformName
); );
}); });
}).call(this, require || RequireJS.require); }).call(this, require || RequireJS.require);
......
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