]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tpl/view.html
vérificatio CSRF et mise en page
[github/wallabag/wallabag.git] / tpl / view.html
index 1e0578899beac2e866683c2944c1b8a27f9dfb60..d24d26edbca969261400f1b0894dd0bf2f6a5738 100755 (executable)
@@ -5,9 +5,11 @@
                        <a href="index.php" title="back to home">&larr;</a>
                </div>
             <div class="tools">
-                <a title="toggle mark as read" class="tool archive {if="$is_read == 0"}archive-off{/if}" onclick="toggle_archive(this, {$id}, 1)"><span></span></a>
-                <a title="toggle favorite" class="tool fav  {if="$is_fav == 0"}fav-off{/if}" onclick="toggle_favorite(this, {$id})"><span></span></a>
-                <a href="index.php?action=delete&id={$id}" title="toggle delete" onclick="return confirm('Are you sure?')" class="tool delete"><span></span></a>
+                <ul>
+                    <li><a title="toggle mark as read" class="tool archive {if="$is_read == '0'"}archive-off{/if}" onclick="toggle_archive(this, {$id}, '{$token}')"><span></span></a></li>
+                    <li><a title="toggle favorite" class="tool fav {if="$is_fav == '0'"}fav-off{/if}" onclick="toggle_favorite(this, {$id}, '{$token}')"><span></span></a></li>
+                    <li><form method="post" onsubmit="return confirm('Are you sure?')" style="display: inline;"><input type="hidden" name="token" id="token" value="{$token}" /><input type="hidden" id="action" name="action" value="delete" /><input type="hidden" id="id" name="id" value="{$id}" /><input type="submit" class="delete" title="toggle delete" /></form></li>
+                </ul>
             </div>
             <header class="mbm">
                 <h1><a href="{$url}">{$title}</a></h1>