# HG changeset patch # User Benoît Allard # Date 1412598265 -7200 # Node ID 537d25b1593c73426b3b66fa20400f8c6533e061 # Parent 22d89f53e34ca04cca2b444d72cb1cb3533cd284 Add Descriptions to the fields of the edit_publisher page diff -r 22d89f53e34c -r 537d25b1593c farol/templates/document/edit_publisher.j2 --- a/farol/templates/document/edit_publisher.j2 Mon Oct 06 14:09:57 2014 +0200 +++ b/farol/templates/document/edit_publisher.j2 Mon Oct 06 14:24:25 2014 +0200 @@ -24,16 +24,34 @@ -#} {% extends "base.j2" %} -{% from "macros.j2" import textinput, textarea, selectinput %} +{% from "macros.j2" import textinput, textarea, selectinput, examples %} {% block title %}Edit the type{% endblock %} {% block content %}
-{{ selectinput("type", "Type", types, publisher._type) }} -{{ textinput("vendorid", "Vendor ID", "", publisher._vendorid or '') }} -{{ textarea("contact", "Contacts Details", "", publisher._contact or '', 3) }} -{{ textarea("authority", "Issuing Authority", "", publisher._authority or '', 3) }} +{% call selectinput("type", "Type", types, publisher._type) %} +

The Document Publisher Type attribute is an enumerated list containing an array of different document publisher types. Types include:

+ +{% endcall %} +{% call textinput("vendorid", "Vendor ID", "", publisher._vendorid or '') %} +

The optional Vendor ID attribute is a unique identifier (OID) that a vendor uses as issued by FIRST under the auspices of IETF. At the time of this writing, OID is a work in progress.

+{{ examples(['MarcusCom']) }} +{% endcall %} +{% call textarea("contact", "Contacts Details", "", publisher._contact or '', 3) %} +

Contact Details contains information required to contact the document publisher.

+{{ examples(['Name: Captain Sledge Fisthammer
Organization: International Space Explorers of America
Phone Number: 555-123-4567
Fax Number: 555-123-4568
Email Address: sledge@foo.com']) }} +{% endcall %} +{% call textarea("authority", "Issuing Authority", "", publisher._authority or '', 3) %} +

Issuing Authority states the name of the issuing party and that party’s authority to release the document. In particular, it addresses the party’s constituency and responsibilities or other obligations. This element should also include instructions for contacting the issuer.

+{{ examples(['The Juniper SIRT (Juniper Networks Security Incident Response Team) is the sole authority regarding vulnerabilities in any Juniper Networks products or services, and coordinates the handling of all aspects of such vulnerabilities from initial discovery or report through public announcements and any subsequent follow-on activities. Additional information is available at http://www.juniper.net/support/security/report_vulnerability.html']) }} +{% endcall %} Cancel diff -r 22d89f53e34c -r 537d25b1593c farol/templates/macros.j2 --- a/farol/templates/macros.j2 Mon Oct 06 14:09:57 2014 +0200 +++ b/farol/templates/macros.j2 Mon Oct 06 14:24:25 2014 +0200 @@ -78,14 +78,32 @@ {% macro textarea(name, label, placeholder="", value=None, rows=10, required=False) %}
- + {% if caller %} + {% set content=caller () %} + {% call modal(name + "_modal", label) %} + {{ content }} + {% endcall %} + {% endif %} +
{% endmacro %} {% macro selectinput(name, label, choices, value) %}
- + {% if caller %} + {% set content=caller () %} + {% call modal(name + "_modal", label) %} + {{ content }} + {% endcall %} + {% endif %} +