Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (31 sloc) 1.36 KB
{# This is specific to datasets' owner_org field and won't work #}
{# if used with other fields #}
{% macro organization_option_tag(organization, selected_org) %}
{% block organization_option scoped %}
<option value="{{ organization.id }}"{%
if selected_org %} selected="selected"{% endif
%}>{{ organization.display_name }}</option>
{% endblock %}
{% endmacro %}
<div data-module="dataset-visibility">
{% snippet "scheming/form_snippets/_organization_select.html",
field=field,
data=data,
errors=errors,
organizations_available=h.organizations_available('create_dataset'),
org_required=not h.check_config_permission('create_unowned_dataset')
or h.scheming_field_required(field),
organization_option_tag=organization_option_tag %}
{% block package_metadata_fields_visibility %}
<div class="control-group form-group control-medium">
<label for="field-private" class="control-label">{{ _('Visibility') }}</label>
<div class="controls">
<select id="field-private" name="private" class="form-control">
{% for option in [('True', _('Private')), ('False', _('Public'))] %}
<option value="{{ option[0] }}" {% if option[0] == data.private|trim %}selected="selected"{% endif %}>{{ option[1] }}</option>
{% endfor %}
</select>
</div>
</div>
{% endblock %}
</div>
You can’t perform that action at this time.