From 8e4ce897a6faab489a2b09fa64cb1b696d37018f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 31 May 2016 15:27:46 +0200 Subject: [PATCH] added title (e.g. Dr., Prof. etc) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- nbproject/faces-config.NavData | 146 +++++++++--------- .../localization/bundle_de_DE.properties | 1 + .../localization/bundle_en_US.properties | 1 + .../PizzaAdminContactWebRequestBean.java | 18 +++ ...PizzaAdminContactWebRequestController.java | 14 ++ .../admin/contact/admin_form_contact_data.tpl | 14 ++ 6 files changed, 121 insertions(+), 73 deletions(-) diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index ebbbba22..2d89abb6 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,81 +2,81 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 9318cc33..6333bb73 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -551,3 +551,4 @@ GUEST_CONTACT_DATA_ZIP_CODE_REQUIRED=Bitte geben Sie Ihre Postleitzahl ein. GUEST_CONTACT_DATA_CITY_REQUIRED=Bitte geben Sie Ihren Wohnort ein. GUEST_CONTACT_DATA_BIRTHDAY_REQUIRED=Bitte geben Sie Ihr Geburtsdatum ein. FIELD_GENDER_REQUIRED=Bitte w\u00e4hlen Sie eine Anrede aus. +ADMIN_PERSONAL_DATA_TITLE=Titel: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 803037cb..f73ab467 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -535,3 +535,4 @@ GUEST_CONTACT_DATA_ZIP_CODE_REQUIRED=Please enter your ZIP code. GUEST_CONTACT_DATA_CITY_REQUIRED=Please enter your city. GUEST_CONTACT_DATA_BIRTHDAY_REQUIRED=Please enter your birthday. FIELD_GENDER_REQUIRED=Please select a salutation. +ADMIN_PERSONAL_DATA_TITLE=Title: diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java index 6b3ef417..94487af0 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java @@ -214,6 +214,11 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme */ private String street; + /** + * Title + */ + private String title; + /** * An event fired when the administrator has updated contact data */ @@ -295,6 +300,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme // Set all fields: contact this.setContactId(contact.getContactId()); + this.setTitle(contact.getContactTitle()); this.setBirthday(contact.getContactBirthday()); this.setCity(contact.getContactCity()); this.setComment(contact.getContactComment()); @@ -735,6 +741,16 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme this.street = street; } + @Override + public String getTitle () { + return this.title; + } + + @Override + public void setTitle (final String title) { + this.title = title; + } + @Override public Integer getZipCode () { return this.zipCode; @@ -759,6 +775,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme // Clear all data // - personal data this.setGender(Gender.UNKNOWN); + this.setTitle(null); this.setFirstName(null); this.setFamilyName(null); this.setStreet(null); @@ -834,6 +851,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme // Update all fields contact.setContactGender(this.getGender()); + contact.setContactTitle(this.getTitle()); contact.setContactFirstName(this.getFirstName()); contact.setContactFamilyName(this.getFamilyName()); contact.setContactStreet(this.getStreet()); diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java index d8612583..c1fa9668 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java @@ -369,6 +369,20 @@ public interface PizzaAdminContactWebRequestController extends Serializable { */ void setStreet (final String street); + /** + * Getter for title + *

+ * @return title + */ + String getTitle (); + + /** + * Setter for title + *

+ * @param title Title + */ + void setTitle (final String title); + /** * ZIP code *

diff --git a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl index 0282508c..f7f3228b 100644 --- a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl +++ b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl @@ -41,6 +41,20 @@ +

+
+ +
+ +
+ +
+ +
+
+ + +
-- 2.39.5