Commit ffd3cf22 authored by Birin Sanchez's avatar Birin Sanchez

Change 'Submit' to 'Billing >>' for paying pages.

Change 'Submit' to 'Register >>' for non paying pages.
Signed-off-by: Birin Sanchez's avatarBirin Sanchez <birin.sanchez@puri.sm>
parent 18a2cdf5
......@@ -15,6 +15,10 @@
<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Submit' %}" />
{% if is_billing %}
<input type="submit" value="{% trans 'Billing >>' %}" />
{% else %}
<input type="submit" value="{% trans 'Register >>' %}" />
{% endif %}
</form>
{% endblock %}
......@@ -55,6 +55,16 @@ class CartRegistrationView(RegistrationView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['DEBUG_REGISTER_STATUS'] = settings.DEBUG_REGISTER_STATUS
is_billing = False
billing_carts = list(
set().union(settings.WOO_CART_BASIC,
settings.WOO_CART_COMPLETE,
settings.WOO_CART_GROUP_BASIC,
settings.WOO_CART_GROUP_COMPLETE)
)
if self.reward in billing_carts:
is_billing = True
context['is_billing'] = is_billing
return context
def get(self, *args, **kwargs):
......
......@@ -15,6 +15,6 @@
<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Submit' %}" />
<input type="submit" value="{% trans 'Register >>' %}" />
</form>
{% endblock %}
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