Add cancel_allow_user_paid_adjust_fees_explanation

This commit is contained in:
Martin Gross
2020-04-08 16:43:29 +02:00
parent 3607d8706d
commit 2b1123b487
5 changed files with 38 additions and 2 deletions
+1
View File
@@ -618,6 +618,7 @@ class EventSettingsSerializer(serializers.Serializer):
'cancel_allow_user_paid_keep_fees', 'cancel_allow_user_paid_keep_fees',
'cancel_allow_user_paid_keep_percentage', 'cancel_allow_user_paid_keep_percentage',
'cancel_allow_user_paid_adjust_fees', 'cancel_allow_user_paid_adjust_fees',
'cancel_allow_user_paid_adjust_fees_explanation',
'cancel_allow_user_paid_refund_as_giftcard', 'cancel_allow_user_paid_refund_as_giftcard',
'cancel_allow_user_paid_require_approval', 'cancel_allow_user_paid_require_approval',
] ]
+17
View File
@@ -966,6 +966,23 @@ DEFAULTS = {
help_text=_("With this option enabled, your customers can choose to get a smaller refund to support you.") help_text=_("With this option enabled, your customers can choose to get a smaller refund to support you.")
) )
}, },
'cancel_allow_user_paid_adjust_fees_explanation': {
'default': LazyI18nString.from_gettext(gettext_noop(
'However, if you want us to help keep the lights on here, please consider using the slider below to '
'request a smaller refund. Thank you!'
)),
'type': LazyI18nString,
'serializer_class': I18nField,
'form_class': I18nFormField,
'form_kwargs': dict(
label=_("Voluntary lower refund explanation"),
widget=I18nTextarea,
widget_kwargs={'attrs': {'rows': '2'}},
help_text=_("This text will be shown in between the explanation of how the refunds work and the slider "
"which your customers can use to choose the amount they would like to receive. You can use it "
"e.g. to explain choosing a lower refund will help your organisation.")
)
},
'cancel_allow_user_paid_require_approval': { 'cancel_allow_user_paid_require_approval': {
'default': 'False', 'default': 'False',
'type': bool, 'type': bool,
+1
View File
@@ -572,6 +572,7 @@ class CancelSettingsForm(SettingsForm):
'cancel_allow_user_paid_keep_fees', 'cancel_allow_user_paid_keep_fees',
'cancel_allow_user_paid_keep_percentage', 'cancel_allow_user_paid_keep_percentage',
'cancel_allow_user_paid_adjust_fees', 'cancel_allow_user_paid_adjust_fees',
'cancel_allow_user_paid_adjust_fees_explanation',
'cancel_allow_user_paid_refund_as_giftcard', 'cancel_allow_user_paid_refund_as_giftcard',
'cancel_allow_user_paid_require_approval', 'cancel_allow_user_paid_require_approval',
] ]
@@ -20,7 +20,21 @@
{% bootstrap_field form.cancel_allow_user_paid_keep_percentage layout="control" %} {% bootstrap_field form.cancel_allow_user_paid_keep_percentage layout="control" %}
{% bootstrap_field form.cancel_allow_user_paid_keep_fees layout="control" %} {% bootstrap_field form.cancel_allow_user_paid_keep_fees layout="control" %}
{% bootstrap_field form.cancel_allow_user_paid_until layout="control" %} {% bootstrap_field form.cancel_allow_user_paid_until layout="control" %}
{% bootstrap_field form.cancel_allow_user_paid_adjust_fees layout="control" %} <div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="checkbox">
<label data-toggle="collapse" data-target="#cancel_allow_user_paid_adjust_fees_explanation">
{{ form.cancel_allow_user_paid_adjust_fees }} {{ form.cancel_allow_user_paid_adjust_fees.label }}
</label>
</div>
<div class="help-block">
{{ form.cancel_allow_user_paid_adjust_fees.help_text }}
</div>
</div>
</div>
<div id="cancel_allow_user_paid_adjust_fees_explanation" class="panel-body panel-collapse collapse {% if form.cancel_allow_user_paid_adjust_fees.value %} in {% else %} out {% endif %}">
{% bootstrap_field form.cancel_allow_user_paid_adjust_fees_explanation layout="control" %}
</div>
{% bootstrap_field form.cancel_allow_user_paid_refund_as_giftcard layout="control" %} {% bootstrap_field form.cancel_allow_user_paid_refund_as_giftcard layout="control" %}
{% if not gets_notification %} {% if not gets_notification %}
<div class="alert alert-warning"> <div class="alert alert-warning">
@@ -3,6 +3,7 @@
{% load money %} {% load money %}
{% load eventurl %} {% load eventurl %}
{% load l10n %} {% load l10n %}
{% load rich_text %}
{% block title %}{% trans "Cancel order" %}{% endblock %} {% block title %}{% trans "Cancel order" %}{% endblock %}
{% block content %} {% block content %}
<h2> <h2>
@@ -48,7 +49,9 @@
If you want, you can request a full refund. If you want, you can request a full refund.
{% endblocktrans %} {% endblocktrans %}
{% endif %} {% endif %}
{% trans "However, if you want us to help keep the lights on here, please consider using the slider below to request a smaller refund. Thank you!" %} </p>
<p>
{{ request.event.settings.cancel_allow_user_paid_adjust_fees_explanation|rich_text }}
</p> </p>
<div class="cancel-fee-slider"> <div class="cancel-fee-slider">
<div id="cancel-fee-keep">Enter how much we can keep:</div> <div id="cancel-fee-keep">Enter how much we can keep:</div>