<form *ngIf="containerForm" appFormSubmit (ngSubmit)="objectController.actionCallback(primaryAction)"
      [formGroup]="containerForm" layoutDirection="column" class="fl-content">
  <!--suppress JSUnusedGlobalSymbols -->
  <app-form-errors #formErrors [formGroup]="containerForm"></app-form-errors>
  <app-credit-warning *ngIf="!object?.id" resourceName="container" i18n-resourceName></app-credit-warning>
  <mat-form-field *ngIf="!this.object?.id">
    <mat-label i18n>Name</mat-label>
    <input matInput placeholder="Name" i18n-placeholder
           type="text" formControlName="name" [maxLength]="maxContainerNameLength" required>
    <mat-error>{{fieldErrors['name']}}</mat-error>
  </mat-form-field>
  <mat-form-field *ngIf="policies">
    <mat-label i18n>Storage policy</mat-label>
    <mat-select placeholder="Storage policy" i18n-placeholder formControlName="storage_policy">
      <mat-option *ngFor="let policy of policies" [value]="policy.name">
        <span [class.fl-bold]="policy.default">
          {{policy.name}}
        </span>
      </mat-option>
    </mat-select>
  </mat-form-field>
  <p i18n>Access policy:</p>
  <mat-checkbox color="primary" formControlName="public" i18n>Public</mat-checkbox>
</form>
