mirror of
https://github.com/DerTyp7/shop-ejs-expressjs.git
synced 2025-10-29 12:32:11 +01:00
reworked auth
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<img src="/images/examples.jpg" alt="">
|
||||
</div>
|
||||
<div id="product-info">
|
||||
<h2><%= product.productName %></h2><br>
|
||||
<h2 style="padding-left: 0px"><%= product.productName %></h2><br>
|
||||
<p class="badge">Nr.:<%= product.id %></p><br>
|
||||
|
||||
<p class="seller">Verkäufer: <%= product.sellerName%></p><br>
|
||||
@@ -25,9 +25,9 @@
|
||||
<p class="product-detail"><b>Kategorie:</b> <%= category.name %></h2>
|
||||
<div>
|
||||
<% if(product.quantity > 0){%>
|
||||
<label style="margin-right: 30px; margin-left: 0px;color: green;">
|
||||
<p style="margin-right: 30px; margin-left: 0px;color: green;">
|
||||
Lieferbar in <%= product.delivery_time %> - <%= product.delivery_time + 1 %> Tagen
|
||||
</label><br><br>
|
||||
</p><br><br>
|
||||
|
||||
|
||||
<div style=" float:right;">
|
||||
@@ -36,9 +36,9 @@
|
||||
<button class ="order-button"onclick="window.open('/order/<%= product.id %>/' + document.getElementById('quantity').value, '_self')">Bestellen</button>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<label style="margin-right: 30px; margin-left: 0px;color: red; font-weight:bold;">
|
||||
<p style="margin-right: 30px; margin-left: 0px;color: red; font-weight:bold;">
|
||||
Aktuell nicht lieferbar!
|
||||
</label>
|
||||
</p>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,9 +49,10 @@
|
||||
<p><%= product.productDescription %> </p>
|
||||
</section>
|
||||
|
||||
<% if(user){ %>
|
||||
|
||||
<section>
|
||||
<h2 style="padding-left: 30px;">Rezensionen</h2>
|
||||
<% if(user){ %>
|
||||
<form class="product-form" action="/review/create/<%= product.id %>" method="post">
|
||||
<label for="title">
|
||||
<p>Titel: </p>
|
||||
@@ -69,8 +70,8 @@
|
||||
|
||||
<input style="width: 150px" type="submit" value="Senden">
|
||||
</form>
|
||||
<% } %>
|
||||
</section>
|
||||
<% } %>
|
||||
<section>
|
||||
<% if(reviews.length > 0){ %>
|
||||
<% for(let i = 0; i < reviews.length; i++){ %>
|
||||
@@ -84,10 +85,10 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<% }else{ %>
|
||||
<h2 style="color:rgb(158, 51, 51);">Leider hat dieses Produkt noch keine Bewertung. :(</h2>
|
||||
<h4 style="color:rgb(158, 51, 51);" class="text-center">Leider hat dieses Produkt noch keine Bewertung.</h4>
|
||||
<% } %>
|
||||
</section>
|
||||
</div>
|
||||
<%- include('partials/footer'); %>
|
||||
<!--<%- include('partials/footer'); %>-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,72 +8,84 @@
|
||||
<%- include('partials/auth_header'); %>
|
||||
<div class="content">
|
||||
<h1 class="text-center">Register</h1>
|
||||
|
||||
<p id="error_text_general" class="error-text"></p>
|
||||
<form class="auth_form" action="" method="POST">
|
||||
<p id="error-text"></p>
|
||||
|
||||
|
||||
<h4>Account Informationen:</h4>
|
||||
|
||||
<label for="username">
|
||||
<p>Benutzername:</p>
|
||||
<input required type="text" name="username" id="username" placeholder="Geben Sie Ihren Benutzernamen ein">
|
||||
<p id="error_text_username" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="email">
|
||||
<p>E-Mail:</p>
|
||||
<input required type="email" name="email" id="email" placeholder="Geben Sie Ihre E-Mail-Adresse ein">
|
||||
<p id="error_text_email" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="password1">
|
||||
<p>Passwort:</p>
|
||||
<input required type="password" name="password1" id="password1" placeholder="Geben Sie Ihr Passwort ein">
|
||||
<p id="error_text_password1" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="password2">
|
||||
<p>Passwort wiederholen:</p>
|
||||
<input required type="password" name="password2" id="password2" placeholder="wiederholen Sie Ihr Passwort">
|
||||
<p id="error_text_password2" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<h4>Persönliche Informationen:</h4>
|
||||
<label for="firstname">
|
||||
<p>Vorname:</p>
|
||||
<input required type="text" name="firstname" id="firstname" placeholder="Geben Sie Ihren Vornamen ein">
|
||||
<p id="error_text_firstname" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="lastname">
|
||||
<p>Nachname:</p>
|
||||
<input required type="text" name="lastname" id="lastname" placeholder="Geben Sie Ihren Nachnamen ein">
|
||||
<p id="error_text_lastname" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="gender">
|
||||
<p>Anrede (z.B. Herr, Frau):</p>
|
||||
<input required type="text" name="gender" id="gender" placeholder="Wie lautet Ihre Anrede?">
|
||||
<p id="error_text_gender" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<h4>Lieferadresse:</h4>
|
||||
<label for="street">
|
||||
<p>Straße:</p>
|
||||
<input required type="text" name="street" id="street" placeholder="Geben Sie Ihre Straße ein">
|
||||
<p id="error_text_street" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="housenumber">
|
||||
<p>Hausnummer:</p>
|
||||
<input required type="number" min="1" name="housenumber" id="housenumber" placeholder="Geben Sie Ihre Hausnummer ein">
|
||||
<p id="error_text_housenumber" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="postcode">
|
||||
<p>Postleitzahl:</p>
|
||||
<input required type="text" name="postcode" id="postcode" placeholder="Geben Sie die Postleitzahl ein">
|
||||
<p id="error_text_postcode" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="cityName">
|
||||
<p>Stadt:</p>
|
||||
<input required type="text" name="cityName" id="city" placeholder="Geben Sie die Stadt ein">
|
||||
<p id="error_text_city" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<label for="country">
|
||||
<p>Land:</p>
|
||||
<input required type="text" name="country" id="country" placeholder="Geben Sie das Land ein">
|
||||
<p id="error_text_country" class="error-text"></p>
|
||||
</label>
|
||||
|
||||
<input style="width: 40%;cursor:pointer;" type="button" value="Registrieren" onclick="submitForm()">
|
||||
|
||||
Reference in New Issue
Block a user