Mercurial > farol > farol
comparison farol/templates/document/edit_note.j2 @ 49:5583ddcd6164
Unify the edit_note page
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Tue, 07 Oct 2014 16:15:43 +0200 |
parents | 5e6eed63ff07 |
children |
comparison
equal
deleted
inserted
replaced
48:c6753fb93b3b | 49:5583ddcd6164 |
---|---|
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, selectinput %} | 27 {% from "common_edits.j2" import edit_note %} |
28 | |
28 {% block title %}Edit the type{% endblock %} | 29 {% block title %}Edit the type{% 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, note and note._type or '') %} | 34 {{ edit_note(types, note, ordinal) }} |
34 <p><em>Type</em> can be one of the following:</p> | |
35 <dl class="dl-horizontal"> | |
36 <dt>General:</dt> | |
37 <dd>A general, high-level note (<em>Title</em> may have more information).</dd> | |
38 <dt>Details:</dt> | |
39 <dd>A low-level detailed discussion (<em>Title</em> may have more information).</dd> | |
40 <dt>Description:</dt> | |
41 <dd>A description of something (<em>Title</em> may have more information).</dd> | |
42 <dt>Summary:</dt> | |
43 <dd>A summary of something (<em>Title</em> may have more information).</dd> | |
44 <dt>FAQ:</dt> | |
45 <dd>A list of frequently asked questions.</dd> | |
46 <dt>Legal Disclaimer:</dt> | |
47 <dd>Any possible legal discussion, including constraints, surrounding the document.</dd> | |
48 <dt>Other:</dt> | |
49 <dd>Something that doesn’t fit (<em>Title</em> should have more information).</dd> | |
50 </dl> | |
51 {% endcall %} | |
52 {% call textinput("ordinal", "Ordinal", "", ordinal or note._ordinal, type="number", required=True, extras={'min': '1'}) %} | |
53 <p><em>Ordinal</em> is a mandatory, locally significant value used to track notes inside a CVRF document at the root (document) level. It is provided to uniquely identify a <strong>Note</strong>.</p> | |
54 <p>There should be one of these values for every <strong>Note</strong> inside <strong>Document Notes</strong>, and it is recommended that <em>Ordinal</em> should be instantiated as a monotonically increasing counter, indexed from 1. Each <em>Ordinal</em> that tracks a <strong>Note</strong> inside <strong>Document Notes</strong> is completely independent from an <em>Ordinal</em> tracking a <strong>Note</strong> inside <strong>Vulnerability/Notes</strong>.</p> | |
55 {% endcall %} | |
56 {% call textinput("title", "Title", "", note and note._title or '') %} | |
57 <p><em>Title</em> should be a concise description of what is contained in the text.</p> | |
58 {% endcall %} | |
59 {% call textinput("audience", "Audience", "", note and note._audience or '') %} | |
60 <p><em>Audience</em> will indicate who is intended to read it.</p> | |
61 {% endcall %} | |
62 {% call textarea("note", "Note", "", note and note._note or '', 10, required=True) %} | |
63 <p><strong>Note</strong> is a place to put all manner of text blobs related to the document as a whole. It can be a concise summary of the overall document or a more compartmentalized and area-specific textual discussion.</p> | |
64 <p>The note should contain a compartmentalized textual discussion constrained by its <em>Type</em> attribute.</p> | |
65 {% endcall %} | |
66 | 35 |
67 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> | 36 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> |
68 <a class="btn btn-danger" href="{% if action=='Add' %}{{ url_for('.view') }}{% else %}{{ url_for('.view_note', ordinal=note._ordinal) }}{% endif %}">Cancel</a> | 37 <a class="btn btn-danger" href="{% if action=='Add' %}{{ url_for('.view') }}{% else %}{{ url_for('.view_note', ordinal=note._ordinal) }}{% endif %}">Cancel</a> |
69 </form> | 38 </form> |
70 {% endblock %} | 39 {% endblock %} |