Improve autocapitalization of form inputs for budgets, transactions, and categories
This commit is contained in:
parent
170214c1ca
commit
3981e575f2
4 changed files with 8 additions and 9 deletions
|
@ -4,10 +4,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!isLoading && budget" class="form budget-form">
|
<div *ngIf="!isLoading && budget" class="form budget-form">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput [(ngModel)]="budget.name" placeholder="Name" required>
|
<input matInput [(ngModel)]="budget.name" placeholder="Name" required autocapitalize="words">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<textarea matInput [(ngModel)]="budget.description" placeholder="Description"></textarea>
|
<textarea matInput [(ngModel)]="budget.description" placeholder="Description" autocapitalize="sentences"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-raised-button color="accent" (click)="save()">Save</button>
|
<button mat-raised-button color="accent" (click)="save()">Save</button>
|
||||||
<button class="button-delete" mat-raised-button color="warn" *ngIf="!create" (click)="delete()">Delete</button>
|
<button class="button-delete" mat-raised-button color="warn" *ngIf="!create" (click)="delete()">Delete</button>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="currentCategory" class="form category-form">
|
<div *ngIf="currentCategory" class="form category-form">
|
||||||
<mat-form-field (keyup.enter)="doAction()">
|
<mat-form-field (keyup.enter)="doAction()">
|
||||||
<input matInput [(ngModel)]="currentCategory.title" placeholder="Name" required>
|
<input matInput [(ngModel)]="currentCategory.title" placeholder="Name" required autocapitalize="words">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field (keyup.enter)="doAction()">
|
<mat-form-field (keyup.enter)="doAction()">
|
||||||
<textarea matInput [(ngModel)]="currentCategory.description" placeholder="Description"></textarea>
|
<textarea matInput [(ngModel)]="currentCategory.description" placeholder="Description" autocapitalize="sentences"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field (keyup.enter)="doAction()">
|
<mat-form-field (keyup.enter)="doAction()">
|
||||||
<input matInput type="text" [(ngModel)]="currentCategory.amount" placeholder="Amount" required>
|
<input matInput type="input" [(ngModel)]="currentCategory.amount" placeholder="Amount" required step="0.01">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-radio-group [(ngModel)]="currentCategory.expense">
|
<mat-radio-group [(ngModel)]="currentCategory.expense">
|
||||||
<mat-radio-button [value]="true">Expense</mat-radio-button>
|
<mat-radio-button [value]="true">Expense</mat-radio-button>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!currentTransaction" *ngIf="currentTransaction" class="form transaction-form">
|
<div [hidden]="!currentTransaction" *ngIf="currentTransaction" class="form transaction-form">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput [(ngModel)]="currentTransaction.title" placeholder="Name" required>
|
<input matInput [(ngModel)]="currentTransaction.title" placeholder="Name" required autocapitalize="words">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<textarea matInput [(ngModel)]="currentTransaction.description" placeholder="Description"></textarea>
|
<textarea matInput [(ngModel)]="currentTransaction.description" placeholder="Description" autocapitalize="sentences"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="text" [(ngModel)]="currentTransaction.amount" placeholder="Amount" required>
|
<input matInput type="number" [(ngModel)]="currentTransaction.amount" placeholder="Amount" required step="0.01">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="date" [ngModel]="transactionDate | date:'yyyy-MM-dd'"
|
<input matInput type="date" [ngModel]="transactionDate | date:'yyyy-MM-dd'"
|
||||||
|
|
|
@ -18,7 +18,6 @@ export class AddEditTransactionComponent implements OnInit, OnChanges {
|
||||||
@Input() create: boolean
|
@Input() create: boolean
|
||||||
public transactionType = TransactionType;
|
public transactionType = TransactionType;
|
||||||
public categories: Category[];
|
public categories: Category[];
|
||||||
public rawAmount: string;
|
|
||||||
public currentTime: string;
|
public currentTime: string;
|
||||||
public transactionDate: string;
|
public transactionDate: string;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue