Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
a0b1fa32
Commit
a0b1fa32
authored
Sep 02, 2016
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix subscription form
parent
bae34c4b
Pipeline
#173
failed with stage
in 1 minute and 59 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
87 deletions
+95
-87
locale/fr/LC_MESSAGES/django.mo
locale/fr/LC_MESSAGES/django.mo
+0
-0
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+91
-86
subscription/models.py
subscription/models.py
+1
-1
subscription/templates/subscription/subscription.jinja
subscription/templates/subscription/subscription.jinja
+1
-0
subscription/views.py
subscription/views.py
+2
-0
No files found.
locale/fr/LC_MESSAGES/django.mo
View file @
a0b1fa32
No preview for this file type
locale/fr/LC_MESSAGES/django.po
View file @
a0b1fa32
...
...
@@ -6,7 +6,7 @@
msgid
""
msgstr
""
"Report-Msgid-Bugs-To:
\n
"
"POT-Creation-Date: 2016-09-0
1 16:54
+0200
\n
"
"POT-Creation-Date: 2016-09-0
2 12:26
+0200
\n
"
"PO-Revision-Date: 2016-07-18
\n
"
"Last-Translator: Skia <skia@libskia.so>
\n
"
"Language-Team: AE info <ae.info@utbm.fr>
\n
"
...
...
@@ -134,7 +134,7 @@ msgid "comment"
msgstr
"commentaire"
#: accounting/models.py:181 counter/models.py:204 counter/models.py:247
#: subscription/models.py:5
3
#: subscription/models.py:5
7
msgid
"payment method"
msgstr
"méthode de paiement"
...
...
@@ -162,8 +162,7 @@ msgstr "type comptable"
msgid
"target type"
msgstr
"type de cible"
#: accounting/models.py:190 club/templates/club/club_detail.jinja:21
#: club/templates/club/club_members.jinja:8
#: accounting/models.py:190 club/templates/club/club_members.jinja:8
#: launderette/templates/launderette/launderette_admin.jinja:44
msgid
"User"
msgstr
"Utilisateur"
...
...
@@ -180,7 +179,7 @@ msgstr "Compte"
msgid
"Company"
msgstr
"Entreprise"
#: accounting/models.py:190 sith/settings.py:28
3
sith/settings_sample.py:272
#: accounting/models.py:190 sith/settings.py:28
7
sith/settings_sample.py:272
msgid
"Other"
msgstr
"Autre"
...
...
@@ -304,6 +303,7 @@ msgid "Delete"
msgstr
"Supprimer"
#: accounting/templates/accounting/bank_account_details.jinja:17
#: club/templates/club/club_base.jinja:11
#: core/templates/core/user_base.jinja:12
msgid
"Infos"
msgstr
"Infos"
...
...
@@ -324,7 +324,7 @@ msgstr "Nouveau compte club"
#: accounting/templates/accounting/bank_account_list.jinja:21
#: accounting/templates/accounting/club_account_details.jinja:53
#: accounting/templates/accounting/journal_details.jinja:66
#: club/templates/club/club_
detail.jinja:8
core/templates/core/file.jinja:38
#: club/templates/club/club_
base.jinja:34
core/templates/core/file.jinja:38
#: core/templates/core/page.jinja:31 core/templates/core/user_base.jinja:33
#: core/templates/core/user_tools.jinja:33
#: counter/templates/counter/counter_list.jinja:20
...
...
@@ -490,7 +490,7 @@ msgstr "Éditer l'opération"
#: core/templates/core/file_edit.jinja:8 core/templates/core/page_prop.jinja:8
#: core/templates/core/pagerev_edit.jinja:24
#: counter/templates/counter/cash_register_summary.jinja:22
#: subscription/templates/subscription/subscription.jinja:2
2
#: subscription/templates/subscription/subscription.jinja:2
3
msgid
"Save"
msgstr
"Sauver"
...
...
@@ -566,24 +566,19 @@ msgstr "L'utilisateur est déjà membre de ce club"
msgid
"past member"
msgstr
"Anciens membres"
#: club/templates/club/club_detail.jinja:6
#: core/templates/core/group_edit.jinja:4
msgid
"Back to list"
msgstr
"Retour à la liste"
#: club/templates/club/club_detail.jinja:11 core/templates/core/file.jinja:41
#: core/templates/core/page.jinja:34
msgid
"Prop"
msgstr
"Propriétés"
#: club/templates/club/club_detail.jinja:15
#: club/templates/club/club_base.jinja:18
msgid
"Members"
msgstr
"Membres"
#: club/templates/club/club_detail.jinja:22
#: club/templates/club/club_members.jinja:9
msgid
"Role"
msgstr
"Rôle"
#: club/templates/club/club_base.jinja:26 core/templates/core/base.jinja:25
#: core/templates/core/user_base.jinja:19
msgid
"Tools"
msgstr
"Outils"
#: club/templates/club/club_base.jinja:42
#: counter/templates/counter/counter_list.jinja:23
msgid
"Props"
msgstr
"Propriétés"
#: club/templates/club/club_edit.jinja:4
msgid
"Edit club"
...
...
@@ -610,7 +605,15 @@ msgstr "Il n'y a pas de club dans ce site web."
msgid
"Club members"
msgstr
"Membres du club"
#: club/templates/club/club_members.jinja:23
#: club/templates/club/club_members.jinja:9
msgid
"Role"
msgstr
"Rôle"
#: club/templates/club/club_members.jinja:10
msgid
"Description"
msgstr
"Description"
#: club/templates/club/club_members.jinja:25
#: core/templates/core/file_detail.jinja:19 launderette/views.py:146
msgid
"Add"
msgstr
"Ajouter"
...
...
@@ -620,15 +623,15 @@ msgstr "Ajouter"
msgid
"Club tools"
msgstr
"Outils club"
#: club/templates/club/club_tools.jinja:
8
#: club/templates/club/club_tools.jinja:
7
msgid
"Counters:"
msgstr
"Comptoirs : "
#: club/templates/club/club_tools.jinja:1
9
#: club/templates/club/club_tools.jinja:1
8
msgid
"Accouting: "
msgstr
"Comptabilité : "
#: club/templates/club/club_tools.jinja:2
7
#: club/templates/club/club_tools.jinja:2
6
msgid
"Manage launderettes"
msgstr
"Gestion des laveries"
...
...
@@ -1049,10 +1052,6 @@ msgstr "Connexion"
msgid
"Register"
msgstr
"S'enregister"
#: core/templates/core/base.jinja:25 core/templates/core/user_base.jinja:19
msgid
"Tools"
msgstr
"Outils"
#: core/templates/core/base.jinja:26
msgid
"Logout"
msgstr
"Déconnexion"
...
...
@@ -1154,6 +1153,10 @@ msgstr "Non trouvé"
msgid
"My files"
msgstr
"Mes fichiers"
#: core/templates/core/file.jinja:41 core/templates/core/page.jinja:34
msgid
"Prop"
msgstr
"Propriétés"
#: core/templates/core/file_detail.jinja:13
msgid
"Owner: "
msgstr
"Propriétaire : "
...
...
@@ -1186,6 +1189,10 @@ msgstr "Télécharger"
msgid
"There is no file in this website."
msgstr
"Il n'y a pas de fichier sur ce site web."
#: core/templates/core/group_edit.jinja:4
msgid
"Back to list"
msgstr
"Retour à la liste"
#: core/templates/core/group_edit.jinja:5
msgid
"Edit group"
msgstr
"Éditer le groupe"
...
...
@@ -1658,7 +1665,7 @@ msgstr "Ajouter un nouveau dossier"
msgid
"Error creating folder %(folder_name)s: %(msg)s"
msgstr
"Erreur de création du dossier %(folder_name)s : %(msg)s"
#: core/views/files.py:61 core/views/forms.py:17
1 core/views/forms.py:175
#: core/views/files.py:61 core/views/forms.py:17
2 core/views/forms.py:176
#, python-format
msgid
"Error uploading file %(file_name)s: %(msg)s"
msgstr
"Erreur d'envoie du fichier %(file_name)s : %(msg)s"
...
...
@@ -1671,11 +1678,11 @@ msgstr "Choisir un fichier"
msgid
"Choose user"
msgstr
"Choisir un utilisateur"
#: core/views/forms.py:8
8
#: core/views/forms.py:8
9
msgid
"Username, email, or account number"
msgstr
"Nom d'utilisateur, email, ou numéro de compte AE"
#: core/views/forms.py:13
0
#: core/views/forms.py:13
1
msgid
""
"Profile: you need to be visible on the picture, in order to be recognized (e."
"g. by the barmen)"
...
...
@@ -1683,15 +1690,15 @@ msgstr ""
"Photo de profil: vous devez être visible sur la photo afin d'être reconnu "
"(par exemple par les barmen)"
#: core/views/forms.py:13
1
#: core/views/forms.py:13
2
msgid
"Avatar: used on the forum"
msgstr
"Avatar : utilisé sur le forum"
#: core/views/forms.py:13
2
#: core/views/forms.py:13
3
msgid
"Scrub: let other know how your scrub looks like!"
msgstr
"Blouse : montrez aux autres à quoi ressemble votre blouse !"
#: core/views/forms.py:17
6
#: core/views/forms.py:17
7
msgid
"Bad image format, only jpeg, png, and gif are accepted"
msgstr
"Mauvais format d'image, seuls les jpeg, png, et gif sont acceptés"
...
...
@@ -1775,7 +1782,7 @@ msgstr "Bureau"
#: eboutic/templates/eboutic/eboutic_main.jinja:24
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:8
#: eboutic/templates/eboutic/eboutic_payment_result.jinja:4
#: sith/settings.py:28
2 sith/settings.py:290
sith/settings_sample.py:271
#: sith/settings.py:28
6 sith/settings.py:294
sith/settings_sample.py:271
#: sith/settings_sample.py:279
msgid
"Eboutic"
msgstr
"Eboutic"
...
...
@@ -1813,8 +1820,8 @@ msgstr "quantité"
msgid
"Sith account"
msgstr
"Compte utilisateur"
#: counter/models.py:248 sith/settings.py:27
5 sith/settings.py:280
#: sith/settings.py:30
2
sith/settings_sample.py:264
#: counter/models.py:248 sith/settings.py:27
9 sith/settings.py:284
#: sith/settings.py:30
6
sith/settings_sample.py:264
#: sith/settings_sample.py:269 sith/settings_sample.py:291
msgid
"Credit card"
msgstr
"Carte bancaire"
...
...
@@ -1917,10 +1924,6 @@ msgstr "Liste des comptoirs"
msgid
"New counter"
msgstr
"Nouveau comptoir"
#: counter/templates/counter/counter_list.jinja:23
msgid
"Props"
msgstr
"Propriétés"
#: counter/templates/counter/counter_list.jinja:29
msgid
"There is no counters in this website."
msgstr
"Il n'y a pas de comptoirs dans ce site web."
...
...
@@ -2228,12 +2231,12 @@ msgid "Washing and drying"
msgstr
"Lavage et séchage"
#: launderette/templates/launderette/launderette_book.jinja:26
#: sith/settings.py:4
16
sith/settings_sample.py:405
#: sith/settings.py:4
20
sith/settings_sample.py:405
msgid
"Washing"
msgstr
"Lavage"
#: launderette/templates/launderette/launderette_book.jinja:30
#: sith/settings.py:4
16
sith/settings_sample.py:405
#: sith/settings.py:4
20
sith/settings_sample.py:405
msgid
"Drying"
msgstr
"Séchage"
...
...
@@ -2288,120 +2291,116 @@ msgstr "L'utilisateur n'a pas réservé de créneau"
msgid
"Token not found"
msgstr
"Jeton non trouvé"
#: sith/settings.py:17
0
sith/settings_sample.py:160
#: sith/settings.py:17
4
sith/settings_sample.py:160
msgid
"English"
msgstr
"Anglais"
#: sith/settings.py:17
1
sith/settings_sample.py:161
#: sith/settings.py:17
5
sith/settings_sample.py:161
msgid
"French"
msgstr
"Français"
#: sith/settings.py:27
2 sith/settings.py:279 sith/settings.py:300
#: sith/settings.py:27
6 sith/settings.py:283 sith/settings.py:304
#: sith/settings_sample.py:261 sith/settings_sample.py:268
#: sith/settings_sample.py:289
msgid
"Check"
msgstr
"Chèque"
#: sith/settings.py:27
3 sith/settings.py:281 sith/settings.py:301
#: sith/settings.py:27
7 sith/settings.py:285 sith/settings.py:305
#: sith/settings_sample.py:262 sith/settings_sample.py:270
#: sith/settings_sample.py:290
msgid
"Cash"
msgstr
"Espèces"
#: sith/settings.py:27
4
sith/settings_sample.py:263
#: sith/settings.py:27
8
sith/settings_sample.py:263
msgid
"Transfert"
msgstr
"Virement"
#: sith/settings.py:2
87
sith/settings_sample.py:276
#: sith/settings.py:2
91
sith/settings_sample.py:276
msgid
"Belfort"
msgstr
"Belfort"
#: sith/settings.py:2
88
sith/settings_sample.py:277
#: sith/settings.py:2
92
sith/settings_sample.py:277
msgid
"Sevenans"
msgstr
"Sevenans"
#: sith/settings.py:2
89
sith/settings_sample.py:278
#: sith/settings.py:2
93
sith/settings_sample.py:278
msgid
"Montbéliard"
msgstr
"Montbéliard"
#: sith/settings.py:3
29
sith/settings_sample.py:318
#: sith/settings.py:3
33
sith/settings_sample.py:318
msgid
"One semester"
msgstr
"Un semestre, 15 €"
#: sith/settings.py:33
4
sith/settings_sample.py:323
#: sith/settings.py:33
8
sith/settings_sample.py:323
msgid
"Two semesters"
msgstr
"Deux semestres, 28 €"
#: sith/settings.py:3
39
sith/settings_sample.py:328
#: sith/settings.py:3
43
sith/settings_sample.py:328
msgid
"Common core cursus"
msgstr
"Cursus tronc commun, 45 €"
#: sith/settings.py:34
4
sith/settings_sample.py:333
#: sith/settings.py:34
8 sith/settings.py:353
sith/settings_sample.py:333
#: sith/settings_sample.py:338
msgid
"Branch cursus"
msgstr
"Cursus branche, 45 €"
#: sith/settings.py:349
msgid
"Alternating cursus"
msgstr
"Cursus alternant, 30 €"
#: sith/settings.py:354 sith/settings_sample.py:343
#: sith/settings.py:358 sith/settings_sample.py:343
msgid
"Honorary member"
msgstr
"Membre honoraire, 0 €"
#: sith/settings.py:3
59
sith/settings_sample.py:348
#: sith/settings.py:3
63
sith/settings_sample.py:348
msgid
"Assidu member"
msgstr
"Membre d'Assidu, 0 €"
#: sith/settings.py:36
4
sith/settings_sample.py:353
#: sith/settings.py:36
8
sith/settings_sample.py:353
msgid
"Amicale/DOCEO member"
msgstr
"Membre de l'Amicale/DOCEO, 0 €"
#: sith/settings.py:3
69
sith/settings_sample.py:358
#: sith/settings.py:3
73
sith/settings_sample.py:358
msgid
"UT network member"
msgstr
"Cotisant du réseau UT, 0 €"
#: sith/settings.py:37
4
sith/settings_sample.py:363
#: sith/settings.py:37
8
sith/settings_sample.py:363
msgid
"CROUS member"
msgstr
"Membres du CROUS, 0 €"
#: sith/settings.py:3
79
sith/settings_sample.py:368
#: sith/settings.py:3
83
sith/settings_sample.py:368
msgid
"Sbarro/ESTA member"
msgstr
"Membre de Sbarro ou de l'ESTA, 15 €"
#: sith/settings.py:3
87
sith/settings_sample.py:376
#: sith/settings.py:3
91
sith/settings_sample.py:376
msgid
"President"
msgstr
"Président"
#: sith/settings.py:3
88
sith/settings_sample.py:377
#: sith/settings.py:3
92
sith/settings_sample.py:377
msgid
"Vice-President"
msgstr
"Vice-Président"
#: sith/settings.py:3
89
sith/settings_sample.py:378
#: sith/settings.py:3
93
sith/settings_sample.py:378
msgid
"Treasurer"
msgstr
"Trésorier"
#: sith/settings.py:39
0
sith/settings_sample.py:379
#: sith/settings.py:39
4
sith/settings_sample.py:379
msgid
"Communication supervisor"
msgstr
"Responsable com"
#: sith/settings.py:39
1
sith/settings_sample.py:380
#: sith/settings.py:39
5
sith/settings_sample.py:380
msgid
"Secretary"
msgstr
"Secrétaire"
#: sith/settings.py:39
2
sith/settings_sample.py:381
#: sith/settings.py:39
6
sith/settings_sample.py:381
msgid
"IT supervisor"
msgstr
"Responsable info"
#: sith/settings.py:39
3
sith/settings_sample.py:382
#: sith/settings.py:39
7
sith/settings_sample.py:382
msgid
"Board member"
msgstr
"Membre du bureau"
#: sith/settings.py:39
4
sith/settings_sample.py:383
#: sith/settings.py:39
8
sith/settings_sample.py:383
msgid
"Active member"
msgstr
"Membre actif"
#: sith/settings.py:39
5
sith/settings_sample.py:384
#: sith/settings.py:39
9
sith/settings_sample.py:384
msgid
"Curious"
msgstr
"Curieux"
...
...
@@ -2413,35 +2412,41 @@ msgstr "Mauvais type de cotisation"
msgid
"Bad payment method"
msgstr
"Mauvais type de paiement"
#: subscription/models.py:
48
#: subscription/models.py:
52
msgid
"subscription type"
msgstr
"type d'inscription"
#: subscription/models.py:5
1
#: subscription/models.py:5
5
msgid
"subscription start"
msgstr
"début de la cotisation"
#: subscription/models.py:5
2
#: subscription/models.py:5
6
msgid
"subscription end"
msgstr
"fin de la cotisation"
#: subscription/models.py:5
5
#: subscription/models.py:5
9
msgid
"location"
msgstr
"lieu"
#: subscription/models.py:6
4
#: subscription/models.py:6
8
msgid
"You can not subscribe many time for the same period"
msgstr
"Vous ne pouvez pas cotiser plusieurs fois pour la même période"
#: subscription/models.py:
68
msgid
"
You are trying to create a subscription without membe
r"
msgstr
"
Vous essayez de créer une cotisation sans membre
"
#: subscription/models.py:
72
msgid
"
Subscription erro
r"
msgstr
"
Erreur de cotisation
"
#: subscription/views.py:5
2
#: subscription/views.py:5
4
msgid
"A user with that email address already exists"
msgstr
"Un utilisateur avec cette adresse email existe déjà"
#: subscription/views.py:
68
#: subscription/views.py:
70
msgid
"You must either choose an existing user or create a new one properly"
msgstr
""
"Vous devez soit choisir un utilisateur existant, ou en créer un proprement."
#~ msgid "Alternating cursus"
#~ msgstr "Cursus alternant, 30 €"
#~ msgid "You are trying to create a subscription without member"
#~ msgstr "Vous essayez de créer une cotisation sans membre"
subscription/models.py
View file @
a0b1fa32
...
...
@@ -69,7 +69,7 @@ class Subscription(models.Model):
except
:
# This should not happen, because the form should have handled the data before, but sadly, it still
# calls the model validation :'(
# TODO see SubscriptionForm's clean method
raise
ValidationError
(
_
(
"
You are trying to create a subscription without membe
r"
))
raise
ValidationError
(
_
(
"
Subscription erro
r"
))
def
save
(
self
):
super
(
Subscription
,
self
).
save
()
...
...
subscription/templates/subscription/subscription.jinja
View file @
a0b1fa32
...
...
@@ -9,6 +9,7 @@
<div
id=
"user_info"
></div>
<form
action=
""
method=
"post"
id=
"subscription_form"
>
{%
csrf_token
%}
{{
form.non_field_errors
()
}}
<p>
{{
form.member.errors
}}
<label
for=
"
{{
form.member.name
}}
"
>
{{
form.member.label
}}
</label>
{{
form.member
}}
</p>
<div
id=
"new_member"
>
<p>
{{
form.first_name.errors
}}
<label
for=
"
{{
form.first_name.name
}}
"
>
{{
form.first_name.label
}}
</label>
{{
form.first_name
}}
</p>
...
...
subscription/views.py
View file @
a0b1fa32
...
...
@@ -48,6 +48,8 @@ class SubscriptionForm(forms.ModelForm):
and
"first_name"
not
in
self
.
errors
.
as_data
()
and
"email"
not
in
self
.
errors
.
as_data
()):
self
.
errors
.
pop
(
"member"
,
None
)
if
self
.
errors
:
return
cleaned_data
if
Subscriber
.
objects
.
filter
(
email
=
cleaned_data
.
get
(
"email"
)).
first
()
is
not
None
:
self
.
add_error
(
"email"
,
ValidationError
(
_
(
"A user with that email address already exists"
)))
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment