comparison farol/templates/document/edit_revision.j2 @ 160:a7ce1660aaaf

Add a checkbox macro
author Benoît Allard <benoit.allard@greenbone.net>
date Tue, 30 Dec 2014 14:10:50 +0100
parents e0830bcab004
children
comparison
equal deleted inserted replaced
158:d66532e1909e 160:a7ce1660aaaf
22 # along with this program; if not, write to the Free Software 22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24 -#} 24 -#}
25 25
26 {% extends "base.j2" %} 26 {% extends "base.j2" %}
27 {% from "macros.j2" import textinput, textarea, examples %} 27 {% from "macros.j2" import textinput, textarea, examples, checkbox %}
28 {% block title %}Edit Revision{% endblock %} 28 {% block title %}Edit Revision{% endblock %}
29 29
30 {% block content %} 30 {% block content %}
31 <p><strong>Revision</strong> contains all the elements required to track the evolution of a CVRF document. Each change to a CVRF document should be accompanied by <strong>Number</strong>, <strong>Date</strong>, and <strong>Description</strong> elements.</p> 31 <p><strong>Revision</strong> contains all the elements required to track the evolution of a CVRF document. Each change to a CVRF document should be accompanied by <strong>Number</strong>, <strong>Date</strong>, and <strong>Description</strong> elements.</p>
32 <form role="form" method="POST"> 32 <form role="form" method="POST">
47 {% call textarea("description", "Description", "", description, 3, required=True) %} 47 {% call textarea("description", "Description", "", description, 3, required=True) %}
48 <p><strong>Description</strong> should be a short description of the changes made. It can describe the conditions that prompted the change or be a short list of the items changed.</p> 48 <p><strong>Description</strong> should be a short description of the changes made. It can describe the conditions that prompted the change or be a short list of the items changed.</p>
49 {{ examples(['initial public release']) }} 49 {{ examples(['initial public release']) }}
50 {% endcall %} 50 {% endcall %}
51 {% if action == 'Add' %} 51 {% if action == 'Add' %}
52 <div class="form-group"> 52 {{ checkbox('update_tracking', "Update Tracking Information", True) }}
53 <div class="checkbox">
54 <label>
55 <input name="update_tracking" type="checkbox" checked> Update Tracking Information
56 </label>
57 </div>
58 </div>
59 {% endif %} 53 {% endif %}
60 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> 54 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button>
61 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a> 55 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a>
62 </form> 56 </form>
63 {% endblock %} 57 {% endblock %}

http://farol.wald.intevation.org