diff farol/templates/document/edit_reference.j2 @ 56:e6da0705a47c

Unify the edit_reference pages
author Benoît Allard <benoit.allard@greenbone.net>
date Wed, 08 Oct 2014 10:08:05 +0200
parents abf549d56fd9
children
line wrap: on
line diff
--- a/farol/templates/document/edit_reference.j2	Wed Oct 08 09:57:13 2014 +0200
+++ b/farol/templates/document/edit_reference.j2	Wed Oct 08 10:08:05 2014 +0200
@@ -25,26 +25,13 @@
 
 {% extends "base.j2" %}
 {% from "macros.j2" import textinput, selectinput %}
-{% block title %}Edit the title{% endblock %}
+{% from "common_edits.j2" import edit_reference %}
+{% block title %}Edit a Reference{% endblock %}
 
 {% block content %}
 <form role="form" method="POST">
 
-{% call selectinput("type", "Type", types, _type) %}
-<p>The <em>Type</em> attribute denotes the type of the document reference relative to the given document. The following types are available:</p>
-<dl class="dl-horizontal">
-  <dt>External:</dt>
-  <dd>The default value indicates the reference is external to the document.</dd>
-  <dt>Self:</dt>
-  <dd>This indicates the related document is actually a direct reference to itself.</dd>
-</dl>
-{% endcall %}
-{% call textinput("url", "URL", "http://...", url, type="url", required=True) %}
-<p><strong>URL</strong> is the fixed URL or location of the reference.</p>
-{% endcall %}
-{% call  textinput("description", "Description", "", description, required=True) %}
-<p><strong>Description</strong> is a descriptive title or the name of the reference.</p>
-{% endcall %}
+  {{ edit_reference(types, _type, url, description) }}
 
 <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button>
 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a>

http://farol.wald.intevation.org