<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <form appFormSubmit (ngSubmit)="saveProductGroup()" [formGroup]="productGroupForm" layoutDirection="column">
      <app-form-errors #formErrors [formGroup]="productGroupForm"></app-form-errors>
      <mat-form-field appFlex="100">
        <mat-label i18n>Name</mat-label>
        <input matInput placeholder="Name" i18n-placeholder type="text"
               formControlName="name" required>
        <mat-error>{{backendErrors['name'] || fieldRequiredTxt}}</mat-error>
      </mat-form-field>
      <mat-form-field appFlex="100">
        <mat-label i18n>Description</mat-label>
        <input matInput placeholder="Description" i18n-placeholder type="text"
               formControlName="description">
        <mat-error>{{backendErrors['description']}}</mat-error>
      </mat-form-field>
    </form>
  </ng-template>
</app-common-dialog>
