Przeglądaj źródła

set remove action for remove button

weichen 4 lat temu
rodzic
commit
b80cdb1de3
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      backstage/templates/collections.html

+ 5 - 3
backstage/templates/collections.html

@@ -12,7 +12,7 @@
         </button></th>
     </tr>
   </thead>
-{% for collection in collections %}
+  {% for collection in collections %}
     <tbody>
       <tr>
         <td>1</td>
@@ -21,11 +21,13 @@
         <td>
           <div>
             <a class="btn btn-secondary btn-sm m-1" href="{{ url_for('editor.editor', url=collection.url) }}">編輯</a>
-            <a class="btn btn-secondary btn-sm m-1" href="#">刪除</a>
+            <form action="{{ url_for('editor.remove', url=collection.url) }}" method="POST">
+              <input class="btn btn-danger" type="submit" value="Delete">
+            </form>
           </div>
         </td>
       </tr>
     </tbody>
-{% endfor %}
+  {% endfor %}
 </table>
 {% endblock main %}