32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
<ion-header [translucent]="true">
|
|
<ion-toolbar>
|
|
<div class="toolbar">
|
|
<ion-title *ngIf="isAddMode">Create Goal</ion-title>
|
|
<ion-title *ngIf="!isAddMode">Edit Goal</ion-title>
|
|
</div>
|
|
</ion-toolbar>
|
|
</ion-header>
|
|
|
|
<ion-content [fullscreen]="true">
|
|
<form [formGroup]="form">
|
|
<label>Goal Name</label>
|
|
<input id="name" type="text" formControlName="name"/>
|
|
|
|
<label>Target</label>
|
|
<input id="target" type="number" placeholder="0.00" name="price" min="0" value="0" step="0.01" formControlName="target"/>
|
|
|
|
<label>Weight</label>
|
|
<input id="weight" type="number" placeholder="0.00" name="price" min="0" value="0" step="0.01" formControlName="weight"/>
|
|
|
|
<label>Colour</label>
|
|
<select formControlName="color">
|
|
<option *ngFor="let color of possibleColors" [value]="color" [style.--background]="color">{{color}}</option>
|
|
</select>
|
|
|
|
<button type="button" [disabled]="!form.valid" (click)="submit()">
|
|
<span *ngIf="isAddMode">Add Goal</span>
|
|
<span *ngIf="!isAddMode">Update Goal</span>
|
|
</button>
|
|
</form>
|
|
</ion-content>
|