logged in user

This commit is contained in:
Arvind Tiwari 2017-09-07 19:56:34 +05:30
parent 114b4bea48
commit 0ed104cd56
6 changed files with 183 additions and 129 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 02:52+0530\n" "POT-Creation-Date: 2017-09-07 19:54+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -61,24 +61,6 @@ msgstr "Bitte gib einen Wert von 10 bis 200 ein."
msgid "GB Storage (SSD)" msgid "GB Storage (SSD)"
msgstr "GB Storage (SSD)" msgstr "GB Storage (SSD)"
msgid "Name"
msgstr ""
msgid "Your Name"
msgstr "Dein Name"
msgid "Please enter your name."
msgstr "Bitte gib Deinen Namen ein."
msgid "Email"
msgstr "E-Mail-Adresse"
msgid "Your Email"
msgstr "Deine E-Mail"
msgid "Please enter a valid email address."
msgstr "Bitte gib eine gültige E-Mailadresse ein."
msgid "Continue" msgid "Continue"
msgstr "Weiter" msgstr "Weiter"
@ -91,6 +73,18 @@ msgstr "Vielen Dank für Deine Nachricht."
msgid "Get in touch with us!" msgid "Get in touch with us!"
msgstr "Sende uns eine Nachricht." msgstr "Sende uns eine Nachricht."
msgid "Name"
msgstr ""
msgid "Please enter your name."
msgstr "Bitte gib Deinen Namen ein."
msgid "Email"
msgstr "E-Mail-Adresse"
msgid "Please enter a valid email address."
msgstr "Bitte gib eine gültige E-Mailadresse ein."
msgid "Message" msgid "Message"
msgstr "Nachricht" msgstr "Nachricht"
@ -260,6 +254,13 @@ msgstr "Kontaktiere uns"
msgid "Switzerland " msgid "Switzerland "
msgstr "Schweiz " msgstr "Schweiz "
msgid "Welcome back"
msgstr ""
msgid ""
"Review your billing address and card details and proceed to make payment."
msgstr ""
msgid "Log in" msgid "Log in"
msgstr "" msgstr ""
@ -307,6 +308,11 @@ msgstr "Monat"
msgid "Sign up" msgid "Sign up"
msgstr "" msgstr ""
#, fuzzy
#| msgid "Billing Address"
msgid "Billing Address"
msgstr "Rechnungsadresse"
#, fuzzy #, fuzzy
#| msgid "Billing Address" #| msgid "Billing Address"
msgid "Email Address" msgid "Email Address"
@ -315,14 +321,21 @@ msgstr "Rechnungsadresse"
msgid "Credit Card" msgid "Credit Card"
msgstr "Kreditkarte" msgstr "Kreditkarte"
#, fuzzy
#| msgid ""
#| "\n"
#| " Please fill in your credit card "
#| "information below. We are using <a\n"
#| " href=\"https://stripe.com\" target="
#| "\"_blank\">Stripe</a> for payment and do not store\n"
#| " your information in our database.\n"
#| " "
msgid "" msgid ""
"\n" "\n"
" Please fill in your credit card information " " Please fill in your credit card information below. "
"below. We are using <a\n" "We are using <a href=\"https://stripe.com\" target=\"_blank\">Stripe</a> for "
" href=\"https://stripe.com\" target=" "payment and do not store your information in our database.\n"
"\"_blank\">Stripe</a> for payment and do not store\n" " "
" your information in our database.\n"
" "
msgstr "" msgstr ""
"\n" "\n"
"Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen <a href=" "Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen <a href="
@ -517,6 +530,12 @@ msgstr "ist kein gültiger Name"
msgid "is not a proper email" msgid "is not a proper email"
msgstr "ist keine gültige E-Mailadresse" msgstr "ist keine gültige E-Mailadresse"
#~ msgid "Your Name"
#~ msgstr "Dein Name"
#~ msgid "Your Email"
#~ msgstr "Deine E-Mail"
#~ msgid "Questions?" #~ msgid "Questions?"
#~ msgstr "Fragen?" #~ msgstr "Fragen?"

View file

@ -81,6 +81,7 @@
<!--<div class="description check-ip"> <!--<div class="description check-ip">
<input type="checkbox" name="ipv6"> Ipv6 Only<br> <input type="checkbox" name="ipv6"> Ipv6 Only<br>
</div>--> </div>-->
{% comment %}
<div class="form-group"> <div class="form-group">
<div class="description input justify-center"> <div class="description input justify-center">
<label for="name" class="control-label">{% trans "Name"%}</label> <label for="name" class="control-label">{% trans "Name"%}</label>
@ -118,6 +119,7 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
{% endcomment %}
</div> </div>
<input type="submit" class="btn btn-primary disabled" value="{% trans 'Continue' %}"></input> <input type="submit" class="btn btn-primary disabled" value="{% trans 'Continue' %}"></input>
</form> </form>

View file

@ -16,23 +16,31 @@
<div class="dcl-payment-grid"> <div class="dcl-payment-grid">
<div class="dcl-payment-box"> <div class="dcl-payment-box">
<div class="dcl-payment-section"> <div class="dcl-payment-section">
<h3>{%trans "Log in" %}</h3> {% if request.user.is_authenticated %}
<hr class="top-hr"> <div class="dcl-payment-user">
<p>{% blocktrans %}Already signed up?<br>By logging in you can retrieve saved billing information.{% endblocktrans %}</p> <h4>{% trans "Welcome back" %} {{request.user.name}}!</h4>
<form role="form" id="login-form" method="post" action="" novalidate> <p>{% trans "Review your billing address and card details and proceed to make payment." %}</p>
{% for field in login_form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
<div class="text-right">
<button type="submit" class="btn btn-vm-contact">{% trans "LOGIN" %}</button>
</div> </div>
</form> {% else %}
<p> <h3>{%trans "Log in" %}</h3>
{% trans "Don't have an account yet?" %}<br> <hr class="top-hr">
{% trans "You can sign up by filling in the information below." %}<br> <p style="margin-bottom: 20px;">{% blocktrans %}Already signed up?<br>By logging in you can retrieve saved billing information.{% endblocktrans %}</p>
<a href="">{% trans "Forgot password?" %}</a> <form role="form" id="login-form" method="post" action="{% url 'hosting:login' %}" novalidate>
</p> {% for field in login_form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
<input type='hidden' name='next' value='{{request.path}}'/>
<div class="form-group text-right">
<button type="submit" class="btn btn-wide btn-vm-contact">{% trans "LOGIN" %}</button>
</div>
</form>
<p>
{% trans "Don't have an account yet?" %}<br>
{% trans "You can sign up by filling in the information below." %}<br>
<a href="{% url 'hosting:reset_password' %}">{% trans "Forgot password?" %}</a>
</p>
{% endif %}
</div> </div>
</div> </div>
<div class="dcl-payment-box"> <div class="dcl-payment-box">
@ -54,17 +62,23 @@
</div> </div>
<div class="dcl-payment-box"> <div class="dcl-payment-box">
<div class="dcl-payment-section"> <div class="dcl-payment-section">
<h3><b>{%trans "Sign up"%}</b></h3> {% if not request.user.is_authenticated %}
<h3><b>{%trans "Sign up"%}</b></h3>
{% else %}
<h3><b>{%trans "Billing Address"%}</b></h3>
{% endif %}
<hr class="top-hr"> <hr class="top-hr">
<form role="form" id="billing-form" method="post" action="" novalidate> <form role="form" id="billing-form" method="post" action="" novalidate>
<div class="form-group"> {% if not request.user.is_authenticated %}
<label class="sr-only" for="id_signup_name">{% trans "Name" %}</label> <div class="form-group">
<input type="text" id="id_signup_name" class="form-control" name="signup_name" placeholder="{% trans 'Name' %}"> <label class="sr-only" for="id_signup_name">{% trans "Name" %}</label>
</div> <input type="text" id="id_signup_name" class="form-control" name="signup_name" placeholder="{% trans 'Name' %}">
<div class="form-group"> </div>
<label class="sr-only" for="id_signup_email">{% trans "Email Address" %}</label> <div class="form-group">
<input type="email" id="id_signup_email" class="form-control" name="signup_email" placeholder="{% trans 'Email Address' %}"> <label class="sr-only" for="id_signup_email">{% trans "Email Address" %}</label>
</div> <input type="email" id="id_signup_email" class="form-control" name="signup_email" placeholder="{% trans 'Email Address' %}">
</div>
{% endif %}
{% for field in form %} {% for field in form %}
{% csrf_token %} {% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%} {% bootstrap_field field show_label=False type='fields'%}
@ -76,28 +90,70 @@
<div class="dcl-payment-section"> <div class="dcl-payment-section">
<h3><b>{%trans "Credit Card"%}</b></h3> <h3><b>{%trans "Credit Card"%}</b></h3>
<hr class="top-hr"> <hr class="top-hr">
<p>
{% 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 %}
</p>
<div> <div>
<div> {% if credit_card_data.last4 %}
<p> <form role="form" id="payment-form-with-creditcard" novalidate>
{% blocktrans %} <h5 class="billing-head">Credit Card</h5>
Please fill in your credit card information below. We are using <a <h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
href="https://stripe.com" target="_blank">Stripe</a> for payment and do not store <h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
your information in our database. <input type="hidden" name="credit_card_needed" value="false"/>
{% endblocktrans %} </form>
</p> {% if not messages and not form.non_field_errors %}
</div> <p class="card-warning-content card-warning-addtional-margin">
<br> {% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
<div> </p>
{% if credit_card_data.last4 %} {% endif %}
<form role="form" id="payment-form-with-creditcard" novalidate> <div id='payment_error'>
<h5 class="billing-head">Credit Card</h5> {% for message in messages %}
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5> {% if 'failed_payment' or 'make_charge_error' in message.tags %}
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5> <ul class="list-unstyled"><li>
<input type="hidden" name="credit_card_needed" value="false"/> <p class="card-warning-content card-warning-error">{{ message|safe }}</p>
</form> </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="text-right">
<button id="payment_button_with_creditcard" class="btn btn-success btn-vm-contact" type="submit">{%trans "Submit" %}</button>
</div>
{% else %}
<form action="" id="payment-form-new" method="POST">
<input type="hidden" name="token"/>
<div class="group">
<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>
</div>
<div class="row">
<div class="col-xs-5 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-3 col-xs-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>
</div>
</div>
</div>
<div id="card-errors"></div>
{% if not messages and not form.non_field_errors %} {% if not messages and not form.non_field_errors %}
<p class="card-warning-content card-warning-addtional-margin"> <p class="card-warning-content">
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %} {% trans "You are not making any payment yet. After placing your order, you will be taken to the Submit Payment Page." %}
</p> </p>
{% endif %} {% endif %}
<div id='payment_error'> <div id='payment_error'>
@ -108,6 +164,7 @@
</li></ul> </li></ul>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% for error in form.non_field_errors %} {% for error in form.non_field_errors %}
<p class="card-warning-content card-warning-error"> <p class="card-warning-content card-warning-error">
{{ error|escape }} {{ error|escape }}
@ -115,64 +172,14 @@
{% endfor %} {% endfor %}
</div> </div>
<div class="text-right"> <div class="text-right">
<button id="payment_button_with_creditcard" class="btn btn-success btn-vm-contact" type="submit">{%trans "Submit" %}</button> <button class="btn btn-vm-contact btn-wide" type="submit">{%trans "SUBMIT" %}</button>
</div> </div>
{% else %}
<form action="" id="payment-form-new" method="POST">
<input type="hidden" name="token"/>
<div class="group">
<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>
</div>
<div class="row">
<div class="col-xs-5 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-3 col-xs-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>
</div>
</div>
</div>
<div id="card-errors" role="alert"></div>
{% if not messages and not form.non_field_errors %}
<p class="card-warning-content">
{% trans "You are not making any payment yet. After placing your order, you will be taken to the Submit Payment Page." %}
</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 %} <div style="display:none;">
<p class="card-warning-content card-warning-error"> <p class="payment-errors"></p>
{{ error|escape }} </div>
</p> </form>
{% endfor %} {% endif %}
</div>
<div class="text-right">
<button class="btn btn-vm-contact btn-wide" type="submit">{%trans "SUBMIT" %}</button>
</div>
<div style="display:none;">
<p class="payment-errors"></p>
</div>
</form>
{% endif %}
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 02:50+0530\n" "POT-Creation-Date: 2017-09-07 19:54+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -667,7 +667,7 @@ a.unlink:hover {
#card-errors { #card-errors {
clear: both; clear: both;
padding: 0 0 10px; padding: 0 5px 10px;
color: #eb4d5c; color: #eb4d5c;
} }

View file

@ -48,13 +48,39 @@
} }
.dcl-payment-section p { .dcl-payment-section p {
padding: 0 5px; padding: 0 5px;
font-weight: 400;
} }
.dcl-payment-section .card-warning-content { .dcl-payment-section .card-warning-content {
padding: 8px 10px; padding: 8px 10px;
font-weight: 300;
} }
.dcl-payment-order strong{ .dcl-payment-order strong{
font-size: 17px; font-size: 17px;
} }
.dcl-payment-order p {
font-weight: 300;
}
.dcl-payment-section .form-group {
margin-bottom: 10px;
}
.dcl-payment-section .form-control {
box-shadow: none;
padding: 6px 12px;
height: 32px;
}
.dcl-payment-user {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.dcl-payment-user h4 {
font-weight: 600;
padding-left: 5px;
font-size: 17px;
}
@media (min-width: 768px) { @media (min-width: 768px) {
.dcl-payment-grid { .dcl-payment-grid {
display: flex; display: flex;
@ -67,7 +93,7 @@
padding: 0 30px; padding: 0 30px;
} }
.dcl-payment-section { .dcl-payment-section {
padding: 30px 10px; padding: 15px 10px;
margin-bottom: 0; margin-bottom: 0;
border-bottom-width: 5px; border-bottom-width: 5px;
} }