forked from mirrors/bookwyrm
Label shelf privacy in edit shelf form
This commit is contained in:
parent
d9945ac5e3
commit
cc1ae270cc
2 changed files with 14 additions and 16 deletions
|
@ -9,8 +9,9 @@
|
|||
<form name="edit-shelf" action="{{ shelf.local_path }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<div class="columns is-mobile">
|
||||
{% if shelf.editable %}
|
||||
<div class="field">
|
||||
<div class="column">
|
||||
<label class="label" for="id_name">{% trans "Name:" %}</label>
|
||||
<input type="text" name="name" maxlength="100" class="input" required="true" value="{{ shelf.name }}" id="id_name">
|
||||
</div>
|
||||
|
@ -18,14 +19,12 @@
|
|||
<input type="hidden" name="name" required="true" value="{{ shelf.name }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
{% include 'snippets/privacy_select.html' with current=shelf.privacy %}
|
||||
<div class="column">
|
||||
<label class="label" for="privacy_{{ shelf.id }}">{% trans "Shelf privacy:" %}</label>
|
||||
{% include 'snippets/privacy_select.html' with current=shelf.privacy uuid=shelf.id no_label=True %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button is-primary" type="submit">{% trans "Update shelf" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% load i18n %}
|
||||
{% load utilities %}
|
||||
<div class="select {{ class }}">
|
||||
{% with 0|uuid as uuid %}
|
||||
{% firstof uuid 0|uuid as uuid %}
|
||||
{% if not no_label %}
|
||||
<label class="is-sr-only" for="privacy_{{ uuid }}">{% trans "Post privacy" %}</label>
|
||||
{% endif %}
|
||||
|
@ -20,6 +20,5 @@
|
|||
{% trans "Private" %}
|
||||
</option>
|
||||
</select>
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue