Browse Source

Merge branch '220-do-not-fail-when-no-gtu' into 'dev'

Resolve "Do not fail when no GTU has been uploaded."

See merge request federez/re2o!440
remove-useless-fields-preferences-template
chirac 6 years ago
parent
commit
347cd8bf5d
  1. 3
      users/forms.py

3
users/forms.py

@ -409,10 +409,11 @@ class AdherentCreationForm(AdherentForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(AdherentCreationForm, self).__init__(*args, **kwargs) super(AdherentCreationForm, self).__init__(*args, **kwargs)
gtu_file = GeneralOption.get_cached_value('GTU')
self.fields['gtu_check'].label = mark_safe( self.fields['gtu_check'].label = mark_safe(
"%s <a href='%s' download='CGU'>%s</a>." % ( "%s <a href='%s' download='CGU'>%s</a>." % (
_("I commit to accept the"), _("I commit to accept the"),
GeneralOption.get_cached_value('GTU').url, gtu_file.url if gtu_file else "#",
_("General Terms of Use") _("General Terms of Use")
) )
) )

Loading…
Cancel
Save