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

@@ -538,7 +538,7 @@
} }
}, },
"switch-configuration": { "switch-configuration": {
"title":"Show" "title": "Show"
}, },
"view-switch": { "view-switch": {
"show-list": "Show as list", "show-list": "Show as list",
@@ -930,7 +930,8 @@
"forgot-password": "Have you forgotten your password?", "forgot-password": "Have you forgotten your password?",
"new-user": "New user? Click here to register.", "new-user": "New user? Click here to register.",
"password": "Password", "password": "Password",
"submit": "Log in" "submit": "Log in",
"ssoLogin": "Shibboleth"
} }
}, },
"logout": { "logout": {
@@ -980,7 +981,7 @@
"no-results": "No {{ type }} found" "no-results": "No {{ type }} found"
}, },
"submission": { "submission": {
"general":{ "general": {
"cannot_submit": "You have not the privilege to make a new submission.", "cannot_submit": "You have not the privilege to make a new submission.",
"deposit": "Deposit", "deposit": "Deposit",
"discard": { "discard": {
@@ -1002,10 +1003,8 @@
"title": "Edit Submission" "title": "Edit Submission"
}, },
"mydspace": { "mydspace": {
}, },
"sections": { "sections": {
"general": { "general": {
"add-more": "Add more", "add-more": "Add more",
"no-sections": "No options available", "no-sections": "No options available",
@@ -1030,7 +1029,6 @@
"submit.progressbar.license": "Deposit license", "submit.progressbar.license": "Deposit license",
"submit.progressbar.cclicense": "Creative commons license", "submit.progressbar.cclicense": "Creative commons license",
"submit.progressbar.detect-duplicate": "Potential duplicates", "submit.progressbar.detect-duplicate": "Potential duplicates",
"upload": { "upload": {
"no-entry": "No", "no-entry": "No",
"no-file-uploaded": "No file uploaded yet.", "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.", "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": "Return to pool",
"return_help": "Return the task to the pool so that another user may perform the task." "return_help": "Return the task to the pool so that another user may perform the task."
}, },
"pool": { "pool": {
"claim": "Claim", "claim": "Claim",

View File

@@ -174,7 +174,9 @@ export class AuthInterceptor implements HttpInterceptor {
// console.log('error: ', error); // console.log('error: ', error);
let location = ''; let location = '';
if (error.headers.get('www-authenticate') != null && error.headers.get('www-authenticate').includes('shibboleth realm')) { if (error.headers.get('www-authenticate') != null && error.headers.get('www-authenticate').includes('shibboleth realm')) {
location = this.getShibbUrlFromHeader(error.headers); 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. // Create a new HttpResponse and return it, so it can be handle properly by AuthService.
const authResponse = new HttpResponse({ 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 // next three cases are used by shibboleth login
case AuthActionTypes.RETRIEVE_AUTH_METHODS: case AuthActionTypes.RETRIEVE_AUTH_METHODS:
console.log(' case AuthActionTypes.RETRIEVE_AUTH_METHODS');
return Object.assign({}, state, { return Object.assign({}, state, {
loading: true 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" <button class="btn btn-lg btn-primary btn-block mt-3" type="submit"
[disabled]="!form.valid">{{"login.form.submit" | translate}}</button> [disabled]="!form.valid">{{"login.form.submit" | translate}}</button>
<br>
<div *ngIf="(hasSsoLoginUrl | async)"> <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)" <a class="btn btn-lg btn-primary btn-block mt-2" [href]="(ssoLoginUrl | async)"
role="button">{{"login.form.ssoLogin" | translate}}</a> role="button">{{"login.form.ssoLogin" | translate}}</a>
</div> </div>