From 90876aa4743f132169bd4d5ebba2410e6ce905a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 17 Aug 2016 09:37:34 +0200 Subject: [PATCH] Continued a bit: (please cherry-pick) - added missing backing bean properties for fax/land-line edit templates (both share the same properties as they are same data but for different purposes) - fixed copy-paste mobile -> fax/land-line stuff I forgot - admin_form_(fax|landline)_data.tpl should be more complete now MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../phone/JobsAdminPhoneWebRequestBean.java | 31 +++++++++++++++++++ .../JobsAdminPhoneWebRequestController.java | 29 +++++++++++++++++ .../admin/fax/admin_fax_add_show.tpl | 8 ++--- .../templates/admin/fax/admin_fax_data.tpl | 29 ++++++----------- .../templates/admin/fax/admin_fax_links.tpl | 12 +++---- .../admin/fax/admin_form_add_contact_fax.tpl | 18 +++++------ .../admin/fax/admin_form_fax_data.tpl | 16 ++++++++-- .../landline/admin_form_landline_data.tpl | 16 ++++++++-- .../admin/landline/admin_landline_data.tpl | 17 +++------- .../admin/mobile/admin_form_mobile_data.tpl | 2 +- 10 files changed, 120 insertions(+), 58 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java index b05a7ea3..636675a3 100644 --- a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java @@ -28,6 +28,7 @@ import javax.inject.Named; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; +import org.mxchange.jcountry.data.Country; import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jjobs.beans.helper.JobsWebRequestController; import org.mxchange.jphone.events.fax.removed.AdminFaxNumberRemovedFromListEvent; @@ -105,12 +106,22 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements */ private MobileProvider mobileProvider; + /** + * Area code (city dial prefix) + */ + private Long phoneAreaCode; + /** * Generic hone controller */ @Inject private JobsPhoneWebApplicationController phoneController; + /** + * Country (for dial prefix) + */ + private Country phoneCountry; + /** * Phone number */ @@ -335,6 +346,26 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements this.mobileProvider = mobileProvider; } + @Override + public Long getPhoneAreaCode () { + return this.phoneAreaCode; + } + + @Override + public void setPhoneAreaCode (final Long phoneAreaCode) { + this.phoneAreaCode = phoneAreaCode; + } + + @Override + public Country getPhoneCountry () { + return this.phoneCountry; + } + + @Override + public void setPhoneCountry (final Country phoneCountry) { + this.phoneCountry = phoneCountry; + } + @Override public Long getPhoneNumber () { return this.phoneNumber; diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java index 7af1d526..194fb02c 100644 --- a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java @@ -19,6 +19,7 @@ package org.mxchange.jjobs.beans.phone; import java.io.Serializable; import java.util.List; import javax.ejb.Local; +import org.mxchange.jcountry.data.Country; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; @@ -124,6 +125,34 @@ public interface JobsAdminPhoneWebRequestController extends Serializable { */ void setMobileNumber (final Long mobileNumber); + /** + * Getter for phone area code + *

+ * @return Phone area code + */ + Long getPhoneAreaCode (); + + /** + * Setter for phone area code + *

+ * @param phoneAreaCode Phone area code + */ + void setPhoneAreaCode (final Long phoneAreaCode); + + /** + * Getter for phone country (for dial prefix) + *

+ * @return Phone country + */ + Country getPhoneCountry (); + + /** + * Setter for phone country (for dial prefix) + *

+ * @param phoneCountry Phone country + */ + void setPhoneCountry (final Country phoneCountry); + /** * Getter for dial number without prefix *

diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl index 0bc92a85..257f2404 100644 --- a/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl @@ -7,11 +7,11 @@ - - + + - - + + diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl index 4369ce0d..c6443840 100644 --- a/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl @@ -5,43 +5,34 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - + - + - + - + - + - + - - - - - - - - - - + - +

- +
diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl index f5b64ccd..01cf00ea 100644 --- a/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl @@ -5,15 +5,15 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - +
    @@ -21,7 +21,7 @@ @@ -29,7 +29,7 @@ @@ -38,7 +38,7 @@
diff --git a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl index 1403a0d8..5b39f4e3 100644 --- a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl @@ -10,7 +10,7 @@
- +
@@ -19,29 +19,29 @@
- +
- - + + - +
- +
- +
- +
@@ -49,7 +49,7 @@ diff --git a/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl b/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl index 145cb721..6bfe63d6 100644 --- a/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl @@ -8,7 +8,7 @@
-
+
@@ -31,8 +31,18 @@
- - + + + + + + + + + + + +
diff --git a/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl b/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl index eb1d16a3..cd705113 100644 --- a/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl @@ -8,7 +8,7 @@
-
+
@@ -31,8 +31,18 @@
- - + + + + + + + + + + + +
diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl index f3195a77..35ce87e1 100644 --- a/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl @@ -7,9 +7,9 @@ - + - + @@ -22,23 +22,14 @@ - - - - - - - - - - + - +
diff --git a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl index c9f99a2f..9524d066 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl @@ -8,7 +8,7 @@
-
+
-- 2.39.2