Skip to content

Commit 739578c

Browse files
Merge pull request #2528 from adaptlearning/issue/2527
Add configurable support fields
2 parents ef4c832 + 50e4a52 commit 739578c

5 files changed

Lines changed: 24 additions & 4 deletions

File tree

frontend/src/core/helpers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@ define(function(require){
326326
}
327327
}
328328
return flatProperties;
329+
},
330+
331+
importConstants: function() {
332+
this.constants = Origin.constants;
333+
return '';
329334
}
330335
};
331336

frontend/src/modules/help/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ define(function(require) {
22
var Origin = require('core/origin');
33

44
Origin.on('navigation:help', function() {
5-
openWikiLink(getLink());
5+
var override = Origin.constants.supportLink;
6+
if (override) {
7+
window.open(override);
8+
} else {
9+
openWikiLink(getLink());
10+
}
611
});
712

813
function getLink() {

frontend/src/modules/user/templates/forgotPassword.hbs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{importConstants}}
2+
13
<div class="login-logo"></div>
24

35
<div class="login-title">{{t 'app.resetpassword'}}</div>
@@ -24,6 +26,11 @@
2426
</form>
2527
</div>
2628
<div class="forgot-footer">
27-
<strong>{{t 'app.hasyouremailchanged'}}</strong> {{t 'app.forgotpasswordfooter'}}
29+
<strong>{{t 'app.hasyouremailchanged'}}</strong>
30+
{{#if constants.supportContact}}
31+
{{t 'app.forgotpasswordfooter' supportContact=constants.supportContact}}
32+
{{else}}
33+
{{t 'app.forgotpasswordfooter' supportContact=(t 'app.anadmin')}}
34+
{{/if}}
2835
</div>
2936
</div>

lib/configuration.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ var ALLOWED_CLIENT_SIDE_KEYS = [
3434
'maxLoginAttempts',
3535
'ckEditorExtraAllowedContent',
3636
'ckEditorEnterMode',
37-
'maxFileUploadSize'
37+
'maxFileUploadSize',
38+
'supportLink',
39+
'supportContact'
3840
];
3941

4042
/**

routes/lang/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
"app.confirmpassword": "Confirm password",
134134
"app.passwordtip": "Enter a new password below. The most secure passwords have a mix of numbers, letters (including capitals) and other characters.",
135135
"app.forgotpasswordblurb": "Enter the email address associated with your Adapt account, then click Continue.",
136-
"app.forgotpasswordfooter": "Contact Support for help with restoring access to your account.",
136+
"app.forgotpasswordfooter": "Contact %{supportContact} for help with restoring access to your account.",
137+
"app.anadmin": "an administrator",
137138
"app.hasyouremailchanged": "Has your email address changed?",
138139
"app.forgotpasswordsuccess": "Your request is being processed. If the details you provided match our records, you will receive further instructions via email.",
139140
"app.returnto": "Return to",

0 commit comments

Comments
 (0)