amended if code and validation

This commit is contained in:
piratefinn 2018-03-05 13:42:28 +00:00
parent 45d016c897
commit f5c0a76032
2 changed files with 7 additions and 7 deletions

View file

@ -48,29 +48,29 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div> <div>
<input value="daily" type="radio" name="daily" [(ngModel)]="recurringType"> <input value="daily" type="radio" name="daily" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
<label>Daily</label> <label>Daily</label>
</div> </div>
<div> <div>
<input value="weekly" type="radio" name="weekly" [(ngModel)]="recurringType"> <input value="weekly" type="radio" name="weekly" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
<label>Weekly</label> <label>Weekly</label>
</div> </div>
<div> <div>
<input value="fortnightly" type="radio" name="fortnightly" [(ngModel)]="recurringType"> <input value="fortnightly" type="radio" name="fortnightly" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
<label>Fortnightly</label> <label>Fortnightly</label>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div> <div>
<input value="monthly" type="radio" name="monthly" [(ngModel)]="recurringType"> <input value="monthly" type="radio" name="monthly" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
<label>Monthly</label> <label>Monthly</label>
</div> </div>
<div> <div>
<input value="monthly" type="radio" name="monthly" [(ngModel)]="recurringType"> <input value="monthly" type="radio" name="monthly" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
<label>Monthly</label> <label>Monthly</label>
</div> </div>
<div> <div>
<input value="quarterly" type="radio" name="quarterly" [(ngModel)]="recurringType"> <input value="quarterly" type="radio" name="quarterly" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
<label>Quarterly</label> <label>Quarterly</label>
</div> </div>
</div> </div>

View file

@ -178,7 +178,7 @@ export class AddDataComponent implements OnInit {
this.submitOrg.town.length === 0 || this.submitOrg.town.length === 0 ||
this.amount === 0 || this.amount === 0 ||
this.recurringPurchase && this.recurringPurchase &&
this.recurringType === 0) { !this.recurringType) {
this.transactionFormInvalid = true; this.transactionFormInvalid = true;
} else { } else {
this.transactionFormInvalid = false; this.transactionFormInvalid = false;