Add "delete identity" button in settings
[tt-rss-micropub.git] / settings.phtml
1 <div dojoType="dijit.layout.AccordionPane" title="Micropub" id="micropub" <?= $accordionActive ?>>
2  <div>
3   <h2>Registered identities</h2>
4   <table width="100%">
5    <thead>
6     <tr class="title">
7      <td width="5%">Default</td>
8      <td>Identity URL</td>
9      <td width="5%"></td>
10     </tr>
11    </thead>
12    <tbody>
13     <?php foreach ($accounts as $accurl => $account) { ?>
14      <tr data-url="<?= htmlspecialchars($accurl) ?>">
15       <td align='center'>
16        <input disabled='1' dojoType="dijit.form.CheckBox" type="checkbox"/>
17       </td>
18       <td>
19        <a href="<?= htmlspecialchars($accurl) ?>"><?= htmlspecialchars($accurl) ?></a>
20       </td>
21       <td>
22        <a href="#" onclick='javascript:micropubDeleteIdentity(<?= json_encode($accurl) ?>)'>Remove</a>
23       </td>
24      </tr>
25     <?php } ?>
26    </tbody>
27   </table>
28  </div>
29
30  <div>
31   <h2>Add new identity</h2>
32   <form method="post" action="backend.php">
33    <input type="hidden" name="op" value="pluginhandler"/>
34    <input type="hidden" name="plugin" value="micropub"/>
35    <input type="hidden" name="method" value="action"/>
36    <input type="hidden" name="mode"   value="authorize"/>
37
38    <input name="url" type="url" size="40" dojoType="dijit.form.TextBox" required="1"/>
39    <button type="submit">Authorize</button>
40   </form>
41  </div>
42 </div>