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 ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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)"
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"
msgstr "Weiter"
@ -91,6 +73,18 @@ msgstr "Vielen Dank für Deine Nachricht."
msgid "Get in touch with us!"
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"
msgstr "Nachricht"
@ -260,6 +254,13 @@ msgstr "Kontaktiere uns"
msgid "Switzerland "
msgstr "Schweiz "
msgid "Welcome back"
msgstr ""
msgid ""
"Review your billing address and card details and proceed to make payment."
msgstr ""
msgid "Log in"
msgstr ""
@ -307,6 +308,11 @@ msgstr "Monat"
msgid "Sign up"
msgstr ""
#, fuzzy
#| msgid "Billing Address"
msgid "Billing Address"
msgstr "Rechnungsadresse"
#, fuzzy
#| msgid "Billing Address"
msgid "Email Address"
@ -315,14 +321,21 @@ msgstr "Rechnungsadresse"
msgid "Credit Card"
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 ""
"\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"
" "
" 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.\n"
" "
msgstr ""
"\n"
"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"
msgstr "ist keine gültige E-Mailadresse"
#~ msgid "Your Name"
#~ msgstr "Dein Name"
#~ msgid "Your Email"
#~ msgstr "Deine E-Mail"
#~ msgid "Questions?"
#~ msgstr "Fragen?"

View file

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

View file

@ -16,23 +16,31 @@
<div class="dcl-payment-grid">
<div class="dcl-payment-box">
<div class="dcl-payment-section">
<h3>{%trans "Log in" %}</h3>
<hr class="top-hr">
<p>{% blocktrans %}Already signed up?<br>By logging in you can retrieve saved billing information.{% endblocktrans %}</p>
<form role="form" id="login-form" method="post" action="" novalidate>
{% 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>
{% if request.user.is_authenticated %}
<div class="dcl-payment-user">
<h4>{% trans "Welcome back" %} {{request.user.name}}!</h4>
<p>{% trans "Review your billing address and card details and proceed to make payment." %}</p>
</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="">{% trans "Forgot password?" %}</a>
</p>
{% else %}
<h3>{%trans "Log in" %}</h3>
<hr class="top-hr">
<p style="margin-bottom: 20px;">{% blocktrans %}Already signed up?<br>By logging in you can retrieve saved billing information.{% endblocktrans %}</p>
<form role="form" id="login-form" method="post" action="{% url 'hosting:login' %}" novalidate>
{% 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 class="dcl-payment-box">
@ -54,17 +62,23 @@
</div>
<div class="dcl-payment-box">
<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">
<form role="form" id="billing-form" method="post" action="" novalidate>
<div class="form-group">
<label class="sr-only" for="id_signup_name">{% trans "Name" %}</label>
<input type="text" id="id_signup_name" class="form-control" name="signup_name" placeholder="{% trans 'Name' %}">
</div>
<div class="form-group">
<label class="sr-only" for="id_signup_email">{% trans "Email Address" %}</label>
<input type="email" id="id_signup_email" class="form-control" name="signup_email" placeholder="{% trans 'Email Address' %}">
</div>
{% if not request.user.is_authenticated %}
<div class="form-group">
<label class="sr-only" for="id_signup_name">{% trans "Name" %}</label>
<input type="text" id="id_signup_name" class="form-control" name="signup_name" placeholder="{% trans 'Name' %}">
</div>
<div class="form-group">
<label class="sr-only" for="id_signup_email">{% trans "Email Address" %}</label>
<input type="email" id="id_signup_email" class="form-control" name="signup_email" placeholder="{% trans 'Email Address' %}">
</div>
{% endif %}
{% for field in form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
@ -76,28 +90,70 @@
<div class="dcl-payment-section">
<h3><b>{%trans "Credit Card"%}</b></h3>
<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>
<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>
<br>
<div>
{% if credit_card_data.last4 %}
<form role="form" id="payment-form-with-creditcard" novalidate>
<h5 class="billing-head">Credit Card</h5>
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
<input type="hidden" name="credit_card_needed" value="false"/>
</form>
{% if credit_card_data.last4 %}
<form role="form" id="payment-form-with-creditcard" novalidate>
<h5 class="billing-head">Credit Card</h5>
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
<input type="hidden" name="credit_card_needed" value="false"/>
</form>
{% if not messages and not form.non_field_errors %}
<p class="card-warning-content card-warning-addtional-margin">
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order 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 %}
<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 %}
<p class="card-warning-content card-warning-addtional-margin">
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
<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'>
@ -108,6 +164,7 @@
</li></ul>
{% endif %}
{% endfor %}
{% for error in form.non_field_errors %}
<p class="card-warning-content card-warning-error">
{{ error|escape }}
@ -115,64 +172,14 @@
{% endfor %}
</div>
<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>
{% 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 %}
<p class="card-warning-content card-warning-error">
{{ error|escape }}
</p>
{% endfor %}
</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 style="display:none;">
<p class="payment-errors"></p>
</div>
</form>
{% endif %}
</div>
</div>
</div>

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

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

View file

@ -48,13 +48,39 @@
}
.dcl-payment-section p {
padding: 0 5px;
font-weight: 400;
}
.dcl-payment-section .card-warning-content {
padding: 8px 10px;
font-weight: 300;
}
.dcl-payment-order strong{
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) {
.dcl-payment-grid {
display: flex;
@ -67,7 +93,7 @@
padding: 0 30px;
}
.dcl-payment-section {
padding: 30px 10px;
padding: 15px 10px;
margin-bottom: 0;
border-bottom-width: 5px;
}