basket: cancel_information_message field (#88504)
This commit is contained in:
parent
41677f8678
commit
2e8985a283
|
@ -487,7 +487,7 @@ class BasketLineSerializer(serializers.ModelSerializer):
|
|||
'user_external_id',
|
||||
'user_first_name',
|
||||
'user_last_name',
|
||||
'information_message',
|
||||
'cancel_information_message',
|
||||
'group_items',
|
||||
'form_url',
|
||||
'validation_callback_url',
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('basket', '0006_credit'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='basketline',
|
||||
old_name='information_message',
|
||||
new_name='cancel_information_message',
|
||||
),
|
||||
]
|
|
@ -193,7 +193,7 @@ class BasketLine(models.Model):
|
|||
user_first_name = models.CharField(max_length=250)
|
||||
user_last_name = models.CharField(max_length=250)
|
||||
|
||||
information_message = models.TextField(blank=True)
|
||||
cancel_information_message = models.TextField(blank=True)
|
||||
group_items = models.BooleanField(default=False)
|
||||
|
||||
closed = models.BooleanField(default=False)
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
{% csrf_token %}
|
||||
<p>{% trans "Are you sure you want to cancel this basket?" %}</p>
|
||||
{% for line in basket.lines %}
|
||||
{% if line.information_message %}
|
||||
<p>{{ line.information_message }}</p>
|
||||
{% if line.cancel_information_message %}
|
||||
<p>{{ line.cancel_information_message }}</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="buttons">
|
||||
|
|
|
@ -271,7 +271,7 @@ def test_add_line(app, user):
|
|||
'user_external_id': 'user:1',
|
||||
'user_first_name': 'First1',
|
||||
'user_last_name': 'Last1',
|
||||
'information_message': 'foo bar',
|
||||
'cancel_information_message': 'foo bar',
|
||||
'form_url': 'http://form.com',
|
||||
'validation_callback_url': 'http://validation.com',
|
||||
'payment_callback_url': 'http://payment.com',
|
||||
|
@ -287,7 +287,7 @@ def test_add_line(app, user):
|
|||
assert line.user_external_id == 'user:1'
|
||||
assert line.user_first_name == 'First1'
|
||||
assert line.user_last_name == 'Last1'
|
||||
assert line.information_message == 'foo bar'
|
||||
assert line.cancel_information_message == 'foo bar'
|
||||
assert line.group_items is False
|
||||
assert line.form_url == 'http://form.com'
|
||||
assert line.validation_callback_url == 'http://validation.com'
|
||||
|
@ -330,7 +330,7 @@ def test_add_line(app, user):
|
|||
assert line.user_external_id == 'user:2'
|
||||
assert line.user_first_name == 'First2'
|
||||
assert line.user_last_name == 'Last2'
|
||||
assert line.information_message == ''
|
||||
assert line.cancel_information_message == ''
|
||||
assert line.group_items is True
|
||||
assert line.form_url == ''
|
||||
assert line.validation_callback_url == ''
|
||||
|
|
Loading…
Reference in New Issue