From: Roland Haeder <roland@mxchange.org> Date: Tue, 15 Sep 2015 09:18:06 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=78360cfa464944ce4659af074e30dd2623ecb3f9;p=pizzaservice-war.git Continued: - added more translations - swapped out some parts of large registration form for reuse - used them again for checkout without registration - added template file for templates Signed-off-by:Roland Häder <roland@mxchange.org> --- diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index d5721ad2..d162f45d 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -104,3 +104,13 @@ SUB_TITLE_INDEX_IMPRINT=Impressum PAGE_TITLE_INDEX_ITEM_ADDED=Produkt zum Warenkorb hinzugef\u00fcgt SUB_TITLE_INDEX_ITEM_ADDED=Produkt zum Warenkorb hinzugef\u00fcgt GUEST_ITEM_ADDED_TO_BASKET=Der Artikel {0} wurde zum Warenkorb hinzugef\u00fcgt. +LINK_CONTINUE_TO_CHECKOUT=Weiter zur Bezahlung +PAGE_TITLE_CUSTOMER_CHECKOUT=Weiter zur Bezahlung +PAGE_TITLE_INDEX_CHECKOUT2=Ohne Anmeldung bezahlen +SUB_TITLE_INDEX_CHECKOUT2=Ohne Anmeldung bezahlen +GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE=Sie k\u00f6nnen hier ohne Anmeldung bezahlen: +SUB_TITLE_CUSTOMER_CHECKOUT=Bezahlungsm\u00f6glichkeit ausw\u00e4hlen +LINK_CHECKOUT_OPTION_LOGIN=Weiter zum Kundenlogin +LINK_CHECKOUT_OPTION_REGISTRATION=Weiter zum neuen Kundenkonto anmelden +LINK_CHECKOUT_OPTION_GUEST=Ohne Anmeldung bezahlen +BUTTON_COMPLETE_ORDER=Bestellung verbindlich abschicken diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 530f47c3..ad4203a1 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -102,3 +102,13 @@ SUB_TITLE_INDEX_IMPRINT=Imprint: PAGE_TITLE_INDEX_ITEM_ADDED=Item has been added to basket SUB_TITLE_INDEX_ITEM_ADDED=Item has been added to basket: GUEST_ITEM_ADDED_TO_BASKET=The item {0} has been added to the basket. +LINK_CONTINUE_TO_CHECKOUT=Continue to checkout +PAGE_TITLE_CUSTOMER_CHECKOUT=Continue to checkout +PAGE_TITLE_INDEX_CHECKOUT2=Checkout without login +SUB_TITLE_INDEX_CHECKOUT2=Checkout without login +GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE=You can checkout without registration +SUB_TITLE_CUSTOMER_CHECKOUT=Choose checkout option +LINK_CHECKOUT_OPTION_LOGIN=Continue to customer login +LINK_CHECKOUT_OPTION_REGISTRATION=Continue with new customer registration +LINK_CHECKOUT_OPTION_GUEST=Checkout without registration +BUTTON_COMPLETE_ORDER=Bestellung verbindlich abschicken diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index a699e4aa..7296fdad 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -70,6 +70,20 @@ <to-view-id>/errorHandler.xhtml</to-view-id> </navigation-case> </navigation-rule> + <navigation-rule> + <from-view-id>/basket.xhtml</from-view-id> + <navigation-case> + <from-outcome>checkout</from-outcome> + <to-view-id>/customer/checkout.xhtml</to-view-id> + </navigation-case> + </navigation-rule> + <navigation-rule> + <from-view-id>/customer/checkout.xhtml</from-view-id> + <navigation-case> + <from-outcome>checkout2</from-outcome> + <to-view-id>/customer/checkout2.xhtml</to-view-id> + </navigation-case> + </navigation-rule> <navigation-rule> <from-view-id>/index.xhtml</from-view-id> <navigation-case> diff --git a/web/WEB-INF/templates.dist/guest_page.xhtml b/web/WEB-INF/templates.dist/guest_page.xhtml index 9dcb5701..a90306bc 100644 --- a/web/WEB-INF/templates.dist/guest_page.xhtml +++ b/web/WEB-INF/templates.dist/guest_page.xhtml @@ -7,14 +7,14 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">Your page's title here</ui:define> + <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_FOO}</ui:define> <ui:define name="menu"> <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" /> </ui:define> <ui:define name="content_header"> - Your header above content here + #{msg.SUB_TITLE_INDEX_FOO} </ui:define> <ui:define name="content"> diff --git a/web/WEB-INF/templates.dist/template.tpl b/web/WEB-INF/templates.dist/template.tpl new file mode 100644 index 00000000..ed0a4336 --- /dev/null +++ b/web/WEB-INF/templates.dist/template.tpl @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + <!-- Put your stuff here //--> +</ui:composition> diff --git a/web/WEB-INF/templates/basket/full_basket.tpl b/web/WEB-INF/templates/basket/full_basket.tpl new file mode 100644 index 00000000..8ddeea95 --- /dev/null +++ b/web/WEB-INF/templates/basket/full_basket.tpl @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + <h:dataTable var="item" value="#{basketController.allItems()}" headerClass="table_header_column" class="table" rendered="#{basketController.hasItems()}"> + <h:column> + <f:facet name="header">#{msg.GUEST_ITEM_TITLE}</f:facet> + + <ui:fragment rendered="#{item.isProductType()}"> + #{item.product.title} + </ui:fragment> + </h:column> + + <h:column> + <f:facet name="header">#{msg.SINGLE_ITEM_PRICE}</f:facet> + + <div class="item_price"> + <ui:fragment rendered="#{item.isProductType()}"> + <h:outputText class="price" value="#{item.product.price}"> + <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> + </h:outputText> + </ui:fragment> + </div> + </h:column> + + <h:column> + <f:facet name="header">#{msg.CHANGE_ITEM_AMOUNT}</f:facet> + + <h:form acceptcharset="utf-8" id="add_item"> + <h:outputText id="amount" value="#{item.amount}"> + </h:outputText> + </h:form> + </h:column> + + <h:column> + <f:facet name="header">#{msg.TOTAL_ITEM_PRICE}</f:facet> + + <div class="item_total_price"> + <h:outputText class="price" id="item_price" value="#{basketController.calculateItemPrice(item)}" rendered="#{item.isProductType()}"> + <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> + </h:outputText> + </div> + </h:column> + </h:dataTable> +</ui:composition> diff --git a/web/WEB-INF/templates/basket/total_sum.tpl b/web/WEB-INF/templates/basket/total_sum.tpl new file mode 100644 index 00000000..c350d77c --- /dev/null +++ b/web/WEB-INF/templates/basket/total_sum.tpl @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:fragment rendered="#{basketController.hasItems()}"> + <div class="totals_container"> + #{msg.TOTAL_ORDER_PRICE} + <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}"> + <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> + </h:outputText> + </div> + </ui:fragment> + + <h:outputText class="empty_basket" value="#{msg.NO_ITEMS_ADDED_TO_BASKET}" rendered="#{basketController.isEmpty()}" /> +</ui:composition> diff --git a/web/WEB-INF/templates/guest/guest_personal_data.tpl b/web/WEB-INF/templates/guest/guest_personal_data.tpl new file mode 100644 index 00000000..f4da04c8 --- /dev/null +++ b/web/WEB-INF/templates/guest/guest_personal_data.tpl @@ -0,0 +1,159 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + <div class="para notice"> + Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein: + </div> + + <div class="para"> + <fieldset id="personal_data"> + <legend title="Bitte geben Sie Ihre Daten ein.">Bitte Ihre Daten eingeben:</legend> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="gender" value="Anrede:" /> + </div> + + <div class="table_right"> + <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="companyname" value="Firmenname:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="companyname" size="15" maxlength="255" value="#{customer.companyName}" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="firstName" value="Vorname:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{customer.firstName}" required="true"> + <f:validator validatorId="NameValidator" /> + </h:inputText> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="familyName" value="Nachname:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{customer.familyName}" required="true"> + <f:validator validatorId="NameValidator" /> + </h:inputText> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="street" value="StraÃe:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="street" size="20" maxlength="255" value="#{customer.street}" required="true"> + <f:validator validatorId="NameValidator" /> + </h:inputText> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="houseNumber" value="Hausnummer:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{customer.houseNumber}" required="true"> + <f:validateLongRange minimum="1" maximum="500" /> + </h:inputText> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="zipCode" value="Postleitzahl:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{customer.zipCode}" required="true" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="city" value="Ort:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="city" size="10" maxlength="255" value="#{customer.city}" required="true"> + <f:validator validatorId="NameValidator" /> + </h:inputText> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="phoneNumber" value="Telefon:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="phoneNumber" size="20" maxlength="255" value="#{customer.phoneNumber}" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="faxNumber" value="Faxnummer:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="faxNumber" size="20" maxlength="255" value="#{customer.faxNumber}" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="cellphoneNumber" value="Handy:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="cellphoneNumber" size="20" maxlength="255" value="#{customer.cellphoneNumber}" /> + </div> + + <div class="clear"></div> + </div> + </fieldset> + </div> +</ui:composition> diff --git a/web/WEB-INF/templates/guest/guest_privacy_terms.tpl b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl new file mode 100644 index 00000000..981c8f37 --- /dev/null +++ b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + <div class="para"> + <fieldset id="terms_privacy"> + <legend title="Bitte die AGBs und Datenschutzbestimmungen lesen und akzeptieren.">Rechtliches:</legend> + + <div class="table_row"> + <div class="table_left25"> + <h:selectBooleanCheckbox class="input" id="privacy" required="true" requiredMessage="Bitte den Datenschutzbestimmungen zustimmen."> + <f:validator validatorId="PrivacyTermsCheckboxValidator" /> + </h:selectBooleanCheckbox> + </div> + + <div class="table_right75"> + Ja, ich habe die <h:link outcome="privacy" target="_blank" value="Datenschutzbestimmungen" /> gelesen und + auch verstanden. + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left25"> + <h:selectBooleanCheckbox class="input" id="terms" required="true" requiredMessage="Bitte den AGBs zustimmen."> + <f:validator validatorId="PrivacyTermsCheckboxValidator" /> + </h:selectBooleanCheckbox> + </div> + + <div class="table_right75"> + Ja, ich habe die <h:link outcome="terms" target="_blank" value="Allgemeinen Geschäftsbedingungen" /> gelesen und + auch verstanden. + </div> + + <div class="clear"></div> + </div> + </fieldset> + </div> +</ui:composition> diff --git a/web/WEB-INF/templates/guest/guest_registration_form.tpl b/web/WEB-INF/templates/guest/guest_registration_form.tpl new file mode 100644 index 00000000..d8845ac3 --- /dev/null +++ b/web/WEB-INF/templates/guest/guest_registration_form.tpl @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + + <h:form acceptcharset="utf-8" id="register_form"> + <div class="table"> + <div class="table_header"> + Anmelden als Neukunde + </div> + + <ui:include src="/WEB-INF/templates/guest/guest_personal_data.tpl" /> + + <div class="para"> + <fieldset id="login_data"> + <legend title="Zum Bestätigen wird Ihre Email-Adresse benötigt, für den Login Kundennummer und Passwort.">Email-Adresse und Passwort:</legend> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="emailAddress1" value="eMail-Adresse eingeben:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="emailAddress2" value="eMail-Adresse wiederholen:" /> + </div> + + <div class="table_right"> + <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" /> + </div> + + <div class="clear"></div> + </div> + + <div class="para"></div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="password1" value="Passwort eingeben:" /> + </div> + + <div class="table_right"> + <h:inputSecret class="input" id="password1" size="10" maxlength="255" required="true" /> + </div> + + <div class="clear"></div> + </div> + + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="password2" value="Passwort wiederholen:" /> + </div> + + <div class="table_right"> + <h:inputSecret class="input" id="password2" size="10" maxlength="255" required="true" /> + </div> + + <div class="clear"></div> + </div> + + <div class="para notice"> + Die Kundennummer wird Ihnen später vergeben. + </div> + </fieldset> + </div> + + <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" /> + + <div class="table_footer"> + <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton class="submit" type="submit" id="register" value="Anmelden" action="#{controller.doRegister()}" /> + </div> + </div> + </h:form> +</ui:composition> diff --git a/web/basket.xhtml b/web/basket.xhtml index a878d563..e3c253c2 100644 --- a/web/basket.xhtml +++ b/web/basket.xhtml @@ -65,14 +65,11 @@ </h:column> </h:dataTable> - <div class="totals_container"> - #{msg.TOTAL_ORDER_PRICE} - <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}"> - <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> - </h:outputText> - </div> + <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" /> - <h:outputText class="empty_basket" value="#{msg.NO_ITEMS_ADDED_TO_BASKET}" rendered="#{basketController.isEmpty()}" /> + <div class="continue_checkout"> + <h:link class="checkout_link" id="checkout" value="#{msg.LINK_CONTINUE_TO_CHECKOUT}" outcome="checkout" /> + </div> </ui:define> <ui:define name="footer"> diff --git a/web/customer/checkout.xhtml b/web/customer/checkout.xhtml new file mode 100644 index 00000000..9de80b1d --- /dev/null +++ b/web/customer/checkout.xhtml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> + <ui:define name="guest_title">#{msg.PAGE_TITLE_CUSTOMER_CHECKOUT}</ui:define> + + <ui:define name="menu"> + <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" /> + </ui:define> + + <ui:define name="content_header"> + #{msg.SUB_TITLE_CUSTOMER_CHECKOUT} + </ui:define> + + <ui:define name="content"> + <div class="basket_content"> + <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" /> + + <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" /> + </div> + + <div class="checkout_outer"> + <div class="checkout_title"> + Sie haben drei Möglichkeiten zur Auswahl: + </div> + + <div class="checkout_options"> + <ul> + <li> + <div class="checkout_option_title"> + Ein bestehenden Kundenkonto verwenden + </div> + + <div class="checkout_option_content"> + <h:link class="checkout_option_link" id="checkout_option_login" outcome="login" value="#{msg.LINK_CHECKOUT_OPTION_LOGIN}"> + <f:param name="redirect" value="login_checkout" /> + </h:link> + </div> + </li> + + <li> + <div class="checkout_option_title"> + Neues Kundenkonto erstellen + </div> + + <div class="checkout_option_content"> + <h:link class="checkout_option_link" id="checkout_option_register" outcome="register" value="#{msg.LINK_CHECKOUT_OPTION_REGISTRATION}"> + <f:param name="redirect" value="login_checkout" /> + </h:link> + </div> + </li> + + <li> + <div class="checkout_option_title"> + Ohne Anmeldung bezahlen + </div> + + <div class="checkout_option_content"> + <h:link class="checkout_option_link" id="checkout_option_guest" outcome="checkout2" value="#{msg.LINK_CHECKOUT_OPTION_GUEST}" /> + </div> + </li> + </ul> + </div> + </div> + </ui:define> + + <ui:define name="footer"> + <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" /> + </ui:define> + </ui:composition> +</html> diff --git a/web/customer/checkout2.xhtml b/web/customer/checkout2.xhtml new file mode 100644 index 00000000..e6391348 --- /dev/null +++ b/web/customer/checkout2.xhtml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> + <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_CHECKOUT2}</ui:define> + + <ui:define name="menu"> + <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" /> + + <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" /> + </ui:define> + + <ui:define name="content_header"> + #{msg.SUB_TITLE_INDEX_CHECKOUT2} + </ui:define> + + <ui:define name="content"> + <div class="basket_content"> + <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" /> + </div> + + <div class="checkout_outer"> + <div class="checkout_title"> + #{msg.GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE} + </div> + + <div class="registration_form"> + <h:form acceptcharset="utf-8" id="checkout_form"> + <div class="table"> + <div class="table_header"> + Bezahlung ohne Anmeldung + </div> + + <ui:include src="/WEB-INF/templates/guest/guest_personal_data.tpl" /> + + <div class="para"> + Derzeit ist nur eine Bezahlung gegen Rechnung möglich. + </div> + + <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" /> + + <div class="table_footer"> + <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton class="submit" type="submit" id="checkout" value="#{msg.BUTTON_COMPLETE_ORDER}" action="#{controller.doCheckout()}" /> + </div> + </div> + </h:form> + </div> + </div> + </ui:define> + + <ui:define name="footer"> + <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" /> + </ui:define> + </ui:composition> +</html> diff --git a/web/customer/register.xhtml b/web/customer/register.xhtml index 7a002027..dd1af7b5 100644 --- a/web/customer/register.xhtml +++ b/web/customer/register.xhtml @@ -23,266 +23,9 @@ Sie sind bereits Kunde? Dann <h:link outcome="customer_login" value="hier" /> einloggen. </div> - <h:form acceptcharset="utf-8" id="register_form"> - <div class="table"> - <div class="table_header"> - Anmelden als Neukunde - </div> - - <div class="para notice"> - Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein: - </div> - - <div class="para"> - <fieldset id="personal_data"> - <legend title="Bitte geben Sie Ihre Daten ein.">Bitte Ihre Daten eingeben:</legend> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="gender" value="Anrede:" /> - </div> - - <div class="table_right"> - <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="companyname" value="Firmenname:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="companyname" size="15" maxlength="255" value="#{customer.companyName}" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="firstName" value="Vorname:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{customer.firstName}" required="true"> - <f:validator validatorId="NameValidator" /> - </h:inputText> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="familyName" value="Nachname:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{customer.familyName}" required="true"> - <f:validator validatorId="NameValidator" /> - </h:inputText> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="street" value="StraÃe:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="street" size="20" maxlength="255" value="#{customer.street}" required="true"> - <f:validator validatorId="NameValidator" /> - </h:inputText> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="houseNumber" value="Hausnummer:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{customer.houseNumber}" required="true"> - <f:validateLongRange minimum="1" maximum="500" /> - </h:inputText> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="zipCode" value="Postleitzahl:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{customer.zipCode}" required="true" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="city" value="Ort:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="city" size="10" maxlength="255" value="#{customer.city}" required="true"> - <f:validator validatorId="NameValidator" /> - </h:inputText> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="phoneNumber" value="Telefon:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="phoneNumber" size="20" maxlength="255" value="#{customer.phoneNumber}" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="faxNumber" value="Faxnummer:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="faxNumber" size="20" maxlength="255" value="#{customer.faxNumber}" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="cellphoneNumber" value="Handy:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="cellphoneNumber" size="20" maxlength="255" value="#{customer.cellphoneNumber}" /> - </div> - - <div class="clear"></div> - </div> - </fieldset> - </div> - - <div class="para"> - <fieldset id="login_data"> - <legend title="Zum Bestätigen wird Ihre Email-Adresse benötigt, für den Login Kundennummer und Passwort.">Email-Adresse und Passwort:</legend> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="emailAddress1" value="eMail-Adresse eingeben:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="emailAddress2" value="eMail-Adresse wiederholen:" /> - </div> - - <div class="table_right"> - <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" /> - </div> - - <div class="clear"></div> - </div> - - <div class="para"></div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="password1" value="Passwort eingeben:" /> - </div> - - <div class="table_right"> - <h:inputSecret class="input" id="password1" size="10" maxlength="255" required="true" /> - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="password2" value="Passwort wiederholen:" /> - </div> - - <div class="table_right"> - <h:inputSecret class="input" id="password2" size="10" maxlength="255" required="true" /> - </div> - - <div class="clear"></div> - </div> - - <div class="para notice"> - Die Kundennummer wird Ihnen später vergeben. - </div> - </fieldset> - </div> - - <div class="para"> - <fieldset id="terms_privacy"> - <legend title="Bitte die AGBs und Datenschutzbestimmungen lesen und akzeptieren.">Rechtliches:</legend> - - <div class="table_row"> - <div class="table_left25"> - <h:selectBooleanCheckbox class="input" id="privacy" required="true" requiredMessage="Bitte den Datenschutzbestimmungen zustimmen."> - <f:validator validatorId="PrivacyTermsCheckboxValidator" /> - </h:selectBooleanCheckbox> - </div> - - <div class="table_right75"> - Ja, ich habe die <h:link outcome="privacy" target="_blank" value="Datenschutzbestimmungen" /> gelesen und - auch verstanden. - </div> - - <div class="clear"></div> - </div> - - <div class="table_row"> - <div class="table_left25"> - <h:selectBooleanCheckbox class="input" id="terms" required="true" requiredMessage="Bitte den AGBs zustimmen."> - <f:validator validatorId="PrivacyTermsCheckboxValidator" /> - </h:selectBooleanCheckbox> - </div> - - <div class="table_right75"> - Ja, ich habe die <h:link outcome="terms" target="_blank" value="Allgemeinen Geschäftsbedingungen" /> gelesen und - auch verstanden. - </div> - - <div class="clear"></div> - </div> - </fieldset> - </div> - - <div class="table_footer"> - <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> - <h:commandButton class="submit" type="submit" id="register" value="Anmelden" action="#{controller.doRegister()}" /> - </div> - </div> - </h:form> + <div class="registration_form"> + <ui:include src="/WEB-INF/templates/guest/guest_registration_form.tpl" /> + </div> </ui:define> <ui:define name="footer">