moviewyrm/bookwyrm/templates/snippets/privacy_select.html

25 lines
934 B
HTML
Raw Normal View History

2021-02-28 02:48:10 +00:00
{% load i18n %}
2021-05-11 21:41:28 +00:00
{% load utilities %}
2021-01-18 17:57:44 +00:00
<div class="select {{ class }}">
2021-09-29 22:58:37 +00:00
{% firstof privacy_uuid 0|uuid as uuid %}
2020-11-09 20:40:22 +00:00
{% if not no_label %}
<label class="is-sr-only" for="privacy_{{ uuid }}">{% trans "Post privacy" %}</label>
2020-11-09 20:40:22 +00:00
{% endif %}
{% firstof current user.default_post_privacy "public" as privacy %}
<select name="privacy" id="privacy_{{ uuid }}">
<option value="public" {% if privacy == 'public' %}selected{% endif %}>
2021-02-28 02:48:10 +00:00
{% trans "Public" %}
2020-11-11 04:11:21 +00:00
</option>
<option value="unlisted" {% if privacy == 'unlisted' %}selected{% endif %}>
2021-02-28 02:48:10 +00:00
{% trans "Unlisted" %}
2020-11-11 04:11:21 +00:00
</option>
<option value="followers" {% if privacy == 'followers' %}selected{% endif %}>
2021-02-28 02:48:10 +00:00
{% trans "Followers" %}
2020-11-11 04:11:21 +00:00
</option>
<option value="direct" {% if privacy == 'direct' %}selected{% endif %}>
2021-02-28 02:48:10 +00:00
{% trans "Private" %}
2020-11-11 04:11:21 +00:00
</option>
2020-11-06 17:07:15 +00:00
</select>
</div>