From 2d00f8e1fc0d0044004dadd7807024bb86c9dbaf Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 11 Aug 2015 13:09:47 +0200 Subject: [PATCH] =?utf8?q?Continued:=20-=20Moved=20login/register=20to=20o?= =?utf8?q?wn=20path=20/customer/=20-=20Added=20"static"=20include=20"login?= =?utf8?q?=5Fform.jsp"=20and=20"gender=5Fselection=5Fbox.jsp"=20-=20Added?= =?utf8?q?=20form=20handler=20"do=5Fpreview.jsp"=20and=20moved=20code=20fr?= =?utf8?q?om=20preview.jsp=20to=20it=20-=20style.css=20should=20be=20refer?= =?utf8?q?enced=20with=20full=20path=20so=20all=20pages=20can=20have=20sam?= =?utf8?q?e=20HTML=20code=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- web/bye.jsp | 2 +- web/customer/login.jsp | 45 +++++++++++++++++ web/{ => customer}/register.jsp | 10 ++-- web/errorHandler.jsp | 2 +- web/finished.jsp | 2 +- web/form_handler/do_order.jsp | 2 +- web/form_handler/do_preview.jsp | 66 +++++++++++++++++++++++++ web/index.jsp | 4 +- web/login.jsp | 76 ----------------------------- web/preview.jsp | 22 +-------- web/static/forms/login.jsp | 46 +++++++++++++++++ web/static/gender_selection_box.jsp | 36 ++++++++++++++ web/static/menu.jsp | 6 +-- web/style.css | 6 ++- 14 files changed, 214 insertions(+), 111 deletions(-) create mode 100644 web/customer/login.jsp rename web/{ => customer}/register.jsp (84%) create mode 100644 web/form_handler/do_preview.jsp delete mode 100644 web/login.jsp create mode 100644 web/static/forms/login.jsp create mode 100644 web/static/gender_selection_box.jsp 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/register.jsp b/web/customer/register.jsp similarity index 84% rename from web/register.jsp rename to web/customer/register.jsp index 37d65896..c70d3795 100644 --- a/web/register.jsp +++ b/web/customer/register.jsp @@ -1,7 +1,7 @@ <%-- - Document : register - Created on : 11.08.2015, 11:56:22 - Author : Roland Haeder + Document : register + Created on : 11.08.2015, 11:56:22 + Author : Roland Haeder --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> @@ -11,7 +11,7 @@ - + <%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde @@ -24,7 +24,7 @@
-

Einloggen als bestehender Kunde:

+

Anmelden zum <%=PizzaServiceApplication.MAIN_TITLE%>:

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/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; } -- 2.39.5