1<div class="uib-modal__content  modal__local-users-settings">
2  <div class="modal-header">
3    <h2 class="modal-title" id="dialog_label">Account policy settings</h2>
4    <button type="button" class="btn  btn--close  float-right" ng-click="$dismiss()" aria-label="Close">
5      <icon file="icon-close.svg" aria-hidden="true"></icon>
6    </button>
7  </div>
8  <form name="form">
9    <div class="modal-body">
10      <div class="row">
11        <div class="column medium-6">
12            <!-- Max login attempts -->
13            <div class="field-group-container">
14              <label for="maxLogin">Max failed login attempts</label>
15              <p class="label__helper-text">Value must be between <span class="nowrap">0 – 65535</span></p>
16              <input id="maxLogin"
17                     name="maxLogin"
18                     type="number"
19                     required
20                     min="0"
21                     max="65535"
22                     ng-model="modalCtrl.settings.maxLogin" />
23              <div ng-if="form.maxLogin.$invalid && form.maxLogin.$dirty" class="form__validation-message">
24                <span ng-show="form.maxLogin.$error.required">
25                  Field is required</span>
26                <span ng-show="form.maxLogin.$error.min || form.maxLogin.$error.max">
27                  Value must be between <span class="nowrap">1 - 65535</span></span>
28              </div>
29            </div>
30        </div>
31        <div class="column medium-6">
32          <!-- User unlock method -->
33          <fieldset class="field-group-container">
34            <legend>User unlock method</legend>
35            <!-- Automatic radio option -->
36            <label class="radio-label">
37              <input name="lockoutMethod"
38                     type="radio"
39                     ng-value="1"
40                     ng-model="modalCtrl.settings.lockoutMethod">
41              Automatic after timeout
42            </label>
43            <!-- Automatic timeout value -->
44            <div class="field-group-container  radio-option__input-field-group">
45              <label for="lockoutMethod1">Timeout duration (seconds)</label>
46              <p class="label__helper-text" id="lockoutMethod1Helper">Must be at least 1</p>
47              <input id="lockoutMethod1"
48                     name="timeoutDuration"
49                     type="number"
50                     aria-describedby="lockoutMethod1Helper"
51                     ng-min="modalCtrl.settings.lockoutMethod ? 1 : null"
52                     ng-disabled="!modalCtrl.settings.lockoutMethod"
53                     ng-required="modalCtrl.settings.lockoutMethod"
54                     ng-model="modalCtrl.settings.timeoutDuration"/>
55              <div ng-if="form.timeoutDuration.$invalid && form.timeoutDuration.$touched" class="form__validation-message">
56                <span ng-show="form.timeoutDuration.$error.required">
57                  Field is required</span>
58                <span ng-show="form.timeoutDuration.$error.min">
59                  Value must be at least 1</span>
60              </div>
61            </div>
62            <!-- Manual radio option -->
63            <label class="radio-label">
64              <input name="lockoutMethod"
65                     type="radio"
66                     ng-value="0"
67                     ng-model="modalCtrl.settings.lockoutMethod">
68              Manual
69            </label>
70          </fieldset>
71        </div>
72      </div>
73    </div>
74    <div class="modal-footer">
75      <button class="btn btn-secondary" ng-click="$dismiss()" type="button">Cancel</button>
76      <button class="btn btn-primary"
77              type="submit"
78              ng-click="$close(form)"
79              ng-disabled="form.$invalid || form.$pristine"
80              ng-class="{'disabled': form.$invalid}">
81        Save
82      </button>
83    </div>
84  </form>
85</div>
86