From f66b999f249830ffc12a4a42c33d8207ac57bda6 Mon Sep 17 00:00:00 2001 From: Skia Date: Wed, 31 Aug 2016 02:43:49 +0200 Subject: [PATCH] Improve login form --- core/views/__init__.py | 6 +- core/views/forms.py | 18 ++++ core/views/user.py | 4 +- counter/views.py | 7 +- locale/fr/LC_MESSAGES/django.mo | Bin 32028 -> 32161 bytes locale/fr/LC_MESSAGES/django.po | 166 ++++++++++++++++---------------- 6 files changed, 111 insertions(+), 90 deletions(-) diff --git a/core/views/__init__.py b/core/views/__init__.py index 3aaf9d00..1c8e6af8 100644 --- a/core/views/__init__.py +++ b/core/views/__init__.py @@ -3,16 +3,16 @@ from django.shortcuts import render from django.http import HttpResponseForbidden, HttpResponseNotFound from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.views.generic.base import View -from django.contrib.auth.forms import AuthenticationForm from core.models import Group +from core.views.forms import LoginForm def forbidden(request): try: return HttpResponseForbidden(render(request, "core/403.jinja", context={'next': request.path, 'form': - AuthenticationForm(), 'popup': request.resolver_match.kwargs['popup'] or ""})) + LoginForm(), 'popup': request.resolver_match.kwargs['popup'] or ""})) except: - return HttpResponseForbidden(render(request, "core/403.jinja", context={'next': request.path, 'form': AuthenticationForm()})) + return HttpResponseForbidden(render(request, "core/403.jinja", context={'next': request.path, 'form': LoginForm()})) def not_found(request): return HttpResponseNotFound(render(request, "core/404.jinja")) diff --git a/core/views/forms.py b/core/views/forms.py index f0c5b530..496b11a1 100644 --- a/core/views/forms.py +++ b/core/views/forms.py @@ -8,6 +8,7 @@ from django.utils.translation import ugettext as _ from phonenumber_field.widgets import PhoneNumberInternationalFallbackWidget import logging +import re from core.models import User, Page, RealGroup, SithFile @@ -68,6 +69,23 @@ class SelectUser(TextInput): # Forms +class LoginForm(AuthenticationForm): + def __init__(self, *arg, **kwargs): + if 'data' in kwargs.keys(): + from counter.models import Customer + data = kwargs['data'].copy() + account_code = re.compile(r"^[0-9]+[A-Za-z]$") + if account_code.match(data['username']): + user = Customer.objects.filter(account_id=data['username']).first().user + elif '@' in data['username']: + user = User.objects.filter(email=data['username']).first() + else: + user = User.objects.filter(username=data['username']).first() + data['username'] = user.username + kwargs['data'] = data + super(LoginForm, self).__init__(*arg, **kwargs) + self.fields['username'].label = _("Username, email, or account number") + class RegisteringForm(UserCreationForm): error_css_class = 'error' required_css_class = 'required' diff --git a/core/views/user.py b/core/views/user.py index 77873458..f935b722 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -16,7 +16,7 @@ from datetime import timedelta import logging from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin -from core.views.forms import RegisteringForm, UserPropForm, UserProfileForm +from core.views.forms import RegisteringForm, UserPropForm, UserProfileForm, LoginForm from core.models import User, SithFile def login(request): @@ -25,7 +25,7 @@ def login(request): Needs to be improve with correct handling of form exceptions """ - return views.login(request, template_name="core/login.jinja") + return views.login(request, template_name="core/login.jinja", authentication_form=LoginForm) def logout(request): """ diff --git a/counter/views.py b/counter/views.py index 1cf8086c..65c33818 100644 --- a/counter/views.py +++ b/counter/views.py @@ -4,7 +4,6 @@ from django.views.generic.edit import UpdateView, CreateView, DeleteView, Proces from django.forms.models import modelform_factory from django.forms import CheckboxSelectMultiple from django.core.urlresolvers import reverse_lazy -from django.contrib.auth.forms import AuthenticationForm from django.http import HttpResponseRedirect from django.utils import timezone from django import forms @@ -18,7 +17,7 @@ from ajax_select.fields import AutoCompleteSelectField, AutoCompleteSelectMultip from ajax_select import make_ajax_form, make_ajax_field from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin, CanCreateMixin -from core.views.forms import SelectUser +from core.views.forms import SelectUser, LoginForm from core.models import User from subscription.models import Subscriber from subscription.views import get_subscriber @@ -77,7 +76,7 @@ class CounterMain(DetailView, ProcessFormView, FormMixin): if self.request.method == 'POST': self.object = self.get_object() kwargs = super(CounterMain, self).get_context_data(**kwargs) - kwargs['login_form'] = AuthenticationForm() + kwargs['login_form'] = LoginForm() kwargs['login_form'].fields['username'].widget.attrs['autofocus'] = True kwargs['login_form'].cleaned_data = {} # add_error fails if there are no cleaned_data if "credentials" in self.request.GET: @@ -348,7 +347,7 @@ class CounterLogin(RedirectView): """ self.counter_id = kwargs['counter_id'] self.counter = Counter.objects.filter(id=kwargs['counter_id']).first() - form = AuthenticationForm(request, data=request.POST) + form = LoginForm(request, data=request.POST) self.errors = [] if form.is_valid(): user = User.objects.filter(username=form.cleaned_data['username']).first() diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 6114043170670f5fdcde7d948b9859be05944043..108ac0d6bb080b207eb3f0b548d3f5e17ccf6393 100644 GIT binary patch delta 11760 zcmZA72YgTW{>Sl?NJ2seLK0D8CB%q`89PFWS))qS4mA?1inRJOimEED8ZEBSK~#-~ z8l^2tm!hRq(Hgl%uhw>{(f{lHJD>d9|NlH5pFF?c@A;nZJ|}T|m;LFp^1hGfmlA#p z9j>yz1U?9Joa3ZVRZywpG_2`3m9Y^9TL zC#s#57)t+6E(s>>Y{ww{2E*}3EB_6PlE06dN#WXV10fhpzBCrX${2=KQO`F*f9z!W z?x^R7p(ZdIYtp|niG*gb8r9$rsETJW3NNA``XsW97=WQz61CKoumtu-ZAB)k-gGRE z^DzWhp$57M)&3UrXe2vH=z)Ex{12!lI%(zSQ4L>1Js42O9cZu_jcT|Ws-2psddaAP zx3qj4EJ3~_>a6vz!}@EfCR3n8_6BOnwxSx^g&O%cs0L4y z`C!zFmO-^s6*+WH1H0cciS^f>ccMTY_d<=hA8G{#V+kCII{h9iUt;E%Yf$wzq6V}V z)zJaeRvkn2a{)Dh>!=AmRD&w;tLt_chGFC*u{c&kHP9HBr+-u?qLGG&lS?(t4mQR>WA;O0+|DkdEFhL3Qjw z4P=((=U`9r3$QQ#2US07(2|ZqEzMZeKqjLaehD?x*{B9y zN7Y-2s<#eRFVEa&?n0gZJ@`BxMop{(2SeYLuIN$0ND>J+7PZ%_Q04EUX1o@4NVlW5 zVjq^qK6}1I(Ex#1C_p4F;ZSz>c0n~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LjWIzb7$N-)6lq`xH&b5Eb?qHCHx_cH}~q_+_IcIc|^ z;_Sq#l=EG3JPSzFB-#)kQ1A`%sdu`fzEUTNe@R!M)6Yp~5c3Hw++NCc1#|B<>BDZ; z{b~1On7{#{1k~2R)IfEoVN-6VtIkG*N79O z4-u(EfAUR;JH!v<+Yw6$T^A^O6CWi8kS@B$kiJZ&u9Z!*8~nO)=by%nJw!KdtRkKw zCR^nmxQn=A4}EFnpW@3zSthWQd-~N|biHherdBtRd}-=6$C9Y4J`w0c|D&n&khh3G zwMniJk#%ri+6LE#~38E9} zTr5rWAU#*_zphCXe21ZQ&>pL*kn1hVQ;B)R)8sc{(UnO0Ys>imXJB)RD&RV+{{`vt z|9N%>`TOMi6}|uWD0q*8H;H7@x)zh3LFj5obR&I_I7Ye>G1BgRfFa@-y}PU#A(aRdvAKHR%X6cDrR zo_L@9OT<*t@8Bo+Jth#ni8S)h5TB8L9?uaSNb4F+)Fpn^i+P#CkH|cMYq02gmc*;} zfXeTm_^rSd*J(` z0($ChWxr5Xn)sJEMp+jt{|Te0SH|*JKmE=3*)lG_w%*$;#JJ3Jv;h5C)hG}VeC9{66oL4z_O3?oS Dl{5e~ diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 66ded299..2b653673 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-29 03:22+0200\n" +"POT-Creation-Date: 2016-08-31 02:41+0200\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -103,7 +103,7 @@ msgid "club account" msgstr "compte club" #: accounting/models.py:135 accounting/models.py:178 counter/models.py:25 -#: counter/models.py:197 +#: counter/models.py:200 msgid "amount" msgstr "montant" @@ -124,7 +124,7 @@ msgid "journal" msgstr "classeur" #: accounting/models.py:179 core/models.py:458 core/models.py:734 -#: counter/models.py:200 counter/models.py:246 counter/models.py:296 +#: counter/models.py:203 counter/models.py:246 counter/models.py:296 #: eboutic/models.py:15 eboutic/models.py:48 msgid "date" msgstr "date" @@ -133,7 +133,7 @@ msgstr "date" msgid "comment" msgstr "commentaire" -#: accounting/models.py:181 counter/models.py:201 counter/models.py:247 +#: accounting/models.py:181 counter/models.py:204 counter/models.py:247 #: subscription/models.py:52 msgid "payment method" msgstr "méthode de paiement" @@ -179,7 +179,7 @@ msgstr "Compte" msgid "Company" msgstr "Entreprise" -#: accounting/models.py:190 sith/settings.py:291 sith/settings_sample.py:273 +#: accounting/models.py:190 sith/settings.py:287 sith/settings_sample.py:272 msgid "Other" msgstr "Autre" @@ -468,7 +468,7 @@ msgid "Done" msgstr "Effectué" #: accounting/templates/accounting/journal_details.jinja:34 -#: counter/views.py:561 +#: counter/views.py:560 msgid "Comment" msgstr "Commentaire" @@ -1487,7 +1487,7 @@ msgstr "Cotisant jusqu'au %(subscription_end)s" msgid "Not subscribed" msgstr "Non cotisant" -#: core/templates/core/user_detail.jinja:51 +#: core/templates/core/user_detail.jinja:52 #: subscription/templates/subscription/subscription.jinja:4 #: subscription/templates/subscription/subscription.jinja:8 msgid "New subscription" @@ -1576,7 +1576,7 @@ msgstr "Gestion de Sith" msgid "Subscriptions" msgstr "Cotisations" -#: core/templates/core/user_tools.jinja:22 counter/views.py:476 +#: core/templates/core/user_tools.jinja:22 counter/views.py:475 msgid "Counters" msgstr "Comptoirs" @@ -1613,20 +1613,24 @@ 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:152 core/views/forms.py:156 +#: core/views/files.py:61 core/views/forms.py:170 core/views/forms.py:174 #, python-format msgid "Error uploading file %(file_name)s: %(msg)s" msgstr "Erreur d'envoie du fichier %(file_name)s : %(msg)s" -#: core/views/forms.py:49 core/views/forms.py:52 +#: core/views/forms.py:50 core/views/forms.py:53 msgid "Choose file" msgstr "Choisir un fichier" -#: core/views/forms.py:63 core/views/forms.py:66 +#: core/views/forms.py:64 core/views/forms.py:67 msgid "Choose user" msgstr "Choisir un utilisateur" -#: core/views/forms.py:111 +#: core/views/forms.py:87 +msgid "Username, email, or account number" +msgstr "Nom d'utilisateur, email, ou numéro de compte AE" + +#: core/views/forms.py:129 msgid "" "Profile: you need to be visible on the picture, in order to be recognized (e." "g. by the barmen)" @@ -1634,15 +1638,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:112 +#: core/views/forms.py:130 msgid "Avatar: used on the forum" msgstr "Avatar : utilisé sur le forum" -#: core/views/forms.py:113 +#: core/views/forms.py:131 msgid "Scrub: let other know how your scrub looks like!" msgstr "Blouse : montrez aux autres à quoi ressemble votre blouse !" -#: core/views/forms.py:157 +#: core/views/forms.py:175 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" @@ -1726,8 +1730,8 @@ 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:290 sith/settings.py:298 sith/settings_sample.py:272 -#: sith/settings_sample.py:280 +#: sith/settings.py:286 sith/settings.py:294 sith/settings_sample.py:271 +#: sith/settings_sample.py:279 msgid "Eboutic" msgstr "Eboutic" @@ -1740,15 +1744,15 @@ msgstr "vendeurs" msgid "counter" msgstr "comptoir" -#: counter/models.py:203 +#: counter/models.py:206 msgid "bank" msgstr "banque" -#: counter/models.py:205 counter/models.py:249 +#: counter/models.py:208 counter/models.py:249 msgid "is validated" msgstr "est validé" -#: counter/models.py:208 +#: counter/models.py:211 msgid "refilling" msgstr "rechargement" @@ -1764,9 +1768,9 @@ msgstr "quantité" msgid "Sith account" msgstr "Compte utilisateur" -#: counter/models.py:248 sith/settings.py:283 sith/settings.py:288 -#: sith/settings.py:310 sith/settings_sample.py:265 -#: sith/settings_sample.py:270 sith/settings_sample.py:292 +#: counter/models.py:248 sith/settings.py:279 sith/settings.py:284 +#: sith/settings.py:306 sith/settings_sample.py:264 +#: sith/settings_sample.py:269 sith/settings_sample.py:291 msgid "Credit card" msgstr "Carte bancaire" @@ -1937,93 +1941,93 @@ msgstr "Nouveau type de produit" msgid "There is no product types in this website." msgstr "Il n'y a pas de types de produit dans ce site web." -#: counter/views.py:36 +#: counter/views.py:35 msgid "Select user" msgstr "Choisir un utilisateur" -#: counter/views.py:52 +#: counter/views.py:51 msgid "User not found" msgstr "Utilisateur non trouvé" -#: counter/views.py:84 +#: counter/views.py:83 msgid "Bad credentials" msgstr "Mauvais identifiants" -#: counter/views.py:86 +#: counter/views.py:85 msgid "User is not subscriber" msgstr "L'utilisateur n'est pas cotisant." -#: counter/views.py:261 +#: counter/views.py:260 msgid "END" msgstr "FIN" -#: counter/views.py:263 +#: counter/views.py:262 msgid "CAN" msgstr "ANN" -#: counter/views.py:293 +#: counter/views.py:292 msgid "You have not enough money to buy all the basket" msgstr "Vous n'avez pas assez d'argent pour acheter le panier" -#: counter/views.py:473 +#: counter/views.py:472 msgid "Parent product" msgstr "Produit parent" -#: counter/views.py:474 +#: counter/views.py:473 msgid "Buying groups" msgstr "Groupes d'achat" -#: counter/views.py:541 +#: counter/views.py:540 msgid "10 cents" msgstr "10 centimes" -#: counter/views.py:542 +#: counter/views.py:541 msgid "20 cents" msgstr "20 centimes" -#: counter/views.py:543 +#: counter/views.py:542 msgid "50 cents" msgstr "50 centimes" -#: counter/views.py:544 +#: counter/views.py:543 msgid "1 euro" msgstr "1 €" -#: counter/views.py:545 +#: counter/views.py:544 msgid "2 euros" msgstr "2 €" -#: counter/views.py:546 +#: counter/views.py:545 msgid "5 euros" msgstr "5 €" -#: counter/views.py:547 +#: counter/views.py:546 msgid "10 euros" msgstr "10 €" -#: counter/views.py:548 +#: counter/views.py:547 msgid "20 euros" msgstr "20 €" -#: counter/views.py:549 +#: counter/views.py:548 msgid "50 euros" msgstr "50 €" -#: counter/views.py:550 +#: counter/views.py:549 msgid "100 euros" msgstr "100 €" -#: counter/views.py:551 counter/views.py:553 counter/views.py:555 -#: counter/views.py:557 counter/views.py:559 +#: counter/views.py:550 counter/views.py:552 counter/views.py:554 +#: counter/views.py:556 counter/views.py:558 msgid "Check amount" msgstr "Montant du chèque" -#: counter/views.py:552 counter/views.py:554 counter/views.py:556 -#: counter/views.py:558 counter/views.py:560 +#: counter/views.py:551 counter/views.py:553 counter/views.py:555 +#: counter/views.py:557 counter/views.py:559 msgid "Check quantity" msgstr "Nombre de chèque" -#: counter/views.py:562 +#: counter/views.py:561 msgid "Emptied" msgstr "Coffre vidé" @@ -2175,12 +2179,12 @@ msgid "Washing and drying" msgstr "Lavage et séchage" #: launderette/templates/launderette/launderette_book.jinja:26 -#: sith/settings.py:424 sith/settings_sample.py:406 +#: sith/settings.py:420 sith/settings_sample.py:405 msgid "Washing" msgstr "Lavage" #: launderette/templates/launderette/launderette_book.jinja:30 -#: sith/settings.py:424 sith/settings_sample.py:406 +#: sith/settings.py:420 sith/settings_sample.py:405 msgid "Drying" msgstr "Séchage" @@ -2235,116 +2239,116 @@ msgstr "L'utilisateur n'a pas réservé de créneau" msgid "Token not found" msgstr "Jeton non trouvé" -#: sith/settings.py:174 sith/settings_sample.py:161 +#: sith/settings.py:174 sith/settings_sample.py:160 msgid "English" msgstr "Anglais" -#: sith/settings.py:175 sith/settings_sample.py:162 +#: sith/settings.py:175 sith/settings_sample.py:161 msgid "French" msgstr "Français" -#: sith/settings.py:280 sith/settings.py:287 sith/settings.py:308 -#: sith/settings_sample.py:262 sith/settings_sample.py:269 -#: sith/settings_sample.py:290 +#: sith/settings.py:276 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:281 sith/settings.py:289 sith/settings.py:309 -#: sith/settings_sample.py:263 sith/settings_sample.py:271 -#: sith/settings_sample.py:291 +#: sith/settings.py:277 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:282 sith/settings_sample.py:264 +#: sith/settings.py:278 sith/settings_sample.py:263 msgid "Transfert" msgstr "Virement" -#: sith/settings.py:295 sith/settings_sample.py:277 +#: sith/settings.py:291 sith/settings_sample.py:276 msgid "Belfort" msgstr "Belfort" -#: sith/settings.py:296 sith/settings_sample.py:278 +#: sith/settings.py:292 sith/settings_sample.py:277 msgid "Sevenans" msgstr "Sevenans" -#: sith/settings.py:297 sith/settings_sample.py:279 +#: sith/settings.py:293 sith/settings_sample.py:278 msgid "Montbéliard" msgstr "Montbéliard" -#: sith/settings.py:337 sith/settings_sample.py:319 +#: sith/settings.py:333 sith/settings_sample.py:318 msgid "One semester" msgstr "Un semestre, 15 €" -#: sith/settings.py:342 sith/settings_sample.py:324 +#: sith/settings.py:338 sith/settings_sample.py:323 msgid "Two semesters" msgstr "Deux semestres, 28 €" -#: sith/settings.py:347 sith/settings_sample.py:329 +#: sith/settings.py:343 sith/settings_sample.py:328 msgid "Common core cursus" msgstr "Cursus tronc commun, 45 €" -#: sith/settings.py:352 sith/settings.py:357 sith/settings_sample.py:334 -#: sith/settings_sample.py:339 +#: sith/settings.py:348 sith/settings.py:353 sith/settings_sample.py:333 +#: sith/settings_sample.py:338 msgid "Branch cursus" msgstr "Cursus branche, 45 €" -#: sith/settings.py:362 sith/settings_sample.py:344 +#: sith/settings.py:358 sith/settings_sample.py:343 msgid "Honorary member" msgstr "Membre honoraire, 0 €" -#: sith/settings.py:367 sith/settings_sample.py:349 +#: sith/settings.py:363 sith/settings_sample.py:348 msgid "Assidu member" msgstr "Membre d'Assidu, 0 €" -#: sith/settings.py:372 sith/settings_sample.py:354 +#: sith/settings.py:368 sith/settings_sample.py:353 msgid "Amicale/DOCEO member" msgstr "Membre de l'Amicale/DOCEO, 0 €" -#: sith/settings.py:377 sith/settings_sample.py:359 +#: sith/settings.py:373 sith/settings_sample.py:358 msgid "UT network member" msgstr "Cotisant du réseau UT, 0 €" -#: sith/settings.py:382 sith/settings_sample.py:364 +#: sith/settings.py:378 sith/settings_sample.py:363 msgid "CROUS member" msgstr "Membres du CROUS, 0 €" -#: sith/settings.py:387 sith/settings_sample.py:369 +#: sith/settings.py:383 sith/settings_sample.py:368 msgid "Sbarro/ESTA member" msgstr "Membre de Sbarro ou de l'ESTA, 15 €" -#: sith/settings.py:395 sith/settings_sample.py:377 +#: sith/settings.py:391 sith/settings_sample.py:376 msgid "President" msgstr "Président" -#: sith/settings.py:396 sith/settings_sample.py:378 +#: sith/settings.py:392 sith/settings_sample.py:377 msgid "Vice-President" msgstr "Vice-Président" -#: sith/settings.py:397 sith/settings_sample.py:379 +#: sith/settings.py:393 sith/settings_sample.py:378 msgid "Treasurer" msgstr "Trésorier" -#: sith/settings.py:398 sith/settings_sample.py:380 +#: sith/settings.py:394 sith/settings_sample.py:379 msgid "Communication supervisor" msgstr "Responsable com" -#: sith/settings.py:399 sith/settings_sample.py:381 +#: sith/settings.py:395 sith/settings_sample.py:380 msgid "Secretary" msgstr "Secrétaire" -#: sith/settings.py:400 sith/settings_sample.py:382 +#: sith/settings.py:396 sith/settings_sample.py:381 msgid "IT supervisor" msgstr "Responsable info" -#: sith/settings.py:401 sith/settings_sample.py:383 +#: sith/settings.py:397 sith/settings_sample.py:382 msgid "Board member" msgstr "Membre du bureau" -#: sith/settings.py:402 sith/settings_sample.py:384 +#: sith/settings.py:398 sith/settings_sample.py:383 msgid "Active member" msgstr "Membre actif" -#: sith/settings.py:403 sith/settings_sample.py:385 +#: sith/settings.py:399 sith/settings_sample.py:384 msgid "Curious" msgstr "Curieux"