All files / src/app/ceph/block/iscsi-target-discovery-modal iscsi-target-discovery-modal.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 1444x                                                                                                                                                                                                                                                                                              
<cd-modal [modalRef]="bsModalRef">
  <ng-container class="modal-title"
                i18n>Discovery Authentication</ng-container>
 
  <ng-container class="modal-content">
    <form name="discoveryForm"
          class="form-horizontal"
          #formDir="ngForm"
          [formGroup]="discoveryForm"
          novalidate>
      <div class="modal-body">
        <!-- User -->
        <div class="form-group"
             [ngClass]="{'has-error': discoveryForm.showError('user', formDir)}">
          <label class="control-label col-sm-4"
                 for="user"
                 i18n>User</label>
          <div class="col-sm-8">
            <input id="user"
                   class="form-control"
                   formControlName="user"
                   type="text">
            <span class="help-block"
                  *ngIf="discoveryForm.showError('user', formDir, 'required')"
                  i18n>This field is required.</span>
 
            <span class="help-block"
                  *ngIf="discoveryForm.showError('user', formDir, 'pattern')"
                  i18n>Usernames must have a length of 8 to 64 characters and
              can only contain letters, '.', '@', '-', '_' or ':'.</span>
          </div>
        </div>
 
        <!-- Password -->
        <div class="form-group"
             [ngClass]="{'has-error': discoveryForm.showError('password', formDir)}">
          <label class="control-label col-sm-4"
                 for="password"
                 i18n>Password</label>
          <div class="col-sm-8">
            <div class="input-group">
              <input id="password"
                     class="form-control"
                     formControlName="password"
                     type="password">
 
              <span class="input-group-btn">
                <button type="button"
                        class="btn btn-default"
                        cdPasswordButton="password">
                </button>
                <button type="button"
                        class="btn btn-default"
                        cdCopy2ClipboardButton="password">
                </button>
              </span>
            </div>
            <span class="help-block"
                  *ngIf="discoveryForm.showError('password', formDir, 'required')"
                  i18n>This field is required.</span>
 
            <span class="help-block"
                  *ngIf="discoveryForm.showError('password', formDir, 'pattern')"
                  i18n>Passwords must have a length of 12 to 16 characters
              and can only contain letters, '@', '-', '_' or '/'.</span>
          </div>
        </div>
 
        <!-- mutual_user -->
        <div class="form-group"
             [ngClass]="{'has-error': discoveryForm.showError('mutual_user', formDir)}">
          <label class="control-label col-sm-4"
                 for="mutual_user">
            <ng-container i18n>Mutual User</ng-container>
          </label>
          <div class="col-sm-8">
            <input id="mutual_user"
                   class="form-control"
                   formControlName="mutual_user"
                   type="text">
 
            <span class="help-block"
                  *ngIf="discoveryForm.showError('mutual_user', formDir, 'required')"
                  i18n>This field is required.</span>
 
            <span class="help-block"
                  *ngIf="discoveryForm.showError('mutual_user', formDir, 'pattern')"
                  i18n>Usernames must have a length of 8 to 64 characters and
              can only contain letters, '.', '@', '-', '_' or ':'.</span>
          </div>
        </div>
 
        <!-- mutual_password -->
        <div class="form-group"
             [ngClass]="{'has-error': discoveryForm.showError('mutual_password', formDir)}">
          <label class="control-label col-sm-4"
                 for="mutual_password"
                 i18n>Mutual Password</label>
          <div class="col-sm-8">
            <div class="input-group">
              <input id="mutual_password"
                     class="form-control"
                     formControlName="mutual_password"
                     type="password">
 
              <span class="input-group-btn">
                <button type="button"
                        class="btn btn-default"
                        cdPasswordButton="mutual_password">
                </button>
                <button type="button"
                        class="btn btn-default"
                        cdCopy2ClipboardButton="mutual_password">
                </button>
              </span>
            </div>
            <span class="help-block"
                  *ngIf="discoveryForm.showError('mutual_password', formDir, 'required')"
                  i18n>This field is required.</span>
 
            <span class="help-block"
                  *ngIf="discoveryForm.showError('mutual_password', formDir, 'pattern')"
                  i18n>Passwords must have a length of 12 to 16 characters and
              can only contain letters, '@', '-', '_' or '/'.</span>
          </div>
        </div>
      </div>
 
      <div class="modal-footer">
        <div class="button-group text-right">
          <cd-submit-button (submitAction)="submitAction()"
                            [form]="discoveryForm"
                            *ngIf="hasPermission"
                            i18n>Submit</cd-submit-button>
          <cd-back-button [back]="bsModalRef.hide"
                          name="Cancel"
                          i18n-name>
          </cd-back-button>
        </div>
      </div>
    </form>
  </ng-container>
</cd-modal>