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 class="form-horizontal"
7 [formGroup]="reweightForm">
8 <div class="modal-body" [ngClass]="{'has-error': weight.errors}">
10 <label for="weight" class="col-sm-2 control-label">Weight</label>
11 <div class="col-sm-10">
12 <input id="weight" class="form-control" type="number"
13 step="0.1" formControlName="weight" min="0" max="1"
14 [value]="currentWeight">
15 <span class="help-block"
16 *ngIf="weight.errors">
17 <span *ngIf="weight.errors?.required"
18 i18n>This field is required.</span>
19 <span *ngIf="weight.errors?.max || weight.errors?.min"
20 i18n>The value needs to be between 0 and 1.</span>
26 <div class="modal-footer">
27 <cd-submit-button (submitAction)="reweight()"
29 [disabled]="reweightForm.invalid"
30 i18n>Reweight</cd-submit-button>
32 <button class="btn btn-link btn-sm"
33 (click)="bsModalRef.hide()"