funds: fix styling and required checks of the fund transfer dialog
authorGalen Charlton <gmc@equinoxOLI.org>
Tue, 1 Jun 2021 22:01:09 +0000 (18:01 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 1 Jun 2021 22:01:09 +0000 (18:01 -0400)
Resolves LH#44

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.ts

index fa9b6c9..fda3976 100644 (file)
     </button>
   </div>
   <div class="modal-body" [hidden]="!doneLoading">
-    <form #xfrForm="ngForm" role="form" class="form-validated">
+    <form #xfrForm="ngForm" role="form" class="form-validated common-form striped-odd">
       <div class="form-group row mt-2">
         <label for="dest-fund" class="col-sm-4 col-form-label" i18n>Destination Fund</label>
         <div class="col-sm-8">
           <eg-combobox #fundSelector [asyncSupportsEmptyTermClick]="true"
-          name="dest_fund" id="dest-fund"
+          name="dest_fund" id="dest-fund" [mandatory]="true"
           [(ngModel)]="destFund" [asyncDataSource]="fundDataSource"
           i18n-placeholder placeholder="Select fund..."></eg-combobox>
         </div>
@@ -23,7 +23,7 @@
       <div class="form-group row">
         <label for="source_amount" class="col-sm-4 col-form-label" i18n>Source Amount</label>
         <div class="col-sm-8">
-          <input class="form-control" type="number" name="source_amount" id="source_amount" [(ngModel)]="sourceAmount">
+          <input class="form-control" type="number" name="source_amount" id="source_amount" [(ngModel)]="sourceAmount" required>
         </div>
       </div>
       <div class="form-group row">
index f8904c3..3b03c96 100644 (file)
@@ -34,7 +34,7 @@ export class FundTransferDialogComponent
 
     fundDataSource: (term: string) => Observable<ComboboxEntry>;
     destFund: ComboboxEntry = null;
-    sourceAmount = 0.0;
+    sourceAmount = null;
     note = null;
 
     constructor(
@@ -80,7 +80,7 @@ export class FundTransferDialogComponent
     private _initRecord() {
         this.doneLoading = false;
         this.destFund = null;
-        this.sourceAmount = 0;
+        this.sourceAmount = null;
         this.note = null;
         this.doneLoading = true;
     }