amended if code and validation
This commit is contained in:
parent
0a7b49a387
commit
1cbfb334de
2 changed files with 7 additions and 7 deletions
|
@ -48,29 +48,29 @@
|
|||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div>
|
||||
<input value="daily" type="radio" name="daily" [(ngModel)]="recurringType">
|
||||
<input value="daily" type="radio" name="daily" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
|
||||
<label>Daily</label>
|
||||
</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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div>
|
||||
<input value="monthly" type="radio" name="monthly" [(ngModel)]="recurringType">
|
||||
<input value="monthly" type="radio" name="monthly" [(ngModel)]="recurringType" (ngModelChange)="transactionFormValidate()">
|
||||
<label>Monthly</label>
|
||||
</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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -178,7 +178,7 @@ export class AddDataComponent implements OnInit {
|
|||
this.submitOrg.town.length === 0 ||
|
||||
this.amount === 0 ||
|
||||
this.recurringPurchase &&
|
||||
this.recurringType === 0) {
|
||||
!this.recurringType) {
|
||||
this.transactionFormInvalid = true;
|
||||
} else {
|
||||
this.transactionFormInvalid = false;
|
||||
|
|
Reference in a new issue