From 46638bd6d867c5fee5952b0bc9fbda3c031beb90 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Wed, 8 Feb 2017 21:08:00 -0200 Subject: [PATCH 1/3] fixes #85 --- gestioncof/forms.py | 6 +++--- .../templates/calendar_subscription.html | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/gestioncof/forms.py b/gestioncof/forms.py index 8a64825f..3a519a39 100644 --- a/gestioncof/forms.py +++ b/gestioncof/forms.py @@ -378,12 +378,12 @@ EventFormset = formset_factory(AdminEventForm, BaseEventRegistrationFormset) class CalendarForm(forms.ModelForm): subscribe_to_events = forms.BooleanField( initial=True, - label="Événements du COF.") + label="Événements du COF") subscribe_to_my_shows = forms.BooleanField( initial=True, - label="Les spectacles pour lesquels j'ai obtenu une place.") + label="Les spectacles pour lesquels j'ai obtenu une place") other_shows = forms.ModelMultipleChoiceField( - label="Spectacles supplémentaires.", + label="Spectacles supplémentaires", queryset=Spectacle.objects.filter(tirage__active=True), widget=forms.CheckboxSelectMultiple, required=False) diff --git a/gestioncof/templates/calendar_subscription.html b/gestioncof/templates/calendar_subscription.html index 5f0bc988..75f4dbea 100644 --- a/gestioncof/templates/calendar_subscription.html +++ b/gestioncof/templates/calendar_subscription.html @@ -1,4 +1,5 @@ {% extends "base_title.html" %} +{% load bootstrap %} {% block realcontent %} @@ -36,8 +37,21 @@ souscrire aux événements du COF et/ou aux spectacles BdA.
{% csrf_token %} -{{ form.as_p }} - +{{ form | bootstrap }} +

+ + +

+ +
+ {% endblock %} From ca73dc27bb3e54288a08a5794a6db051e51cae6e Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Wed, 8 Feb 2017 21:13:02 -0200 Subject: [PATCH 2/3] move template --- gestioncof/templates/{ => gestioncof}/calendar_subscription.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename gestioncof/templates/{ => gestioncof}/calendar_subscription.html (100%) diff --git a/gestioncof/templates/calendar_subscription.html b/gestioncof/templates/gestioncof/calendar_subscription.html similarity index 100% rename from gestioncof/templates/calendar_subscription.html rename to gestioncof/templates/gestioncof/calendar_subscription.html From 8e7428a11e4002b40ad83ad1a046260d94dc6750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Thu, 9 Feb 2017 12:26:08 +0100 Subject: [PATCH 3/3] =?UTF-8?q?R=C3=A9percute=20le=20d=C3=A9placement=20du?= =?UTF-8?q?=20template=20dans=20les=20vues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestioncof/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gestioncof/views.py b/gestioncof/views.py index 1945f7f6..7c49559a 100644 --- a/gestioncof/views.py +++ b/gestioncof/views.py @@ -686,15 +686,15 @@ def calendar(request): subscription.token = uuid.uuid4() subscription.save() form.save_m2m() - return render(request, "calendar_subscription.html", + return render(request, "gestioncof/calendar_subscription.html", {'form': form, 'success': True, 'token': str(subscription.token)}) else: - return render(request, "calendar_subscription.html", + return render(request, "gestioncof/calendar_subscription.html", {'form': form, 'error': "Formulaire incorrect"}) else: - return render(request, "calendar_subscription.html", + return render(request, "gestioncof/calendar_subscription.html", {'form': CalendarForm(instance=instance), 'token': instance.token if instance else None})