Verified Commit 32e065bb authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add wire payment type to payments app

parent 23b79eb4
# 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): ...@@ -20,11 +20,13 @@ class Payment(models.Model):
NONE = 'no_payment' NONE = 'no_payment'
CASH = 'cash_payment' CASH = 'cash_payment'
CARD = 'card_payment' CARD = 'card_payment'
WIRE = 'wire_payment'
PAYMENT_TYPE = ( PAYMENT_TYPE = (
(NONE, _('No payment')), (NONE, _('No payment')),
(CASH, _('Cash payment')), (CASH, _('Cash payment')),
(CARD, _('Card payment')), (CARD, _('Card payment')),
(WIRE, _('Wire payment')),
) )
type = models.CharField( type = models.CharField(
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<div class="submit-row payments-row"> <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="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="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> </div>
{% endif %} {% endif %}
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
<a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}" <a data-href="{% url 'admin:payments_payment_process' pk=payment.pk %}"
data-next="true" data-type="card_payment" data-next="true" data-type="card_payment"
class="button process">{% trans "Process (card payment)" %}</a> 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 %} {% else %}
<a href="{{ url }}"> <a href="{{ url }}">
{% trans "Processed" %} {% trans "Processed" %}
......
Supports Markdown
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