<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <p i18n>This will generate a new self signed certificate valid for 10 years for SAML 2 SSO.</p>
    <form appFormSubmit (ngSubmit)="generateCertificate()" [formGroup]="certificateForm" layoutDirection="column">
      <mat-form-field>
        <mat-label i18n>Organization name</mat-label>
        <input matInput type="text" formControlName="organization_name" required>
        <mat-error>{{backendErrors['organization_name'] | errorFormatter }}</mat-error>
      </mat-form-field>
      <mat-form-field>
        <mat-label i18n>Common name</mat-label>
        <input matInput type="text" formControlName="common_name">
        <mat-error>{{backendErrors['common_name'] | fieldRequired }}</mat-error>
      </mat-form-field>
      <mat-form-field>
        <mat-label i18n>Email address</mat-label>
        <input matInput type="text" formControlName="email_address">
        <mat-error>{{backendErrors['email_address'] | fieldRequired }}</mat-error>
      </mat-form-field>
    </form>
  </ng-template>
</app-common-dialog>
