1*c15f66b0SDixsie Wolmers<div class="uib-modal__content">
2*c15f66b0SDixsie Wolmers  <div class="modal-header">
3*c15f66b0SDixsie Wolmers    <h2 class="modal-title" id="modal_label">
4*c15f66b0SDixsie Wolmers      Add new certificate
5*c15f66b0SDixsie Wolmers    </h2>
6*c15f66b0SDixsie Wolmers    <button
7*c15f66b0SDixsie Wolmers      type="button"
8*c15f66b0SDixsie Wolmers      class="btn  btn--close"
9*c15f66b0SDixsie Wolmers      ng-click="$dismiss()"
10*c15f66b0SDixsie Wolmers      aria-label="close">
11*c15f66b0SDixsie Wolmers      <icon file="icon-close.svg" aria-hidden="true"></icon>
12*c15f66b0SDixsie Wolmers    </button>
13*c15f66b0SDixsie Wolmers  </div>
14*c15f66b0SDixsie Wolmers  <form
15*c15f66b0SDixsie Wolmers    name="addCertForm"
16*c15f66b0SDixsie Wolmers    id="addCertForm"
17*c15f66b0SDixsie Wolmers    ng-class="{'submitted': submitted}">
18*c15f66b0SDixsie Wolmers    <div class="modal-body">
19*c15f66b0SDixsie Wolmers      <div class="form__field">
20*c15f66b0SDixsie Wolmers        <label class="content-label" for="certType">Certificate type</label>
21*c15f66b0SDixsie Wolmers        <select
22*c15f66b0SDixsie Wolmers          class="cert-dropdown"
23*c15f66b0SDixsie Wolmers          id="certType"
24*c15f66b0SDixsie Wolmers          name="certType"
25*c15f66b0SDixsie Wolmers          ng-model="newCertificate.selectedType"
26*c15f66b0SDixsie Wolmers          required>
27*c15f66b0SDixsie Wolmers          <option class="courier-bold" ng-value="">Select an option</option>
28*c15f66b0SDixsie Wolmers          <option
29*c15f66b0SDixsie Wolmers            class="courier-bold"
30*c15f66b0SDixsie Wolmers            ng-value="type"
31*c15f66b0SDixsie Wolmers            ng-repeat="type in availableCertificateTypes">
32*c15f66b0SDixsie Wolmers            {{ type.name }}
33*c15f66b0SDixsie Wolmers          </option>
34*c15f66b0SDixsie Wolmers        </select>
35*c15f66b0SDixsie Wolmers        <div
36*c15f66b0SDixsie Wolmers          ng-messages="addCertForm.certType.$error"
37*c15f66b0SDixsie Wolmers          class="form-error"
38*c15f66b0SDixsie Wolmers          ng-class="{'visible' : addCertForm.certType.$touched || submitted }">
39*c15f66b0SDixsie Wolmers          <p ng-message="required">Field is required</p>
40*c15f66b0SDixsie Wolmers        </div>
41*c15f66b0SDixsie Wolmers      </div>
42*c15f66b0SDixsie Wolmers      <div class="content-label form__field">Certificate file</div>
43*c15f66b0SDixsie Wolmers      <div class="file-upload">
44*c15f66b0SDixsie Wolmers        <label
45*c15f66b0SDixsie Wolmers          for="upload_cert_new"
46*c15f66b0SDixsie Wolmers          class="file-upload-btn btn btn-secondary"
47*c15f66b0SDixsie Wolmers          tabindex="0">
48*c15f66b0SDixsie Wolmers          Choose file
49*c15f66b0SDixsie Wolmers        </label>
50*c15f66b0SDixsie Wolmers        <input
51*c15f66b0SDixsie Wolmers          name="uploadCertNew"
52*c15f66b0SDixsie Wolmers          id="upload_cert_new"
53*c15f66b0SDixsie Wolmers          type="file"
54*c15f66b0SDixsie Wolmers          file="newCertificate.file"
55*c15f66b0SDixsie Wolmers          class="file-upload-input"/>
56*c15f66b0SDixsie Wolmers        <div class="form__field file-upload-container">
57*c15f66b0SDixsie Wolmers          <span ng-hide="newCertificate.file">No file selected</span>
58*c15f66b0SDixsie Wolmers          <span>{{ newCertificate.file.name }}</span>
59*c15f66b0SDixsie Wolmers          <button
60*c15f66b0SDixsie Wolmers            type="reset"
61*c15f66b0SDixsie Wolmers            class="btn file-upload-reset"
62*c15f66b0SDixsie Wolmers            ng-if="newCertificate.file.name"
63*c15f66b0SDixsie Wolmers            ng-click="newCertificate.file = '';"
64*c15f66b0SDixsie Wolmers            aria-label="remove selected file">
65*c15f66b0SDixsie Wolmers            <icon file="icon-close.svg" aria-hidden="true"></icon>
66*c15f66b0SDixsie Wolmers          </button>
67*c15f66b0SDixsie Wolmers        </div>
68*c15f66b0SDixsie Wolmers      </div>
69*c15f66b0SDixsie Wolmers    </div>
70*c15f66b0SDixsie Wolmers    <div class="modal-footer">
71*c15f66b0SDixsie Wolmers      <button
72*c15f66b0SDixsie Wolmers        type="button"
73*c15f66b0SDixsie Wolmers        class="btn btn-secondary"
74*c15f66b0SDixsie Wolmers        ng-click="$dismiss(); addCertForm.$setUntouched();">
75*c15f66b0SDixsie Wolmers        Cancel
76*c15f66b0SDixsie Wolmers      </button>
77*c15f66b0SDixsie Wolmers      <button
78*c15f66b0SDixsie Wolmers        type="submit"
79*c15f66b0SDixsie Wolmers        class="btn btn-primary"
80*c15f66b0SDixsie Wolmers        ng-click="submitted = true; uploadCertificate(); $dismiss()"
81*c15f66b0SDixsie Wolmers        ng-disabled="addCertForm.$invalid || !newCertificate.file">
82*c15f66b0SDixsie Wolmers        Save
83*c15f66b0SDixsie Wolmers      </button>
84*c15f66b0SDixsie Wolmers    </div>
85*c15f66b0SDixsie Wolmers  </form>
86*c15f66b0SDixsie Wolmers</div>
87