blob: 37954bb709d7dd2b9f5afa09dfab401a032ec433 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<div id="box">
<div id="header">
<h1> Cupboard </h1>
<button *ngIf="isManager()" class="button2" (click)="this.selectForm('create')"><span class="icon">add</span>Create Need</button>
</div>
<app-need-list (currentNeed) = populateForm($event) #needList></app-need-list>
</div>
<ng-template [ngIf]="isManager()" >
<div>
<app-need-edit *ngIf="selectedForm === 'update'" [selectedNeed]="selectedNeed" (refreshNeedList)="needList.refresh()"></app-need-edit>
<div>
<div id="create-form" *ngIf="selectedForm === 'create'">
<h1> Create Need </h1>
<form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)">
<label>Name:</label><br>
<input type="text" name="name" ngModel><br>
<label>Image:</label><br>
<input type="text" name="image" ngModel><br>
<label>Location:</label><br>
<input type="text" name="location" ngModel><br>
<label>Max Goal:</label><br>
<input type="number" name="maxGoal" ngModel><br>
<label>Type</label><br>
<input type="radio" name="type" value="MONETARY" ngModel>
<label>Monetary</label><br>
<input type="radio" name="type" value="PHYSICAL" ngModel>
<label>Physical</label><br>
<input type="checkbox" name="urgent" value="false" ngModel>
<label>Urgent</label><br>
<label>Description</label><br>
<textarea name="description"></textarea><br>
<input type="submit" value="Submit">
</form>
</div>
</div>
</div>
</ng-template>
|