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' %}
{% load i18n %}
{% block searchresults %}
<h2 class="title is-5">
Add new members!
{% trans "Add new members!" %}
</h2>
{% include 'groups/suggested_users.html' with suggested_users=suggested_users query=query %}
{% endblock %}

View file

@ -1,6 +1,5 @@
{% load i18n %}
{% csrf_token %}
<input type="hidden" name="user" value="{{ request.user.id }}">
<div class="columns">
<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" %}
<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">
{% if user.memberships %}
{% if user.memberships.exists %}
<label class="label" for="id_group" id="group">{% trans "Select Group" %}</label>
<div class="field has-addons">
<div class="select control">

View file

@ -12,7 +12,7 @@
{% endblock %}
{% 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>
{% endblocktrans %}
<div class="row shrink">

View file

@ -24,15 +24,10 @@
{% block panel %}
<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">
<h3 class="title column">{% trans "Create group" %}</h3>
<div class="column is-narrow">
{% include 'snippets/toggle/toggle_button.html' with controls_text="create_group" label="close" class="delete" nonbutton=True %}
</div>
</header>
{% include 'groups/form.html' %}
</form>
<div class="block">
{% include 'groups/create_form.html' with controls_text="create_group" %}
</div>
{% include 'groups/user_groups.html' with memberships=memberships %}
</section>