From cc1ae270ccfba412295cf79e46efe7913af966b9 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 28 Sep 2021 16:09:24 -0700 Subject: [PATCH] Label shelf privacy in edit shelf form --- bookwyrm/templates/shelf/edit_shelf_form.html | 27 +++++++++---------- .../templates/snippets/privacy_select.html | 3 +-- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/bookwyrm/templates/shelf/edit_shelf_form.html b/bookwyrm/templates/shelf/edit_shelf_form.html index 753d0681..847d5e46 100644 --- a/bookwyrm/templates/shelf/edit_shelf_form.html +++ b/bookwyrm/templates/shelf/edit_shelf_form.html @@ -9,23 +9,22 @@
{% csrf_token %} - {% if shelf.editable %} -
- - -
- {% else %} - - {% endif %} +
+ {% if shelf.editable %} +
+ + +
+ {% else %} + + {% endif %} -
-
- {% include 'snippets/privacy_select.html' with current=shelf.privacy %} -
-
- +
+ + {% include 'snippets/privacy_select.html' with current=shelf.privacy uuid=shelf.id no_label=True %}
+ {% endblock %} diff --git a/bookwyrm/templates/snippets/privacy_select.html b/bookwyrm/templates/snippets/privacy_select.html index d7184e13..e1053051 100644 --- a/bookwyrm/templates/snippets/privacy_select.html +++ b/bookwyrm/templates/snippets/privacy_select.html @@ -1,7 +1,7 @@ {% load i18n %} {% load utilities %}
- {% with 0|uuid as uuid %} + {% firstof uuid 0|uuid as uuid %} {% if not no_label %} {% endif %} @@ -20,6 +20,5 @@ {% trans "Private" %} - {% endwith %}