blob: 208bf1b85aed2b1911f73c888af59ad4ce25bcae (
plain)
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
|
<div class="uib-modal__content">
<div class="modal-header">
<h2 class="modal-title" id="modal_label">
Add new certificate
</h2>
<button
type="button"
class="btn btn--close"
ng-click="$dismiss()"
aria-label="close">
<icon file="icon-close.svg" aria-hidden="true"></icon>
</button>
</div>
<form
name="addCertForm"
id="addCertForm"
ng-class="{'submitted': submitted}">
<div class="modal-body">
<div class="form__field">
<label class="content-label" for="certType">Certificate type</label>
<select
class="cert-dropdown"
id="certType"
name="certType"
ng-model="newCertificate.selectedType"
required>
<option class="courier-bold" ng-value="">Select an option</option>
<option
class="courier-bold"
ng-value="type"
ng-repeat="type in availableCertificateTypes">
{{ type.name }}
</option>
</select>
<div
ng-messages="addCertForm.certType.$error"
class="form-error"
ng-class="{'visible' : addCertForm.certType.$touched || submitted }">
<p ng-message="required">Field is required</p>
</div>
</div>
<div class="content-label form__field">Certificate file</div>
<div class="file-upload">
<label
for="upload_cert_new"
class="file-upload-btn btn btn-secondary"
tabindex="0">
Choose file
</label>
<input
name="uploadCertNew"
id="upload_cert_new"
type="file"
file="newCertificate.file"
class="file-upload-input"/>
<div class="form__field file-upload-container">
<span ng-hide="newCertificate.file">No file selected</span>
<span>{{ newCertificate.file.name }}</span>
<button
type="reset"
class="btn file-upload-reset"
ng-if="newCertificate.file.name"
ng-click="newCertificate.file = '';"
aria-label="remove selected file">
<icon file="icon-close.svg" aria-hidden="true"></icon>
</button>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
ng-click="$dismiss(); addCertForm.$setUntouched();">
Cancel
</button>
<button
type="submit"
class="btn btn-primary"
ng-click="submitted = true; uploadCertificate(); $dismiss()"
ng-disabled="addCertForm.$invalid || !newCertificate.file">
Save
</button>
</div>
</form>
</div>
|