blob: e5aa22311f1cd8596a4026ae9bbee601c9add478 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<cd-modal [modalRef]="activeModal">
<ng-container class="modal-title"
i18n>Reweight OSD: {{ osdId }}</ng-container>
<ng-container class="modal-content">
<form [formGroup]="reweightForm">
<div class="modal-body">
<div class="row">
<label for="weight"
class="cd-col-form-label">Weight</label>
<div class="cd-col-form-input">
<input id="weight"
class="form-control"
type="number"
step="0.1"
formControlName="weight"
min="0"
max="1"
[value]="currentWeight">
<span class="invalid-feedback"
*ngIf="weight.errors">
<span *ngIf="weight.errors?.required"
i18n>This field is required.</span>
<span *ngIf="weight.errors?.max || weight.errors?.min"
i18n>The value needs to be between 0 and 1.</span>
</span>
</div>
</div>
</div>
<div class="modal-footer">
<cd-form-button-panel (submitActionEvent)="reweight()"
[form]="reweightForm"
[submitText]="actionLabels.REWEIGHT"></cd-form-button-panel>
</div>
</form>
</ng-container>
</cd-modal>
|