forked from CGM_Public/pretix_original
Add setting to disable copy-answers-button (#1778)
This commit is contained in:
@@ -1825,6 +1825,15 @@ Your {event} team"""))
|
|||||||
'seating_distance_within_row': {
|
'seating_distance_within_row': {
|
||||||
'default': 'False',
|
'default': 'False',
|
||||||
'type': bool
|
'type': bool
|
||||||
|
},
|
||||||
|
'checkout_show_copy_answers_button': {
|
||||||
|
'default': 'True',
|
||||||
|
'type': bool,
|
||||||
|
'form_class': forms.BooleanField,
|
||||||
|
'serializer_class': serializers.BooleanField,
|
||||||
|
'form_kwargs': dict(
|
||||||
|
label=_("Show button to copy user input from other products"),
|
||||||
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PERSON_NAME_TITLE_GROUPS = OrderedDict([
|
PERSON_NAME_TITLE_GROUPS = OrderedDict([
|
||||||
|
|||||||
@@ -522,6 +522,7 @@ class EventSettingsForm(SettingsForm):
|
|||||||
'banner_text_bottom',
|
'banner_text_bottom',
|
||||||
'order_email_asked_twice',
|
'order_email_asked_twice',
|
||||||
'last_order_modification_date',
|
'last_order_modification_date',
|
||||||
|
'checkout_show_copy_answers_button',
|
||||||
]
|
]
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
|
|||||||
@@ -97,6 +97,7 @@
|
|||||||
{% bootstrap_field sform.attendee_company_required layout="control" %}
|
{% bootstrap_field sform.attendee_company_required layout="control" %}
|
||||||
{% bootstrap_field sform.attendee_addresses_asked layout="control" %}
|
{% bootstrap_field sform.attendee_addresses_asked layout="control" %}
|
||||||
{% bootstrap_field sform.attendee_addresses_required layout="control" %}
|
{% bootstrap_field sform.attendee_addresses_required layout="control" %}
|
||||||
|
{% bootstrap_field sform.checkout_show_copy_answers_button layout="control" %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{% trans "Texts" %}</legend>
|
<legend>{% trans "Texts" %}</legend>
|
||||||
|
|||||||
@@ -62,7 +62,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if forloop.counter > 1 %}
|
{% if forloop.counter > 1 %}
|
||||||
<span class="text-right flip">
|
<span class="text-right flip">
|
||||||
<button type="button" data-id="{{ forloop.counter0 }}" name="copy" class="js-copy-answers btn btn-default btn-xs">{% trans "Copy answers from above" %}</button>
|
{% if event.settings.checkout_show_copy_answers_button %}
|
||||||
|
<button type="button" data-id="{{ forloop.counter0 }}" name="copy"
|
||||||
|
class="js-copy-answers btn btn-default btn-xs">{% trans "Copy answers from above" %}</button>
|
||||||
|
{% endif %}
|
||||||
<i class="fa fa-angle-down collapse-indicator"></i>
|
<i class="fa fa-angle-down collapse-indicator"></i>
|
||||||
</span>
|
</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -120,7 +123,7 @@
|
|||||||
{% if form.pos.item != pos.item %}
|
{% if form.pos.item != pos.item %}
|
||||||
{# Add-Ons #}
|
{# Add-Ons #}
|
||||||
<legend>
|
<legend>
|
||||||
{% if form.show_copy_answers_to_addon_button %}
|
{% if form.show_copy_answers_to_addon_button and event.settings.checkout_show_copy_answers_button %}
|
||||||
<span class="pull-right flip">
|
<span class="pull-right flip">
|
||||||
<button type="button" data-id="{{ forloop.parentloop.counter0 }}" data-addonid="{{ forloop.counter0 }}" name="copy" class="js-copy-answers-addon btn btn-default btn-xs">{% trans "Copy answers" %}</button>
|
<button type="button" data-id="{{ forloop.parentloop.counter0 }}" data-addonid="{{ forloop.counter0 }}" name="copy" class="js-copy-answers-addon btn btn-default btn-xs">{% trans "Copy answers" %}</button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user