From: Roland Haeder Date: Tue, 11 Aug 2015 11:09:47 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2d00f8e1fc0d0044004dadd7807024bb86c9dbaf;p=pizzaservice-war.git Continued: - Moved login/register to own path /customer/ - Added "static" include "login_form.jsp" and "gender_selection_box.jsp" - Added form handler "do_preview.jsp" and moved code from preview.jsp to it - style.css should be referenced with full path so all pages can have same HTML code Signed-off-by:Roland Häder --- diff --git a/web/bye.jsp b/web/bye.jsp index b4a152f1..678c9da9 100644 --- a/web/bye.jsp +++ b/web/bye.jsp @@ -11,7 +11,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Sitzung beenden diff --git a/web/customer/login.jsp b/web/customer/login.jsp new file mode 100644 index 00000000..9005179d --- /dev/null +++ b/web/customer/login.jsp @@ -0,0 +1,45 @@ +<%-- + Document : login + Created on : 11.08.2015, 11:35:53 + Author : Roland Haeder +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> + + + + + + + <%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen + + + +
+

<%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen

+
+ + + +
+
+

Einloggen als bestehender Kunde:

+
+ +
+
+ Noch kein Kunde? Einfach beim Bestellen anmelden oder hier anmelden. +
+ +
+ +
+ + +
+
+ + diff --git a/web/customer/register.jsp b/web/customer/register.jsp new file mode 100644 index 00000000..c70d3795 --- /dev/null +++ b/web/customer/register.jsp @@ -0,0 +1,50 @@ +<%-- + Document : register + Created on : 11.08.2015, 11:56:22 + Author : Roland Haeder +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> + + + + + + + <%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde + + + +
+

<%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde

+
+ + + +
+
+

Anmelden zum <%=PizzaServiceApplication.MAIN_TITLE%>:

+
+ +
+
+ Sie sind bereits Kunde? Dann hier einloggen. +
+ +
+
+
+ Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein: +
+ + +
+
+
+
+ + diff --git a/web/errorHandler.jsp b/web/errorHandler.jsp index 8fe26c1b..21a892fd 100644 --- a/web/errorHandler.jsp +++ b/web/errorHandler.jsp @@ -19,7 +19,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Fehler diff --git a/web/finished.jsp b/web/finished.jsp index 13195b2a..3788ba18 100644 --- a/web/finished.jsp +++ b/web/finished.jsp @@ -26,7 +26,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank! diff --git a/web/form_handler/do_order.jsp b/web/form_handler/do_order.jsp index 79e7c5e1..cdfe1c37 100644 --- a/web/form_handler/do_order.jsp +++ b/web/form_handler/do_order.jsp @@ -32,7 +32,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler diff --git a/web/form_handler/do_preview.jsp b/web/form_handler/do_preview.jsp new file mode 100644 index 00000000..9327d52c --- /dev/null +++ b/web/form_handler/do_preview.jsp @@ -0,0 +1,66 @@ +<%-- + Document : order + Created on : 04.08.2015, 10:55:10 + Author : Roland Haeder +--%> + +<%--<%@page errorPage="errorHandler.jsp" %>--%> +<%@page import="java.util.Iterator"%> +<%@page import="java.util.Map"%> +<%@page import="org.mxchange.jcore.contact.Gender"%> +<%@page import="org.mxchange.pizzaapplication.product.Product"%> +<%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%> +<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> +<%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<% + // Init application instance + PizzaApplication app = PizzaServiceApplication.getInstance(application); + + // Is it post? + if ("POST".equals(request.getMethod())) { //NOI18N + // "Walk" through all products and unmark them as ordered + for (final Product product : app.getUnmarkedProducts(session)) { + // Is it choosen and amount set? + if (app.isProductChoosen(product, request, session)) { + // Then mark it as choosen + app.markProductAsChoosen(product, session); + } + } + // Redirect to proper URL + // @TODO Commented out for developing: + //response.sendRedirect(request.getContextPath() + "/finished.jsp"); +%> + + + +<% + } +%> + + + + + + <%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler + + + +
+

<%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler

+
+ + + +
+
+

Bitte nicht direkt aufrufen:

+
+ +
+ Bitte rufen Sie diese Seite nicht direkt auf. +
+
+ + diff --git a/web/index.jsp b/web/index.jsp index ab34c085..ffc06eb0 100644 --- a/web/index.jsp +++ b/web/index.jsp @@ -20,7 +20,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Eingangsseite @@ -37,7 +37,7 @@
-
+ diff --git a/web/login.jsp b/web/login.jsp deleted file mode 100644 index 8d418c23..00000000 --- a/web/login.jsp +++ /dev/null @@ -1,76 +0,0 @@ -<%-- - Document : login - Created on : 11.08.2015, 11:35:53 - Author : Roland Haeder ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> - - - - - - - <%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen - - - -
-

<%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen

-
- - - -
-
-

Einloggen als bestehender Kunde:

-
- -
-
- Noch kein Kunde? Einfach beim Bestellen anmelden oder hier anmelden. -
- - -
-
- Bitte geben Sie Ihre Kundennummer und Passwort ein: -
- -
- Bitte Daten eingeben: - -
-
- Kundennummer: -
-
- -
-
- -
- -
-
- Passwort: -
-
- -
-
- -
-
- - -
- -
-
- - diff --git a/web/preview.jsp b/web/preview.jsp index 62a3dad0..dbe8eb8e 100644 --- a/web/preview.jsp +++ b/web/preview.jsp @@ -25,7 +25,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Bestellung anzeigen @@ -122,25 +122,7 @@
- +
diff --git a/web/register.jsp b/web/register.jsp deleted file mode 100644 index 37d65896..00000000 --- a/web/register.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - Document : register - Created on : 11.08.2015, 11:56:22 - Author : Roland Haeder ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> - - - - - - - <%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde - - - -
-

<%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde

-
- - - -
-
-

Einloggen als bestehender Kunde:

-
- -
-
- Sie sind bereits Kunde? Dann hier einloggen. -
- -
-
-
- Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein: -
- - -
- -
-
- - diff --git a/web/static/forms/login.jsp b/web/static/forms/login.jsp new file mode 100644 index 00000000..2276d934 --- /dev/null +++ b/web/static/forms/login.jsp @@ -0,0 +1,46 @@ +<%-- + Document : login + Created on : 11.08.2015, 12:28:03 + Author : Roland Haeder +--%> +
+
+
+
+ Bitte geben Sie Ihre Kundennummer und Passwort ein: +
+ +
+ Bitte Daten eingeben: + +
+
+ Kundennummer: +
+
+ +
+
+ +
+ +
+
+ Passwort: +
+
+ +
+
+ +
+
+ + +
+ +
diff --git a/web/static/gender_selection_box.jsp b/web/static/gender_selection_box.jsp new file mode 100644 index 00000000..d761f48d --- /dev/null +++ b/web/static/gender_selection_box.jsp @@ -0,0 +1,36 @@ +<%-- + Document : gender_selection_box + Created on : 11.08.2015, 13:02:12 + Author : Roland Haeder +--%> +<%@page import="org.mxchange.jcore.contact.Gender"%> +<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> +<%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%> +<%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %> + + + +<% + // Init application instance + PizzaApplication app = PizzaServiceApplication.getInstance(application); +%> + + diff --git a/web/static/menu.jsp b/web/static/menu.jsp index a8a22db9..1f72802b 100644 --- a/web/static/menu.jsp +++ b/web/static/menu.jsp @@ -13,8 +13,8 @@ diff --git a/web/style.css b/web/style.css index c4a12262..c8580af0 100644 --- a/web/style.css +++ b/web/style.css @@ -22,11 +22,15 @@ div { clear: both; } -table { +table, .table { margin: 0px; padding: 0px; } +.table { + width: 500px; +} + .table_row { width: 300px; }