-
Notifications
You must be signed in to change notification settings - Fork 159
/
group_form.html
25 lines (23 loc) · 1.25 KB
/
group_form.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
{%- if not c.group_type -%}
<p>
group_type not passed to template. your version of CKAN
might not be compatible with ckanext-scheming
</p>
{%- endif -%}
<form class="dataset-form form-horizontal" method="post" data-module="basic-form" enctype="multipart/form-data">
{%- set schema = h.scheming_get_organization_schema(c.group_type) -%}
{%- for field in schema['fields'] -%}
{%- snippet 'scheming/snippets/form_field.html',
field=field, data=data, errors=errors, licenses=licenses,
schema=schema -%}
{%- endfor -%}
<div class="form-actions">
{% block delete_button %}
{% if h.check_access('group_delete', {'id': data.id}) and action=='edit' %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this Organization?')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='organization', action='delete', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
<button class="btn btn-primary" name="save" type="submit">{% block save_text %}{{ _('Save Organization') }}{% endblock %}</button>
</div>
</form>