Commit fe2438ef authored by Skia's avatar Skia

Fix subscription right and typo

parent 3305a19f
Pipeline #153 failed with stage
in 1 minute and 55 seconds
......@@ -48,8 +48,10 @@
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
{% else %}
{% trans %}Not subscribed{% endtrans %}
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
{% endif %}
{% endif %}
</p>
{% endif %}
......
......@@ -1768,7 +1768,7 @@ msgstr "Compte utilisateur"
#: sith/settings.py:310 sith/settings_sample.py:265
#: sith/settings_sample.py:270 sith/settings_sample.py:292
msgid "Credit card"
msgstr "Carte banquaire"
msgstr "Carte bancaire"
#: counter/models.py:252
msgid "selling"
......@@ -2061,7 +2061,7 @@ msgstr "État du panier"
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:35
msgid "Pay with credit card"
msgstr "Payer avec une carte banquaire"
msgstr "Payer avec une carte bancaire"
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:38
msgid ""
......
......@@ -66,10 +66,16 @@ class SubscriptionForm(forms.ModelForm):
raise ValidationError(_("You must either choose an existing user or create a new one properly"))
return cleaned_data
class NewSubscription(CanEditMixin, CreateView):
class NewSubscription(CreateView):
template_name = 'subscription/subscription.jinja'
form_class = SubscriptionForm
def dispatch(self, request, *arg, **kwargs):
res = super(NewSubscription, self).dispatch(request, *arg, **kwargs)
if request.user.is_in_group(settings.SITH_MAIN_BOARD_GROUP):
return res
raise PermissionDenied
def get_initial(self):
if 'member' in self.request.GET.keys():
return {'member': self.request.GET['member'], 'subscription_type': 'deux-semestres'}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment