1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Merge branch 'master' into api

# Conflicts:
#	apps/note/forms.py
#	apps/note/urls.py
#	apps/note/views.py
This commit is contained in:
Yohann D'ANELLO
2020-02-16 22:25:00 +01:00
9 changed files with 125 additions and 9 deletions

View File

@ -52,7 +52,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#"><i class="fa fa-coffee"></i> Consos</a>
<a class="nav-link" href="{% url 'note:consos' %}"><i class="fa fa-coffee"></i> Consos</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="{% url 'member:club_list' %}"><i class="fa fa-users"></i> Clubs</a>

View File

@ -0,0 +1,41 @@
{% extends "base.html" %}
{% load i18n static pretty_money %}
{% block content %}
<fieldset class="module aligned">
{% for type in template_types %}
<a href="{% url 'note:consos' template_type=type %}"><button>{{ type }}</button></a>
{% endfor %}
</fieldset>
<form method="post" onsubmit="window.onbeforeunload=null">{% csrf_token %}
{% if form.non_field_errors %}
<p class="errornote">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</p>
{% endif %}
<fieldset class="module aligned">
{% for field in form %}
<div class="form-row{% if field.errors %} errors{% endif %}">
{{ field.errors }}
<div>
{{ field.label_tag }}
{% if field.is_readonly %}
<div class="readonly">{{ field.contents }}</div>
{% else %}
{{ field }}
{% endif %}
{% if field.field.help_text %}
<div class="help">{{ field.field.help_text|safe }}</div>
{% endif %}
</div>
</div>
{% endfor %}
{% for button in buttons %}
<button name="button" value="{{ button.name }}">{{ button.name }} ({{ button.amount | pretty_money }})</button>
{% endfor %}
</fieldset>
</form>
{% endblock %}