<div class="bg-primary p-a-1" [class.bg-warning]="editing">
    <h5>{{editing  ? "Edycja" : "Dodawanie"}} produktu</h5>
</div>
<form novalidate #form="ngForm" (ngSubmit)="save(form)" >
    <div class="form-group">
        <label>Produkt</label>
        <input class="form-control" name="name" [(ngModel)]="product.name" />
    </div>
    <div class="form-group">
        <label>Kategoria</label>
        <input class="form-control" name="category" [(ngModel)]="product.category" />
    </div>
    <div class="form-group">
        <label>Opis</label>
        <textarea class="form-control" name="description" 
                  [(ngModel)]="product.description">
        </textarea>
    </div>
    <div class="form-group">
        <label>Cena</label>
        <input class="form-control" name="price" [(ngModel)]="product.price" />
    </div>
    <button type="submit" class="btn btn-primary" [class.btn-warning]="editing">
        {{editing ? "Zapisz" : "Dodaj"}}
    </button>
    <button type="reset" class="btn btn-secondary" routerLink="/admin/main/products">
        Anuluj
    </button>
</form>
