Skip to content
Snippets Groups Projects
Commit 526fab80 authored by Julius Gruber's avatar Julius Gruber
Browse files

Branch change

parent e72e0277
No related branches found
No related tags found
No related merge requests found
......@@ -353,6 +353,7 @@
"login.form.new-user": "New user? Click here to register.",
"login.form.password": "Password",
"login.form.submit": "Log in",
"login.shibbForm.submit": "Shibboleth",
"login.title": "Login",
"logout.form.header": "Log out from DSpace",
"logout.form.submit": "Log out",
......@@ -690,4 +691,4 @@
"uploader.or": ", or",
"uploader.processing": "Processing",
"uploader.queue-lenght": "Queue length"
}
\ No newline at end of file
}
......@@ -6,4 +6,12 @@
</div>
<!--<form *ngIf="!(loading | async) && !(isAuthenticated | async)" class="form-login px-4 py-3" (ngSubmit)="submit()"-->
<form class="form-login px-4 py-3" (ngSubmit)="submit()"
[formGroup]="shibbForm" novalidate>
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit"
[disabled]="!shibbForm.valid">{{"login.shibbForm.submit" | translate}}</button>
</form>
......@@ -2,6 +2,7 @@ import { Component, Inject, Input, OnInit } from '@angular/core';
import { renderAuthMethodFor } from '../../authMethods-decorator';
import { AuthMethodType } from '../../authMethods-type';
import { AuthMethodModel } from '../../../../core/auth/models/auth-method.model';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
@Component({
selector: 'ds-dynamic-shibboleth',
......@@ -16,16 +17,30 @@ export class DynamicShibbolethComponent implements OnInit {
buttonHref: string;
/**
* The authentication form.
* @type {FormGroup}
*/
public shibbForm: FormGroup;
/**
* @constructor
*/
constructor(@Inject('authMethodModelProvider') public injectedAuthMethodModel: AuthMethodModel) {
constructor(@Inject('authMethodModelProvider') public injectedAuthMethodModel: AuthMethodModel,
private formBuilder: FormBuilder) {
this.authMethodModel = injectedAuthMethodModel;
this.buttonHref = ('https://fis.tiss.tuwien.ac.at' + this.authMethodModel.location + '/shibboleth')
}
ngOnInit(): void {
console.log('injectedAuthMethodModel', this.injectedAuthMethodModel);
// set formGroup
this.shibbForm = this.formBuilder.group({
shibbButton: [''],
});
}
submit() {
console.log('submit() was callled');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment