mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
List existing sessions on the home.
Also factorize the code to display errors in forms.
This commit is contained in:
parent
87ea045059
commit
ea136b506b
3 changed files with 19 additions and 18 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Welcome on the budget manager</h2>
|
<h2>Welcome on the budget manager</h2>
|
||||||
|
<div class="span-12 prepend-2">
|
||||||
<form class="span-12 prepend-2" action="{{ url_for('authenticate') }}" method="post" accept-charset="utf-8">
|
<form action="{{ url_for('authenticate') }}" method="post" accept-charset="utf-8">
|
||||||
<h3>Log to an existing project...</h3>
|
<h3>Log to an existing project...</h3>
|
||||||
|
|
||||||
{{ auth_form.hidden_tag() }}
|
{{ auth_form.hidden_tag() }}
|
||||||
|
@ -11,7 +11,14 @@
|
||||||
<p>{{ auth_form.id.label }}<br /> {{ auth_form.id }}</p>
|
<p>{{ auth_form.id.label }}<br /> {{ auth_form.id }}</p>
|
||||||
<p>{{ auth_form.password.label }}<br /> {{ auth_form.password }}</p>
|
<p>{{ auth_form.password.label }}<br /> {{ auth_form.password }}</p>
|
||||||
<p>{{ auth_form.submit }}</p>
|
<p>{{ auth_form.submit }}</p>
|
||||||
</form>
|
</form>
|
||||||
|
<h3>Recently visisted projects</h3>
|
||||||
|
<ul>
|
||||||
|
{% for project in session['projects'] %}
|
||||||
|
<li>{{ project }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form class="span-10 last" action="{{ url_for('create_project') }}" method="post" class="container span-24 add-bill">
|
<form class="span-10 last" action="{{ url_for('create_project') }}" method="post" class="container span-24 add-bill">
|
||||||
<h3>...or create a new one</h3>
|
<h3>...or create a new one</h3>
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
|
|
||||||
<div class="container" class="span-24">
|
<div class="container" class="span-24">
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<div class="span-18">
|
|
||||||
<a href="/"><h1>Account manager ! <span class="small">Manage your shared expenses.</span></h1></a>
|
<a href="/"><h1>Account manager ! <span class="small">Manage your shared expenses.</span></h1></a>
|
||||||
</div>
|
<div class="fright" id="topmenu">
|
||||||
<div class="span-6 last" id="topmenu">
|
|
||||||
{% block top_menu %}{% endblock %}
|
{% block top_menu %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{% for errors in form.errors.values() %}
|
{% include "display_errors.html" %}
|
||||||
{% for error in errors %}
|
|
||||||
<p class="error">{{error}}</p>
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
<form action="{{ url_for("add_member", project_id=project.id) }}" method="post">
|
<form action="{{ url_for("add_member", project_id=project.id) }}" method="post">
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
<p>{{ form.name.label }}<br /> {{ form.name }}</p>
|
<p>{{ form.name.label }}<br /> {{ form.name }}</p>
|
||||||
|
|
Loading…
Reference in a new issue