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):
|
||||
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):
|
||||
try:
|
||||
|
|
|
@ -113,13 +113,13 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label " for="id_username">{% trans "Benutzername" %}</label>
|
||||
<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 class="form-group">
|
||||
<label class="control-label " for="id_password">{% trans "Passwort" %}</label>
|
||||
<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>
|
||||
<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 id="tab-register" class="tab-pane">
|
||||
<img src="{% static "frontend/images/paypal.png" %}" class="img-fluid" alt="paypal" />
|
||||
<div class="paypal-text">
|
||||
<p>{% trans "Zur Zahlung per PayPal erfolgt eine Weiterleitung auf deren Server." %}</p>
|
||||
<a href="#" class="btn btn-default btn-lightgrey">{% trans "Per PayPal bezahlen" %}<span><i class="fa fa-angle-double-right"></i></span></a>
|
||||
</div><!-- end paypal-text -->
|
||||
<div class="form-group">
|
||||
<label class="control-label " for="id_username">{% trans "Benutzername" %}</label>
|
||||
<div class=" ">
|
||||
<input type="text" name="username" autofocus class=" form-control" id="id_username">
|
||||
</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><!-- end tab-paypal -->
|
||||
|
@ -151,14 +166,14 @@
|
|||
<div class="col-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
|
||||
<div class="col-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
</div><!-- end row -->
|
||||
|
@ -167,14 +182,14 @@
|
|||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
</div><!-- end row -->
|
||||
|
@ -183,14 +198,14 @@
|
|||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
</div><!-- end row -->
|
||||
|
@ -199,7 +214,7 @@
|
|||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
</div><!-- end row -->
|
||||
|
@ -208,14 +223,14 @@
|
|||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<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><!-- end columns -->
|
||||
</div><!-- end row -->
|
||||
|
@ -226,7 +241,7 @@
|
|||
<span>2</span>
|
||||
<h3>{% trans "Zahlungsdaten" %}</h3>
|
||||
</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">
|
||||
<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>
|
||||
|
@ -256,7 +271,7 @@
|
|||
</div><!-- end payment-tabs -->
|
||||
|
||||
<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 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>
|
||||
|
|
Loading…
Reference in a new issue