Organizer-level override for giftcard code length

This commit is contained in:
Martin Gross
2019-12-09 13:55:26 +01:00
parent 2a929200b5
commit cf5ac6af4b
4 changed files with 19 additions and 3 deletions

View File

@@ -302,6 +302,12 @@ class OrganizerSettingsForm(SettingsForm):
help_text=_('If you provide a favicon, we will show it instead of the default pretix icon. '
'We recommend a size of at least 200x200px to accomodate most devices.')
)
giftcard_length = forms.IntegerField(
label=_('Length of gift card codes'),
help_text=_('The system generates by default {}-character long gift card codes. However, if a different length '
'is required, it can be set here.'.format(settings.ENTROPY['giftcard_secret'])),
required=False
)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View File

@@ -32,6 +32,7 @@
{% endif %}
{% bootstrap_field sform.organizer_info_text layout="control" %}
{% bootstrap_field sform.event_team_provisioning layout="control" %}
{% bootstrap_field sform.giftcard_length layout="control" %}
</fieldset>
<fieldset>
<legend>{% trans "Organizer page" %}</legend>