Added translation for Shibboleth button

This commit is contained in:
Julius Gruber
2019-06-26 10:13:33 +02:00
parent 159ce66050
commit 318c736083
5 changed files with 9 additions and 14 deletions

View File

@@ -930,7 +930,8 @@
"forgot-password": "Have you forgotten your password?",
"new-user": "New user? Click here to register.",
"password": "Password",
"submit": "Log in"
"submit": "Log in",
"ssoLogin": "Shibboleth"
}
},
"logout": {
@@ -1002,10 +1003,8 @@
"title": "Edit Submission"
},
"mydspace": {
},
"sections": {
"general": {
"add-more": "Add more",
"no-sections": "No options available",
@@ -1030,7 +1029,6 @@
"submit.progressbar.license": "Deposit license",
"submit.progressbar.cclicense": "Creative commons license",
"submit.progressbar.detect-duplicate": "Potential duplicates",
"upload": {
"no-entry": "No",
"no-file-uploaded": "No file uploaded yet.",
@@ -1096,7 +1094,6 @@
"reject_help": "If you have reviewed the item and found it is <strong>not</strong> suitable for inclusion in the collection, select \"Reject\". You will then be asked to enter a message indicating why the item is unsuitable, and whether the submitter should change something and resubmit.",
"return": "Return to pool",
"return_help": "Return the task to the pool so that another user may perform the task."
},
"pool": {
"claim": "Claim",

View File

@@ -174,7 +174,9 @@ export class AuthInterceptor implements HttpInterceptor {
// console.log('error: ', error);
let location = '';
if (error.headers.get('www-authenticate') != null && error.headers.get('www-authenticate').includes('shibboleth realm')) {
location = this.getShibbUrlFromHeader(error.headers);
console.log('shibb url from header: ', location);
}
// Create a new HttpResponse and return it, so it can be handle properly by AuthService.
const authResponse = new HttpResponse({

View File

@@ -200,6 +200,7 @@ export function authReducer(state: any = initialState, action: AuthActions): Aut
// next three cases are used by shibboleth login
case AuthActionTypes.RETRIEVE_AUTH_METHODS:
console.log(' case AuthActionTypes.RETRIEVE_AUTH_METHODS');
return Object.assign({}, state, {
loading: true
});

View File

@@ -1,5 +0,0 @@
export class AuthShibbModel {
host: string;
target: string;
startShibSessionUrl: string; // as configured in backend
}

View File

@@ -25,9 +25,9 @@
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit"
[disabled]="!form.valid">{{"login.form.submit" | translate}}</button>
<br>
<div *ngIf="(hasSsoLoginUrl | async)">
<div class="text-center mt-2"><span class="align-middle">{{"login.form.or-divider" | translate}}</span></div>
<!--<div class="text-center mt-2"><span class="align-middle">{{"login.form.or-divider" | translate}}</span></div>-->
<a class="btn btn-lg btn-primary btn-block mt-2" [href]="(ssoLoginUrl | async)"
role="button">{{"login.form.ssoLogin" | translate}}</a>
</div>