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