clean up templates

This commit is contained in:
Hugh Rundle 2021-10-16 08:18:55 +11:00
parent 97ea61dd7e
commit 864d8cea2b
6 changed files with 20 additions and 13 deletions

View 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' request.user.username %}">
{% include 'groups/form.html' with group_form=group_form %}
</form>
{% endblock %}

View file

@ -1,8 +1,9 @@
{% extends 'groups/group.html' %} {% extends 'groups/group.html' %}
{% load i18n %}
{% block searchresults %} {% block searchresults %}
<h2 class="title is-5"> <h2 class="title is-5">
Add new members! {% trans "Add new members!" %}
</h2> </h2>
{% include 'groups/suggested_users.html' with suggested_users=suggested_users query=query %} {% include 'groups/suggested_users.html' with suggested_users=suggested_users query=query %}
{% endblock %} {% endblock %}

View file

@ -1,6 +1,5 @@
{% load i18n %} {% load i18n %}
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user" value="{{ request.user.id }}">
<div class="columns"> <div class="columns">
<div class="column is-two-thirds"> <div class="column is-two-thirds">

View file

@ -37,7 +37,7 @@
<input type="radio" name="curation" value="group"{% if list.curation == 'group' %} checked{% endif %} > {% trans "Group" %} <input type="radio" name="curation" value="group"{% if list.curation == 'group' %} checked{% endif %} > {% trans "Group" %}
<p class="help mb-2">{% trans "Group members can add to and remove from this list" %}</p> <p class="help mb-2">{% trans "Group members can add to and remove from this list" %}</p>
<fieldset class="{% if list.curation != 'group' %}is-hidden{% endif %}" id="list_group_selector"> <fieldset class="{% if list.curation != 'group' %}is-hidden{% endif %}" id="list_group_selector">
{% if user.memberships %} {% if user.memberships.exists %}
<label class="label" for="id_group" id="group">{% trans "Select Group" %}</label> <label class="label" for="id_group" id="group">{% trans "Select Group" %}</label>
<div class="field has-addons"> <div class="field has-addons">
<div class="select control"> <div class="select control">

View file

@ -12,7 +12,7 @@
{% endblock %} {% endblock %}
{% block description %} {% block description %}
{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %}
invited you to join the group <a href="{{ group_path }}">{{ group_name }}</a> invited you to join the group <a href="{{ group_path }}">{{ group_name }}</a>
{% endblocktrans %} {% endblocktrans %}
<div class="row shrink"> <div class="row shrink">

View file

@ -24,15 +24,10 @@
{% block panel %} {% block panel %}
<section class="block"> <section class="block">
<form name="create-group" method="post" action="{% url 'user-groups' request.user.username %}" class="box is-hidden" id="create_group">
<header class="columns"> <div class="block">
<h3 class="title column">{% trans "Create group" %}</h3> {% include 'groups/create_form.html' with controls_text="create_group" %}
<div class="column is-narrow"> </div>
{% include 'snippets/toggle/toggle_button.html' with controls_text="create_group" label="close" class="delete" nonbutton=True %}
</div>
</header>
{% include 'groups/form.html' %}
</form>
{% include 'groups/user_groups.html' with memberships=memberships %} {% include 'groups/user_groups.html' with memberships=memberships %}
</section> </section>