55 lines
2.1 KiB
HTML
55 lines
2.1 KiB
HTML
<h1>Einkaufszettel</h1>
|
|
<app-blog-entry *ngFor="let entry of entries" [entry]="entry"></app-blog-entry>
|
|
<h2>Neuen Einkaufszettel Eintrag anlegen:</h2>
|
|
|
|
<div class="form">
|
|
<form novalidate (ngSubmit)="saveTask(form.value)" #form="ngForm">
|
|
<div class="form-group">
|
|
<label for="title">Titel*</label>
|
|
<input type="text" class="form-control" name="title" id="title" #title ngModel required/>
|
|
|
|
<label for="image">Bild-URL*</label>
|
|
<input type="text" class="form-control" name="title" id="image" #image ngModel required/>
|
|
|
|
<label>Kategorie*</label>
|
|
<input type="text" class="form-control" id="kategorie" #kategorie ngModel required/>
|
|
|
|
<label for="menge">Menge*</label>
|
|
<input type="text" class="form-control" name="title" id="menge" #menge ngModel required/>
|
|
|
|
<label for="kommentar">Kommentar: </label>
|
|
<textarea id="kommentar" #kommentar cols="20" rows="3" #text>
|
|
</textarea>
|
|
</div>
|
|
<button (click)="createBlogEntry(title.value, image.value, kategorie.value,menge.value, kommentar.value)">
|
|
Blog-Eintrag anlegen
|
|
</button>
|
|
|
|
</form>
|
|
<div class="container">
|
|
<div class="row custom-wrapper">
|
|
<div class="col-md-12">
|
|
<!-- Form starts -->
|
|
<form [formGroup]="registrationForm" (ngSubmit)="onSubmit()">
|
|
<div class="group-gap">
|
|
<div class="d-block my-3">
|
|
<div class="mb-3">
|
|
<select class="custom-select" (change)="changeKategorie($event)" formControlName="kategorieName">
|
|
<option value="">Wählen sie eine Kategorie</option>
|
|
<option *ngFor="let kategorie of Kategorien" [ngValue]="kategorie">{{kategorie}}</option>
|
|
</select>
|
|
<!-- error block -->
|
|
<div class="invalid-feedback" *ngIf="isSubmitted && kategorieName.errors?.required">
|
|
<sup>*</sup>Bitte geben sie eine Kategorie ein!
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Submit Button -->
|
|
<button type="submit" class="btn btn-danger btn-lg btn-block">Speichern</button>
|
|
</form><!-- Form ends -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|