blob: a46de69f3938618f32f500ca145aa74340e0ad7c [file] [log] [blame]
<div class="table__row-value row column">
<div class="certificate__type-cell bold">
{{cert.Description}}
</div>
<div class="certificate__title-inline">
Valid from:
</div>
<div class="certificate__date-cell">
{{cert.ValidNotBefore | localeDate}}
</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 | localeDate}}
</div>
<div class="certificate__buttons-cell">
<button type="button" class="btn btn-tertiary certificate__button">
<icon file="icon-replace.svg" ng-click="cert.upload = true"
aria-label="Replace certificate"></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">
<icon file="icon-close.svg" ng-click="cert.upload=false"></icon>
</button>
</div>
<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="button" ng-if="cert.file.name" ng-click="cert.file = '';">
<icon file="icon-close.svg"></icon>
</button>
</div>
<div class="small-3 column">
<button type="button" ng-class="{disabled:!cert.file}"
class="btn btn-primary"
ng-click="replaceCertificate(cert)">Replace</button>
</div>
</div>
</div>
</div>