Mercurial > farol > farol
comparison farol/templates/producttree/edit_product.j2 @ 46:086e35c4aee7
Add description fields for edit_product and edit_branch
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Tue, 07 Oct 2014 14:07:57 +0200 |
parents | 7c4d001839e7 |
children | 1d63a532ccce |
comparison
equal
deleted
inserted
replaced
45:7c4d001839e7 | 46:086e35c4aee7 |
---|---|
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, selectinput2 %} | 27 {% from "macros.j2" import textinput, selectinput2, examples %} |
28 {% block title %}Edit the product{% endblock %} | 28 {% block title %}Edit the product{% endblock %} |
29 | 29 |
30 {% set active = 'product' %} | 30 {% set active = 'product' %} |
31 | 31 |
32 {% block content %} | 32 {% block content %} |
33 <form role="form" method="POST"> | 33 <p>The <strong>Full Product Name</strong> elements define the endpoints of the <strong>Product Tree</strong> and occur directly at the root level, at the branch level, or as the result of a relationship between two products.</p><form role="form" method="POST"> |
34 | 34 |
35 {{ textinput('name', "Product Name", value=product._name, required=True) }} | 35 {% call textinput('name', "Product Name", value=product._name, required=True) %} |
36 {{ textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) }} | 36 <p>The value of a <strong>Full Product Name</strong> element should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document.</p> |
37 {{ textinput('cpe', "CPE", placeholder="cpe:/a:...", value=product._cpe) }} | 37 {{ examples(['Microsoft Host Integration Server 2006 Service Pack 1', 'Microsoft Office 2008 for Mac 12.3.1 Update']) }} |
38 {% endcall %} | |
39 {% call textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) %} | |
40 <p>The <em>Product ID</em> attribute is required to identify a <strong>Full Product Name</strong> so that it can be referred to from other parts in the document. There is no predefined or required format for the <em>Product ID</em> as long as it uniquely identifies a product in the context of the current document. Examples include incremental integers or Globally Unique Identifiers (GUIDs).</p> | |
41 {{ examples(['CVRFPID-0004']) }} | |
42 {% endcall %} | |
43 {% call textinput('cpe', "CPE", placeholder="cpe:/a:...", value=product._cpe) %} | |
44 <p>The Common Platform Enumeration (<em>CPE</em>) attribute refers to a method for naming platforms. The structure for CPE is described at http://cpe.mitre.org. The <em>CPE</em> can be either an integer (if MITRE has an entry for the platform in question) or a candidate string from the vendor if no MITRE entry yet exists.</p> | |
45 {% endcall %} | |
38 <hr> | 46 <hr> |
39 {{ selectinput2('parent_branch', "Parent Branch", orphaned_leaves , product.getParentPath()) }} | 47 {{ selectinput2('parent_branch', "Parent Branch", orphaned_leaves , product.getParentPath()) }} |
40 {{ selectinput2('parent_relationship', "Parent relationship", orphaned_relationships, current_rel) }} | 48 {{ selectinput2('parent_relationship', "Parent relationship", orphaned_relationships, current_rel) }} |
41 | 49 |
42 <button class="btn btn-primary" type="submit">{{ action }}</button> | 50 <button class="btn btn-primary" type="submit">{{ action }}</button> |