]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
document template parameters and correct form action
authorChristian Weiske <cweiske@cweiske.de>
Wed, 11 May 2011 04:48:40 +0000 (06:48 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 11 May 2011 04:48:40 +0000 (06:48 +0200)
data/templates/editprofile-sslclientcerts.tpl.php

index 246fb733773c14f6dc569a187970871282bcc2bb..900c19351b416391387e6562eb9c311c11d60e7b 100644 (file)
@@ -1,3 +1,13 @@
+<?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>
@@ -14,7 +24,8 @@
  <?php foreach($sslClientCerts as $cert) { ?>
   <tr <?php if ($cert->isCurrent()) { echo 'class="ssl-current"'; } ?>>
    <td>
-    <form method="post" action="#FIXME">
+    <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>
@@ -37,7 +48,7 @@
   <p><?php echo T_('Your current certificate is already registered with your account.'); ?></p>
  <?php } else { ?>
   <p>
-   <form method="post" action="#FIXME">
+   <form method="post" action="<?php echo $formaction; ?>">
     <button type="submit" name="action" value="registerCurrentCert">
      <?php echo T_('Register current certificate to automatically login.'); ?>
     </button>