dynamicweb/hosting/templates/hosting/settings.html

150 lines
8.4 KiB
HTML
Raw Normal View History

2017-08-24 16:41:15 +00:00
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
2017-08-31 10:24:01 +00:00
{% block css_extra %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
{% endblock css_extra %}
2017-08-24 16:41:15 +00:00
{% block content %}
<div class="dashboard-container wide">
<div class="dashboard-container-head">
2017-08-31 17:17:47 +00:00
<h1 class="dashboard-title-thin"><img src="{% static 'hosting/img/dashboard_settings.svg' %}" class="un-icon wide"> {% trans "My Settings" %}</h1>
2017-08-24 16:41:15 +00:00
</div>
<!-- Credit card form -->
<div class="settings-container">
<div class="row">
<div class="col-sm-5 col-md-6 billing dcl-billing">
<h3>{%trans "Billing Address"%}</h3>
<hr>
<form role="form" id="billing-form" method="post" action="" novalidate>
{% for field in form %}
{% csrf_token %}
2017-08-31 10:24:01 +00:00
{% bootstrap_field field show_label=False type='fields' bound_css_class='' %}
2017-08-24 16:41:15 +00:00
{% endfor %}
2017-08-29 12:12:35 +00:00
<div class="form-group text-right">
2017-09-01 18:41:16 +00:00
<button type="submit" class="btn btn-vm-contact btn-wide">{% trans "UPDATE" %}</button>
2017-08-29 12:12:35 +00:00
</div>
2017-08-24 16:41:15 +00:00
</form>
</div>
<div class="col-sm-7 col-md-6 creditcard-box dcl-creditcard">
<h3>{%trans "Credit Card"%}</h3>
<hr>
<div>
2017-09-04 20:21:53 +00:00
{% if credit_card_data.last4 %}
<div class="credit-card-details">
<h5 class="billing-head">{% trans "Credit Card" %}</h5>
<h5 class="membership-lead">{% trans "Last" %} 4: *****{{credit_card_data.last4}}</h5>
<h5 class="membership-lead">{% trans "Type" %}: {{credit_card_data.cc_brand}}</h5>
2017-09-05 16:39:18 +00:00
{% comment %}
2017-09-04 20:21:53 +00:00
<div class="credit-card-details-opt">
<div class="row">
<div class="col-xs-6">
<a class="caps-link" href=""><img src="{% static 'hosting/img/delete.svg' %}" class="svg-img">{% trans "REMOVE CARD" %}</a>
</div>
<div class="col-xs-6 text-right">
<a class="btn btn-vm-contact" href="">{% trans "EDIT CARD" %}</a>
2017-08-30 14:05:23 +00:00
</div>
</div>
2017-08-24 16:41:15 +00:00
</div>
2017-09-05 16:39:18 +00:00
{% endcomment %}
2017-09-04 20:21:53 +00:00
</div>
{% else %}
<div class="no-cards">
<h4>{% trans "No Credit Cards Added" %}</h4>
<p>{% blocktrans %}We are using <a href="https://stripe.com">Stripe</a> for payment and do not store your information in our database.{% endblocktrans %}</p>
</div>
{% comment %}
2017-08-30 14:30:59 +00:00
<h4>{% trans "Add a new Card." %}</h4>
<p style="margin-bottom: 15px;">
2017-08-31 10:24:01 +00:00
{% blocktrans %}Please fill in your credit card information below. We are using <a href="https://stripe.com" target="_blank">Stripe</a> for payment and do not store your information in our database.{% endblocktrans %}
2017-08-30 14:30:59 +00:00
</p>
2017-08-29 09:23:03 +00:00
<form action="" id="payment-form-new" class="credit-card-form" method="POST">
<input type="hidden" name="token"/>
<div class="credit-card-goup">
<div class="card-element card-number-element">
<label>{%trans "Card Number" %}</label>
<div id="card-number-element" class="field my-input"></div>
2017-08-24 16:41:15 +00:00
</div>
2017-08-29 09:23:03 +00:00
<div class="row">
<div class="col-xs-6 col-sm-4 card-element card-expiry-element">
<label>{%trans "Expiry Date" %}</label>
<div id="card-expiry-element" class="field my-input"></div>
</div>
<div class="col-xs-6 col-sm-4 col-sm-offset-4 card-element card-cvc-element">
<label>{%trans "CVC" %}</label>
<div id="card-cvc-element" class="field my-input"></div>
</div>
</div>
<div class="card-element brand">
<label>{%trans "Card Type" %}</label>
<i class="pf pf-credit-card" id="brand-icon"></i>
2017-08-24 16:41:15 +00:00
</div>
</div>
2017-08-29 09:23:03 +00:00
<div id="card-errors" role="alert"></div>
<div>
{% if not messages and not form.non_field_errors %}
<p class="card-warning-content">
{% blocktrans %}You are not making any payment here.{% endblocktrans %}
</p>
{% endif %}
<div id='payment_error'>
{% for message in messages %}
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
<ul class="list-unstyled"><li>
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
</li></ul>
{% endif %}
{% endfor %}
{% for error in form.non_field_errors %}
<p class="card-warning-content card-warning-error">
{{ error|escape }}
</p>
{% endfor %}
</div>
<div class="row">
<div class="col-xs-6 col-xs-offset-6 text-right">
<button class="btn btn-success stripe-payment-btn" type="submit">{%trans "Submit" %}
</button>
</div>
2017-08-24 16:41:15 +00:00
</div>
</div>
2017-08-29 09:23:03 +00:00
<div style="display:none;">
<p class="payment-errors"></p>
</div>
</form>
2017-09-04 20:21:53 +00:00
{% endcomment %}
{% endif %}
2017-08-24 16:41:15 +00:00
</div>
</div>
</div>
</div>
</div>
2017-09-04 20:21:53 +00:00
{% comment %}
2017-08-24 16:41:15 +00:00
<!-- stripe key data -->
{% if stripe_key %}
{% get_current_language as LANGUAGE_CODE %}
<script type="text/javascript">
window.processing_text = '{%trans "Processing" %}';
window.enter_your_card_text = '{%trans "Enter your credit card number" %}';
(function () {
window.stripeKey = "{{stripe_key}}";
window.current_lan = "{{LANGUAGE_CODE}}";
})();
</script>
{%endif%}
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
<script type="text/javascript">
(function () {
window.hasCreditcard = true;
})();
</script>
{%endif%}
2017-09-04 20:21:53 +00:00
{% endcomment %}
2017-08-24 16:41:15 +00:00
{%endblock%}