<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <p class="fl-detail" i18n>
      You can use this operation to increase but not decrease the volume size.
    </p>
    <p class="fl-detail" *ngIf="authService.feature('openstack.dbaas.replicas')" i18n>
      For replication cluster, resizing volume of the primary will also resize replicas automatically.
    </p>
    <form class="fl-margin-top-medium" [formGroup]="volumeResizeForm" appFormSubmit layoutDirection="column" (ngSubmit)="resize()">
      <app-form-errors #formErrors [formGroup]="volumeResizeForm"></app-form-errors>
      <mat-form-field appFlex="100">
        <mat-label i18n>Volume size(GB)</mat-label>
        <input matInput placeholder="Volume size(GB)" i18n-placeholder formControlName="volume_size" type="text" required>
        <mat-error i18n>{{volumeResizeForm.controls.volume_size.errors | errorFormatter}}</mat-error>
      </mat-form-field>
    </form>
  </ng-template>
</app-common-dialog>
