Mercurial > farol > farol
annotate farol/templates/document/edit_tracking.j2 @ 126:e0830bcab004
Add (optional) regex matching to our input fields
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 23 Oct 2014 16:32:33 +0200 |
parents | c79082d0d44d |
children |
rev | line source |
---|---|
0 | 1 {# |
2 # Description: | |
3 # Web Template used in Farol Design | |
4 # | |
5 # Authors: | |
6 # Benoît Allard <benoit.allard@greenbone.net> | |
7 # | |
8 # Copyright: | |
9 # Copyright (C) 2014 Greenbone Networks GmbH | |
10 # | |
11 # This program is free software; you can redistribute it and/or | |
12 # modify it under the terms of the GNU General Public License | |
13 # as published by the Free Software Foundation; either version 2 | |
14 # of the License, or (at your option) any later version. | |
15 # | |
16 # This program is distributed in the hope that it will be useful, | |
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 # GNU General Public License for more details. | |
20 # | |
21 # You should have received a copy of the GNU General Public License | |
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. | |
24 -#} | |
25 | |
26 {% extends "base.j2" %} | |
36
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
27 {% from "macros.j2" import textinput, textarea, selectinput, panel, examples %} |
0 | 28 {% block title %}Edit the type{% endblock %} |
29 | |
30 {% block content %} | |
43
c79082d0d44d
Add global descriptions about some containers
Benoît Allard <benoit.allard@greenbone.net>
parents:
40
diff
changeset
|
31 <p>The <strong>Document Tracking</strong> container contains all the attributes necessary to track a CVRF document.</p> |
0 | 32 <form role="form" method="POST"> |
33 | |
36
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
34 {% call textinput("id", "ID", value=tracking._identification._id, required=True) %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
35 <p><strong>ID</strong> is a short, unique identifier used to refer to the document unambiguously in any context. The ID is a simple label. It is a string data type to provide for a wide range of numbering values, types, and schemes. Typically, the ID should be assigned and maintained by the original document issuing authority. It is recommended that the ID be a monotonically increasing value, or increasing in such a predictable manner that it does not contribute toward confusion or misnumbering. Careful consideration is required to ensure that construction of the ID does not contribute to confusion or collision with other labels.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
36 {{ examples(['01', '29834841', '0xABCDEF', '100-200-301']) }} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
37 {% endcall %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
38 {% call textinput("id_aliases", "Aliases", value=', '.join(tracking._identification._aliases), |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
39 help="Multiple aliases should be separated by commas.") %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
40 <p><strong>Alias</strong> is an optional alternative ID used to refer to the document. Many vendors have one or more alternative or secondary IDs for documents and the <strong>Alias</strong> presents an interface to publish those alongside the primary ID.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
41 {% endcall %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
42 {% call selectinput("status", "Status", statuses, tracking._status) %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
43 <p><strong>Status</strong> refers to the condition of the document with regard to completeness and the likelihood of future editions.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
44 <p>Status types are:</p> |
40
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
45 <dl class="dl-horizontal"> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
46 <dt>Draft:</dt> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
47 <dd>Pre-release, intended for issuing party’s internal use only, or possibly used externally when the party is seeking feedback or indicating its intentions regarding a specific issue.</dd> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
48 <dt>Interim:</dt> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
49 <dd>The issuing party believes the content is subject to change.</dd> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
50 <dt>Final:</dt> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
51 <dd>The issuing party asserts the content is unlikely to change. <samp>Final</samp> status is an indication only, and does not preclude updates.</dd> |
5e6eed63ff07
Replace lists with definition lists in descriptions
Benoît Allard <benoit.allard@greenbone.net>
parents:
36
diff
changeset
|
52 </dl> |
36
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
53 <p>Issuing parties are strongly recommended to set <strong>Status</strong> to <samp>Draft</samp> when initiating a new document and to implement procedures to ensure that the status is changed to the appropriate value before the document is released.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
54 {% endcall %} |
126
e0830bcab004
Add (optional) regex matching to our input fields
Benoît Allard <benoit.allard@greenbone.net>
parents:
43
diff
changeset
|
55 {% call textinput("version", "Version", value=version, required=True, regex='(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*)){0,3}') %} |
36
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
56 <p>Version is a simple counter to track the version of the document. This is a numeric tokenized field of the format “nn” – “nn.nn.nn.nn”. It may be incremented in either major or minor notation to denote clearly the evolution of the content of the document. Issuing parties must ensure that this field is incremented appropriately, even for the least editorial or grammatical changes, when the field is used. It is validated using the following regular expression: <code>(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*)){0,3}</code>.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
57 {{ examples(['1.0', '1.0.1', '1.0.0.1']) }} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
58 {% endcall %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
59 {% call textinput("initial", "Initial Release Date", value=tracking._initialDate.isoformat(), required=True, type="datetime") %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
60 <p><strong>Initial Release Date</strong> is the date (and time, optionally) that the document was initially released by the issuing party. All dateTime values in CVRF require a time, and we recommend the inclusion of a time zone as well (ICASI endorses the use of GMT or “Zulu time”). If a time zone is excluded, Zulu should be assumed.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
61 {{ examples(['2011-11-26T00:00:00+00:00']) }} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
62 {% endcall %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
63 {% call textinput("current", "Current Release Date", value=tracking._currentDate.isoformat(), required=True, type="datetime") %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
64 <p><strong>Current Release Date</strong> is the current date (and time, optionally) that the document was released by the issuing party. All dateTime values in CVRF require a time, and we recommend the inclusion of a time zone as well (ICASI endorses the use of GMT or “Zulu time”). If a time zone is excluded, Zulu should be assumed.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
65 {{ examples(['2011-11-26T00:00:00+00:00']) }} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
66 {% endcall %} |
0 | 67 |
68 {% call panel(heading="Generator", title=3, collapsible=False) %} | |
43
c79082d0d44d
Add global descriptions about some containers
Benoît Allard <benoit.allard@greenbone.net>
parents:
40
diff
changeset
|
69 <p>The <strong>Generator</strong> container contains all the elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.</p> |
36
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
70 {% call textinput("gen_engine", "Generator Engine", value=generator._engine or '') %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
71 <p><strong>Engine</strong> will refer to the name and optional version of the engine that generated the CVRF document.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
72 {{ examples(['Mike Schiffman’s sublime fingertips version 1.0']) }} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
73 {% endcall %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
74 {% call textinput("gen_date", "Generator Date", now.isoformat(), generator._date and generator._date.isoformat() or None, type="datetime") %} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
75 <p><strong>Date</strong> will refer to the date the CVRF document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field can be different from the <strong>Initial Release Date</strong>. All dateTime values in CVRF require a time, and we recommend the inclusion of a time zone as well (ICASI endorses the use of GMT or “Zulu time”). If a time zone is excluded, Zulu should be assumed.</p> |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
76 {{ examples(['2012-02-27T00:00:00+00:00']) }} |
3b49063d76e0
Add Descriptions for the fields of the edit_tracking section
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
77 {% endcall %} |
0 | 78 {% endcall %} |
79 | |
80 <button class="btn btn-primary" type="submit">Update</button> | |
10 | 81 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a> |
0 | 82 </form> |
83 {% endblock %} |