forked from mirrors/bookwyrm
add group templates
This commit is contained in:
parent
71b1c6117c
commit
99b533510a
2 changed files with 46 additions and 0 deletions
bookwyrm/templates/groups
12
bookwyrm/templates/groups/create_form.html
Normal file
12
bookwyrm/templates/groups/create_form.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends 'components/inline_form.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block header %}
|
||||
{% trans "Create Group" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<form name="create-group" method="post" action="{% url 'user-groups' %}">
|
||||
{% include 'group/form.html' %}
|
||||
</form>
|
||||
{% endblock %}
|
34
bookwyrm/templates/groups/form.html
Normal file
34
bookwyrm/templates/groups/form.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
{% load i18n %}
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-two-thirds">
|
||||
<div class="field">
|
||||
<label class="label" for="id_name">{% trans "Name:" %}</label>
|
||||
{{ group_form.name }}
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="id_description">{% trans "Description:" %}</label>
|
||||
{{ group_form.description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
{% include 'snippets/privacy_select.html' with current=group.privacy %}
|
||||
</div>
|
||||
<div class="control">
|
||||
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if group.id %}
|
||||
<div class="column is-narrow">
|
||||
{% trans "Delete group" as button_text %}
|
||||
{% include 'snippets/toggle/toggle_button.html' with class="is-danger" text=button_text icon_with_text="x" controls_text="delete_group" controls_uid=group.id focus="modal_title_delete_group" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
Loading…
Reference in a new issue