Mercurial > farol > farol
comparison farol/templates/vulnerability/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 | 4a9f23230eba |
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 {% block title %}Edit the type{% endblock %} | 28 {% block title %}Edit the type{% endblock %} |
29 | 29 |
30 {% set active = 'vulnerability' %} | 30 {% set active = 'vulnerability' %} |
31 | 31 |
32 {% block content %} | 32 {% block content %} |
33 <form role="form" method="POST"> | 33 <form role="form" method="POST"> |
34 | 34 |
35 {{ selectinput("type", "Type", types, note and note._type or '') }} | 35 {{ edit_note(types, note, note_ordinal) }} |
36 {{ textinput("ordinal", "Ordinal", "", note_ordinal or note._ordinal, type="number", extras={'min': '1'}) }} | |
37 {{ textinput("title", "Title", "", note and note._title or '') }} | |
38 {{ textinput("audience", "Audience", "", note and note._audience or '') }} | |
39 {{ textarea("note", "Note", "", note and note._note or '', 10, required=True) }} | |
40 | 36 |
41 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> | 37 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> |
42 <a class="btn btn-danger" href="{% if action=='Add' %}{{ url_for('.view', ordinal=ordinal) }}{% else %}{{ url_for('.view_note', ordinal=ordinal, note_ordinal=note._ordinal) }}{% endif %}">Cancel</a> | 38 <a class="btn btn-danger" href="{% if action=='Add' %}{{ url_for('.view', ordinal=ordinal) }}{% else %}{{ url_for('.view_note', ordinal=ordinal, note_ordinal=note._ordinal) }}{% endif %}">Cancel</a> |
43 </form> | 39 </form> |
44 {% endblock %} | 40 {% endblock %} |