1 <cd-modal [modalRef]="bsModalRef">
2 <ng-container class="modal-title"
3 i18n>Reweight OSD</ng-container>
5 <ng-container class="modal-content">
6 <form [formGroup]="reweightForm">
7 <div class="modal-body">
9 <label for="weight" class="col-sm-2 col-form-label">Weight</label>
10 <div class="col-sm-10">
11 <input id="weight" class="form-control" type="number"
12 step="0.1" formControlName="weight" min="0" max="1"
13 [value]="currentWeight">
14 <span class="invalid-feedback"
15 *ngIf="weight.errors">
16 <span *ngIf="weight.errors?.required"
17 i18n>This field is required.</span>
18 <span *ngIf="weight.errors?.max || weight.errors?.min"
19 i18n>The value needs to be between 0 and 1.</span>
25 <div class="modal-footer">
26 <cd-submit-button (submitAction)="reweight()"
28 [disabled]="reweightForm.invalid"
29 i18n>Reweight</cd-submit-button>
30 <cd-back-button [back]="bsModalRef.hide"