On utilise un template commun pour des formulaires
This commit is contained in:
parent
b9703e6e78
commit
50453a799a
8 changed files with 52 additions and 156 deletions
31
shared/templates/forms/common-form.html
Normal file
31
shared/templates/forms/common-form.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div class="columns is-centered">
|
||||
<div class="column {% if c_size %}{{ c_size }}{% else %}is-two-thirds{% endif %}">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% include "forms/form.html" %}
|
||||
|
||||
<div class="field is-grouped is-centered">
|
||||
<div class="control is-expanded">
|
||||
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||
<span class="icon">
|
||||
<i class="fas fa-{% if f_icon %}{{ f_icon }}{% else %}check{% endif %}"></i>
|
||||
</span>
|
||||
<span>{% if f_submit %}{{ f_submit }}{% else %}{% trans "Enregister" %}{% endif %}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="control">
|
||||
<a class="button is-primary" href="{{ r_url }}{% if r_anchor %}#{{ r_anchor }}{% endif %}">
|
||||
<span class="icon">
|
||||
<i class="fas fa-undo-alt"></i>
|
||||
</span>
|
||||
<span>{% if f_return %}{{ f_return }}{% else %}{% trans "Retour" %}{% endif %}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue