mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-09 23:55:12 +00:00
feat: add Help/Support e-mail for instance/org (#5445)
feat: help and support email in privacy policy
This commit is contained in:
@@ -73,6 +73,7 @@ export function mapRequestValues(map: Partial<Map>, req: Req): Req {
|
||||
r3.setHelp(map.footerText?.help ?? '');
|
||||
r3.setPrivacyPolicy(map.footerText?.privacyPolicy ?? '');
|
||||
r3.setTos(map.footerText?.tos ?? '');
|
||||
r3.setSupportEmail(map.footerText?.supportEmail ?? '');
|
||||
req.setFooterText(r3);
|
||||
|
||||
const r4 = new InitMFADoneScreenText();
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
<input cnslInput name="helpLink" formControlName="helpLink" />
|
||||
<template [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="{ key: 'helpLink' }"></template>
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="privacy-policy-formfield">
|
||||
<cnsl-label>{{ 'POLICY.PRIVACY_POLICY.SUPPORTEMAIL' | translate }}</cnsl-label>
|
||||
<input cnslInput name="supportEmail" formControlName="supportEmail" />
|
||||
<template [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="{ key: 'supportEmail' }"></template>
|
||||
</cnsl-form-field>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
column-gap: 1rem;
|
||||
width: 75%;
|
||||
|
||||
@media only screen and (min-width: 800px) {
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
tosLink: ['', []],
|
||||
privacyLink: ['', []],
|
||||
helpLink: ['', []],
|
||||
supportEmail: ['', []],
|
||||
});
|
||||
|
||||
this.canWrite$.pipe(take(1)).subscribe((canWrite) => {
|
||||
@@ -105,6 +106,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
tosLink: '',
|
||||
privacyLink: '',
|
||||
helpLink: '',
|
||||
supportEmail: '',
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -114,6 +116,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
tosLink: '',
|
||||
privacyLink: '',
|
||||
helpLink: '',
|
||||
supportEmail: '',
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -125,6 +128,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
req.setPrivacyLink(this.form.get('privacyLink')?.value);
|
||||
req.setTosLink(this.form.get('tosLink')?.value);
|
||||
req.setHelpLink(this.form.get('helpLink')?.value);
|
||||
req.setSupportEmail(this.form.get('supportEmail')?.value);
|
||||
(this.service as ManagementService)
|
||||
.addCustomPrivacyPolicy(req)
|
||||
.then(() => {
|
||||
@@ -137,6 +141,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
req.setPrivacyLink(this.form.get('privacyLink')?.value);
|
||||
req.setTosLink(this.form.get('tosLink')?.value);
|
||||
req.setHelpLink(this.form.get('helpLink')?.value);
|
||||
req.setSupportEmail(this.form.get('supportEmail')?.value);
|
||||
|
||||
(this.service as ManagementService)
|
||||
.updateCustomPrivacyPolicy(req)
|
||||
@@ -151,6 +156,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
req.setPrivacyLink(this.form.get('privacyLink')?.value);
|
||||
req.setTosLink(this.form.get('tosLink')?.value);
|
||||
req.setHelpLink(this.form.get('helpLink')?.value);
|
||||
req.setSupportEmail(this.form.get('supportEmail')?.value);
|
||||
|
||||
(this.service as AdminService)
|
||||
.updatePrivacyPolicy(req)
|
||||
|
||||
@@ -53,6 +53,6 @@
|
||||
<cnsl-login-texts [serviceType]="serviceType"></cnsl-login-texts>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="currentSetting === 'privacypolicy'">
|
||||
<cnsl-privacy-policy [serviceType]="PolicyComponentServiceType.ADMIN"></cnsl-privacy-policy>
|
||||
<cnsl-privacy-policy [serviceType]="serviceType"></cnsl-privacy-policy>
|
||||
</ng-container>
|
||||
</cnsl-sidenav>
|
||||
|
||||
Reference in New Issue
Block a user