]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued with administrative area:
authorRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 19:02:40 +0000 (21:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 19:03:42 +0000 (21:03 +0200)
- added admin_form_personal_data.xhtml which is based on the generic but with some things different
- added a lot new language strings

src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/admin/admin_form_personal_data.tpl [new file with mode: 0644]
web/admin/admin_user_add.xhtml

index 8bcb93deefc33899dcef20610906163a65bb1e57..8f8c7a57c1280e40abaa795fe93876db6a5aa470 100644 (file)
@@ -263,3 +263,32 @@ CONTENT_TITLE_ADMIN_EDIT_PRODUCT=Produkt aendern:
 ADMIN_LINK_EDIT_DELETE_CATEGORY_TITLE=Aendern oder loeschen der Kategorie
 #@TODO Please fix German umlauts!
 ADMIN_LINK_EDIT_DELETE_PRODUCT_TITLE=Aendern oder loeschen des Produktes
+ADMIN_ADD_USER_TITLE=Neues Benutzeraccount anlegen
+ADMIN_PERSONAL_DATA_MINIMUM_NOTICE=Bitte geben Sie mindestens Vor- und Nachnamen, sowie Benutzernamen und Email-Adresse ein.
+#@TODO Please fix German umlauts!
+ADMIN_PERSONAL_DATA_LEGEND=Persoenliche Daten des Benutzers:
+#@TODO Please fix German umlauts!
+ADMIN_PERSONAL_DATA_LEGEND_TITLE=Geben Sie hier die persoenlichen Daten des neuen Benutzers ein.
+#@TODO Please fix German umlauts!
+ADMIN_PERSONAL_DATA_GENDER=Anrede auswaehlen:
+ADMIN_PERSONAL_DATA_FIRST_NAME=Vorname:
+ADMIN_PERSONAL_DATA_FAMILY_NAME=Familienname:
+ADMIN_PERSONAL_DATA_STREET=Strassenname:
+ADMIN_PERSONAL_DATA_HOUSE_NUMBER=Hausnummer:
+ADMIN_PERSONAL_DATA_ZIP_CODE=Postleitzahl:
+ADMIN_PERSONAL_DATA_CITY=Wohnort:
+#@TODO Please fix German umlauts!
+ADMIN_PERSONAL_DATA_COUNTRY_CODE=Land auswaehlen:
+ADMIN_PERSONAL_DATA_PHONE_NUMBER=Telefonnummer:
+ADMIN_PERSONAL_DATA_FAX_NUMBER=Faxnummer:
+ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER=Handynummer:
+ADMIN_ADD_USER_EMAIL_LEGEND=Benutzernamen und Email-Adresse:
+ADMIN_ADD_USER_EMAIL_LEGEND_TITLE=Vergeben Sie hier den Benutzernamen und geben Sie die Email-Adresse ein.
+ADMIN_ADD_USER_ENTER_USER_NAME=Benutzername (*1):
+ADMIN_ADD_USER_ENTER_EMAIL=Email-Adresse (*2):
+ADMIN_ADD_USER_USER_NAME_NOTICE=*1: Der Benutzername darf nur einmal vorhanden sein, das System prueft dies fuer Sie.
+ADMIN_ADD_USER_PASSWORD_NOTICE=Das Passwort wird dem Benutzer nach Erstellung des Zugangs an die Email-Adresse gesendet.
+ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE=*2: Die Email-Adresse darf nur einmal vorhanden sein.
+ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE=Eine Kundennummer wird automatisch beim Erstellen des Accounts erzeugt.
+#@TODO Please fix German umlauts!
+BUTTON_ADMIN_ADD_USER=Neuen Benutzer hinzufuegen
index 7e59c0a7a2e651aed29432d37fd2f39d0ecda549..3415868b6a1871ae139466f76cd1fa5be4c680b9 100644 (file)
@@ -247,3 +247,27 @@ PAGE_TITLE_ADMIN_EDIT_PRODUCT=Edit product
 CONTENT_TITLE_ADMIN_EDIT_PRODUCT=Edit product:
 ADMIN_LINK_EDIT_DELETE_CATEGORY_TITLE=Edit or delete category
 ADMIN_LINK_EDIT_DELETE_PRODUCT_TITLE=Edit or delete product
+ADMIN_ADD_USER_TITLE=Create a new user account
+ADMIN_PERSONAL_DATA_MINIMUM_NOTICE=Please enter at least first name, family name, user name and email address.
+ADMIN_PERSONAL_DATA_LEGEND=Personal data of the user:
+ADMIN_PERSONAL_DATA_LEGEND_TITLE=Here you can enter the personal data of the new user.
+ADMIN_PERSONAL_DATA_GENDER=Select gender:
+ADMIN_PERSONAL_DATA_FIRST_NAME=First name:
+ADMIN_PERSONAL_DATA_FAMILY_NAME=Family name:
+ADMIN_PERSONAL_DATA_STREET=Name of street:
+ADMIN_PERSONAL_DATA_HOUSE_NUMBER=House number:
+ADMIN_PERSONAL_DATA_ZIP_CODE=ZIP code:
+ADMIN_PERSONAL_DATA_CITY=City:
+ADMIN_PERSONAL_DATA_COUNTRY_CODE=Select country:
+ADMIN_PERSONAL_DATA_PHONE_NUMBER=Phone number:
+ADMIN_PERSONAL_DATA_FAX_NUMBER=Fax number:
+ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER=Mobile number:
+ADMIN_ADD_USER_EMAIL_LEGEND=User name and email address:
+ADMIN_ADD_USER_EMAIL_LEGEND_TITLE=Enter here a user name and email address.
+ADMIN_ADD_USER_ENTER_USER_NAME=User name (*1):
+ADMIN_ADD_USER_ENTER_EMAIL=Email address (*2):
+ADMIN_ADD_USER_USER_NAME_NOTICE=*1: The user name must be unique which is checked by the system for you.
+ADMIN_ADD_USER_PASSWORD_NOTICE=The password is being sent to the user's email address after creation of the account.
+ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE=*2: The email address must be unique.
+ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE=A customer number is being automatically created on creation of the account.
+BUTTON_ADMIN_ADD_USER=Add new user account
diff --git a/web/WEB-INF/templates/admin/admin_form_personal_data.tpl b/web/WEB-INF/templates/admin/admin_form_personal_data.tpl
new file mode 100644 (file)
index 0000000..6c6cc28
--- /dev/null
@@ -0,0 +1,234 @@
+<?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">
+               #{msg.ADMIN_PERSONAL_DATA_MINIMUM_NOTICE}
+       </div>
+
+       <div class="para">
+               <fieldset id="personal_data">
+                       <legend title="#{msg.ADMIN_PERSONAL_DATA_LEGEND_TITLE}">#{msg.ADMIN_PERSONAL_DATA_LEGEND}</legend>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="gender" value="#{msg.ADMIN_PERSONAL_DATA_GENDER}" />
+                               </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="firstName" value="#{msg.ADMIN_PERSONAL_DATA_FIRST_NAME}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{adminUserController.firstName}" required="true">
+                                               <f:validator for="firstName" validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="familyName" value="#{msg.ADMIN_PERSONAL_DATA_FAMILY_NAME}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{adminUserController.familyName}" required="true">
+                                               <f:validator for="familyName" validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="street" value="#{msg.ADMIN_PERSONAL_DATA_STREET}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="street" size="20" maxlength="255" value="#{adminUserController.street}" required="true">
+                                               <f:validator for="street" validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="houseNumber" value="#{msg.ADMIN_PERSONAL_DATA_HOUSE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{adminUserController.houseNumber}" required="true" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
+                                               <f:validateLongRange for="houseNumber" 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="#{msg.ADMIN_PERSONAL_DATA_ZIP_CODE}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{adminUserController.zipCode}" required="true" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
+                                               <f:validateLongRange for="zipCode" minimum="1" maximum="99999" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="city" value="#{msg.ADMIN_PERSONAL_DATA_CITY}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="city" size="10" maxlength="255" value="#{adminUserController.city}" required="true">
+                                               <f:validator for="city" validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="country" value="#{msg.ADMIN_PERSONAL_DATA_COUNTRY_CODE}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="country" value="#{adminUserController.country}" converter="country">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryCode} (#{msg[c.countryI18nkey]})" />
+                                       </h:selectOneMenu>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel value="#{msg.ADMIN_PERSONAL_DATA_PHONE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="phoneCountryCode" value="#{adminUserController.phoneCountry}" converter="country">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText class="input" id="phoneAreaCode" size="5" maxlength="10" value="#{adminUserController.phoneAreaCode}">
+                                               <f:validator for="phoneAreaCode" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+
+                                       <h:inputText class="input" id="phoneNumber" size="10" maxlength="20" value="#{adminUserController.phoneNumber}">
+                                               <f:validator for="phoneNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="faxNumber" value="#{msg.ADMIN_PERSONAL_DATA_FAX_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="faxCountryCode" value="#{adminUserController.faxCountry}" converter="country">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText class="input" id="faxAreaCode" size="5" maxlength="10" value="#{adminUserController.faxAreaCode}">
+                                               <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+
+                                       <h:inputText class="input" id="faxNumber" size="10" maxlength="20" value="#{adminUserController.faxNumber}">
+                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="cellphoneNumber" value="#{msg.ADMIN_PERSONAL_DATA_CELLPHONE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="cellphoneCarrier" value="#{adminUserController.cellphoneCarrier}" converter="CellphoneCarrierConverter">
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{cellphone.allSmsProvider()}" var="p" itemValue="#{p}" itemLabel="#{p.providerCountry.countryLocalDialPrefix}#{p.providerDialPrefix} (#{p.providerName})" />
+                                       </h:selectOneMenu>
+
+                                       <h:inputText class="input" id="cellphoneNumber" size="10" maxlength="20" value="#{adminUserController.cellphoneNumber}">
+                                               <f:validator for="cellphoneNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+               </fieldset>
+       </div>
+
+       <div class="para">
+               <fieldset id="login_data">
+                       <legend title="#{msg.ADMIN_ADD_USER_EMAIL_LEGEND_TITLE}">#{msg.ADMIN_ADD_USER_EMAIL_LEGEND}</legend>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="userName" value="#{msg.ADMIN_ADD_USER_ENTER_USER_NAME}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="userName" size="20" maxlength="255" value="#{adminUserController.userName}" required="true" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="emailAddress" value="#{msg.ADMIN_ADD_USER_ENTER_EMAIL}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{adminUserController.emailAddress}" required="true" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="para"></div>
+
+                       <div class="para notice">
+                               <ul>
+                                       <li>#{msg.ADMIN_ADD_USER_USER_NAME_NOTICE}</li>
+                                       <li>#{msg.ADMIN_ADD_USER_PASSWORD_NOTICE}</li>
+                                       <li>#{msg.ADMIN_ADD_USER_EMAIL_ADDRESS_NOTICE}</li>
+                                       <li>#{msg.ADMIN_ADD_USER_CUSTOMER_NUMBER_NOTICE}</li>
+                               </ul>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
index dbfd0e004b861ab86f8e1c0162678465581170a9..19e2ddeb8058ce634c660f92befd09e796106cfd 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <div class="table">
+                               <h:form id="admin_add_user">
+                                       <div class="table_header">
+                                               #{msg.ADMIN_ADD_USER_TITLE}
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/admin/admin_form_personal_data.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="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
+                                       </div>
+                               </h:form>
+                       </div>
                </ui:define>
        </ui:composition>
 </html>