Templates update

This commit is contained in:
Ludovic Stephan 2020-07-19 16:24:57 +02:00
parent 6454931e70
commit 62281cb3b7
3 changed files with 53 additions and 34 deletions

View file

@ -10,26 +10,13 @@
{# CSS #}
<link rel="stylesheet" href="{% static "bds/css/bds.css" %}">
<link type="text/css" rel="stylesheet" href="{% static 'gestioncof/vendor/font-awesome/css/font-awesome.min.css' %}">
{# Javascript #}
<script src="{% static 'vendor/jquery/jquery-3.3.1.min.js' %}"></script>
<script src="{% static "vendor/jquery/jquery.autocomplete-light.min.js" %}"></script>
</head>
<body>
{% include "bds/nav.html" %}
{% if messages %}
{% for message in messages %}
<p class="{{ message.level_tag }}">
{% if 'safe' in message.tags %}
{{ message|safe }}
{% else %}
{{ message }}
{% endif %}
</p>
{% endfor %}
{% endif %}
{% block content %}{% endblock %}
{% block body %}{% endblock %}
</body>
</html>

View file

@ -0,0 +1,28 @@
{% extends "bds/base.html" %}
{% block body %}
{% include "bds/nav.html" %}
{% if messages %}
{% for message in messages %}
<p class="{{ message.level_tag }}">
{% if 'safe' in message.tags %}
{{ message|safe }}
{% else %}
{{ message }}
{% endif %}
</p>
{% endfor %}
{% endif %}
<section class="section">
<div class="columns">
<div class="column is-two-thirds is-offset-2">
{% block content %}
{% endblock content %}
</div>
</div>
</section>
{% endblock body %}

View file

@ -1,27 +1,31 @@
{% extends "bds/base.html" %}
{% extends "bds/base_layout.html" %}
{% load i18n %}
{% block content %}
{% for error in user_form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% for error in profile_form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
<div class="form-wrapper">
<form action="" method="post">
{% csrf_token %}
{% for error in user_form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% for error in profile_form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
<table>
<tbody>
{{ user_form.as_table }}
{{ profile_form.as_table }}
</tbody>
</table>
<h1 class="title">{% trans "Modification de l'utilisateur " %}{{user_form.instance.username}}</h1>
<div class="container">
<form action="" method="post">
{% csrf_token %}
{% include "bds/forms/form.html" with form=user_form errors=False %}
{% include "bds/forms/form.html" with form=profile_form errors=False %}
<div class="field">
<p class="control">
<input class="button is-fullwidth" type="submit" value="Enregistrer">
</p>
</div>
</form>
</div>
<input type="submit" value="Enregistrer">
</form>
</div>
{% endblock %}