<h1 mat-dialog-title>Neue Transaktion hinzufügen</h1>
<form
  name="form"
  (ngSubmit)="f.form.valid && onSubmit()"
  #f="ngForm"
  novalidate
  class="backgorund"
>
  <div class="form-group">
    <label for="comment">Comment</label>
    <input
      type="comment"
      class="form-control"
      name="comment"
      [(ngModel)]="data.comment"
      required
      comment
      #comment="ngModel"
      placeholder="ex. Google"
    />
  </div>
  <div class="form-group">
    <label for="isin">ISIN/Symbol</label>
    <input
      type="text"
      class="form-control"
      name="isin"
      [(ngModel)]="data.isin"
      required
      isin
      #isin="ngModel"
      placeholder="ex. US02079K3059 / AAPL"
    />
  </div>
  <div class="form-group">
    <label for="time">Time</label>
    <input
      type="date"
      class="form-control"
      name="time"
      [(ngModel)]="data.time"
      required
      time
      #time="ngModel"
    />
  </div>
  <div class="form-group">
    <label for="count">Count (negative for sale/positiv for buy)</label>
    <input
      type="number"
      class="form-control"
      name="count"
      [(ngModel)]="data.count"
      required
      count
      #count="ngModel"
      placeholder="ex. 10"
    />
    <div class="alert-danger" *ngIf="!countValid">
      Password does not match, make sure it is the same!
    </div>
  </div>
  <div class="form-group">
    <label for="price">Price in € per share</label>
    <input
      class="form-control"
      name="price"
      [(ngModel)]="data.price"
      required
      #price="ngModel"
      type="number"
      placeholder="ex. 999"
    />
    <div class="alert-danger" *ngIf="!priceValid">
      Password does not match, make sure it is the same!
    </div>
  </div>
  <div class="form-group footer-buttons">
    <button class="btn btn-danger btn-block" mat-dialog-close>Cancel</button>
    <span class="spacer"></span>
    <button class="btn btn-primary btn-block">Confirm</button>
  </div>
</form>
