From 98125d19e385b0be143bc4a273dc81c3082f53f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org> Date: Sun, 17 Sep 2017 01:17:32 +0200 Subject: [PATCH] Please cherry-pick: - introduced custom JSF tag widgets:outputCountrySelector which renders a nice country-selection box for forms - removed id from fieldset, no need to "over-id" things - rewrote administrative mobilde provider list to more PrimeFaces, like filterable and dragable columns, responsiveness - added more i18n strings for above new stuff - added new property "filteredMobileProviders" for filtering mobile providers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder <roland@mxchange.org> --- .../JobsMobileProviderWebRequestBean.java | 27 ++++- .../JobsProfileModeWebApplicationBean.java | 22 +++- ...bsProfileModeWebApplicationController.java | 8 -- .../localization/bundle_de_DE.properties | 8 ++ .../localization/bundle_en_US.properties | 5 + web/WEB-INF/links.jsf.taglib.xml | 22 ++-- .../contact/admin_form_contact_data.tpl | 20 +--- .../form_data/fax/admin_form_fax_data.tpl | 2 +- .../landline/admin_form_landline_data.tpl | 2 +- .../mobile/admin_form_mobile_data.tpl | 2 +- .../form_data/user/admin_form_user_data.tpl | 2 +- .../form_data/form_country_selector.tpl | 14 +++ .../tags/table_rows/fax_input_table_row.tpl | 6 +- .../table_rows/landline_input_table_row.tpl | 6 +- .../user_profile_mode_table_row.tpl | 2 +- .../admin_form_basic_company_data.tpl | 14 +-- .../admin_form_branch_offices_data.tpl | 20 +--- .../admin/country/admin_form_country_data.tpl | 2 +- .../admin_form_mobile_provider.tpl | 8 +- .../templates/contact/form_contact_data.tpl | 40 +++---- .../templates/guest/guest_privacy_terms.tpl | 2 +- .../templates/guest/user/guest_login_form.tpl | 2 +- .../register/guest_form_register_page1.tpl | 2 +- .../register/guest_form_register_single.tpl | 2 +- .../user/user_enter_current_password.tpl | 2 +- web/WEB-INF/widgets.jsf.taglib.xml | 73 +++++++++--- web/admin/mobile/admin_mobile_list.xhtml | 2 +- .../admin_mobile_provider_list.xhtml | 105 ++++++++++-------- web/admin/user/admin_user_list.xhtml | 2 +- web/guest/user/user_lost_password.xhtml | 2 +- web/guest/user/user_resend_link.xhtml | 8 +- web/resources/css/layout.css | 4 + .../login_user_change_email_address.xhtml | 2 +- web/user/login_user_change_password.xhtml | 2 +- 34 files changed, 252 insertions(+), 190 deletions(-) create mode 100644 web/WEB-INF/resources/tags/country/form_data/form_country_selector.tpl diff --git a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java index b15390ed..32fd055e 100644 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java @@ -53,6 +53,11 @@ public class JobsMobileProviderWebRequestBean extends BaseJobsController impleme */ private final List<MobileProvider> allMobileProviders; + /** + * A list of filtered mobile providers + */ + private List<MobileProvider> filteredMobileProviders; + /** * Remote EJB for mobile providers (regular) */ @@ -111,11 +116,31 @@ public class JobsMobileProviderWebRequestBean extends BaseJobsController impleme return this.allMobileProviders; } + /** + * Getter for filtered mobile provider list + * <p> + * @return Filtered mobile providers + */ + @SuppressWarnings ("ReturnOfCollectionOrArrayField") + public List<MobileProvider> getFilteredMobileProviders () { + return this.filteredMobileProviders; + } + + /** + * Getter for filtered mobile provider list + * <p> + * @param filteredMobileProviders Filtered mobile providers + */ + @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter") + public void setFilteredMobileProviders (final List<MobileProvider> filteredMobileProviders) { + this.filteredMobileProviders = filteredMobileProviders; + } + /** * Post-construction method */ @PostConstruct - public void init () { + public void initCache () { // Is cache there? if (!this.mobileProviderCache.iterator().hasNext()) { // Get whole list diff --git a/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationBean.java index be774621..88f82973 100644 --- a/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationBean.java +++ b/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationBean.java @@ -16,6 +16,9 @@ */ package org.mxchange.jjobs.beans.profilemode; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; import javax.enterprise.context.ApplicationScoped; import javax.inject.Named; import org.mxchange.jjobs.beans.BaseJobsController; @@ -35,18 +38,29 @@ public class JobsProfileModeWebApplicationBean extends BaseJobsController implem */ private static final long serialVersionUID = 835_482_364_189L; + /** + * A list of all profile modes + */ + private final List<ProfileMode> allProfileModes; + /** * Default constructor */ public JobsProfileModeWebApplicationBean () { // Call super constructor super(); + + // Init list + this.allProfileModes = Arrays.asList(ProfileMode.values()); } - @Override - public ProfileMode[] getAllProfileModes () { + /** + * Getter for all profile modes as array + * <p> + * @return All profile modes as list + */ + public List<ProfileMode> allProfileModes () { // Return it - return ProfileMode.values(); + return Collections.unmodifiableList(this.allProfileModes); } - } diff --git a/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationController.java b/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationController.java index dd028c06..bcdefa60 100644 --- a/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationController.java +++ b/src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationController.java @@ -17,7 +17,6 @@ package org.mxchange.jjobs.beans.profilemode; import java.io.Serializable; -import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; /** * An interface for data beans @@ -26,11 +25,4 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; */ public interface JobsProfileModeWebApplicationController extends Serializable { - /** - * Getter for all profile modes as array - * <p> - * @return All profile modes as array - */ - ProfileMode[] getAllProfileModes (); - } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 3a0d94c1..9c116087 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -957,3 +957,11 @@ ADMIN_LANDLINE_NUMBER_LIST_EMPTY=Es befinden sich keine Festnetznummern in der D ADMIN_MOBILE_NUMBER_LIST_EMPTY=Es befinden sich keine Mobilfunknummern in der Datenbank oder Ihre Suche ergab keine Uebereinstimmungen. #@TODO Please fix German umlauts! ADMIN_CONTACT_MOBILE_LIST_EMPTY=Es befinden sich keine Mobilfunknummern von Kontakten in der Datenbank oder Ihre Suche ergab keine Uebereinstimmungen. +#@TODO Please fix German umlauts! +ADMIN_MOBILE_PROVIDER_COUNTRY_REQUIRED=Bitte waehlen Sie ein Land fuer den Mobilfunkanbieter aus. +#@TODO Please fix German umlauts! +COUNTRIES=Laender +#@TODO Please fix German umlauts! +FILTER_BY_MULTIPLE_COUNTRY_TITLE=Liste durch Auswahl von ein oder mehr Laendern durchsuchen. +ADMIN_LIST_MOBILE_PROVIDERS_HEADER=Liste aller Mobilfunkanbieter +SELECT_SHOWN_COLUMNS=Angezeigte Spalten diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 5e9de62e..35600bc5 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -908,3 +908,8 @@ ADMIN_FAX_NUMBER_LIST_EMPTY=There are no fax numbers in database. Or your search ADMIN_LANDLINE_NUMBER_LIST_EMPTY=There are no land-line numbers in database. Or your search criteria doesn't match anything. ADMIN_MOBILE_NUMBER_LIST_EMPTY=There are no mobile numbers in database. Or your search criteria doesn't match anything. ADMIN_CONTACT_MOBILE_LIST_EMPTY=There are no mobile numbers of contacts in database. Or your search criteria doesn't match anything. +ADMIN_MOBILE_PROVIDER_COUNTRY_REQUIRED=Please select a country for mobile provider. +COUNTRIES=Countries +FILTER_BY_MULTIPLE_COUNTRY_TITLE=Filter list by selecting one or more countries. +ADMIN_LIST_MOBILE_PROVIDERS_HEADER=List of all mobile providers +SELECT_SHOWN_COLUMNS=Shown columns diff --git a/web/WEB-INF/links.jsf.taglib.xml b/web/WEB-INF/links.jsf.taglib.xml index af8b7edd..0c395769 100644 --- a/web/WEB-INF/links.jsf.taglib.xml +++ b/web/WEB-INF/links.jsf.taglib.xml @@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -61,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -90,7 +90,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -119,7 +119,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -142,7 +142,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -165,7 +165,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -188,7 +188,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -211,7 +211,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -234,7 +234,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -257,7 +257,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -292,7 +292,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> diff --git a/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl index 88ea9ee1..91ff24de 100644 --- a/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl +++ b/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block" rendered="#{empty rendered or rendered}"> - <fieldset class="fieldset" id="personal_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}" /> </legend> @@ -137,11 +137,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu id="country" value="#{adminContactController.contactCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="country" value="#{adminContactController.contactCountry}" </div> </h:panelGroup> @@ -155,11 +151,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="landLineCountryCode" value="#{adminContactController.landLineCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="landLineCountryCode" styleClass="select divider-right" value="#{adminContactController.landLineCountry}" /> <p:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{adminContactController.landLineAreaCode}"> <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" /> @@ -177,11 +169,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="faxCountryCode" value="#{adminContactController.faxCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="faxCountryCode" styleClass="select divider-right" value="#{adminContactController.faxCountry}" /> <p:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{adminContactController.faxAreaCode}"> <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" /> diff --git a/web/WEB-INF/resources/tags/admin/form_data/fax/admin_form_fax_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/fax/admin_form_fax_data.tpl index 781eb0d9..8a8d2c01 100644 --- a/web/WEB-INF/resources/tags/admin/form_data/fax/admin_form_fax_data.tpl +++ b/web/WEB-INF/resources/tags/admin/form_data/fax/admin_form_fax_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block" rendered="#{empty rendered or rendered == true}"> - <fieldset class="fieldset" id="fax_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_FAX_NUMBER_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_FAX_NUMBER_DATA_LEGEND}" /> </legend> diff --git a/web/WEB-INF/resources/tags/admin/form_data/landline/admin_form_landline_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/landline/admin_form_landline_data.tpl index 62d64ef0..2453119c 100644 --- a/web/WEB-INF/resources/tags/admin/form_data/landline/admin_form_landline_data.tpl +++ b/web/WEB-INF/resources/tags/admin/form_data/landline/admin_form_landline_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block" rendered="#{empty rendered or rendered == true}"> - <fieldset class="fieldset" id="landline_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_LAND_LINE_NUMBER_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_LAND_LINE_NUMBER_DATA_LEGEND}" /> </legend> diff --git a/web/WEB-INF/resources/tags/admin/form_data/mobile/admin_form_mobile_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/mobile/admin_form_mobile_data.tpl index 101bd595..25ddc379 100644 --- a/web/WEB-INF/resources/tags/admin/form_data/mobile/admin_form_mobile_data.tpl +++ b/web/WEB-INF/resources/tags/admin/form_data/mobile/admin_form_mobile_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block" rendered="#{empty rendered or rendered == true}"> - <fieldset class="fieldset" id="mobile_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND}" /> </legend> diff --git a/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl index c06c52ae..de66672f 100644 --- a/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl +++ b/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block" rendered="#{not empty mode}"> - <fieldset class="fieldset" id="login_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND}" /> </legend> diff --git a/web/WEB-INF/resources/tags/country/form_data/form_country_selector.tpl b/web/WEB-INF/resources/tags/country/form_data/form_country_selector.tpl new file mode 100644 index 00000000..aa2227aa --- /dev/null +++ b/web/WEB-INF/resources/tags/country/form_data/form_country_selector.tpl @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://xmlns.jcp.org/jsf/core" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:p="http://primefaces.org/ui"> + + <p:selectOneMenu id="#{id}" value="#{value}" styleClass="#{empty styleClass ? 'select' : styleClass}" rendered="#{empty rendered or rendered}" required="#{empty required ? false : required}" requiredMessage="#{requiredMessage}"> + <f:converter converterId="CountryConverter" /> + <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" rendered="#{empty allowNull or allowNull}" /> + <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" /> + </p:selectOneMenu> +</ui:composition> diff --git a/web/WEB-INF/resources/tags/table_rows/fax_input_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/fax_input_table_row.tpl index f63bbd6e..16c868df 100644 --- a/web/WEB-INF/resources/tags/table_rows/fax_input_table_row.tpl +++ b/web/WEB-INF/resources/tags/table_rows/fax_input_table_row.tpl @@ -14,11 +14,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="faxCountry" value="#{targetController.faxCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="faxCountry" styleClass="select divider-right" value="#{targetController.faxCountry}" /> <p:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{targetController.faxAreaCode}"> <f:validator validatorId="PhoneNumberValidator" /> diff --git a/web/WEB-INF/resources/tags/table_rows/landline_input_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/landline_input_table_row.tpl index e1891b82..df8d6e65 100644 --- a/web/WEB-INF/resources/tags/table_rows/landline_input_table_row.tpl +++ b/web/WEB-INF/resources/tags/table_rows/landline_input_table_row.tpl @@ -14,11 +14,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="countryPhoneCode" value="#{targetController.landLineCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="landLineCountry" styleClass="select divider-right" value="#{targetController.landLineCountry}" /> <p:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{targetController.landLineAreaCode}"> <f:validator validatorId="PhoneNumberValidator" /> diff --git a/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl index d1409ce1..56a3987b 100644 --- a/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl +++ b/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl @@ -15,7 +15,7 @@ <div class="table-right-medium"> <p:selectOneMenu id="profileMode" value="#{targetController.userProfileMode}"> - <f:selectItems value="#{profileModeController.allProfileModes}" var="mode" itemValue="#{mode}" itemLabel="#{msg[mode.messageKey]}" /> + <f:selectItems value="#{profileModeController.allProfileModes()}" var="mode" itemValue="#{mode}" itemLabel="#{msg[mode.messageKey]}" /> </p:selectOneMenu> </div> </h:panelGroup> diff --git a/web/WEB-INF/templates/admin/basic_company_data/admin_form_basic_company_data.tpl b/web/WEB-INF/templates/admin/basic_company_data/admin_form_basic_company_data.tpl index 3c71f186..42911da2 100644 --- a/web/WEB-INF/templates/admin/basic_company_data/admin_form_basic_company_data.tpl +++ b/web/WEB-INF/templates/admin/basic_company_data/admin_form_basic_company_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="basic_company_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_BASIC_COMPANY_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_BASIC_COMPANY_DATA_LEGEND}" /> </legend> @@ -170,11 +170,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="landLineCountry" value="#{adminCompanyDataController.landLineCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="landLineCountry" styleClass="select divider-right" value="#{adminCompanyDataController.landLineCountry}" /> <p:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{adminCompanyDataController.landLineAreaCode}"> <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" /> @@ -204,11 +200,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="faxCountry" value="#{adminCompanyDataController.faxCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="faxCountry" styleClass="select divider-right" value="#{adminCompanyDataController.faxCountry}" /> <p:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{adminCompanyDataController.faxAreaCode}"> <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" /> diff --git a/web/WEB-INF/templates/admin/branch_offices/admin_form_branch_offices_data.tpl b/web/WEB-INF/templates/admin/branch_offices/admin_form_branch_offices_data.tpl index 48dd6e59..f0d990dd 100644 --- a/web/WEB-INF/templates/admin/branch_offices/admin_form_branch_offices_data.tpl +++ b/web/WEB-INF/templates/admin/branch_offices/admin_form_branch_offices_data.tpl @@ -8,7 +8,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="admin_branch_office_basic"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_BRANCH_OFFICE_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_BRANCH_OFFICE_LEGEND}" /> </legend> @@ -90,11 +90,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="landLineCountry" value="#{adminBranchOfficeController.landLineCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="landLineCountry" styleClass="select divider-right" value="#{adminBranchOfficeController.landLineCountry}" /> <p:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{adminBranchOfficeController.landLineAreaCode}"> <f:validator for="landLineAreaCode" validatorId="PhoneNumberValidator" /> @@ -124,11 +120,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="faxCountry" value="#{adminBranchOfficeController.faxCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="faxCountry" styleClass="select divider-right" value="#{adminBranchOfficeController.faxCountry}" /> <p:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{adminBranchOfficeController.faxAreaCode}"> <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" /> @@ -256,11 +248,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu id="branchCountry" value="#{adminBranchOfficeController.branchCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="branchCountry" value="#{adminBranchOfficeController.branchCountry}" /> </div> </h:panelGroup> diff --git a/web/WEB-INF/templates/admin/country/admin_form_country_data.tpl b/web/WEB-INF/templates/admin/country/admin_form_country_data.tpl index 5a0802d0..cfe51e9f 100644 --- a/web/WEB-INF/templates/admin/country/admin_form_country_data.tpl +++ b/web/WEB-INF/templates/admin/country/admin_form_country_data.tpl @@ -11,7 +11,7 @@ </h:panelGroup> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="country_data"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_COUNTRY_PHONE_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_COUNTRY_PHONE_DATA_LEGEND}" /> </legend> diff --git a/web/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl b/web/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl index 156b795d..194d90fc 100644 --- a/web/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl +++ b/web/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:widgets="http://mxchange.org/jsf/core/widgets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" @@ -11,7 +12,7 @@ </h:panelGroup> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="mobile_provider"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_MOBILE_PROVIDER_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_MOBILE_PROVIDER_LEGEND}" /> </legend> @@ -60,10 +61,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu id="providerCountry" value="#{adminMobileProviderController.providerCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="providerCountry" value="#{adminMobileProviderController.providerCountry}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_PROVIDER_COUNTRY_REQUIRED}" allowNone="false" /> </div> </h:panelGroup> </fieldset> diff --git a/web/WEB-INF/templates/contact/form_contact_data.tpl b/web/WEB-INF/templates/contact/form_contact_data.tpl index 12406604..0619039d 100644 --- a/web/WEB-INF/templates/contact/form_contact_data.tpl +++ b/web/WEB-INF/templates/contact/form_contact_data.tpl @@ -12,7 +12,7 @@ </h:panelGroup> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="personal_data"> + <fieldset class="fieldset"> <legend title="#{msg.PERSONAL_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.PERSONAL_DATA_LEGEND}" /> </legend> @@ -125,9 +125,9 @@ </div> </h:panelGroup> - <h:panelGroup styleClass="error-container" layout="block"> - <p:message for="city" /> - </h:panelGroup> + <h:panelGroup styleClass="error-container" layout="block"> + <p:message for="city" /> + </h:panelGroup> <h:panelGroup styleClass="table-row" layout="block"> <div class="table-left-medium"> @@ -141,9 +141,9 @@ </div> </h:panelGroup> - <h:panelGroup styleClass="error-container" layout="block"> - <p:message for="birthday" /> - </h:panelGroup> + <h:panelGroup styleClass="error-container" layout="block"> + <p:message for="birthday" /> + </h:panelGroup> <h:panelGroup styleClass="table-row" layout="block"> <div class="table-left-medium"> @@ -151,17 +151,13 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu id="country" value="#{contactController.country}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" /> - </p:selectOneMenu> + <widgets:outputCountrySelector id="country" value="#{contactController.country}" /> </div> </h:panelGroup> - <h:panelGroup styleClass="error-container" layout="block"> - <p:message for="country" /> - </h:panelGroup> + <h:panelGroup styleClass="error-container" layout="block"> + <p:message for="country" /> + </h:panelGroup> <h:panelGroup styleClass="table-row" layout="block"> <div class="table-left-medium"> @@ -169,11 +165,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="landLineCountry" value="#{contactController.landLineCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector styleClass="select divider-right" id="landLineCountry" value="#{contactController.landLineCountry}" /> <p:inputText styleClass="input divider-right" id="landLineAreaCode" size="5" maxlength="10" value="#{contactController.landLineAreaCode}"> <f:validator validatorId="PhoneNumberValidator" /> @@ -199,11 +191,7 @@ </div> <div class="table-right-medium"> - <p:selectOneMenu styleClass="select divider-right" id="faxCountry" value="#{contactController.faxCountry}"> - <f:converter converterId="CountryConverter" /> - <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" /> - <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" /> - </p:selectOneMenu> + <widgets:outputCountrySelector styleClass="select divider-right" id="faxCountry" value="#{contactController.faxCountry}" /> <p:inputText styleClass="input divider-right" id="faxAreaCode" size="5" maxlength="10" value="#{contactController.faxAreaCode}"> <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" /> @@ -228,7 +216,7 @@ </h:panelGroup> <h:panelGroup styleClass="para" layout="block" rendered="#{userController.isPublicUserProfileEnabled()}"> - <fieldset class="fieldset" id="profile_mode"> + <fieldset class="fieldset"> <legend title="#{msg.USER_PROFILE_LEGEND_TITLE}"> <h:outputText value="#{msg.USER_PROFILE_LEGEND}" /> </legend> diff --git a/web/WEB-INF/templates/guest/guest_privacy_terms.tpl b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl index 69651c92..80e67acd 100644 --- a/web/WEB-INF/templates/guest/guest_privacy_terms.tpl +++ b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl @@ -7,7 +7,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="terms_privacy"> + <fieldset class="fieldset"> <legend title="#{msg.PRIVACY_TERMS_LEGEND_TITLE}"> <h:outputText value="#{msg.PRIVACY_TERMS_LEGEND}" /> </legend> diff --git a/web/WEB-INF/templates/guest/user/guest_login_form.tpl b/web/WEB-INF/templates/guest/user/guest_login_form.tpl index 59511d9a..185c785a 100644 --- a/web/WEB-INF/templates/guest/user/guest_login_form.tpl +++ b/web/WEB-INF/templates/guest/user/guest_login_form.tpl @@ -13,7 +13,7 @@ <h:outputText value="#{msg.GUEST_ENTER_USER_LOGIN_DATA_TITLE}" /> </div> - <fieldset class="fieldset" id="login_data"> + <fieldset class="fieldset"> <legend title="#{msg.GUEST_ENTER_USER_LOGIN_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.GUEST_ENTER_USER_LOGIN_DATA_LEGEND}" /> </legend> diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl index cc803e85..eaa13ad3 100644 --- a/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl +++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl @@ -13,7 +13,7 @@ </div> <div class="para"> - <fieldset class="fieldset" id="login_data"> + <fieldset class="fieldset"> <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}"> <h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" /> </legend> diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl index 6dff4156..312208e1 100644 --- a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl +++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl @@ -15,7 +15,7 @@ <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" /> <div class="para"> - <fieldset class="fieldset" id="login_data"> + <fieldset class="fieldset"> <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}"> <h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" /> </legend> diff --git a/web/WEB-INF/templates/login/user/user_enter_current_password.tpl b/web/WEB-INF/templates/login/user/user_enter_current_password.tpl index c4947264..1410005c 100644 --- a/web/WEB-INF/templates/login/user/user_enter_current_password.tpl +++ b/web/WEB-INF/templates/login/user/user_enter_current_password.tpl @@ -7,7 +7,7 @@ xmlns:p="http://primefaces.org/ui"> <h:panelGroup styleClass="para" layout="block"> - <fieldset class="fieldset" id="current_password"> + <fieldset class="fieldset"> <legend title="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE}"> <h:outputText value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND}" /> </legend> diff --git a/web/WEB-INF/widgets.jsf.taglib.xml b/web/WEB-INF/widgets.jsf.taglib.xml index bfc829d9..9860efe3 100644 --- a/web/WEB-INF/widgets.jsf.taglib.xml +++ b/web/WEB-INF/widgets.jsf.taglib.xml @@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -72,7 +72,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -97,7 +97,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -121,7 +121,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -145,7 +145,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -162,7 +162,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -179,7 +179,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -196,7 +196,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -236,7 +236,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -271,7 +271,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -306,7 +306,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -336,7 +336,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> @@ -360,9 +360,56 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. </attribute> <attribute> <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> </attribute> </tag> + <tag> + <tag-name>outputCountrySelector</tag-name> + <description>This tag renders a selection box for all available countries.</description> + <source>resources/tags/country/form_data/form_country_selector.tpl</source> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine (default: true).</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>allowNone</name> + <description>Whether this tag allows NONE/null to be selected (default: true).</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>required</name> + <description>Whether this tag is required (default: false)</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>requiredMessage</name> + <description>Localizable message to be displayed when this field is required but not selected.</description> + <required>false</required> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>id</name> + <description>Id of the JSF component.</description> + <required>true</required> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>styleClass</name> + <description>CSS style class for this component, default: select.</description> + <required>false</required> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>value</name> + <description>A target property to set the selected country in.</description> + <required>true</required> + <type>org.mxchange.jcountry.model.data.Country</type> + </attribute> + </tag> </facelet-taglib> diff --git a/web/admin/mobile/admin_mobile_list.xhtml b/web/admin/mobile/admin_mobile_list.xhtml index cac23e37..26d03a54 100644 --- a/web/admin/mobile/admin_mobile_list.xhtml +++ b/web/admin/mobile/admin_mobile_list.xhtml @@ -16,7 +16,7 @@ </ui:define> <ui:define name="content"> - <p:dataTable id="table_list_mobile" var="mobileNumber" value="#{phoneController.allMobileNumbers()}" tableStyleClass="table table-full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILES}" emptyMessage="#{msg.ADMIN_MOBILE_NUMBER_LIST_EMPTY}"> + <p:dataTable id="table-list-mobile-provider" var="mobileNumber" value="#{phoneController.allMobileNumbers()}" tableStyleClass="table table-full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILES}" emptyMessage="#{msg.ADMIN_MOBILE_NUMBER_LIST_EMPTY}"> <p:column> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_ID_NUMBER}" /> diff --git a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml index 1062279f..a45e6972 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml @@ -16,59 +16,66 @@ </ui:define> <ui:define name="content"> - <p:dataTable id="table_list_mobile" var="mobileProvider" value="#{mobileProviderController.allMobileProviders()}" tableStyleClass="table table-medium" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" emptyMessage="#{msg.ADMIN_MOBILE_PROVIDER_LIST_EMPTY}"> - <p:column sortBy="#{mobileProvider.providerId}"> - <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_ID_NUMBER}" /> - </f:facet> - - <p:link outcome="admin_show_mobile_provider" title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}" value="#{mobileProvider.providerId}"> - <f:param name="providerId" value="#{mobileProvider.providerId}" /> - </p:link> - </p:column> - - <p:column sortBy="#{mobileProvider.providerName}" priority="3"> - <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" /> - </f:facet> - - <h:outputText value="#{mobileProvider.providerName}" /> - </p:column> - - <p:column sortBy="#{mobileProvider.providerDialPrefix}" priority="2"> - <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" /> - </f:facet> + <h:form id="form-list-mobile-provider"> + <p:dataTable + id="table-list-mobile-provider" + var="mobileProvider" + value="#{mobileProviderController.allMobileProviders()}" + widgetVar="mobileProviderTable" + filteredValue="#{mobileProviderController.filteredMobileProviders}" + tableStyleClass="table table-medium" + rows="10" + paginator="true" + paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" + reflow="true" + resizableColumns="true" + rowsPerPageTemplate="5,10,20,50,100" + sortMode="multiple" + summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" + emptyMessage="#{msg.ADMIN_MOBILE_PROVIDER_LIST_EMPTY}"> - <h:outputText value="#{mobileProvider.providerDialPrefix}" /> - </p:column> - - <p:column sortBy="#{mobileProvider.providerCountry.countryPhoneCode}" priority="4"> - <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" /> - </f:facet> - - <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" /> - </p:column> - - <p:column sortBy="#{mobileProvider.providerEntryCreated}" priority="5"> <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" /> + <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDERS_HEADER}" /> + <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" /> + <p:columnToggler datasource="table-list-mobile-provider" trigger="toggler" /> </f:facet> - <h:outputText id="providerEntryCreated" value="#{mobileProvider.providerEntryCreated.time}" title="#{msg.ADMIN_MOBILE_PROVIDER_ENTRY_CREATED_TITLE}"> - <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" /> - </h:outputText> - </p:column> - - <p:column sortable="false" priority="6"> - <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> - </f:facet> - - <links:outputMobileProviderAdminMiniLinks mobileProvider="#{mobileProvider}" /> - </p:column> - </p:dataTable> + <p:column filterBy="#{mobileProvider.providerId}" sortBy="#{mobileProvider.providerId}" headerText="#{msg.ADMIN_ID_NUMBER}"> + <p:link outcome="admin_show_mobile_provider" title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}" value="#{mobileProvider.providerId}"> + <f:param name="providerId" value="#{mobileProvider.providerId}" /> + </p:link> + </p:column> + + <p:column filterBy="#{mobileProvider.providerName}" sortBy="#{mobileProvider.providerName}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" filterMatchMode="contains"> + <h:outputText value="#{mobileProvider.providerName}" /> + </p:column> + + <p:column filterBy="#{mobileProvider.providerDialPrefix}" sortBy="#{mobileProvider.providerDialPrefix}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" filterMatchMode="contains"> + <h:outputText value="#{mobileProvider.providerDialPrefix}" /> + </p:column> + + <p:column filterBy="#{mobileProvider.providerCountry}" sortBy="#{mobileProvider.providerCountry.countryPhoneCode}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" filterMatchMode="in"> + <f:facet name="filter"> + <p:selectCheckboxMenu filter="true" label="#{msg.COUNTRIES}" onchange="PF('mobileProviderTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COUNTRY_TITLE}"> + <f:converter converterId="CountryConverter" /> + <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{msg[country.countryI18nKey]}" /> + </p:selectCheckboxMenu> + </f:facet> + + <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" /> + </p:column> + + <p:column sortBy="#{mobileProvider.providerEntryCreated}" headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}"> + <h:outputText id="providerEntryCreated" value="#{mobileProvider.providerEntryCreated.time}"> + <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" /> + </h:outputText> + </p:column> + + <p:column sortable="false" headerText="#{msg.ADMIN_ACTION_LINKS}"> + <links:outputMobileProviderAdminMiniLinks mobileProvider="#{mobileProvider}" /> + </p:column> + </p:dataTable> + </h:form> <h:form id="form_add_mobile_provider"> <h:panelGroup styleClass="table table-medium" layout="block"> diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index be6bf16e..9ebed061 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -105,7 +105,7 @@ <!-- Whether select contact data .. //--> <h:panelGroup id="admin_user_personal_data_option_1" styleClass="para" layout="block"> - <fieldset class="fieldset" id="user_contact"> + <fieldset class="fieldset"> <legend title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}" /> </legend> diff --git a/web/guest/user/user_lost_password.xhtml b/web/guest/user/user_lost_password.xhtml index dc069457..a181a29a 100644 --- a/web/guest/user/user_lost_password.xhtml +++ b/web/guest/user/user_lost_password.xhtml @@ -26,7 +26,7 @@ <h:outputText value="#{msg.GUEST_LOST_PASSWORD_TITLE}" /> </div> - <fieldset class="fieldset" id="login_data"> + <fieldset class="fieldset"> <legend title="#{msg.GUEST_LOST_PASSWORD_LEGEND_TITLE}"> <h:outputText value="#{msg.GUEST_LOST_PASSWORD_LEGEND}" /> </legend> diff --git a/web/guest/user/user_resend_link.xhtml b/web/guest/user/user_resend_link.xhtml index faf4f2b7..08dfc7e5 100644 --- a/web/guest/user/user_resend_link.xhtml +++ b/web/guest/user/user_resend_link.xhtml @@ -24,18 +24,18 @@ <h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" /> </div> - <fieldset class="fieldset" id="email_address_notice"> + <fieldset class="fieldset"> <legend title="#{msg.RESEND_CONFIRMATION_LINK_LEGEND_TITLE}"> <h:outputText value="#{msg.RESEND_CONFIRMATION_LINK_LEGEND}" /> </legend> <h:panelGroup styleClass="table-row" layout="block"> <div class="table-left"> - <p:outputLabel for="resendEmailAddress" value="#{msg.GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS}" /> + <p:outputLabel for="emailAddress" value="#{msg.GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS}" /> </div> <div class="table-right"> - <p:inputText styleClass="input" id="resendEmailAddress" size="20" maxlength="255" value="#{userResendConfirmationController.emailAddress}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_NOT_ENTERED}"> + <p:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{userResendConfirmationController.emailAddress}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_NOT_ENTERED}"> <f:validator validatorId="EmailAddressValidator" /> </p:inputText> </div> @@ -43,7 +43,7 @@ </fieldset> <h:panelGroup styleClass="error-container" layout="block"> - <p:message for="resendEmailAddress" /> + <p:message for="emailAddress" /> </h:panelGroup> <h:panelGroup styleClass="table-row" layout="block"> diff --git a/web/resources/css/layout.css b/web/resources/css/layout.css index a3e22a51..b5c6eb7a 100644 --- a/web/resources/css/layout.css +++ b/web/resources/css/layout.css @@ -338,3 +338,7 @@ ul.navbar-horizontal li.footer-copyright { #footer::after { clear: both; } + +.column-selector { + float: right; +} diff --git a/web/user/login_user_change_email_address.xhtml b/web/user/login_user_change_email_address.xhtml index 8f0a3bbb..672c8218 100644 --- a/web/user/login_user_change_email_address.xhtml +++ b/web/user/login_user_change_email_address.xhtml @@ -24,7 +24,7 @@ </div> <h:form id="form_user_change_email_address"> - <fieldset class="fieldset" id="change_email"> + <fieldset class="fieldset"> <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}"> <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" /> </legend> diff --git a/web/user/login_user_change_password.xhtml b/web/user/login_user_change_password.xhtml index caa79212..cbac07e5 100644 --- a/web/user/login_user_change_password.xhtml +++ b/web/user/login_user_change_password.xhtml @@ -31,7 +31,7 @@ <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" /> </div> - <fieldset class="fieldset" id="change_password"> + <fieldset class="fieldset"> <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}"> <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" /> </legend> -- 2.39.5