<form appFormSubmit (ngSubmit)="objectController.actionCallback(primaryAction)"
      [formGroup]="apiUserForm" class="fl-content">
  <!--suppress JSUnusedGlobalSymbols -->
  <app-form-errors #formErrors [formGroup]="apiUserForm"></app-form-errors>
  <div layoutDirection="row">
    <mat-form-field appFlex="100">
      <mat-label i18n>Name</mat-label>
      <input matInput placeholder="Name" i18n-placeholder type="text" formControlName="name" required>
      <mat-error>{{fieldErrors['name']}}</mat-error>
    </mat-form-field>
  </div>
  <div layoutDirection="row">
    <mat-form-field appFlex="100">
      <mat-label i18n>Password</mat-label>
      <input matInput placeholder="Password" i18n-placeholder
             formControlName="password" [type]="(passwordCtrl.value !== null)? 'password' : 'text'">
      <mat-error>{{fieldErrors['password']}}</mat-error>
    </mat-form-field>
  </div>
  <div layoutDirection="row">
    <mat-form-field appFlex="100">
      <mat-label i18n>Description</mat-label>
      <input matInput placeholder="Description" i18n-placeholder type="text"
             formControlName="description">
      <mat-error>{{fieldErrors['description']}}</mat-error>
    </mat-form-field>
  </div>
</form>
