# HG changeset patch # User BenoƮt Allard # Date 1412756534 -7200 # Node ID 4ac1dd522998e6da8b89ad373812d63ba863619a # Parent e6da0705a47cc53992a53a7afe2af13fb5500982 Unify the edit_acknowledgment pages diff -r e6da0705a47c -r 4ac1dd522998 farol/templates/common_edits.j2 --- a/farol/templates/common_edits.j2 Wed Oct 08 10:08:05 2014 +0200 +++ b/farol/templates/common_edits.j2 Wed Oct 08 10:22:14 2014 +0200 @@ -95,3 +95,22 @@

Description is a descriptive title or the name of the reference.

{% endcall %} {% endmacro %} + +{% macro edit_acknowledgment(name, organization, description, url) %} +

Acknowledgment contains recognition of external parties that reported noncritical/low-severity security issues or provided information, observations, or suggestions that contributed to improved security or improved documentation in future releases of the document producer's products. This may also contain recognition to external parties that contributed toward producing this document.

+

This element indicates collaboration with the security community in a positive fashion and is an important part of a notice or advisory. Care should be taken to ensure that individuals would like to be acknowledged before they are included.

+ +{% call textinput("name", "Names", "", name, help="Multiple names should be comma-separated.") %} +

The Name should contain the name of the party being acknowledged.

+{% endcall %} +{% call textinput("organization", "Organizations", "", organization, help="Multiple organizations should be comma-separated.") %} +

The Organization should contain the organization of the party or if the Name is omitted, the organization itself that is being acknowledged.

+{% endcall %} +{% call textarea("description", "Description", "", description, 5) %} +

The Description can contain any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.

+{{ examples (['Vendor X would like to thank [Name 3] from [OrgName] for reporting this issue.', 'Vendor X would like to thank the following researchers for their contributions to making this project more secure: [Name 1], [Name 2], [Name 3]']) }} +{% endcall %} +{% call textinput("url", "URL", "http://...", url, type="url") %} +

URL is the optional URL to the person, place, or thing being acknowledged.

+{% endcall %} +{% endmacro %} diff -r e6da0705a47c -r 4ac1dd522998 farol/templates/document/edit_acknowledgment.j2 --- a/farol/templates/document/edit_acknowledgment.j2 Wed Oct 08 10:08:05 2014 +0200 +++ b/farol/templates/document/edit_acknowledgment.j2 Wed Oct 08 10:22:14 2014 +0200 @@ -24,25 +24,13 @@ -#} {% extends "base.j2" %} -{% from "macros.j2" import textinput, selectinput %} -{% block title %}Edit the title{% endblock %} +{% from "common_edits.j2" import edit_acknowledgment %} +{% block title %}Edit an Acknowledgment{% endblock %} {% block content %} -

Acknowledgment contains recognition of external parties that reported noncritical/low-severity security issues or provided information, observations, or suggestions that contributed to improved security or improved documentation in future releases of the document producer's products. This may also contain recognition to external parties that contributed toward producing this document.

-{% call textinput("name", "Name", "", name) %} -

The Name should contain the name of the party being acknowledged.

-{% endcall %} -{% call textinput("organization", "Organization", "", organization) %} -

The Organization should contain the organization of the party or if the Name is omitted, the organization itself that is being acknowledged.

-{% endcall %} -{% call textinput("description", "Description", "", description) %} -

The Description can contain any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.

-{% endcall %} -{% call textinput("url", "URL", "http://...", url, type="url") %} -

URL is the optional URL to the person, place, or thing being acknowledged.

-{% endcall %} + {{ edit_acknowledgment(name, organization, description, url) }} Cancel diff -r e6da0705a47c -r 4ac1dd522998 farol/templates/vulnerability/edit_acknowledgment.j2 --- a/farol/templates/vulnerability/edit_acknowledgment.j2 Wed Oct 08 10:08:05 2014 +0200 +++ b/farol/templates/vulnerability/edit_acknowledgment.j2 Wed Oct 08 10:22:14 2014 +0200 @@ -24,18 +24,15 @@ -#} {% extends "base.j2" %} -{% from "macros.j2" import textinput, selectinput %} -{% block title %}Edit the title{% endblock %} +{% from "common_edits.j2" import edit_acknowledgment %} +{% block title %}Edit an Acknowledgment{% endblock %} {% set active = 'vulnerability' %} {% block content %} -{{ textinput("name", "Name", "", name) }} -{{ textinput("organization", "Organization", "", organization) }} -{{ textinput("description", "Description", "", description) }} -{{ textinput("url", "URL", "http://...", url, type="url") }} + {{ edit_acknowledgment(name, organization, description, url) }} Cancel