Skip to content

Commit

Permalink
Add imprint to login screen (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel authored Nov 22, 2023
1 parent cf19dac commit 559157a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/login/login.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
.login-wrapper .login {
justify-content: center;
}

.imprint {
position: absolute;
left: 5px;
bottom: 5px;
}
3 changes: 3 additions & 0 deletions src/app/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,8 @@
</clr-tab-content>
</clr-tab>
</clr-tabs>
<a [href]="imprintLink" *ngIf="imprintGiven" class="imprint">
{{ imprintLinkName }}
</a>
</form>
</div>
12 changes: 11 additions & 1 deletion src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ export class LoginComponent {
public privacyPolicyRequired = true;
public privacyPolicyLink = '';
public privacyPolicyLinkName = '';
public imprintGiven = false;
public imprintLink = '';
public imprintLinkName = '';

private Config = this.config.getConfig();
public logo;
public background;

public loginactive = false;
public loginactive = true;

public loginForm: FormGroup = new FormGroup({
email: new FormControl<string | null>(null, [Validators.required]),
Expand Down Expand Up @@ -66,13 +69,20 @@ export class LoginComponent {
this.privacyPolicyLinkName =
typedInputs.get('registration-privacy-policy-linkname')?.value ??
'Privacy Policy';
this.imprintLinkName =
typedInputs.get('imprint-linkname')?.value ?? 'Imprint';
this.imprintLink = typedInputs.get('imprint-link')?.value ?? '';
this.imprintGiven =
this.imprintLink != '' && this.imprintLinkName != '';

if (this.privacyPolicyRequired) {
this.loginForm.addControl(
'privacyPolicy',
new FormControl<string | null>(null, [Validators.required]),
);
}

this.loginactive = false;
});
}

Expand Down

0 comments on commit 559157a

Please sign in to comment.