diff farol/templates/macros.j2 @ 69:42915aaa6888

Move the delete_button to the common macros
author Benoît Allard <benoit.allard@greenbone.net>
date Thu, 09 Oct 2014 10:11:35 +0200
parents 249b3ad750b1
children 51825b0c4890
line wrap: on
line diff
--- a/farol/templates/macros.j2	Thu Oct 09 10:10:48 2014 +0200
+++ b/farol/templates/macros.j2	Thu Oct 09 10:11:35 2014 +0200
@@ -168,3 +168,16 @@
 </ul>
 {% endif %}
 {% endmacro %}
+
+{% macro delete_button(url, hiddens, text="delete") %}
+<form class="delete" role="button" action="{{ url }}" method="POST">
+  {% for elem in hiddens %}
+  <input type=hidden name="{{ elem }}", value="{{ hiddens[elem] }}">
+  {% endfor %}
+  <button type="submit" class="btn btn-link btn-xs">
+    <span class="label label-danger">
+      <strong>{{ text }}</strong>
+    </span>
+  </button>
+</form>
+{% endmacro %}

http://farol.wald.intevation.org