Skip to content

Commit

Permalink
new template for home page and credit card page fix#507
Browse files Browse the repository at this point in the history
  • Loading branch information
jdungan committed Sep 24, 2017
1 parent 909917c commit da80eb3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
2 changes: 1 addition & 1 deletion codesy/templates/includes/get_started.html
Expand Up @@ -48,7 +48,7 @@ <h3>You are ready to bid</h3>
{% else %}
<h3>Browser Extension Installed</h3>
<p>Add credit card.</p>
{% include "credit_card_form.html" %}
{% include "credit_card_row.html" %}
{% endif %}

</div>
Expand Down
2 changes: 1 addition & 1 deletion payments/templates/credit_card_form.html
@@ -1,6 +1,6 @@
<fieldset class="fieldset">
<legend>Credit Card</legend>
<form id="stripe-form" stripe-account-type="card" role="form" class="form-horizontal">
<form id="stripe-form" stripe-account-type="card" role="form" class="form-vertical">
{% csrf_token %}
<div class="row">
<div class="small-7 columns">
Expand Down
36 changes: 3 additions & 33 deletions payments/templates/credit_card_page.html
@@ -1,36 +1,6 @@
{% extends "base.html" %}

{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
<div class="row">
<div class="column medium-4 medium-offset-4 text-left">
{% if request.user.stripe_customer %}
We saved your <b> {{request.user.card_brand}}</b> card ending in <b> {{ request.user.card_last4}} </b> with Stripe.

<div class="reveal" id="credit_card_form" data-reveal>

{% include "credit_card_form.html" %}

<button class="close-button" data-close aria-label="Close modal" type="button">
<span aria-hidden="true">&times;</span>
</button>
</div>

<p><a data-open="credit_card_form">Change this card.</a></p>

{% else %}
You need to register a credit card to be able to make offers.
We use Stripe to handle this information and it is never stored in codesy's database.

{% include "credit_card_form.html" %}

{% endif %}
</div>
</div>
<div class="row">
<div class="column medium-4 medium-offset-4 text-left">
<a href="https://stripe.com" target="_blank">
<img src="{% static 'img/stripe/powered_by_stripe.png' %}" alt="" />
</a>
</div>
</div>
{% include "credit_card_row.html" %}
{% endblock %}
35 changes: 35 additions & 0 deletions payments/templates/credit_card_row.html
@@ -0,0 +1,35 @@
{% load staticfiles %}
{% block content %}
<div class="row">
<div class="column medium-4 medium-offset-4 text-left">
{% if request.user.stripe_customer %}
We saved your <b> {{request.user.card_brand}}</b> card ending in <b> {{ request.user.card_last4}} </b> with Stripe.

<div class="reveal" id="credit_card_form" data-reveal>

{% include "credit_card_form.html" %}

<button class="close-button" data-close aria-label="Close modal" type="button">
<span aria-hidden="true">&times;</span>
</button>
</div>

<p><a data-open="credit_card_form">Change this card.</a></p>

{% else %}
You need to register a credit card to be able to make offers.
We use Stripe to handle this information and it is never stored in codesy's database.

{% include "credit_card_form.html" %}

{% endif %}
</div>
</div>
<div class="row">
<div class="column medium-4 medium-offset-4 text-left">
<a href="https://stripe.com" target="_blank">
<img src="{% static 'img/stripe/powered_by_stripe.png' %}" alt="" />
</a>
</div>
</div>
{% endblock %}

0 comments on commit da80eb3

Please sign in to comment.