Deleting tokens works (without confirmation)
[grauphel.git] / templates / tokens.php
index 770751637f9580824a9375aab9c1578358d2004b..48e5998a51f60bf80461fadb5ab0035956457d77 100644 (file)
@@ -11,7 +11,6 @@
      <th>Token</th>
      <th>Client</th>
      <th>Last use</th>
-     <th>Actions</th>
     </tr>
    </thead>
    <tbody>
       <tr>
        <td><?php p($token->tokenKey); ?></td>
        <td title="<?php p($token->client); ?>"><?php p($_['client']->getNiceName($token->client)); ?></td>
-       <td><?php p(\OCP\Util::formatDate($token->lastuse)); ?></td>
-       <td>Disable Delete</td>
+       <td>
+        <?php p(\OCP\Util::formatDate($token->lastuse)); ?>
+        <form method="POST" action="<?php p(OCP\Util::linkToRoute('grauphel.token.delete', array('username' => $_['username'], 'tokenKey' => $token->tokenKey))); ?>">
+           <input type="hidden" name="delete" value="1" />
+           <button type="submit" class="icon-delete delete action" original-title="Delete"/>
+        </form>
+       </td>
       </tr>
     <?php } ?>
    </tbody>