moviewyrm/bookwyrm/templates/snippets/goal_form.html

35 lines
1.4 KiB
HTML
Raw Normal View History

2021-01-16 19:34:19 +00:00
<form method="post" name="goal" action="{{ request.user.local_path }}/goal/{{ year }}">
{% csrf_token %}
2021-01-16 20:39:51 +00:00
<input type="hidden" name="year" value="{% if goal %}{{ goal.year }}{% else %}{{ year }}{% endif %}">
<input type="hidden" name="user" value="{{ request.user.id }}">
<div class="columns">
<div class="column">
<label class="label" for="id_goal">Reading goal:</label>
<div class="field has-addons">
<div class="control">
2021-01-19 15:38:18 +00:00
<input type="number" class="input" name="goal" min="1" id="id_goal" value="{% if goal %}{{ goal.goal }}{% else %}12{% endif %}">
</div>
2021-01-16 22:33:43 +00:00
<p class="button is-static" aria-hidden="true">books</p>
</div>
</div>
<div class="column">
2021-01-16 19:34:19 +00:00
<label class="label"><p class="mb-2">Goal privacy:</p>
2021-01-16 20:39:51 +00:00
{% include 'snippets/privacy_select.html' with no_label=True current=goal.privacy %}
</label>
</div>
</div>
2021-01-16 19:34:19 +00:00
<label for="post_status" class="label">
<input type="checkbox" name="post-status" id="post_status" class="checkbox" checked>
Post to feed
</label>
<p>
<button type="submit" class="button is-link">Set goal</button>
2021-01-16 20:39:51 +00:00
{% if goal %}
{% include 'snippets/toggle/close_button.html' with text="Cancel" controls_text="show-edit-goal" %}
2021-01-16 20:39:51 +00:00
{% endif %}
</p>
</form>