certificates.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <div class="section">
  2. <h2 data-anchor-name="ssl-root-certificate"><?php p($l->t('SSL Root Certificates')); ?></h2>
  3. <table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>">
  4. <thead>
  5. <tr>
  6. <th><?php p($l->t('Common Name')); ?></th>
  7. <th><?php p($l->t('Valid until')); ?></th>
  8. <th><?php p($l->t('Issued By')); ?></th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. <?php foreach ($_['certs'] as $rootCert): /**@var \OCP\ICertificate $rootCert */ ?>
  13. <tr class="<?php echo $rootCert->isExpired() ? 'expired' : 'valid' ?>"
  14. data-name="<?php p($rootCert->getName()) ?>">
  15. <td class="rootCert"
  16. title="<?php p($rootCert->getOrganization()) ?>">
  17. <?php p($rootCert->getCommonName()) ?>
  18. </td>
  19. <td title="<?php p($l->t('Valid until %s', $l->l('date', $rootCert->getExpireDate()))) ?>">
  20. <?php echo $l->l('date', $rootCert->getExpireDate()) ?>
  21. </td>
  22. <td title="<?php p($rootCert->getIssuerOrganization()) ?>">
  23. <?php p($rootCert->getIssuerName()) ?>
  24. </td>
  25. <td <?php if ($rootCert != ''): ?>class="remove"
  26. <?php else: ?>style="visibility:hidden;"
  27. <?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
  28. title="<?php p($l->t('Delete')); ?>"
  29. class="action"
  30. src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
  31. </td>
  32. </tr>
  33. <?php endforeach; ?>
  34. </tbody>
  35. </table>
  36. <form class="uploadButton" method="post"
  37. action="<?php p($_['urlGenerator']->linkToRoute($_['uploadRoute'])); ?>"
  38. target="certUploadFrame">
  39. <label for="rootcert_import" class="inlineblock button"
  40. id="rootcert_import_button"><?php p($l->t('Import root certificate')); ?></label>
  41. <input type="file" id="rootcert_import" name="rootcert_import"
  42. class="hiddenuploadfield">
  43. </form>
  44. </div>