mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
Fix subscription right and typo
This commit is contained in:
parent
3305a19f44
commit
fe2438ef0c
@ -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 %}
|
||||
|
||||
|
Binary file not shown.
@ -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'}
|
||||
|
Loading…
Reference in New Issue
Block a user