Mercurial > farol > farol
comparison farol/templates/document/edit_reference.j2 @ 56:e6da0705a47c
Unify the edit_reference pages
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Wed, 08 Oct 2014 10:08:05 +0200 |
parents | abf549d56fd9 |
children |
comparison
equal
deleted
inserted
replaced
55:76cba17794ab | 56:e6da0705a47c |
---|---|
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, selectinput %} | 27 {% from "macros.j2" import textinput, selectinput %} |
28 {% block title %}Edit the title{% endblock %} | 28 {% from "common_edits.j2" import edit_reference %} |
29 {% block title %}Edit a Reference{% endblock %} | |
29 | 30 |
30 {% block content %} | 31 {% block content %} |
31 <form role="form" method="POST"> | 32 <form role="form" method="POST"> |
32 | 33 |
33 {% call selectinput("type", "Type", types, _type) %} | 34 {{ edit_reference(types, _type, url, description) }} |
34 <p>The <em>Type</em> attribute denotes the type of the document reference relative to the given document. The following types are available:</p> | |
35 <dl class="dl-horizontal"> | |
36 <dt>External:</dt> | |
37 <dd>The default value indicates the reference is external to the document.</dd> | |
38 <dt>Self:</dt> | |
39 <dd>This indicates the related document is actually a direct reference to itself.</dd> | |
40 </dl> | |
41 {% endcall %} | |
42 {% call textinput("url", "URL", "http://...", url, type="url", required=True) %} | |
43 <p><strong>URL</strong> is the fixed URL or location of the reference.</p> | |
44 {% endcall %} | |
45 {% call textinput("description", "Description", "", description, required=True) %} | |
46 <p><strong>Description</strong> is a descriptive title or the name of the reference.</p> | |
47 {% endcall %} | |
48 | 35 |
49 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> | 36 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> |
50 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a> | 37 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a> |
51 </form> | 38 </form> |
52 {% endblock %} | 39 {% endblock %} |