Oops I wasn't supposed to close input tags

This commit is contained in:
Mouse Reeve 2020-04-21 10:47:55 -07:00
parent 52651fdaa0
commit 894f76f843
10 changed files with 22 additions and 22 deletions

View file

@ -57,8 +57,8 @@
<h3>Tags</h3> <h3>Tags</h3>
<form name="tag" action="/tag/" method="post"> <form name="tag" action="/tag/" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="text" name="name"></input> <input type="text" name="name">
<button type="submit">Add tag</button> <button type="submit">Add tag</button>
</form> </form>
</div> </div>

View file

@ -40,7 +40,7 @@
<div id="actions"> <div id="actions">
<div id="search"> <div id="search">
<form action="/search/"> <form action="/search/">
<input type="text" name="q" placeholder="Search for a book or user"></input> <input type="text" name="q" placeholder="Search for a book or user">
<button type="submit"> <button type="submit">
<span class="icon icon-search"> <span class="icon icon-search">
<span class="hidden-text">search</span> <span class="hidden-text">search</span>

View file

@ -27,12 +27,12 @@
{% for shelf in shelves %} {% for shelf in shelves %}
{% for book in shelf.books %} {% for book in shelf.books %}
<div class="compose-popout"> <div class="compose-popout">
<input name="book-popout" type="radio" id="book-{{ book.id }}-radio"></input> <input name="book-popout" type="radio" id="book-{{ book.id }}-radio">
<div class="compose compose-suggestion" id="compose-book-{{ book.id }}"> <div class="compose compose-suggestion" id="compose-book-{{ book.id }}">
<label class="close icon icon-close" for="book-{{ book.id }}-radio-close" onclick="hide_element(this)"> <label class="close icon icon-close" for="book-{{ book.id }}-radio-close" onclick="hide_element(this)">
<span class="hidden-text">Close</span> <span class="hidden-text">Close</span>
</label> </label>
<input name="book-popout" type="radio" id="book-{{ book.id }}-radio-close"></input> <input name="book-popout" type="radio" id="book-{{ book.id }}-radio-close">
<div class="content-container"> <div class="content-container">
<h2> <h2>
{% include 'snippets/avatar.html' with user=user %} {% include 'snippets/avatar.html' with user=user %}

View file

@ -21,7 +21,7 @@
{% endif %} {% endif %}
<form class="tab-option-{{ book.id }} review-form" name="review" action="/review/" method="post" id="tab-review-{{ book.id }}"> <form class="tab-option-{{ book.id }} review-form" name="review" action="/review/" method="post" id="tab-review-{{ book.id }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
{% include 'snippets/rate_form.html' with book=book %} {% include 'snippets/rate_form.html' with book=book %}
{{ review_form.as_p }} {{ review_form.as_p }}
<button type="submit">post review</button> <button type="submit">post review</button>
@ -29,14 +29,14 @@
<form class="hidden tab-option-{{ book.id }} review-form" name="comment" action="/comment/" method="post" id="tab-comment-{{ book.id }}"> <form class="hidden tab-option-{{ book.id }} review-form" name="comment" action="/comment/" method="post" id="tab-comment-{{ book.id }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
{{ comment_form.as_p }} {{ comment_form.as_p }}
<button type="submit">post comment</button> <button type="submit">post comment</button>
</form> </form>
<form class="hidden tab-option-{{ book.id }} review-form quote-form" name="quotation" action="/quotate/" method="post" id="tab-quotation-{{ book.id }}"> <form class="hidden tab-option-{{ book.id }} review-form quote-form" name="quotation" action="/quotate/" method="post" id="tab-quotation-{{ book.id }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
{{ quotation_form.as_p }} {{ quotation_form.as_p }}
<button typr="submit">post quote</button> <button typr="submit">post quote</button>
</form> </form>

View file

@ -9,7 +9,7 @@ Follow request already sent.
<form action="/follow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}"> <form action="/follow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}"></input> <input type="hidden" name="user" value="{{ user.username }}">
{% if user.manually_approves_followers %} {% if user.manually_approves_followers %}
<button type="submit">Send follow request</button> <button type="submit">Send follow request</button>
{% else %} {% else %}
@ -18,7 +18,7 @@ Follow request already sent.
</form> </form>
<form action="/unfollow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if not request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}"> <form action="/unfollow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if not request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}"></input> <input type="hidden" name="user" value="{{ user.username }}">
<button type="submit">Unfollow</button> <button type="submit">Unfollow</button>
</form> </form>
{% endif %} {% endif %}

View file

@ -3,7 +3,7 @@
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<form name="reply" action="/reply" method="post" onsubmit="return reply(event)"> <form name="reply" action="/reply" method="post" onsubmit="return reply(event)">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="parent" value="{{ activity.id }}"></input> <input type="hidden" name="parent" value="{{ activity.id }}">
<textarea name="content" placeholder="Leave a comment..." id="id_content" required="true"></textarea> <textarea name="content" placeholder="Leave a comment..." id="id_content" required="true"></textarea>
<button type="submit"> <button type="submit">
<span class="icon icon-comment"> <span class="icon icon-comment">

View file

@ -4,8 +4,8 @@
{% for i in '12345'|make_list %} {% for i in '12345'|make_list %}
<form name="rate" action="/rate/" method="POST" onsubmit="return rate_stars(event)"> <form name="rate" action="/rate/" method="POST" onsubmit="return rate_stars(event)">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="rating" value="{{ forloop.counter }}"></input> <input type="hidden" name="rating" value="{{ forloop.counter }}">
<button type="submit" class="icon icon-star-{% if book|rating:user < forloop.counter %}empty{% else %}full{% endif %}"> <button type="submit" class="icon icon-star-{% if book|rating:user < forloop.counter %}empty{% else %}full{% endif %}">
<span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span> <span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
</button> </button>

View file

@ -1,9 +1,9 @@
{% load fr_display %} {% load fr_display %}
<span class="hidden-text">Rating</span> <span class="hidden-text">Rating</span>
<div class="stars rate-stars"> <div class="stars rate-stars">
<input type="radio" name="rating" value="" checked></input> <input type="radio" name="rating" value="" checked>
{% for i in '12345'|make_list %} {% for i in '12345'|make_list %}
<input id="book{{book.id}}-star-{{ forloop.counter }}" type="radio" name="rating" value="{{ forloop.counter }}"></input> <input id="book{{book.id}}-star-{{ forloop.counter }}" type="radio" name="rating" value="{{ forloop.counter }}">
<label class="icon icon-star-empty" for="book{{book.id}}-star-{{ forloop.counter }}"> <label class="icon icon-star-empty" for="book{{book.id}}-star-{{ forloop.counter }}">
<span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span> <span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
</label> </label>

View file

@ -4,8 +4,8 @@
<div class="pulldown-button"> <div class="pulldown-button">
<form name="shelve" action="/shelve/" method="post"> <form name="shelve" action="/shelve/" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}"></input> <input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}"></input> <input type="hidden" name="shelf" value="{% shelve_button_identifier book %}">
<button type="submit" style="">{% shelve_button_text book %}</button></form><div class="pulldown-container"> <button type="submit" style="">{% shelve_button_text book %}</button></form><div class="pulldown-container">
<button class="pulldown-toggle"> <button class="pulldown-toggle">
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span> <span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
@ -13,7 +13,7 @@
<ul class="pulldown"> <ul class="pulldown">
<form name="shelve" action="/shelve/" method="post"> <form name="shelve" action="/shelve/" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}"></input> <input type="hidden" name="book" value="{{ book.id }}">
{% for shelf in request.user.shelf_set.all %} {% for shelf in request.user.shelf_set.all %}
<li> <li>
<button name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>{{ shelf.name }} {% if shelf in book.shelf_set.all %} ✓ {% endif %}</button> <button name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>{{ shelf.name }} {% if shelf in book.shelf_set.all %} ✓ {% endif %}</button>

View file

@ -3,15 +3,15 @@
{% if tag.identifier in user_tags %} {% if tag.identifier in user_tags %}
<form class="tag-form" name="tag" action="/untag/" method="post"> <form class="tag-form" name="tag" action="/untag/" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="name" value="{{ tag.name }}"></input> <input type="hidden" name="name" value="{{ tag.name }}">
<button type="submit">x</button> <button type="submit">x</button>
</form> </form>
{% else %} {% else %}
<form class="tag-form" name="tag" action="/tag/" method="post"> <form class="tag-form" name="tag" action="/tag/" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input> <input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="name" value="{{ tag.name }}"></input> <input type="hidden" name="name" value="{{ tag.name }}">
<button type="submit">+</button> <button type="submit">+</button>
</form> </form>
{% endif %} {% endif %}