-<div dojoType="dijit.layout.AccordionPane" title="Micropub">
+<div dojoType="dijit.layout.AccordionPane" title="Micropub" id="micropub" <?= $accordionActive ?>>
<div>
- <h1>Existing identities</h1>
- <table border="1">
+ <h2>Registered identities</h2>
+ <table width="100%">
<thead>
- <tr><th>Identity URL</th></tr>
+ <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>
- <td><?= $accurl ?></td>
+ <tr data-url="<?= htmlspecialchars($accurl) ?>">
+ <td align='center'>
+ <input type="radio" href="#" dojoType="dijit.form.RadioButton"
+ name="micropubDefaultIdentity"
+ value="<?= htmlspecialchars($accurl) ?>"
+ <?= $account['checked'] ?>
+ onchange='micropubMakeDefault(<?= json_encode($accurl) ?>, this)'
+ />
+ </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>
</div>
<div>
- <h1>Add new identity</h1>
+ <h2>Add new identity</h2>
<form method="post" action="backend.php">
<input type="hidden" name="op" value="pluginhandler"/>
<input type="hidden" name="plugin" value="micropub"/>
<input type="hidden" name="method" value="action"/>
<input type="hidden" name="mode" value="authorize"/>
- <input name="url" type="url" size="40"/>
+ <input name="url" type="url" size="40" dojoType="dijit.form.TextBox"
+ required="1" autocomplete="on"/>
<button type="submit">Authorize</button>
</form>
</div>