<clr-modal [(clrModalOpen)]="modalOpened">
  <h3 class="modal-title">{{title}}</h3>
  <div class="modal-body">
    <form #ngForm="ngForm">
      <section class="form-block">
        <div class="form-group" style="padding-left: 135px;">
          <label for="name" class="clr-col-md-3 form-group-label-override required">{{'TITLE.NAME' | translate}}</label>
          <label for="name"
                 aria-haspopup="true"
                 role="tooltip"
                 [class.invalid]="!isNameValid"
                 class="tooltip tooltip-validation tooltip-md tooltip-bottom-left form-control">
            <label *ngIf="app && actionType==0 && nameGenerateRuleConfig=='join'">{{app.name}}-</label>
            <input type="text" id="name" [(ngModel)]="pvc.name"
                   name="name"
                   required
                   [placeholder]="'PLACEHOLDER.ENGLISH_NAME' | translate"
                   [readonly]="actionType==1"
                   maxlength="64"
                   pattern="[a-z]([-a-z0-9]*[a-z0-9])?"
                   (keyup)='handleValidation()'>
            <span class="tooltip-content">
              {{'RULE.REGEXT' | translate}}[a-z]([-a-z0-9]*[a-z0-9])?
            </span>
          </label>
          <span class="spinner spinner-inline" [hidden]="!checkOnGoing"></span>
        </div>
        <div class="form-group" style="padding-left: 135px;">
          <label for="description"
                 class="clr-col-md-3 form-group-label-override">{{'TITLE.DESCRIPTION' | translate}}</label>
          <textarea id="description" [(ngModel)]="pvc.description"
                    name="description"
                    rows="3">
          </textarea>
        </div>
      </section>
    </form>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-outline" (click)="onCancel()">{{'BUTTON.CANCEL' | translate}}</button>
    <button type="button" class="btn btn-primary" [disabled]="!isValid"
            (click)="onSubmit()">{{'BUTTON.SUBMIT' | translate}}</button>
  </div>
</clr-modal>
