Browse Source
Merge pull request #8499 from vvlladd28/bug/notification/size-action-button
Minor noification improvement
pull/8506/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
15 additions and
2 deletions
-
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html
-
ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts
-
ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html
-
ui-ngx/src/app/shared/components/notification/notification.component.scss
-
ui-ngx/src/assets/locale/locale.constant-en_US.json
|
|
|
@ -198,6 +198,11 @@ |
|
|
|
<mat-error *ngIf="webTemplateForm.get('additionalConfig.actionButtonConfig.text').hasError('required')"> |
|
|
|
{{ 'notification.button-text-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="webTemplateForm.get('additionalConfig.actionButtonConfig.text').hasError('maxlength')"> |
|
|
|
{{ 'notification.button-text-max-length' | translate : |
|
|
|
{length: webTemplateForm.get('additionalConfig.actionButtonConfig.text').getError('maxlength').requiredLength} |
|
|
|
}} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div fxLayout="row" fxLayoutGap.gt-xs="8px" fxLayout.xs="column"> |
|
|
|
|
|
|
|
@ -99,7 +99,7 @@ export abstract class TemplateConfiguration<T, R = any> extends DialogComponent< |
|
|
|
}), |
|
|
|
actionButtonConfig: this.fb.group({ |
|
|
|
enabled: [false], |
|
|
|
text: [{value: '', disabled: true}, Validators.required], |
|
|
|
text: [{value: '', disabled: true}, [Validators.required, Validators.maxLength(50)]], |
|
|
|
linkType: [ActionButtonLinkType.LINK], |
|
|
|
link: [{value: '', disabled: true}, Validators.required], |
|
|
|
dashboardId: [{value: null, disabled: true}, Validators.required], |
|
|
|
|
|
|
|
@ -126,6 +126,11 @@ |
|
|
|
<mat-error *ngIf="webTemplateForm.get('additionalConfig.actionButtonConfig.text').hasError('required')"> |
|
|
|
{{ 'notification.button-text-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="webTemplateForm.get('additionalConfig.actionButtonConfig.text').hasError('maxlength')"> |
|
|
|
{{ 'notification.button-text-max-length' | translate : |
|
|
|
{length: webTemplateForm.get('additionalConfig.actionButtonConfig.text').getError('maxlength').requiredLength} |
|
|
|
}} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div fxLayout="row" fxLayoutGap.gt-xs="8px" fxLayout.xs="column"> |
|
|
|
@ -189,7 +194,7 @@ |
|
|
|
<mat-label class="tb-title tb-required" |
|
|
|
[ngClass]="{'tb-error': (emailStep.interacted || emailTemplateForm.get('body').dirty) && emailTemplateForm.get('body').hasError('required')}" |
|
|
|
translate>notification.message</mat-label> |
|
|
|
<editor [init]="tinyMceOptions" matInput formControlName="body"></editor> |
|
|
|
<editor [init]="tinyMceOptions" formControlName="body"></editor> |
|
|
|
<mat-error class="tb-mat-error" |
|
|
|
*ngIf="(emailStep.interacted || emailTemplateForm.get('body').dirty) && emailTemplateForm.get('body').hasError('required')"> |
|
|
|
{{ 'notification.message-required' | translate }} |
|
|
|
|
|
|
|
@ -44,6 +44,8 @@ |
|
|
|
.button { |
|
|
|
margin-top: 12px; |
|
|
|
border-color: initial; |
|
|
|
height: fit-content; |
|
|
|
line-height: 2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -2808,6 +2808,7 @@ |
|
|
|
"basic-settings": "Basic settings", |
|
|
|
"button-text": "Button text", |
|
|
|
"button-text-required": "Button text is required", |
|
|
|
"button-text-max-length": "Button text should be less than or equal to {{ length }} characters", |
|
|
|
"compose": "Compose", |
|
|
|
"conversation": "Conversation", |
|
|
|
"conversation-required": "Conversation is required", |
|
|
|
|