Add "delete identity" button in settings
[tt-rss-micropub.git] / settings.phtml
index a06f2ea56f316b62d52a1b763f0f5fd9a21d3242..a22a00bfb349bad77842daa3c7d2c2e4d5dbbd13 100644 (file)
@@ -1,4 +1,4 @@
-<div dojoType="dijit.layout.AccordionPane" title="Micropub">
+<div dojoType="dijit.layout.AccordionPane" title="Micropub" id="micropub" <?= $accordionActive ?>>
  <div>
   <h2>Registered identities</h2>
   <table width="100%">
@@ -6,17 +6,21 @@
     <tr class="title">
      <td width="5%">Default</td>
      <td>Identity URL</td>
+     <td width="5%"></td>
     </tr>
    </thead>
    <tbody>
     <?php foreach ($accounts as $accurl => $account) { ?>
-     <tr>
+     <tr data-url="<?= htmlspecialchars($accurl) ?>">
       <td align='center'>
        <input disabled='1' dojoType="dijit.form.CheckBox" type="checkbox"/>
       </td>
       <td>
        <a href="<?= htmlspecialchars($accurl) ?>"><?= htmlspecialchars($accurl) ?></a>
       </td>
+      <td>
+       <a href="#" onclick='javascript:micropubDeleteIdentity(<?= json_encode($accurl) ?>)'>Remove</a>
+      </td>
      </tr>
     <?php } ?>
    </tbody>