Commit e8a43b4f authored by Luko van der Maas's avatar Luko van der Maas
Browse files

Merge branch 'feature/payments-wire-payment' into 'master'

Add wire payment type to payments app

Closes #813

See merge request !1145
parents 75501213 32e065bb
# Generated by Django 2.1.5 on 2019-02-04 20:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('payments', '0002_auto_20181127_1819'),
]
operations = [
migrations.AlterField(
model_name='payment',
name='type',
field=models.CharField(choices=[('no_payment', 'No payment'), ('cash_payment', 'Cash payment'), ('card_payment', 'Card payment'), ('wire_payment', 'Wire payment')], default='no_payment', max_length=20, verbose_name='type'),
),
]
......@@ -20,11 +20,13 @@ class Payment(models.Model):
NONE = 'no_payment'
CASH = 'cash_payment'
CARD = 'card_payment'
WIRE = 'wire_payment'
PAYMENT_TYPE = (
(NONE, _('No payment')),
(CASH, _('Cash payment')),
(CARD, _('Card payment')),
(WIRE, _('Wire payment')),
)
type = models.CharField(
......
......@@ -16,6 +16,7 @@
<div class="submit-row payments-row">
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" data-type="cash_payment" class="button process">{% trans "Process (cash payment)" %}</a>
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" data-type="card_payment" class="button process">{% trans "Process (card payment)" %}</a>
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" data-type="wire_payment" class="button process">{% trans "Process (wire payment)" %}</a>
</div>
{% endif %}
......
......@@ -14,6 +14,9 @@
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}"
data-next="true" data-type="card_payment"
class="button process">{% trans "Process (card payment)" %}</a>
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}"
data-next="true" data-type="wire_payment"
class="button process">{% trans "Process (wire payment)" %}</a>
{% else %}
<a href="{{ url }}">
{% trans "Processed" %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment