mirror of
https://github.com/ae-utbm/sith.git
synced 2025-06-27 21:55:19 +00:00
apply review comments
This commit is contained in:
parent
455e1d85d4
commit
5888b96271
@ -27,7 +27,7 @@ class LimitedCheckboxField(forms.ModelMultipleChoiceField):
|
||||
def validate(self, qs):
|
||||
if qs.count() > self.max_choice:
|
||||
raise forms.ValidationError(
|
||||
_("You have selected too much candidates."), code="invalid"
|
||||
_("You have selected too many candidates."), code="invalid"
|
||||
)
|
||||
|
||||
|
||||
@ -49,9 +49,7 @@ class CandidateForm(forms.ModelForm):
|
||||
"election_list": AutoCompleteSelect,
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self, *args, election: Election | None, can_edit: bool = False, **kwargs
|
||||
):
|
||||
def __init__(self, *args, election: Election, can_edit: bool = False, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields["role"].queryset = election.roles.select_related("election")
|
||||
self.fields["election_list"].queryset = election.election_lists.all()
|
||||
@ -62,7 +60,7 @@ class CandidateForm(forms.ModelForm):
|
||||
class VoteForm(forms.Form):
|
||||
def __init__(self, election: Election, user: User, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if election.can_vote(user):
|
||||
if not election.can_vote(user):
|
||||
return
|
||||
for role in election.roles.all():
|
||||
cand = role.candidatures
|
||||
|
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-06-25 16:29+0200\n"
|
||||
"POT-Creation-Date: 2025-06-27 12:45+0200\n"
|
||||
"PO-Revision-Date: 2016-07-18\n"
|
||||
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||
@ -1708,27 +1708,27 @@ msgstr "500, Erreur Serveur"
|
||||
msgid "Welcome!"
|
||||
msgstr "Bienvenue !"
|
||||
|
||||
#: core/templates/core/base.jinja core/templates/core/base/navbar.jinja
|
||||
#: core/templates/core/base/footer.jinja core/templates/core/base/navbar.jinja
|
||||
msgid "Contacts"
|
||||
msgstr "Contacts"
|
||||
|
||||
#: core/templates/core/base.jinja
|
||||
#: core/templates/core/base/footer.jinja
|
||||
msgid "Legal notices"
|
||||
msgstr "Mentions légales"
|
||||
|
||||
#: core/templates/core/base.jinja
|
||||
#: core/templates/core/base/footer.jinja
|
||||
msgid "Intellectual property"
|
||||
msgstr "Propriété intellectuelle"
|
||||
|
||||
#: core/templates/core/base.jinja
|
||||
#: core/templates/core/base/footer.jinja
|
||||
msgid "Help & Documentation"
|
||||
msgstr "Aide & Documentation"
|
||||
|
||||
#: core/templates/core/base.jinja
|
||||
#: core/templates/core/base/footer.jinja
|
||||
msgid "R&D"
|
||||
msgstr "R&D"
|
||||
|
||||
#: core/templates/core/base.jinja
|
||||
#: core/templates/core/base/footer.jinja
|
||||
msgid "Site created by the IT Department of the AE"
|
||||
msgstr "Site réalisé par le Pôle Informatique de l'AE"
|
||||
|
||||
@ -3927,7 +3927,7 @@ msgid "You can't buy a refilling with sith money"
|
||||
msgstr "Vous ne pouvez pas acheter un rechargement avec de l'argent du sith"
|
||||
|
||||
#: election/forms.py
|
||||
msgid "You have selected too much candidates."
|
||||
msgid "You have selected too many candidates."
|
||||
msgstr "Vous avez sélectionné trop de candidats."
|
||||
|
||||
#: election/forms.py
|
||||
|
Loading…
x
Reference in New Issue
Block a user