summaryrefslogtreecommitdiff
path: root/data/templates/default/editprofile-sslclientcerts.tpl.php
diff options
context:
space:
mode:
authorMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:38:07 -0400
committerMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:38:07 -0400
commitb628e63e015bc3b2eadc712feaa6c4d05cf75bbd (patch)
treeebdcec5c8133a3b6f86d06dc3f6fb3de46609f04 /data/templates/default/editprofile-sslclientcerts.tpl.php
parent84e603aa91a303a1419962ff3ff6086710a7b1a9 (diff)
parent4c8a53c5bc632302aaf8978e711eb53a03166db5 (diff)
downloadsemanticscuttle-b628e63e015bc3b2eadc712feaa6c4d05cf75bbd.tar.gz
semanticscuttle-b628e63e015bc3b2eadc712feaa6c4d05cf75bbd.tar.bz2
Merge branch 'master' into privatekey2
Conflicts: data/templates/default/bookmarks.tpl.php
Diffstat (limited to 'data/templates/default/editprofile-sslclientcerts.tpl.php')
-rw-r--r--data/templates/default/editprofile-sslclientcerts.tpl.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/data/templates/default/editprofile-sslclientcerts.tpl.php b/data/templates/default/editprofile-sslclientcerts.tpl.php
new file mode 100644
index 0000000..900c193
--- /dev/null
+++ b/data/templates/default/editprofile-sslclientcerts.tpl.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * User's own profile page: SSL client certificate settings
+ *
+ * @param array $sslClientCerts Array of SSL client certificate objects
+ * @param string $formaction URL where to send the forms to
+ * @param SemanticScuttle_Model_User_SslClientCert
+ * $currentCert Current SSL client certificate (may be null)
+ */
+?>
+<h3><?php echo T_('SSL client certificates'); ?></h3>
+<?php if (count($sslClientCerts)) { ?>
+<table>
+ <thead>
+ <tr>
+ <th>Options</th>
+ <th><?php echo T_('Serial'); ?></th>
+ <th><?php echo T_('Name'); ?></th>
+ <th><?php echo T_('Email'); ?></th>
+ <th><?php echo T_('Issuer'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach($sslClientCerts as $cert) { ?>
+ <tr <?php if ($cert->isCurrent()) { echo 'class="ssl-current"'; } ?>>
+ <td>
+ <form method="post" action="<?php echo $formaction; ?>">
+ <input type="hidden" name="certId" value="<?php echo $cert->id; ?>"/>
+ <button type="submit" name="action" value="deleteClientCert">
+ <?php echo T_('delete'); ?>
+ </button>
+ </form>
+ </td>
+ <td><?php echo htmlspecialchars($cert->sslSerial); ?></td>
+ <td><?php echo htmlspecialchars($cert->sslName); ?></td>
+ <td><?php echo htmlspecialchars($cert->sslEmail); ?></td>
+ <td><?php echo htmlspecialchars($cert->sslClientIssuerDn); ?></td>
+ </tr>
+ <?php } ?>
+ </tbody>
+</table>
+<?php } else { ?>
+ <p><?php echo T_('No certificates registered'); ?></p>
+<?php } ?>
+
+<?php if ($currentCert) { ?>
+ <?php if ($currentCert->isRegistered($sslClientCerts)) { ?>
+ <p><?php echo T_('Your current certificate is already registered with your account.'); ?></p>
+ <?php } else { ?>
+ <p>
+ <form method="post" action="<?php echo $formaction; ?>">
+ <button type="submit" name="action" value="registerCurrentCert">
+ <?php echo T_('Register current certificate to automatically login.'); ?>
+ </button>
+ </form>
+ </p>
+ <?php } ?>
+<?php } else { ?>
+ <p><?php echo T_('Your browser does not provide a certificate.'); ?></p>
+<?php } ?>