From 25965626af6ca23301ea4f6d90cb413ef26ebffb Mon Sep 17 00:00:00 2001 From: Bruno Busco Date: Sat, 4 Dec 2010 22:29:33 +0000 Subject: [PATCH] Reverted revision 1042196 as suggested by Adam. This change introduces framework dependencies from applications. More work is needed to the patch in https://issues.apache.org/jira/browse/OFBIZ-4037 before committing again. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042250 13f79535-47bb-0310-9956-ffa450edef68 --- framework/common/config/CommonUiLabels.xml | 95 ------ framework/common/config/general.properties | 5 - .../webcommon/WEB-INF/common-controller.xml | 22 -- framework/common/webcommon/forgotPassword.ftl | 4 +- framework/common/webcommon/login.ftl | 12 +- framework/common/webcommon/registerPerson.ftl | 131 -------- framework/common/widget/RegisterScreens.xml | 91 ----- .../script/org/ofbiz/myportal/Events.xml | 310 ++++++++---------- .../webapp/myportal/WEB-INF/controller.xml | 23 ++ .../myportal/widget/CommonScreens.xml | 80 +++++ .../myportal/widget/MyPortalForms.xml | 46 +++ .../myportal/widget/RegisterPerson.ftl | 160 +++++++++ specialpurpose/myportal/widget/login.ftl | 77 +++++ .../myportal/widget}/reloadCaptchaCode.ftl | 42 +-- .../myportal/widget}/reloadCaptchaImage.ftl | 47 +-- 15 files changed, 579 insertions(+), 566 deletions(-) delete mode 100644 framework/common/webcommon/registerPerson.ftl delete mode 100644 framework/common/widget/RegisterScreens.xml rename framework/common/script/org/ofbiz/common/RegisterEvents.xml => specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml (75%) create mode 100644 specialpurpose/myportal/widget/MyPortalForms.xml create mode 100644 specialpurpose/myportal/widget/RegisterPerson.ftl create mode 100644 specialpurpose/myportal/widget/login.ftl rename {framework/common/webcommon => specialpurpose/myportal/widget}/reloadCaptchaCode.ftl (97%) rename {framework/common/webcommon => specialpurpose/myportal/widget}/reloadCaptchaImage.ftl (96%) diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml index 071cf0a902..20a349d04d 100644 --- a/framework/common/config/CommonUiLabels.xml +++ b/framework/common/config/CommonUiLabels.xml @@ -1108,14 +1108,6 @@ 无法找到 無法找到 - - Verify code captcha is missing or wrong - Vérifier le code captcha, il est absent ou erroné - Verifica il codice captcha, è mancante o errato - รหัสตัวเลขที่ท่านกรอกมีข้อผิดพลาด - 缺少验证码或验证码错误 - 沒有驗證碼或是錯誤 - تغيير Verändern @@ -2869,25 +2861,6 @@ 第一个 第一個 - - Jméno - Vorname - First name - Forename - Nombre - Prénom - पहला नाम - Nome - First name - Voornaam - Nome - Primeiro Nome - Nume - Имя - ชื่อ - 名字 - 名字 - الأخطاء التالية حدثت Folgende Fehler sind aufgetreten @@ -3890,25 +3863,6 @@ 最近的 最近的 - - Příjmení - Nachname - Last name - Surname - Apellidos - Nom - अन्त नाम - Cognome - Last name - Familienaam - Segundo nome - Apelido - Nume de Familie - Фамилия - นามสกุล - 姓氏 - 姓氏 - Last system notes Dernières tâches affectées @@ -4415,21 +4369,6 @@ 方法 方法 - - Zweiter Vorname - Middle Name - Segundo nombre - Nom intermédiaire - मध्य नाम - Nome centrale - Tussenvoegsel - Nome do meio - Nume Central - Отчество - ชื่อกลาง - 中间名 - 中間名 - Millisekunde Millisecond @@ -4779,13 +4718,6 @@ New Portal Page Nuova pagina portale - - New Registration - Nouvel enregistrement - Nuovo utente - ลงทะเบียน - 新注册 - إختيار جديد Neue Auswahl @@ -5669,10 +5601,6 @@ 请修改你的密码 請修改你的密碼 - - Confirm Password - Conferma password - نوع طريقة التسديد Zahlungsmethode Typ @@ -6386,13 +6314,6 @@ 刷新 更新 - - Register of new person is complete...Please - L'enregistrement de la nouvelle personne est complet...SVP - Creazione nuovo utente completata...prego - การลงทะเบียนใหม่สำหรับบุคคลได้ทำการเสร็จสิ้นสมบูรณ์แล้ว...สามารถเข้าสู่ระบบได้ - 完成新人员注册...请 - مستخدم مسجل Registrovaný uživatel @@ -6449,11 +6370,6 @@ 发布版本 發佈版本 - - reload image - Ricarica immagine - 刷新图片 - نزع Odstranit @@ -8686,13 +8602,6 @@ 值 數值 - - Verify code - Vérifier le code captcha - Verifica codice - ใส่รหัสตามรูป - 验证验证码 - مشهد Náhled @@ -8977,10 +8886,6 @@ 哪里 哪里 - - Why would you like to register? - Perche' desideri registrarti? - العرض Breite diff --git a/framework/common/config/general.properties b/framework/common/config/general.properties index 0f83e420a5..db583b22ac 100644 --- a/framework/common/config/general.properties +++ b/framework/common/config/general.properties @@ -130,8 +130,3 @@ http.localhost=ABQIAAAAtt0d8djaYFkk8N5LJVcDSBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxR3euHYk # -- Y if you want to display the multi-tenant textbox in the login page multitenant=N - -# -- Y if you want new users be allowed to register online -login.newRegistration.allow=Y -# -- Y if you want that a captcha image check field is used when registering new users -login.newRegistration.useCaptcha=Y diff --git a/framework/common/webcommon/WEB-INF/common-controller.xml b/framework/common/webcommon/WEB-INF/common-controller.xml index 44323edc2d..578716677d 100644 --- a/framework/common/webcommon/WEB-INF/common-controller.xml +++ b/framework/common/webcommon/WEB-INF/common-controller.xml @@ -95,25 +95,6 @@ under the License. - - - - - - - - - - - - - - - - - - - @@ -253,9 +234,6 @@ under the License. - - - diff --git a/framework/common/webcommon/forgotPassword.ftl b/framework/common/webcommon/forgotPassword.ftl index 0b47817401..47a8e30b92 100644 --- a/framework/common/webcommon/forgotPassword.ftl +++ b/framework/common/webcommon/forgotPassword.ftl @@ -31,11 +31,11 @@ under the License. -   +   - ${uiLabelMap.CommonGoBack} + ${uiLabelMap.CommonGoBack} diff --git a/framework/common/webcommon/login.ftl b/framework/common/webcommon/login.ftl index ee3ae3e53a..cd5c925e65 100644 --- a/framework/common/webcommon/login.ftl +++ b/framework/common/webcommon/login.ftl @@ -19,7 +19,6 @@ under the License. <#if requestAttributes.uiLabelMap?exists><#assign uiLabelMap = requestAttributes.uiLabelMap> <#assign useMultitenant = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "multitenant")> -<#assign allowNewRegistration = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "login.newRegistration.allow")> <#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))> <#if username != ""> @@ -27,6 +26,7 @@ under the License. <#else> <#assign focusName = true> +
+
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <#if ("Y" == useCaptcha)> - - - - - - - - - - -
${uiLabelMap.CommonWhyRegister} - -
Salutation - -
${uiLabelMap.CommonFirstName} - - ${uiLabelMap.CommonRequired} -
${uiLabelMap.CommonMiddleName} - -
${uiLabelMap.CommonLastName} - - ${uiLabelMap.CommonRequired} -
${uiLabelMap.CommonEmail} - - ${uiLabelMap.CommonRequired} -
${uiLabelMap.CommonUsername} - - ${uiLabelMap.CommonRequired} -
${uiLabelMap.CommonPassword} - - ${uiLabelMap.CommonRequired} -
${uiLabelMap.CommonPasswordVerify} - - ${uiLabelMap.CommonRequired} -
${uiLabelMap.CommonVerifyCaptcha} - - - -
- -
-
\ No newline at end of file diff --git a/framework/common/widget/RegisterScreens.xml b/framework/common/widget/RegisterScreens.xml deleted file mode 100644 index dabf4ffd8a..0000000000 --- a/framework/common/widget/RegisterScreens.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -
- - - - - - -
- - - - - - - - - - -
- - - - - - - - - -
-
-
-
-
-
-
-
-
- - -
- - - - - - -
-
- - -
- - - - - - -
-
-
diff --git a/framework/common/script/org/ofbiz/common/RegisterEvents.xml b/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml similarity index 75% rename from framework/common/script/org/ofbiz/common/RegisterEvents.xml rename to specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml index 0b480f643b..5e5560d564 100644 --- a/framework/common/script/org/ofbiz/common/RegisterEvents.xml +++ b/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml @@ -1,168 +1,142 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml b/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml index fbacfaf46c..6634a56135 100644 --- a/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml +++ b/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml @@ -36,6 +36,25 @@
+ + + + + + + + + + + + + + + + + + + @@ -43,6 +62,10 @@ + + + + diff --git a/specialpurpose/myportal/widget/CommonScreens.xml b/specialpurpose/myportal/widget/CommonScreens.xml index 1c0f865155..a56ad87282 100644 --- a/specialpurpose/myportal/widget/CommonScreens.xml +++ b/specialpurpose/myportal/widget/CommonScreens.xml @@ -120,6 +120,65 @@ under the License. + +
+ + + + + + + + + +
+
+ + + +
+ + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+
+
+
+
+
@@ -143,6 +202,27 @@ under the License.
+ +
+ + + + + + +
+
+ + +
+ + + + + + +
+
diff --git a/specialpurpose/myportal/widget/MyPortalForms.xml b/specialpurpose/myportal/widget/MyPortalForms.xml new file mode 100644 index 0000000000..b56736b995 --- /dev/null +++ b/specialpurpose/myportal/widget/MyPortalForms.xml @@ -0,0 +1,46 @@ + + + + + + +
+ + + Required + + + + Salutation + + + + + + First name + + + Required + + + + Middle Name + + + + + + Last name + + + Required + + + + Email + + + Required + + + + User Login + + + + Username + + + Required + + + + Password + + + Required + + + + Password + + + * Confirm + + + + Verify captcha code + + + + Code Captcha + +
+ + + + + + + reload image + + + + Verify captcha code + + + Required + + + + + + + + + + + + + + diff --git a/specialpurpose/myportal/widget/login.ftl b/specialpurpose/myportal/widget/login.ftl new file mode 100644 index 0000000000..6a708af412 --- /dev/null +++ b/specialpurpose/myportal/widget/login.ftl @@ -0,0 +1,77 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#if requestAttributes.uiLabelMap?exists><#assign uiLabelMap = requestAttributes.uiLabelMap> +<#assign useMultitenant = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "multitenant")> + +<#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))> +<#if username != ""> + <#assign focusName = false> +<#else> + <#assign focusName = true> + +
+ +
+ + diff --git a/framework/common/webcommon/reloadCaptchaCode.ftl b/specialpurpose/myportal/widget/reloadCaptchaCode.ftl similarity index 97% rename from framework/common/webcommon/reloadCaptchaCode.ftl rename to specialpurpose/myportal/widget/reloadCaptchaCode.ftl index 5118cacfc5..84c66965dc 100644 --- a/framework/common/webcommon/reloadCaptchaCode.ftl +++ b/specialpurpose/myportal/widget/reloadCaptchaCode.ftl @@ -1,22 +1,22 @@ -<#-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<#assign idkey = Static["org.ofbiz.common.Captcha"].ID_KEY> - +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign idkey = Static["org.ofbiz.common.Captcha"].ID_KEY> + \ No newline at end of file diff --git a/framework/common/webcommon/reloadCaptchaImage.ftl b/specialpurpose/myportal/widget/reloadCaptchaImage.ftl similarity index 96% rename from framework/common/webcommon/reloadCaptchaImage.ftl rename to specialpurpose/myportal/widget/reloadCaptchaImage.ftl index 5d705dcc3e..3f626f31e9 100644 --- a/framework/common/webcommon/reloadCaptchaImage.ftl +++ b/specialpurpose/myportal/widget/reloadCaptchaImage.ftl @@ -1,23 +1,24 @@ -<#-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<#assign fileName = Static["org.ofbiz.common.Captcha"].getCodeCaptcha(request,response)> -<#assign fileName = Static["org.ofbiz.common.Captcha"].CAPTCHA_FILE_NAME> - - +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#-- For add Captcha Capture --> +<#assign fileName = Static["org.ofbiz.common.Captcha"].getCodeCaptcha(request,response)> +<#assign fileName = Static["org.ofbiz.common.Captcha"].CAPTCHA_FILE_NAME> + +