/
package_basic_fields.html
28 lines (23 loc) · 1.51 KB
/
package_basic_fields.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{% import 'macros/form.html' as form %}
{{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. A descriptive title'), value=data.title, error=errors.title, classes=['control-full', 'control-large']) }}
{{ form.input('name', id='field-name', label=_('URL'), placeholder=_('eg. my-dataset'), value=data.title, error=errors.name, classes=['control-full']) }}
{{ form.markdown('notes', id='field-notes', label=_('Description'), placeholder=_('eg. Some useful notes about the data'), value=data.notes, error=errors.notes) }}
{{ form.input('tag_string', id='field-tags', label=_('Tags'), placeholder=_('eg. economy, spending, government'), value=data.tag_string, error=errors.tags, classes=['control-full']) }}
<div class="control-group">
{% set error = errors.license_id %}
<label class="control-label" for="field-license">{{ _("License") }}</label>
<div class="controls">
<select id="field-license" name="license_id">
{% for licence_desc, licence_id in licences if licence_desc %}
<option value="{{ licence_id }}" {% if data.get('license_id', '') == licence_id %}selected="selected"{% endif %}>{{ licence_desc }}</option>
{% endfor %}
</select>
{% if error %}<span class="error-block">{{ error }}</span>{% endif %}
<span class="info-block icon-large icon-info-sign">
{% trans %}
License definitions and additional information can be found
at <a href="http://opendefinition.org/licenses/">opendefinition.org</a>
{% endtrans %}
</span>
</div>
</div>