blob: 122caad1ae596628175b71dd518b1b85ebe69208 [file] [log] [blame]
<div class="table__row-value row column">
<div class="certificate__type-cell bold">
{{getCertificateName(cert.Description)}}
</div>
<div class="certificate__title-inline">
Issued by:
</div>
<div class="certificate__issue-cell">
{{cert.Issuer.CommonName}}
</div>
<div class="certificate__title-inline">
Issued to:
</div>
<div class="certificate__issue-cell">
{{cert.Subject.CommonName}}
</div>
<div class="certificate__title-inline">
Valid from:
</div>
<div class="certificate__date-cell">
{{cert.ValidNotBefore | date:medium}}
</div>
<div class="certificate__title-inline">
Valid until:
</div>
<div class="certificate__status-cell">
<span class="inline"
ng-class="{'icon__warning' : cert.isExpiring , 'icon__critical' : cert.isExpired}"
ng-if="cert.isExpired || cert.isExpiring"></span>
</div>
<div class="certificate__date-cell">
{{cert.ValidNotAfter | date:medium}}
</div>
<div class="certificate__buttons-cell">
<button type="button" ng-click="cert.upload = true" aria-label="Replace certificate"
class="btn btn-tertiary certificate__button">
<icon file="icon-replace.svg" aria-hidden="true"></icon>
</button>
</div>
<div ng-show="cert.upload === true" class="upload__certificate">
<div class="certificate__upload-chooser row">
<div class="small-1 column">
<button
type="button"
ng-click="cert.upload=false"
aria-label="close replace certificate upload form">
<icon file="icon-close.svg" aria-hidden="true"></icon>
</button>
</div>
<!-- TODO: Fix file upload accessibility -->
<div class="small-2 column">
<label for="upload_{{cert.Description + cert.Id}}">
<input
name="upload_{{cert.Description + cert.Id}}"
id="upload_{{cert.Description + cert.Id}}"
type="file"
file="cert.file"
class="hide" />
<span class="btn btn-secondary">Choose file</span>
</label>
</div>
<div class="small-6 column">
<span ng-if="!cert.file">No file selected</span>
<span>{{cert.file.name}}</span>
<button
type="reset"
ng-if="cert.file.name"
ng-click="cert.file = '';"
aria-label="remove selected file">
<icon file="icon-close.svg" aria-hidden="true"></icon>
</button>
</div>
<div class="small-3 column">
<button type="submit" ng-class="{disabled:!cert.file}" class="btn btn-primary"
ng-click="replaceCertificate(cert)">
Replace
</button>
</div>
</div>
</div>
</div>