Add new field OrderRefund.comment

This commit is contained in:
Raphael Michel
2021-01-15 11:25:09 +01:00
parent 674d7673ce
commit f1cd46f6dc
17 changed files with 103 additions and 38 deletions

View File

@@ -6,6 +6,7 @@
{% load rich_text %}
{% load safelink %}
{% load eventsignal %}
{% load l10n %}
{% load phone_format %}
{% block title %}
{% blocktrans trimmed with code=order.code %}
@@ -97,7 +98,10 @@
{% csrf_token %}
<input type="hidden" name="start-action" value="do_nothing">
<input type="hidden" name="start-mode" value="partial">
<input type="hidden" name="start-partial_amount" value="{{ overpaid }}">
{% localize off %}
<input type="hidden" name="start-partial_amount" value="{{ overpaid|floatformat:2 }}">
{% endlocalize %}
<input type="hidden" name="comment" value="{% trans "Refund for overpayment" %}">
<div class="alert alert-warning">
{% blocktrans trimmed with amount=overpaid|money:request.event.currency %}
This order is currently overpaid by {{ amount }}.
@@ -759,11 +763,19 @@
{% endif %}
</td>
</tr>
{% if r.html_info %}
{% if r.html_info or staff_session or r.comment %}
<tr>
<td colspan="1"></td>
<td colspan="7">
{{ r.html_info|safe }}
{% if r.comment %}
<dl class="dl-horizontal">
<dt>{% trans "Comment" %}</dt>
<dd>{{ r.comment }}</dd>
</dl>
{% endif %}
{% if r.html_info %}
{{ r.html_info|safe }}
{% endif %}
{% if staff_session %}
<p>
<a href="" class="btn btn-default btn-xs" data-expandrefund
@@ -775,17 +787,6 @@
{% endif %}
</td>
</tr>
{% elif staff_session %}
<tr>
<td colspan="1"></td>
<td colspan="7">
<a href="" class="btn btn-default btn-xs" data-expandrefund
data-id="{{ r.pk }}">
<span class="fa-eye fa fa-fw"></span>
{% trans "Inspect" %}
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>

View File

@@ -162,6 +162,13 @@
<input type="hidden" name="start-mode" value="{{ start_form.cleaned_data.mode }}">
<input type="hidden" name="start-partial_amount" value="{{ partial_amount }}">
<div class="form-group">
<label class="control-label" for="id_comment">{% trans "Refund reason" %}</label>
<input type="text" name="comment" class="form-control" title="{% trans "May be shown to the end user or used e.g. as part of a payment reference." %}" id="id_comment"
value="{{ comment|default:"" }}">
<div class="help-block">{% trans "May be shown to the end user or used e.g. as part of a payment reference." %}</div>
</div>
<div class="row checkout-button-row">
<div class="col-md-4">
<a class="btn btn-block btn-default btn-lg"