Templates update
This commit is contained in:
parent
6454931e70
commit
62281cb3b7
3 changed files with 53 additions and 34 deletions
|
@ -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>
|
||||
|
|
28
bds/templates/bds/base_layout.html
Normal file
28
bds/templates/bds/base_layout.html
Normal 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 %}
|
|
@ -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">
|
||||
{% 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 %}
|
||||
|
||||
<h1 class="title">{% trans "Modification de l'utilisateur " %}{{user_form.instance.username}}</h1>
|
||||
|
||||
<div class="container">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
{{ user_form.as_table }}
|
||||
{{ profile_form.as_table }}
|
||||
</tbody>
|
||||
</table>
|
||||
{% include "bds/forms/form.html" with form=user_form errors=False %}
|
||||
{% include "bds/forms/form.html" with form=profile_form errors=False %}
|
||||
|
||||
<input type="submit" value="Enregistrer">
|
||||
</form>
|
||||
<div class="field">
|
||||
<p class="control">
|
||||
<input class="button is-fullwidth" type="submit" value="Enregistrer">
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue