From bcbcdd5b3b070c35537b7aa4089c79cc724a8956 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 3 Feb 2021 12:36:20 -0800 Subject: [PATCH] Uses component for create shelf form --- .../templates/user/create_shelf_form.html | 26 +++++++++++++++++++ bookwyrm/templates/user/shelf.html | 23 +++------------- bookwyrm/urls.py | 2 +- 3 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 bookwyrm/templates/user/create_shelf_form.html diff --git a/bookwyrm/templates/user/create_shelf_form.html b/bookwyrm/templates/user/create_shelf_form.html new file mode 100644 index 00000000..89f41fd8 --- /dev/null +++ b/bookwyrm/templates/user/create_shelf_form.html @@ -0,0 +1,26 @@ +{% extends 'components/inline_form.html' %} + +{% block header %} +Create New Shelf +{% endblock %} + +{% block form %} +
+ {% csrf_token %} + +
+ + +
+ +
+
+ {% include 'snippets/privacy_select.html' %} +
+
+ +
+
+
+{% endblock %} + diff --git a/bookwyrm/templates/user/shelf.html b/bookwyrm/templates/user/shelf.html index add5e5db..07b4f30b 100644 --- a/bookwyrm/templates/user/shelf.html +++ b/bookwyrm/templates/user/shelf.html @@ -29,30 +29,13 @@ {% if is_self %}
- {% include 'snippets/toggle/open_button.html' with text="Create shelf" icon="plus" class="is-clickable" controls_text="create-shelf-form" %} + {% include 'snippets/toggle/open_button.html' with text="Create shelf" icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
{% endif %} -