blob: 122caad1ae596628175b71dd518b1b85ebe69208 [file] [log] [blame]
beccabroek309b5da2018-11-07 12:22:31 -06001<div class="table__row-value row column">
2 <div class="certificate__type-cell bold">
Yoshie Muranakadbafdc52019-06-28 09:41:19 -05003 {{getCertificateName(cert.Description)}}
beccabroek309b5da2018-11-07 12:22:31 -06004 </div>
5 <div class="certificate__title-inline">
Zbigniew Kurzynskic81cdd42019-07-25 11:52:15 +02006 Issued by:
7 </div>
8 <div class="certificate__issue-cell">
9 {{cert.Issuer.CommonName}}
10 </div>
11 <div class="certificate__title-inline">
12 Issued to:
13 </div>
14 <div class="certificate__issue-cell">
15 {{cert.Subject.CommonName}}
16 </div>
17 <div class="certificate__title-inline">
beccabroek309b5da2018-11-07 12:22:31 -060018 Valid from:
19 </div>
20 <div class="certificate__date-cell">
Zbigniew Kurzynskic81cdd42019-07-25 11:52:15 +020021 {{cert.ValidNotBefore | date:medium}}
beccabroek309b5da2018-11-07 12:22:31 -060022 </div>
23 <div class="certificate__title-inline">
24 Valid until:
25 </div>
26 <div class="certificate__status-cell">
27 <span class="inline"
28 ng-class="{'icon__warning' : cert.isExpiring , 'icon__critical' : cert.isExpired}"
29 ng-if="cert.isExpired || cert.isExpiring"></span>
30 </div>
31 <div class="certificate__date-cell">
Zbigniew Kurzynskic81cdd42019-07-25 11:52:15 +020032 {{cert.ValidNotAfter | date:medium}}
beccabroek309b5da2018-11-07 12:22:31 -060033 </div>
34 <div class="certificate__buttons-cell">
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050035 <button type="button" ng-click="cert.upload = true" aria-label="Replace certificate"
36 class="btn btn-tertiary certificate__button">
37 <icon file="icon-replace.svg" aria-hidden="true"></icon>
beccabroek309b5da2018-11-07 12:22:31 -060038 </button>
39 </div>
40 <div ng-show="cert.upload === true" class="upload__certificate">
41 <div class="certificate__upload-chooser row">
42 <div class="small-1 column">
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050043 <button
44 type="button"
45 ng-click="cert.upload=false"
46 aria-label="close replace certificate upload form">
47 <icon file="icon-close.svg" aria-hidden="true"></icon>
beccabroek309b5da2018-11-07 12:22:31 -060048 </button>
49 </div>
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050050 <!-- TODO: Fix file upload accessibility -->
beccabroek309b5da2018-11-07 12:22:31 -060051 <div class="small-2 column">
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050052 <label for="upload_{{cert.Description + cert.Id}}">
53 <input
54 name="upload_{{cert.Description + cert.Id}}"
beccabroek309b5da2018-11-07 12:22:31 -060055 id="upload_{{cert.Description + cert.Id}}"
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050056 type="file"
57 file="cert.file"
58 class="hide" />
beccabroek309b5da2018-11-07 12:22:31 -060059 <span class="btn btn-secondary">Choose file</span>
60 </label>
61 </div>
62 <div class="small-6 column">
63 <span ng-if="!cert.file">No file selected</span>
64 <span>{{cert.file.name}}</span>
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050065 <button
66 type="reset"
67 ng-if="cert.file.name"
68 ng-click="cert.file = '';"
69 aria-label="remove selected file">
70 <icon file="icon-close.svg" aria-hidden="true"></icon>
beccabroek309b5da2018-11-07 12:22:31 -060071 </button>
72 </div>
73 <div class="small-3 column">
Dixsie Wolmers0c1e09e2019-08-26 11:16:10 -050074 <button type="submit" ng-class="{disabled:!cert.file}" class="btn btn-primary"
75 ng-click="replaceCertificate(cert)">
76 Replace
77 </button>
beccabroek309b5da2018-11-07 12:22:31 -060078 </div>
79 </div>
80 </div>
81</div>