<clr-modal [(clrModalOpen)]="modalOpened" [clrModalSize]="'lg'" #modal>
  <h3 class="modal-title">{{title}}
    <wayne-modal-operate [modal]="modal" *ngIf="modalOpened"></wayne-modal-operate>
  </h3>
  <div class="modal-body">
    <form #ngForm="ngForm">

      <section class="form-block">
        <div class="form-group" style="padding-left: 135px;">
          <label for="statefulset_app_id" class="clr-col-md-3 form-group-label-override required">状态副本集</label>
          <div class="select form-control">
            <select id="statefulset_app_id" [(ngModel)]="statefulsetTpl.statefulsetId" [disabled]="actionType==1"
                    name="statefulset_app_id">
              <!--这是一个坑，如果使用value获取到的是string，使用ngValue获取到的是model本身类型-->
              <option *ngFor="let statefulset of statefulsets" [ngValue]="statefulset.id"
                      [selected]="statefulset.id === statefulsetTpl.statefulsetId">{{statefulset.name}}
              </option>
            </select>
          </div>
        </div>
        <div class="form-group" style="padding-left: 135px;">
          <label for="statefulset_description"
                 class="clr-col-md-3 form-group-label-override">{{'TITLE.DESCRIPTION' | translate}}</label>
          <textarea id="statefulset_description" [(ngModel)]="statefulsetTpl.description"
                    name="statefulset_description"
                    rows="3">
          </textarea>

        </div>
        <div class="form-group" style="padding-left: 135px;">
          <label for="statefulset_template" class="clr-col-md-3 form-group-label-override">模版</label>
          <wayne-ace-editor-box></wayne-ace-editor-box>
        </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>
