Improve things a little
This commit is contained in:
parent
842b642919
commit
83f567bbe1
2 changed files with 34 additions and 19 deletions
|
@ -22,7 +22,7 @@ class InquiryView(FormView):
|
||||||
|
|
||||||
def form_invalid(self, form):
|
def form_invalid(self, form):
|
||||||
print(repr(form.errors))
|
print(repr(form.errors))
|
||||||
return redirect(reverse_lazy("frontend:index") + "?invalid=verytrue")
|
return redirect(reverse_lazy("frontend:index") + "?invalid=true")
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -113,13 +113,13 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label " for="id_username">{% trans "Benutzername" %}</label>
|
<label class="control-label " for="id_username">{% trans "Benutzername" %}</label>
|
||||||
<div class=" ">
|
<div class=" ">
|
||||||
<input type="text" name="username" autofocus class=" form-control" required id="id_username">
|
<input type="text" name="username" autofocus class=" form-control" id="id_username">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label " for="id_password">{% trans "Passwort" %}</label>
|
<label class="control-label " for="id_password">{% trans "Passwort" %}</label>
|
||||||
<div class=" ">
|
<div class=" ">
|
||||||
<input type="password" name="password" class=" form-control" required id="id_password">
|
<input type="password" name="password" class=" form-control" id="id_password">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button id="btn_login" class="btn btn-orange btn-block" formaction="{% url "profiles:login" %}?next={{ request.path }}">{% trans "Login" %}</button>
|
<button id="btn_login" class="btn btn-orange btn-block" formaction="{% url "profiles:login" %}?next={{ request.path }}">{% trans "Login" %}</button>
|
||||||
|
@ -128,11 +128,26 @@
|
||||||
</div><!-- end tab-login -->
|
</div><!-- end tab-login -->
|
||||||
|
|
||||||
<div id="tab-register" class="tab-pane">
|
<div id="tab-register" class="tab-pane">
|
||||||
<img src="{% static "frontend/images/paypal.png" %}" class="img-fluid" alt="paypal" />
|
<div class="form-group">
|
||||||
<div class="paypal-text">
|
<label class="control-label " for="id_username">{% trans "Benutzername" %}</label>
|
||||||
<p>{% trans "Zur Zahlung per PayPal erfolgt eine Weiterleitung auf deren Server." %}</p>
|
<div class=" ">
|
||||||
<a href="#" class="btn btn-default btn-lightgrey">{% trans "Per PayPal bezahlen" %}<span><i class="fa fa-angle-double-right"></i></span></a>
|
<input type="text" name="username" autofocus class=" form-control" id="id_username">
|
||||||
</div><!-- end paypal-text -->
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label " for="id_password1">{% trans "Passwort" %}</label>
|
||||||
|
<div class=" ">
|
||||||
|
<input type="password" name="password1" class=" form-control" id="id_password1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label " for="id_password2">{% trans "Passwort wiederholen" %}</label>
|
||||||
|
<div class=" ">
|
||||||
|
<input type="password" name="password2" class=" form-control" id="id_password2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button id="btn_login" class="btn btn-orange btn-block" formaction="{% url "profiles:register" %}?next={{ request.path }}">{% trans "Registrieren" %}</button>
|
||||||
|
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div><!-- end tab-paypal -->
|
</div><!-- end tab-paypal -->
|
||||||
|
@ -151,14 +166,14 @@
|
||||||
<div class="col-6 col-md-6">
|
<div class="col-6 col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Vorname" %}</label>
|
<label>{% trans "Vorname" %}</label>
|
||||||
<input type="text" class="form-control" id="id_first_name" name="first_name" required value="{{ request.user.clientprofile.first_name }}"/>
|
<input type="text" class="form-control" id="id_first_name" name="first_name" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.first_name }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
|
|
||||||
<div class="col-6 col-md-6">
|
<div class="col-6 col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Nachname" %}</label>
|
<label>{% trans "Nachname" %}</label>
|
||||||
<input type="text" class="form-control" id="id_last_name" name="last_name" required value="{{ request.user.clientprofile.last_name }}"/>
|
<input type="text" class="form-control" id="id_last_name" name="last_name" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.last_name }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
|
@ -167,14 +182,14 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Straße" %}</label>
|
<label>{% trans "Straße" %}</label>
|
||||||
<input type="text" class="form-control" id="id_address" name="address" required value="{{ request.user.clientprofile.address }}"/>
|
<input type="text" class="form-control" id="id_address" name="address" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.address }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Straße (Zusatz)" %}</label>
|
<label>{% trans "Straße (Zusatz)" %}</label>
|
||||||
<input type="text" class="form-control" id="id_address2" name="address2" {% if request.user.clientprofile.address2 %}value="{{ request.user.clientprofile.address2 }}"{% endif %}/>
|
<input type="text" class="form-control" id="id_address2" name="address2" {% if request.user.is_authenticated %}{% else %}disabled{% endif %} {% if request.user.clientprofile.address2 %}value="{{ request.user.clientprofile.address2 }}"{% endif %}/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
|
@ -183,14 +198,14 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "PLZ" %}</label>
|
<label>{% trans "PLZ" %}</label>
|
||||||
<input type="text" class="form-control" id="id_zipcode" name="zipcode" required value="{{ request.user.clientprofile.zipcode }}"/>
|
<input type="text" class="form-control" id="id_zipcode" name="zipcode" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.zipcode }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Ort" %}</label>
|
<label>{% trans "Ort" %}</label>
|
||||||
<input type="text" class="form-control" id="id_city" name="city" required value="{{ request.user.clientprofile.city }}"/>
|
<input type="text" class="form-control" id="id_city" name="city" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.city }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
|
@ -199,7 +214,7 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Staat" %}</label>
|
<label>{% trans "Staat" %}</label>
|
||||||
<input type="text" class="form-control" id="id_country" name="country" required value="{{ request.user.clientprofile.country }}"/>
|
<input type="text" class="form-control" id="id_country" name="country" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.country }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
|
@ -208,14 +223,14 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "E-Mail-Adresse" %}</label>
|
<label>{% trans "E-Mail-Adresse" %}</label>
|
||||||
<input type="email" class="form-control" id="id_email" name="email" required value="{{ request.user.email }}"/>
|
<input type="email" class="form-control" id="id_email" name="email" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.email }}"/>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{% trans "Telefonnummer" %}</label>
|
<label>{% trans "Telefonnummer" %}</label>
|
||||||
<input type="text" class="form-control" id="id_phone" name="phone" required value="{{ request.user.clientprofile.phone }}" />
|
<input type="text" class="form-control" id="id_phone" name="phone" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} value="{{ request.user.clientprofile.phone }}" />
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end columns -->
|
</div><!-- end columns -->
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
|
@ -226,7 +241,7 @@
|
||||||
<span>2</span>
|
<span>2</span>
|
||||||
<h3>{% trans "Zahlungsdaten" %}</h3>
|
<h3>{% trans "Zahlungsdaten" %}</h3>
|
||||||
</div><!-- end lg-bform-heading -->
|
</div><!-- end lg-bform-heading -->
|
||||||
<input type="hidden" name="gateway" id="id_gateway" required />
|
<input type="hidden" name="gateway" id="id_gateway" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} />
|
||||||
<div id="payment-tabs" class="payment-tabs">
|
<div id="payment-tabs" class="payment-tabs">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="nav-item active"><a class="nav-link" href="#tab-credit-card" data-toggle="tab">{% trans "Kreditkarte" %}</a></li>
|
<li class="nav-item active"><a class="nav-link" href="#tab-credit-card" data-toggle="tab">{% trans "Kreditkarte" %}</a></li>
|
||||||
|
@ -256,7 +271,7 @@
|
||||||
</div><!-- end payment-tabs -->
|
</div><!-- end payment-tabs -->
|
||||||
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label><input type="checkbox" required id="chk_agree" name="chk_agree"> {% trans "Ich erkläre mich einverstanden mit den" %} <a href="#">{% trans "Allgemeinen Geschäftsbedingungen" %}</a>.</label>
|
<label><input type="checkbox" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} id="chk_agree" name="chk_agree"> {% trans "Ich erkläre mich einverstanden mit den" %} <a href="#">{% trans "Allgemeinen Geschäftsbedingungen" %}</a>.</label>
|
||||||
</div><!-- end checkbox -->
|
</div><!-- end checkbox -->
|
||||||
<div class="col-md-12 text-center" id="result_msg"></div>
|
<div class="col-md-12 text-center" id="result_msg"></div>
|
||||||
<button type="submit" class="btn btn-orange" name="submit" id="submit">{% trans "Zahlung durchführen" %}</button>
|
<button type="submit" class="btn btn-orange" name="submit" id="submit">{% trans "Zahlung durchführen" %}</button>
|
||||||
|
|
Loading…
Reference in a new issue