mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
Branch change
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user