Template tweaks
This commit is contained in:
parent
c7e5d9ad6e
commit
c70fcefa86
5 changed files with 85 additions and 63 deletions
|
@ -51,12 +51,14 @@ class QuestionForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Question
|
model = Question
|
||||||
fields = ["text"]
|
fields = ["text"]
|
||||||
|
widgets = {"text": forms.TextInput}
|
||||||
|
|
||||||
|
|
||||||
class OptionForm(forms.ModelForm):
|
class OptionForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Option
|
model = Option
|
||||||
fields = ["text"]
|
fields = ["text"]
|
||||||
|
widgets = {"text": forms.TextInput}
|
||||||
|
|
||||||
|
|
||||||
class VoteForm(forms.ModelForm):
|
class VoteForm(forms.ModelForm):
|
||||||
|
|
|
@ -31,29 +31,33 @@
|
||||||
<h1 class="title">{% trans "Modification d'une élection" %}</h1>
|
<h1 class="title">{% trans "Modification d'une élection" %}</h1>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<form action="" method="post">
|
<div class="columns is-centered">
|
||||||
{% csrf_token %}
|
<div class="column is-two-thirds">
|
||||||
|
<form action="" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
{% include "forms/form.html" with errors=False %}
|
{% include "forms/form.html" with errors=False %}
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>{% trans "Enregistrer" %}</span>
|
<span>{% trans "Enregistrer" %}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<a class="button is-primary" href="{% url 'election.admin' election.pk %}">
|
<a class="button is-primary" href="{% url 'election.admin' election.pk %}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-undo-alt"></i>
|
<i class="fas fa-undo-alt"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>{% trans "Retour" %}</span>
|
<span>{% trans "Retour" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
8
elections/templates/elections/election_voters.html
Normal file
8
elections/templates/elections/election_voters.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -13,29 +13,33 @@
|
||||||
<h1 class="title">{% trans "Modification d'une option" %}</h1>
|
<h1 class="title">{% trans "Modification d'une option" %}</h1>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<form action="" method="post">
|
<div class="columns is-centered">
|
||||||
{% csrf_token %}
|
<div class="column is-two-thirds">
|
||||||
|
<form action="" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
{% include "forms/form.html" with errors=False %}
|
{% include "forms/form.html" with errors=False %}
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>{% trans "Enregistrer" %}</span>
|
<span>{% trans "Enregistrer" %}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<a class="button is-primary" href="{% url 'election.admin' option.question.election.pk %}#o_{{ option.pk }}">
|
<a class="button is-primary" href="{% url 'election.admin' option.question.election.pk %}#o_{{ option.pk }}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-undo-alt"></i>
|
<i class="fas fa-undo-alt"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>{% trans "Retour" %}</span>
|
<span>{% trans "Retour" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -13,29 +13,33 @@
|
||||||
<h1 class="title">{% trans "Modification d'une question" %}</h1>
|
<h1 class="title">{% trans "Modification d'une question" %}</h1>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<form action="" method="post">
|
<div class="columns is-centered">
|
||||||
{% csrf_token %}
|
<div class="column is-two-thirds">
|
||||||
|
<form action="" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
{% include "forms/form.html" with errors=False %}
|
{% include "forms/form.html" with errors=False %}
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>{% trans "Enregistrer" %}</span>
|
<span>{% trans "Enregistrer" %}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<a class="button is-primary" href="{% url 'election.admin' question.election.pk %}#q_{{ question.pk }}">
|
<a class="button is-primary" href="{% url 'election.admin' question.election.pk %}#q_{{ question.pk }}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-undo-alt"></i>
|
<i class="fas fa-undo-alt"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>{% trans "Retour" %}</span>
|
<span>{% trans "Retour" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue