Mercurial > farol > farol
diff 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 |
line wrap: on
line diff
--- a/farol/templates/vulnerability/edit_note.j2 Tue Oct 07 15:30:22 2014 +0200 +++ b/farol/templates/vulnerability/edit_note.j2 Tue Oct 07 16:15:43 2014 +0200 @@ -24,7 +24,7 @@ -#} {% extends "base.j2" %} -{% from "macros.j2" import textinput, textarea, selectinput %} +{% from "common_edits.j2" import edit_note %} {% block title %}Edit the type{% endblock %} {% set active = 'vulnerability' %} @@ -32,11 +32,7 @@ {% block content %} <form role="form" method="POST"> -{{ selectinput("type", "Type", types, note and note._type or '') }} -{{ textinput("ordinal", "Ordinal", "", note_ordinal or note._ordinal, type="number", extras={'min': '1'}) }} -{{ textinput("title", "Title", "", note and note._title or '') }} -{{ textinput("audience", "Audience", "", note and note._audience or '') }} -{{ textarea("note", "Note", "", note and note._note or '', 10, required=True) }} + {{ edit_note(types, note, note_ordinal) }} <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button> <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>