1*c15f66b0SDixsie Wolmers<!-- TODO: Replace table with resusable table component -->
2*c15f66b0SDixsie Wolmers<div class="table__row-value row">
3309b5da3Sbeccabroek  <div class="certificate__type-cell bold">
4dbafdc5fSYoshie Muranaka    {{getCertificateName(cert.Description)}}
5309b5da3Sbeccabroek  </div>
6309b5da3Sbeccabroek  <div class="certificate__title-inline">
7c81cdd4aSZbigniew Kurzynski    Issued by:
8c81cdd4aSZbigniew Kurzynski  </div>
9c81cdd4aSZbigniew Kurzynski  <div class="certificate__issue-cell">
10c81cdd4aSZbigniew Kurzynski    {{cert.Issuer.CommonName}}
11c81cdd4aSZbigniew Kurzynski  </div>
12c81cdd4aSZbigniew Kurzynski  <div class="certificate__title-inline">
13c81cdd4aSZbigniew Kurzynski    Issued to:
14c81cdd4aSZbigniew Kurzynski  </div>
15c81cdd4aSZbigniew Kurzynski  <div class="certificate__issue-cell">
16c81cdd4aSZbigniew Kurzynski    {{cert.Subject.CommonName}}
17c81cdd4aSZbigniew Kurzynski  </div>
18c81cdd4aSZbigniew Kurzynski  <div class="certificate__title-inline">
19309b5da3Sbeccabroek    Valid from:
20309b5da3Sbeccabroek  </div>
21309b5da3Sbeccabroek  <div class="certificate__date-cell">
22c81cdd4aSZbigniew Kurzynski    {{cert.ValidNotBefore | date:medium}}
23309b5da3Sbeccabroek  </div>
24309b5da3Sbeccabroek  <div class="certificate__title-inline">
25309b5da3Sbeccabroek    Valid until:
26309b5da3Sbeccabroek  </div>
27309b5da3Sbeccabroek  <div class="certificate__status-cell">
281a2bd74dSDixsie Wolmers    <icon file="icon-critical.svg"
291a2bd74dSDixsie Wolmers      aria-label="certificate has expired"
301a2bd74dSDixsie Wolmers      class="certificate__status-icon"
311a2bd74dSDixsie Wolmers      ng-if="cert.isExpired">
321a2bd74dSDixsie Wolmers    </icon>
331a2bd74dSDixsie Wolmers    <icon file="icon-warning.svg"
341a2bd74dSDixsie Wolmers      aria-label="certificate will expire soon"
351a2bd74dSDixsie Wolmers      class="certificate__status-icon"
361a2bd74dSDixsie Wolmers      ng-if="cert.isExpiring">
371a2bd74dSDixsie Wolmers    </icon>
38309b5da3Sbeccabroek  </div>
39309b5da3Sbeccabroek  <div class="certificate__date-cell">
40c81cdd4aSZbigniew Kurzynski    {{cert.ValidNotAfter | date:medium}}
41309b5da3Sbeccabroek  </div>
42309b5da3Sbeccabroek  <div class="certificate__buttons-cell">
43*c15f66b0SDixsie Wolmers    <button
44*c15f66b0SDixsie Wolmers      type="button"
45*c15f66b0SDixsie Wolmers      ng-click="cert.upload = true"
46*c15f66b0SDixsie Wolmers      aria-label="Replace certificate"
47*c15f66b0SDixsie Wolmers      class="btn  btn-tertiary certificate__button">
480c1e09e6SDixsie Wolmers      <icon file="icon-replace.svg" aria-hidden="true"></icon>
49309b5da3Sbeccabroek    </button>
50309b5da3Sbeccabroek  </div>
51309b5da3Sbeccabroek  <div ng-show="cert.upload === true" class="upload__certificate">
52*c15f66b0SDixsie Wolmers    <div class="close-btn">
53*c15f66b0SDixsie Wolmers      <button
54*c15f66b0SDixsie Wolmers        type="button"
55*c15f66b0SDixsie Wolmers        ng-click="cert.upload=false"
56*c15f66b0SDixsie Wolmers        aria-label="close replace certificate upload form">
570c1e09e6SDixsie Wolmers        <icon file="icon-close.svg" aria-hidden="true"></icon>
58309b5da3Sbeccabroek      </button>
59309b5da3Sbeccabroek    </div>
60*c15f66b0SDixsie Wolmers    <div class="file-upload">
61*c15f66b0SDixsie Wolmers      <label
62*c15f66b0SDixsie Wolmers        for="upload_{{ cert.Description + cert.Id }}"
63*c15f66b0SDixsie Wolmers        class="file-upload-btn btn btn-secondary"
64*c15f66b0SDixsie Wolmers        tabindex="0">Choose file</label>
65*c15f66b0SDixsie Wolmers      <input
66*c15f66b0SDixsie Wolmers        name="upload_{{ cert.Description + cert.Id }}"
67*c15f66b0SDixsie Wolmers        id="upload_{{ cert.Description + cert.Id }}"
68*c15f66b0SDixsie Wolmers        type="file"
69*c15f66b0SDixsie Wolmers        file="cert.file"
70*c15f66b0SDixsie Wolmers        class="file-upload-input"/>
71309b5da3Sbeccabroek    </div>
72*c15f66b0SDixsie Wolmers    <div class="file-upload-container file-upload-field">
73309b5da3Sbeccabroek      <span ng-if="!cert.file">No file selected</span>
74309b5da3Sbeccabroek      <span>{{ cert.file.name }}</span>
75*c15f66b0SDixsie Wolmers      <button
76*c15f66b0SDixsie Wolmers        type="reset"
77*c15f66b0SDixsie Wolmers        class="btn file-upload-reset"
78*c15f66b0SDixsie Wolmers        ng-if="cert.file.name"
79*c15f66b0SDixsie Wolmers        ng-click="cert.file = '';"
80*c15f66b0SDixsie Wolmers        aria-label="remove selected file">
810c1e09e6SDixsie Wolmers        <icon file="icon-close.svg" aria-hidden="true"></icon>
82309b5da3Sbeccabroek      </button>
83309b5da3Sbeccabroek    </div>
84*c15f66b0SDixsie Wolmers    <div class="replace-btn">
85*c15f66b0SDixsie Wolmers      <button
86*c15f66b0SDixsie Wolmers        type="submit"
87*c15f66b0SDixsie Wolmers        ng-disabled="!cert.file"
88*c15f66b0SDixsie Wolmers        class="btn btn-primary"
89*c15f66b0SDixsie Wolmers        ng-click="replaceCertificate(cert)">
900c1e09e6SDixsie Wolmers        Replace
910c1e09e6SDixsie Wolmers      </button>
92309b5da3Sbeccabroek    </div>
93309b5da3Sbeccabroek  </div>
94309b5da3Sbeccabroek</div>
95