# HG changeset patch # User BenoƮt Allard # Date 1419945050 -3600 # Node ID a7ce1660aaafe06dafdd66856c89e76e0d49a238 # Parent d66532e1909e7921c19f375152d47fae132cae47 Add a checkbox macro diff -r d66532e1909e -r a7ce1660aaaf farol/templates/document/edit_revision.j2 --- a/farol/templates/document/edit_revision.j2 Mon Nov 17 16:51:00 2014 +0100 +++ b/farol/templates/document/edit_revision.j2 Tue Dec 30 14:10:50 2014 +0100 @@ -24,7 +24,7 @@ -#} {% extends "base.j2" %} -{% from "macros.j2" import textinput, textarea, examples %} +{% from "macros.j2" import textinput, textarea, examples, checkbox %} {% block title %}Edit Revision{% endblock %} {% block content %} @@ -49,13 +49,7 @@ {{ examples(['initial public release']) }} {% endcall %} {% if action == 'Add' %} -
-
- -
-
+ {{ checkbox('update_tracking', "Update Tracking Information", True) }} {% endif %} Cancel diff -r d66532e1909e -r a7ce1660aaaf farol/templates/macros.j2 --- a/farol/templates/macros.j2 Mon Nov 17 16:51:00 2014 +0100 +++ b/farol/templates/macros.j2 Tue Dec 30 14:10:50 2014 +0100 @@ -106,6 +106,16 @@ {% endmacro %} +{% macro checkbox(name, label, checked=False) %} +
+
+ +
+
+{% endmacro %} + {% macro panel(type="default", heading=None, badge=None, title=0, collapsible=True, extended=False) %} {% if not heading %} {% set collapsible = False %}