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" >
2017-10-21 15:02:24 +00:00
{% include 'hosting/includes/_messages.html' %}
2017-08-24 16:41:15 +00:00
< 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" >
2017-10-05 20:29:18 +00:00
< h3 > {%trans "Billing Address" %}< / h3 >
2017-08-24 16:41:15 +00:00
< hr >
< form role = "form" id = "billing-form" method = "post" action = "" novalidate >
2018-09-23 14:15:48 +00:00
{% csrf_token %}
2017-08-24 16:41:15 +00:00
{% for field in form %}
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-10-15 17:54:01 +00:00
< button type = "submit" class = "btn btn-vm-contact btn-wide" name = "billing-form" > {% 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" >
2017-10-05 20:29:18 +00:00
< h3 > {%trans "Credit Card" %}< / h3 >
2017-08-24 16:41:15 +00:00
< hr >
< div >
2018-07-05 21:06:47 +00:00
{% with card_list_len=cards_list|length %}
2017-10-05 19:47:35 +00:00
{% for card in cards_list %}
2017-09-04 20:21:53 +00:00
< div class = "credit-card-details" >
< h5 class = "billing-head" > {% trans "Credit Card" %}< / h5 >
2017-10-05 20:29:18 +00:00
< h5 class = "membership-lead" > {% trans "Last" %} 4: ***** {{card.last4}}< / h5 >
2017-10-15 21:56:38 +00:00
< h5 class = "membership-lead" > {% trans "Type" %}: {{card.brand}}< / h5 >
2017-09-04 20:21:53 +00:00
< div class = "credit-card-details-opt" >
< div class = "row" >
2018-07-05 21:06:47 +00:00
{% if card_list_len > 1 %}
2017-09-04 20:21:53 +00:00
< div class = "col-xs-6" >
2017-10-16 14:18:17 +00:00
< a class = "caps-link" href = "" data-toggle = "modal" data-target = "#Modal{{ card.id }}" > < img src = "{% static 'hosting/img/delete.svg' %}" class = "svg-img" > {% trans "REMOVE CARD" %}< / a >
< div class = "modal fade" id = "Modal{{card.id }}" tabindex = "-1" role = "dialog" >
< div class = "modal-dialog" role = "document" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Confirm" > < span aria-hidden = "true" > × < / span > < / button >
< / div >
< div class = "modal-body" >
< div class = "modal-icon" > < i class = "fa fa-trash" aria-hidden = "true" > < / i > < / div >
2017-10-21 21:14:05 +00:00
< h4 class = "modal-title" id = "ModalLabel" > {% trans "Remove Card"%}< / h4 >
2017-10-16 14:18:17 +00:00
< div class = "modal-text" >
2017-10-21 21:14:05 +00:00
< p > {% trans "Do you want to remove this associated card?"%}< / p >
2017-10-16 14:18:17 +00:00
< / div >
< form method = "post" action = "{% url 'hosting:delete_card' card.id %}" >
{% csrf_token %}
< div class = "modal-footer" >
< button type = "submit" class = "btn btn-danger btn-wide" name = "delete_card" > {% trans "Delete"%}< / button >
< / div >
< / form >
< / div >
< / div >
< / div >
< / div >
2017-09-04 20:21:53 +00:00
< / div >
2018-07-05 21:06:47 +00:00
{% endif %}
2017-09-04 20:21:53 +00:00
< div class = "col-xs-6 text-right" >
2017-10-28 18:45:00 +00:00
{% if card.preferred %}
{% trans "DEFAULT" %}
{% else %}
2017-10-28 20:17:46 +00:00
< form method = "post" action = "" >
{% csrf_token %}
< input type = "hidden" name = "card" value = "{{card.id}}" >
< a class = "btn choice-btn choice-btn-faded" href = "#" onclick = "$(this).closest('form').submit()" > {% trans "SELECT" %}< / a >
< / form >
2017-10-28 18:45:00 +00:00
{% endif %}
2017-08-30 14:05:23 +00:00
< / div >
< / div >
2017-08-24 16:41:15 +00:00
< / div >
2017-09-04 20:21:53 +00:00
< / div >
2017-10-05 20:29:18 +00:00
{% empty %}
2017-09-04 20:21:53 +00:00
< 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 >
2017-10-05 20:29:18 +00:00
{% endfor %}
2018-07-05 21:06:47 +00:00
{% endwith %}
2017-09-04 20:21:53 +00:00
2017-10-05 20:29:18 +00:00
< div class = "new-card-head" >
< div class = "row" >
< div class = "col-xs-6" >
< h4 > {% trans "Add a new credit card" %}< / h4 >
< / div >
< div class = "col-xs-6 text-right" >
< button data-toggle = "collapse" data-target = "#newcard" class = "btn choice-btn" >
< span class = "fa fa-plus" > < / span > {% trans "NEW CARD" %}
< / button >
< / div >
< / div >
< / div >
< div id = "newcard" class = "collapse" >
< hr class = "thick-hr" >
< div class = "card-details-box" >
< h3 > {%trans "New Credit Card" %}< / h3 >
< hr >
2017-10-05 19:47:35 +00:00
{% include "hosting/includes/_card_input.html" %}
2017-10-05 20:29:18 +00:00
< / div >
< / div >
2017-08-24 16:41:15 +00:00
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- 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%}
{%endblock%}