Skip to content

Commit 3b5a68b

Browse files
authored
Merge pull request #2728 from JaySoni1/WEB-358-wrong-text-for-field-validation-when-adding-codes
WEB-358 Wrong text for field validation when adding codes
2 parents 9351ac1 + 76fb1a9 commit 3b5a68b

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

src/app/system/codes/view-code/view-code.component.html

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<div class="flex-fill layout-row-wrap gap-2percent responsive-column" [formGroupName]="i">
3232
<mat-form-field class="flex-fill flex-20">
3333
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
34-
<input required matInput formControlName="name" />
34+
<input required matInput formControlName="name" placeholder="{{ 'labels.inputs.name' | translate }}" />
3535
<mat-error *ngIf="codeValues.at(i).controls.name.hasError('required')">
3636
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
3737
<strong>{{ 'labels.commons.required' | translate }}</strong>
@@ -40,12 +40,22 @@
4040

4141
<mat-form-field class="flex-fill flex-22">
4242
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
43-
<input matInput formControlName="description" />
43+
<input
44+
matInput
45+
formControlName="description"
46+
placeholder="{{ 'labels.inputs.Description' | translate }}"
47+
/>
4448
</mat-form-field>
4549

4650
<mat-form-field class="flex-fill flex-18">
4751
<mat-label>{{ 'labels.inputs.Position' | translate }}</mat-label>
48-
<input required matInput formControlName="position" type="number" />
52+
<input
53+
required
54+
matInput
55+
formControlName="position"
56+
type="number"
57+
placeholder="{{ 'labels.inputs.Position' | translate }}"
58+
/>
4959
<mat-error *ngIf="codeValues.at(i).controls.position.hasError('required')">
5060
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
5161
<strong>{{ 'labels.commons.required' | translate }}</strong>
@@ -63,19 +73,22 @@
6373
<button
6474
mat-stroked-button
6575
color="primary"
66-
[disabled]="codeValues.at(i).pristine"
76+
type="button"
77+
[disabled]="!codeValues.at(i).valid || codeValues.at(i).pristine"
6778
(click)="updateCodeValue(i)"
6879
*mifosxHasPermission="'UPDATE_CODEVALUE'"
6980
>
7081
{{ 'labels.buttons.Submit' | translate }}
7182
</button>
7283
</span>
73-
<button mat-button *ngIf="codeValueRowStatus[i] === 'edit'" (click)="disableRow(i)">
84+
<button mat-button type="button" *ngIf="codeValueRowStatus[i] === 'edit'" (click)="disableRow(i)">
7485
{{ 'labels.buttons.Cancel' | translate }}
7586
</button>
7687
<button
7788
mat-icon-button
7889
color="primary"
90+
type="button"
91+
title="{{ 'tooltips.Add' | translate }}"
7992
[disabled]="!codeValuesForm.get('codeValues').at(i).valid"
8093
*ngIf="codeValueRowStatus[i] === 'new'"
8194
matTooltip="{{ 'tooltips.Add' | translate }}"
@@ -87,6 +100,7 @@
87100
<button
88101
type="button"
89102
color="primary"
103+
title="{{ 'tooltips.Edit' | translate }}"
90104
*ngIf="codeValueRowStatus[i] === 'disabled'"
91105
mat-icon-button
92106
matTooltip="{{ 'tooltips.Edit' | translate }}"
@@ -98,6 +112,7 @@
98112
<button
99113
type="button"
100114
color="warn"
115+
title="{{ 'tooltips.Delete' | translate }}"
101116
mat-icon-button
102117
matTooltip="{{ 'tooltips.Delete' | translate }}"
103118
*mifosxHasPermission="'DELETE_CODEVALUE'"

0 commit comments

Comments
 (0)