1<loader loading="loading"></loader>
2<div id="configuration-date-time">
3  <h1>Date and time settings</h1>
4  <div class="column small-12 page-header">
5    <h2>Set date and time manually or configure a Network Time Protocol (NTP) Server</h2>
6  </div>
7  <form class="time__form" role="form" action="">
8    <fieldset>
9      <div class="column large-8">
10        <div class="row column">
11          <label class="control-radio" for="ntp-time">Obtain Automatically from a Network Time Protocol (NTP) Server
12            <input type="radio" id="ntp-time" ng-model="time.mode" value="NTP">
13            <span class="control__indicator control__indicator-on"></span>
14          </label>
15        </div>
16        <div class="row column date-time__ntp-servers-wrap">
17          <fieldset class="date-time__ntp-servers" ng-repeat="server in ntp.servers track by $index">
18            <label for="ntp-server{{$index+1}}">NTP Server Address {{$index+1}} <span ng-if="$first">(Primary)</span></label>
19            <div class="inline">
20              <input id="ntp-server{{$index+1}}" type="text" ng-readonly="time.mode != 'NTP'" ng-model="server" ng-blur="ntp.servers[$index] = server" set-focus-on-new-input/>
21            </div>
22            <button class="date-time__dns-remove inline" ng-click="removeNTPField($index)">Remove</button>
23          </fieldset>
24        </div>
25        <div class="row column date-time__ntp-servers-wrap">
26          <button type="button" class="btn-primary block" ng-click="addNTPField()">Add new NTP server</button>
27        </div>
28        <div class="row column">
29          <label class="control-radio" for="manual-time">Manually set date and time
30            <input type="radio" id="manual-time" ng-model="time.mode" value="Manual"/>
31            <span class="control__indicator control__indicator-on"></span>
32          </label>
33        </div>
34        <ul class="date-time__metadata-wrapper">
35          <li class="date-time__metadata-block">
36            <p class="content-label">BMC <span ng-if="time.owner != 'Split'">and Host</span> Time</p>
37            <div class="inline">
38              <input type="date" ng-model="bmc.date" ng-readonly="time.mode == 'NTP'" min="2018-01-01" max="2099-12-31"/>
39              <input type="time" ng-model="bmc.date" ng-readonly="time.mode == 'NTP'" />
40              <p class="courier-bold">{{bmc.timezone}}</p>
41            </div>
42          </li>
43          <li class="date-time__metadata-block" ng-if="time.owner == 'Split'">
44            <p class="content-label">Host Time</p>
45            <div class="inline">
46              <!--- Ideally, would just use one input, datetime-local, but datetime-local is not supported on Firefox.--->
47              <input type="date" ng-model="host.date" min="2018-01-01" max="2099-12-31"/>
48              <input type="time" ng-model="host.date"/>
49              <p class="courier-bold">{{host.timezone}}</p>
50            </div>
51          </li>
52          <li class="date-time__metadata-block">
53          <label class="content-label">Time Owner</label>
54          <select ng-model="time.owner" class="date-time__owner-dropdown">
55            <option class="courier-bold" ng-repeat="owner in timeOwners">{{owner}}</option>
56          </select>
57          </li>
58        </ul>
59      </div>
60    </fieldset>
61    <div class="time__submit-wrapper">
62      <button type="button" class="btn-primary inline" ng-click="setTime()">Save settings</button>
63      <button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
64    </div>
65  </form>
66</div>
67