forked from CGM_Public/pretix_original
Cancelling events: Only show email fields conditionally
This commit is contained in:
@@ -581,6 +581,7 @@ class EventCancelForm(forms.Form):
|
|||||||
self.fields['send_subject'] = I18nFormField(
|
self.fields['send_subject'] = I18nFormField(
|
||||||
label=_("Subject"),
|
label=_("Subject"),
|
||||||
required=True,
|
required=True,
|
||||||
|
widget_kwargs={'attrs': {'data-display-dependency': '#id_send'}},
|
||||||
initial=_('Canceled: {event}'),
|
initial=_('Canceled: {event}'),
|
||||||
widget=I18nTextInput,
|
widget=I18nTextInput,
|
||||||
locales=self.event.settings.get('locales'),
|
locales=self.event.settings.get('locales'),
|
||||||
@@ -589,6 +590,7 @@ class EventCancelForm(forms.Form):
|
|||||||
label=_('Message'),
|
label=_('Message'),
|
||||||
widget=I18nTextarea,
|
widget=I18nTextarea,
|
||||||
required=True,
|
required=True,
|
||||||
|
widget_kwargs={'attrs': {'data-display-dependency': '#id_send'}},
|
||||||
locales=self.event.settings.get('locales'),
|
locales=self.event.settings.get('locales'),
|
||||||
initial=LazyI18nString.from_gettext(gettext_noop(
|
initial=LazyI18nString.from_gettext(gettext_noop(
|
||||||
'Hello,\n\n'
|
'Hello,\n\n'
|
||||||
@@ -607,6 +609,7 @@ class EventCancelForm(forms.Form):
|
|||||||
required=True,
|
required=True,
|
||||||
initial=_('Canceled: {event}'),
|
initial=_('Canceled: {event}'),
|
||||||
widget=I18nTextInput,
|
widget=I18nTextInput,
|
||||||
|
widget_kwargs={'attrs': {'data-display-dependency': '#id_send_waitinglist'}},
|
||||||
locales=self.event.settings.get('locales'),
|
locales=self.event.settings.get('locales'),
|
||||||
)
|
)
|
||||||
self.fields['send_waitinglist_message'] = I18nFormField(
|
self.fields['send_waitinglist_message'] = I18nFormField(
|
||||||
@@ -614,6 +617,7 @@ class EventCancelForm(forms.Form):
|
|||||||
widget=I18nTextarea,
|
widget=I18nTextarea,
|
||||||
required=True,
|
required=True,
|
||||||
locales=self.event.settings.get('locales'),
|
locales=self.event.settings.get('locales'),
|
||||||
|
widget_kwargs={'attrs': {'data-display-dependency': '#id_send_waitinglist'}},
|
||||||
initial=LazyI18nString.from_gettext(gettext_noop(
|
initial=LazyI18nString.from_gettext(gettext_noop(
|
||||||
'Hello,\n\n'
|
'Hello,\n\n'
|
||||||
'with this email, we regret to inform you that {event} has been canceled.\n\n'
|
'with this email, we regret to inform you that {event} has been canceled.\n\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user