hg merge d7a60c56c795 / solving conflict on AbstractMenuPanel
This commit is contained in:
commit
7e3a7baa71
|
@ -0,0 +1,202 @@
|
|||
-- Sep 18, 2012 2:38:36 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Form (AccessLevel,Classname,AD_Form_ID,Help,IsBetaFunctionality,EntityType,AD_Form_UU,Description,Name,AD_Org_ID,UpdatedBy,CreatedBy,Updated,Created,AD_Client_ID,IsActive) VALUES ('1','org.compiere.apps.form.VResetPassword',200001,NULL,'N','D','e2db983d-c11a-46f7-a4f5-fca8167c8d6c','Reset Password','Reset Password',0,100,100,TO_DATE('2012-09-18 14:38:34','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-18 14:38:34','YYYY-MM-DD HH24:MI:SS'),0,'Y')
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:38:38 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Form_Trl (AD_Language,AD_Form_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Form_Trl_UU ) SELECT l.AD_Language,t.AD_Form_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Form t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Form_ID=200001 AND NOT EXISTS (SELECT * FROM AD_Form_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Form_ID=t.AD_Form_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:13 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Menu (AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,AD_Form_ID,EntityType,IsCentrallyMaintained,Name,Description,Action,AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200017,'N','N','N',200001,'D','Y','Reset Password','Reset Passwords for User','X','c9aa4c76-894d-4a72-97de-38d0345fd477','Y',0,100,TO_DATE('2012-09-18 14:39:12','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-09-18 14:39:12','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200017 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200017, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200017)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200002
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=147
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53246
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200017
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=487
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200012
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=150
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=495
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50007
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=362
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200001
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=475
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=366
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=483
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=368
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=508
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=16, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53348
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:32 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
DELETE FROM AD_Menu_Trl WHERE AD_Menu_ID=487
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:33 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
DELETE FROM AD_Menu WHERE AD_Menu_ID=487
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:33 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
DELETE FROM AD_TreeNodeMM n WHERE Node_ID=487 AND EXISTS (SELECT * FROM AD_Tree t WHERE t.AD_Tree_ID=n.AD_Tree_ID AND t.TreeType='MM')
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:48:49 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_Form SET AccessLevel='7',Updated=TO_DATE('2012-09-18 14:48:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Form_ID=200001
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:32:53 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,MsgTip,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','User is Mandatory',NULL,200067,'D','40544a9e-776d-4f96-8ef1-f38de2237027','UserMandatory','Y',TO_DATE('2012-09-18 16:32:51','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:32:51','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:32:53 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200067 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','New EMail does not match the Confirm New EMail',200068,'D','5046c7a0-0846-4f09-b130-d8280a043775','NewEmailNotMatch','Y',TO_DATE('2012-09-18 16:35:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:35:13','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200068 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:51 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Confirm New EMail is Mandatory',200069,'D','c9e44d6f-af2e-4306-bb84-2df8258ad79c','NewEmailConfirmMandatory','Y',TO_DATE('2012-09-18 16:35:50','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:35:50','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:51 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200069 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:37:44 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Confirm New EMail',200070,'D','41282b1f-672c-43e0-b823-439b87fa0544','New EMail Confirm','Y',TO_DATE('2012-09-18 16:37:43','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:37:43','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:37:44 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200070 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:20 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New EMail',200071,'D','6a228718-3a23-46d3-8e0c-97a6511acc50','New EMail','Y',TO_DATE('2012-09-18 16:38:19','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:38:19','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:20 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200071 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:36 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New EMail User',200072,'D','3bf5a60b-20a1-484d-a5f0-11dbe95fcbce','New EMail User','Y',TO_DATE('2012-09-18 16:38:35','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:38:35','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:36 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200072 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:39:03 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New EMail User Password',200073,'D','cfe2fcb8-81cc-4df5-b187-f1df99f8f842','New EMail User Password','Y',TO_DATE('2012-09-18 16:38:59','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-18 16:38:59','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:39:03 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200073 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('913_IDEMPIERE-374.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,202 @@
|
|||
-- Sep 18, 2012 2:38:36 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Form (AccessLevel,Classname,AD_Form_ID,Help,IsBetaFunctionality,EntityType,AD_Form_UU,Description,Name,AD_Org_ID,UpdatedBy,CreatedBy,Updated,Created,AD_Client_ID,IsActive) VALUES ('1','org.compiere.apps.form.VResetPassword',200001,NULL,'N','D','e2db983d-c11a-46f7-a4f5-fca8167c8d6c','Reset Password','Reset Password',0,100,100,TO_TIMESTAMP('2012-09-18 14:38:34','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-18 14:38:34','YYYY-MM-DD HH24:MI:SS'),0,'Y')
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:38:38 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Form_Trl (AD_Language,AD_Form_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Form_Trl_UU ) SELECT l.AD_Language,t.AD_Form_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Form t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Form_ID=200001 AND NOT EXISTS (SELECT * FROM AD_Form_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Form_ID=t.AD_Form_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:13 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Menu (AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,AD_Form_ID,EntityType,IsCentrallyMaintained,Name,Description,"action",AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200017,'N','N','N',200001,'D','Y','Reset Password','Reset Passwords for User','X','c9aa4c76-894d-4a72-97de-38d0345fd477','Y',0,100,TO_TIMESTAMP('2012-09-18 14:39:12','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-09-18 14:39:12','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200017 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 200017, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200017)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200002
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=147
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53246
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200017
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=487
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200012
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=150
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=495
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50007
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=362
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200001
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=475
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=366
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=483
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=14, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=368
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=15, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=508
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:24 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=16, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53348
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:32 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
DELETE FROM AD_Menu_Trl WHERE AD_Menu_ID=487
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:33 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
DELETE FROM AD_Menu WHERE AD_Menu_ID=487
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:39:33 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
DELETE FROM AD_TreeNodeMM WHERE Node_ID=487 AND EXISTS (SELECT * FROM AD_Tree t WHERE t.AD_Tree_ID=AD_TreeNodeMM.AD_Tree_ID AND t.TreeType='MM')
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 2:48:49 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
UPDATE AD_Form SET AccessLevel='7',Updated=TO_TIMESTAMP('2012-09-18 14:48:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Form_ID=200001
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:32:53 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,MsgTip,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','User is Mandatory',NULL,200067,'D','40544a9e-776d-4f96-8ef1-f38de2237027','UserMandatory','Y',TO_TIMESTAMP('2012-09-18 16:32:51','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:32:51','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:32:53 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200067 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','New EMail does not match the Confirm New EMail',200068,'D','5046c7a0-0846-4f09-b130-d8280a043775','NewEmailNotMatch','Y',TO_TIMESTAMP('2012-09-18 16:35:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:35:13','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:14 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200068 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:51 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Confirm New EMail is Mandatory',200069,'D','c9e44d6f-af2e-4306-bb84-2df8258ad79c','NewEmailConfirmMandatory','Y',TO_TIMESTAMP('2012-09-18 16:35:50','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:35:50','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:35:51 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200069 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:37:44 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Confirm New EMail',200070,'D','41282b1f-672c-43e0-b823-439b87fa0544','New EMail Confirm','Y',TO_TIMESTAMP('2012-09-18 16:37:43','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:37:43','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:37:44 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200070 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:20 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New EMail',200071,'D','6a228718-3a23-46d3-8e0c-97a6511acc50','New EMail','Y',TO_TIMESTAMP('2012-09-18 16:38:19','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:38:19','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:20 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200071 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:36 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New EMail User',200072,'D','3bf5a60b-20a1-484d-a5f0-11dbe95fcbce','New EMail User','Y',TO_TIMESTAMP('2012-09-18 16:38:35','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:38:35','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:38:36 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200072 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:39:03 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New EMail User Password',200073,'D','cfe2fcb8-81cc-4df5-b187-f1df99f8f842','New EMail User Password','Y',TO_TIMESTAMP('2012-09-18 16:38:59','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-18 16:38:59','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 18, 2012 4:39:03 PM SGT
|
||||
-- IDEMPIERE-374 Change password must be changed to be a form instead of a process
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200073 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('913_IDEMPIERE-374.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,329 @@
|
|||
package org.compiere.apps.form;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.beans.VetoableChangeListener;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.swing.JPasswordField;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.apps.ConfirmPanel;
|
||||
import org.compiere.grid.ed.VLookup;
|
||||
import org.compiere.model.MLookup;
|
||||
import org.compiere.model.MLookupFactory;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUser;
|
||||
import org.compiere.swing.CLabel;
|
||||
import org.compiere.swing.CPanel;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
public class VResetPassword implements FormPanel, ActionListener, VetoableChangeListener {
|
||||
|
||||
private static CLogger log = CLogger.getCLogger(VResetPassword.class);
|
||||
|
||||
private FormFrame frame;
|
||||
private CPanel mainPanel;
|
||||
private ConfirmPanel confirmPanel;
|
||||
|
||||
private CLabel lblUser;
|
||||
private CLabel lblOldPassword;
|
||||
private CLabel lblNewPassword;
|
||||
private CLabel lblRetypeNewPassword;
|
||||
private CLabel lblNewEMail;
|
||||
private CLabel lblRetypeNewEMail;
|
||||
private CLabel lblNewEMailUser;
|
||||
private CLabel lblNewEMailUserPW;
|
||||
|
||||
private VLookup fUser;
|
||||
private JPasswordField txtOldPassword;
|
||||
private JPasswordField txtNewPassword;
|
||||
private JPasswordField txtRetypeNewPassword;
|
||||
private JTextField txtNewEMail;
|
||||
private JTextField txtRetypeNewEMail;
|
||||
private JTextField txtNewEMailUser;
|
||||
private JTextField txtNewEMailUserPW;
|
||||
|
||||
public int windowNo = 0;
|
||||
|
||||
@Override
|
||||
public void init(int WindowNo, FormFrame frame)
|
||||
{
|
||||
this.windowNo = WindowNo;
|
||||
this.frame = frame;
|
||||
|
||||
try
|
||||
{
|
||||
dynInit();
|
||||
jbInit();
|
||||
|
||||
frame.getContentPane().add(mainPanel, BorderLayout.CENTER);
|
||||
frame.getContentPane().add(confirmPanel, BorderLayout.SOUTH);
|
||||
confirmPanel.addActionListener(this);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, "init", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void jbInit() throws Exception
|
||||
{
|
||||
GridBagLayout panelLayout = new GridBagLayout();
|
||||
mainPanel.setLayout(panelLayout);
|
||||
|
||||
mainPanel.add(lblUser, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(fUser, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblOldPassword, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtOldPassword, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblNewPassword, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtNewPassword, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblRetypeNewPassword, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtRetypeNewPassword, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblNewEMail, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtNewEMail, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblRetypeNewEMail, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtRetypeNewEMail, new GridBagConstraints(1, 5, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblNewEMailUser, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtNewEMailUser, new GridBagConstraints(1, 6, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
mainPanel.add(lblNewEMailUserPW, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
mainPanel.add(txtNewEMailUserPW, new GridBagConstraints(1, 7, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
|
||||
fUser.addVetoableChangeListener(this);
|
||||
}
|
||||
|
||||
private void dynInit()
|
||||
{
|
||||
mainPanel = new CPanel();
|
||||
|
||||
// AD_User.AD_User_ID
|
||||
MLookup userLkp = MLookupFactory.get (Env.getCtx(), windowNo, 0, 212, DisplayType.Search);
|
||||
fUser = new VLookup("AD_User_ID", false, false, true, userLkp);
|
||||
|
||||
txtOldPassword = new JPasswordField();
|
||||
txtOldPassword.setName("txtOldPassword");
|
||||
|
||||
txtNewPassword = new JPasswordField();
|
||||
txtNewPassword.setName("txtNewPassword");
|
||||
|
||||
txtRetypeNewPassword = new JPasswordField();
|
||||
txtRetypeNewPassword.setName("txtRetypeNewPassword");
|
||||
|
||||
txtNewEMail = new JTextField();
|
||||
txtNewEMail.setName("txtNewEMail");
|
||||
|
||||
txtRetypeNewEMail = new JTextField();
|
||||
txtRetypeNewEMail.setName("txtRetypeNewEMail");
|
||||
|
||||
txtNewEMailUser = new JTextField();
|
||||
txtNewEMailUser.setName("txtNewEMailUser");
|
||||
|
||||
txtNewEMailUserPW = new JTextField();
|
||||
txtNewEMailUserPW.setName("txtNewEMailUserPW");
|
||||
|
||||
lblUser = new CLabel(Msg.translate(Env.getCtx(), "AD_User_ID"));
|
||||
lblUser.setRequestFocusEnabled(false);
|
||||
lblUser.setLabelFor(fUser);
|
||||
lblUser.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblOldPassword = new CLabel(Msg.getMsg(Env.getCtx(), "Old Password"));
|
||||
lblOldPassword.setRequestFocusEnabled(false);
|
||||
lblOldPassword.setLabelFor(txtOldPassword);
|
||||
lblOldPassword.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblNewPassword = new CLabel(Msg.getMsg(Env.getCtx(), "New Password"));
|
||||
lblNewPassword.setRequestFocusEnabled(false);
|
||||
lblNewPassword.setLabelFor(txtNewPassword);
|
||||
lblNewPassword.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblRetypeNewPassword = new CLabel(Msg.getMsg(Env.getCtx(), "New Password Confirm"));
|
||||
lblRetypeNewPassword.setRequestFocusEnabled(false);
|
||||
lblRetypeNewPassword.setLabelFor(txtRetypeNewPassword);
|
||||
lblRetypeNewPassword.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblNewEMail = new CLabel(Msg.getMsg(Env.getCtx(), "New EMail"));
|
||||
lblNewEMail.setRequestFocusEnabled(false);
|
||||
lblNewEMail.setLabelFor(txtNewEMail);
|
||||
lblNewEMail.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblRetypeNewEMail = new CLabel(Msg.getMsg(Env.getCtx(), "New EMail Confirm"));
|
||||
lblRetypeNewEMail.setRequestFocusEnabled(false);
|
||||
lblRetypeNewEMail.setLabelFor(txtRetypeNewEMail);
|
||||
lblRetypeNewEMail.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblNewEMailUser = new CLabel(Msg.getMsg(Env.getCtx(), "New EMail User"));
|
||||
lblNewEMailUser.setRequestFocusEnabled(false);
|
||||
lblNewEMailUser.setLabelFor(txtNewEMailUser);
|
||||
lblNewEMailUser.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
lblNewEMailUserPW = new CLabel(Msg.getMsg(Env.getCtx(), "New EMail User Password"));
|
||||
lblNewEMailUserPW.setRequestFocusEnabled(false);
|
||||
lblNewEMailUserPW.setLabelFor(txtNewEMailUserPW);
|
||||
lblNewEMailUserPW.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
|
||||
confirmPanel = new ConfirmPanel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException
|
||||
{
|
||||
log.info(e.getPropertyName() + "=" + e.getNewValue());
|
||||
if (e.getPropertyName().equals("AD_User_ID"))
|
||||
fUser.setValue(e.getNewValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
|
||||
{
|
||||
dispose();
|
||||
return;
|
||||
}
|
||||
else if (e.getActionCommand().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
validateChangePassword();
|
||||
}
|
||||
}
|
||||
|
||||
private void validateChangePassword()
|
||||
{
|
||||
int p_AD_User_ID = -1;
|
||||
if (fUser.getValue() != null)
|
||||
p_AD_User_ID = Integer.parseInt(fUser.getValue().toString());
|
||||
if (p_AD_User_ID < 0)
|
||||
{
|
||||
ADialog.error(windowNo, frame, "UserMandatory");
|
||||
return;
|
||||
}
|
||||
|
||||
String p_OldPassword = new String(txtOldPassword.getPassword());
|
||||
String p_NewPassword = new String(txtNewPassword.getPassword());
|
||||
String p_NewPasswordConfirm = new String(txtRetypeNewPassword.getPassword());
|
||||
String p_NewEMail = txtNewEMail.getText();
|
||||
String p_NewEMailConfirm = txtRetypeNewEMail.getText();
|
||||
String p_NewEMailUser = txtNewEMailUser.getText();
|
||||
String p_NewEMailUserPW = txtNewEMailUserPW.getText();
|
||||
|
||||
MUser user = MUser.get(Env.getCtx(), p_AD_User_ID);
|
||||
log.fine("User=" + user);
|
||||
|
||||
// Do we need a password ?
|
||||
if (Util.isEmpty(p_OldPassword)) // Password required
|
||||
{
|
||||
MUser operator = MUser.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()));
|
||||
log.fine("Operator=" + operator);
|
||||
|
||||
if (p_AD_User_ID == 0 // change of System
|
||||
|| p_AD_User_ID == 100 // change of SuperUser
|
||||
|| !operator.isAdministrator())
|
||||
{
|
||||
ADialog.error(windowNo, frame, "OldPasswordMandatory");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// is entered Password correct ?
|
||||
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
|
||||
if (hash_password) {
|
||||
if (!user.authenticateHash(p_OldPassword))
|
||||
{
|
||||
ADialog.error(windowNo, frame, "OldPasswordNoMatch");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!p_OldPassword.equals(user.getPassword()))
|
||||
{
|
||||
ADialog.error(windowNo, frame, "OldPasswordNoMatch");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// new password confirm
|
||||
// if (!Util.isEmpty(p_NewPassword)) {
|
||||
if (Util.isEmpty(p_NewPasswordConfirm)) {
|
||||
ADialog.error(windowNo, frame, "NewPasswordConfirmMandatory");
|
||||
return;
|
||||
} else {
|
||||
if (!p_NewPassword.equals(p_NewPasswordConfirm)) {
|
||||
ADialog.error(windowNo, frame, "PasswordNotMatch");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
if (!Util.isEmpty(p_NewEMailUserPW)) {
|
||||
if (Util.isEmpty(p_NewEMailConfirm)) {
|
||||
ADialog.error(windowNo, frame, "NewEmailConfirmMandatory");
|
||||
return;
|
||||
} else {
|
||||
if (!p_NewEMailUserPW.equals(p_NewEMailConfirm)) {
|
||||
ADialog.error(windowNo, frame, "NewEmailNotMatch");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(p_NewPassword))
|
||||
user.set_ValueOfColumn("Password", p_NewPassword); // will be hashed and validate on saveEx
|
||||
if (!Util.isEmpty(p_NewEMail))
|
||||
user.setEMail(p_NewEMail);
|
||||
if (!Util.isEmpty(p_NewEMailUser))
|
||||
user.setEMailUser(p_NewEMailUser);
|
||||
if (!Util.isEmpty(p_NewEMailUserPW))
|
||||
user.setEMailUserPW(p_NewEMailUserPW);
|
||||
|
||||
user.saveEx();
|
||||
clearForm();
|
||||
ADialog.info(windowNo, frame, "RecordSaved");
|
||||
return;
|
||||
}
|
||||
|
||||
private void clearForm()
|
||||
{
|
||||
fUser.setValue(null);
|
||||
txtOldPassword.setText(null);
|
||||
txtNewPassword.setText(null);
|
||||
txtRetypeNewPassword.setText(null);
|
||||
txtNewEMail.setText(null);
|
||||
txtRetypeNewEMail.setText(null);
|
||||
txtNewEMailUser.setText(null);
|
||||
txtNewEMailUserPW.setText(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose()
|
||||
{
|
||||
if (frame != null)
|
||||
frame.dispose();
|
||||
frame = null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,352 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.AdempiereIdGenerator;
|
||||
import org.adempiere.webui.component.Column;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.event.ValueChangeListener;
|
||||
import org.adempiere.webui.panel.ADForm;
|
||||
import org.adempiere.webui.panel.CustomForm;
|
||||
import org.adempiere.webui.panel.IFormController;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.model.MLookup;
|
||||
import org.compiere.model.MLookupFactory;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUser;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Borderlayout;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.Columns;
|
||||
import org.zkoss.zul.South;
|
||||
|
||||
/**
|
||||
* Reset Password Form
|
||||
* @author Elaine
|
||||
* @date September 18, 2012
|
||||
*/
|
||||
public class WResetPassword implements IFormController, EventListener, ValueChangeListener {
|
||||
|
||||
private static CLogger log = CLogger.getCLogger(WResetPassword.class);
|
||||
|
||||
private CustomForm form;
|
||||
private Grid gridPanel;
|
||||
private ConfirmPanel confirmPanel;
|
||||
|
||||
private Label lblUser;
|
||||
private Label lblOldPassword;
|
||||
private Label lblNewPassword;
|
||||
private Label lblRetypeNewPassword;
|
||||
private Label lblNewEMail;
|
||||
private Label lblRetypeNewEMail;
|
||||
private Label lblNewEMailUser;
|
||||
private Label lblNewEMailUserPW;
|
||||
|
||||
private WSearchEditor fUser;
|
||||
private Textbox txtOldPassword;
|
||||
private Textbox txtNewPassword;
|
||||
private Textbox txtRetypeNewPassword;
|
||||
private Textbox txtNewEMail;
|
||||
private Textbox txtRetypeNewEMail;
|
||||
private Textbox txtNewEMailUser;
|
||||
private Textbox txtNewEMailUserPW;
|
||||
|
||||
public WResetPassword()
|
||||
{
|
||||
form = new CustomForm();
|
||||
|
||||
try
|
||||
{
|
||||
dynInit();
|
||||
zkInit();
|
||||
|
||||
Borderlayout contentPane = new Borderlayout();
|
||||
form.appendChild(contentPane);
|
||||
contentPane.setWidth("99%");
|
||||
contentPane.setHeight("100%");
|
||||
Center center = new Center();
|
||||
center.setStyle("border: none");
|
||||
contentPane.appendChild(center);
|
||||
center.appendChild(gridPanel);
|
||||
center.setFlex(true);
|
||||
South south = new South();
|
||||
south.setStyle("border: none");
|
||||
contentPane.appendChild(south);
|
||||
south.appendChild(confirmPanel);
|
||||
confirmPanel.addActionListener(this);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
log.log(Level.SEVERE, "init", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void dynInit() throws Exception
|
||||
{
|
||||
lblUser = new Label(Msg.translate(Env.getCtx(), "AD_User_ID"));
|
||||
lblOldPassword = new Label(Msg.getMsg(Env.getCtx(), "Old Password"));
|
||||
lblNewPassword = new Label(Msg.getMsg(Env.getCtx(), "New Password"));
|
||||
lblRetypeNewPassword = new Label(Msg.getMsg(Env.getCtx(), "New Password Confirm"));
|
||||
lblNewEMail = new Label(Msg.getMsg(Env.getCtx(), "New EMail"));
|
||||
lblRetypeNewEMail = new Label(Msg.getMsg(Env.getCtx(), "New EMail Confirm"));
|
||||
lblNewEMailUser = new Label(Msg.getMsg(Env.getCtx(), "New EMail User"));
|
||||
lblNewEMailUserPW = new Label(Msg.getMsg(Env.getCtx(), "New EMail User Password"));
|
||||
|
||||
// AD_User.AD_User_ID
|
||||
MLookup userLkp = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 212, DisplayType.Search);
|
||||
fUser = new WSearchEditor("AD_User_ID", false, false, true, userLkp);
|
||||
fUser.getComponent().setWidth("220px");
|
||||
|
||||
txtOldPassword = new Textbox();
|
||||
txtOldPassword.setId("txtOldPassword");
|
||||
txtOldPassword.setType("password");
|
||||
txtOldPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtOldPassword.getId());
|
||||
txtOldPassword.setCols(25);
|
||||
txtOldPassword.setWidth("220px");
|
||||
|
||||
txtNewPassword = new Textbox();
|
||||
txtNewPassword.setId("txtNewPassword");
|
||||
txtNewPassword.setType("password");
|
||||
txtNewPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewPassword.getId());
|
||||
txtNewPassword.setCols(25);
|
||||
txtNewPassword.setWidth("220px");
|
||||
|
||||
txtRetypeNewPassword = new Textbox();
|
||||
txtRetypeNewPassword.setId("txtRetypeNewPassword");
|
||||
txtRetypeNewPassword.setType("password");
|
||||
txtRetypeNewPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewPassword.getId());
|
||||
txtRetypeNewPassword.setCols(25);
|
||||
txtRetypeNewPassword.setWidth("220px");
|
||||
|
||||
txtNewEMail = new Textbox();
|
||||
txtNewEMail.setId("txtNewEMail");
|
||||
txtNewEMail.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewEMail.getId());
|
||||
txtNewEMail.setCols(25);
|
||||
txtNewEMail.setWidth("220px");
|
||||
|
||||
txtRetypeNewEMail = new Textbox();
|
||||
txtRetypeNewEMail.setId("txtRetypeNewEMail");
|
||||
txtRetypeNewEMail.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtRetypeNewEMail.getId());
|
||||
txtRetypeNewEMail.setCols(25);
|
||||
txtRetypeNewEMail.setWidth("220px");
|
||||
|
||||
txtNewEMailUser = new Textbox();
|
||||
txtNewEMailUser.setId("txtNewEMailUser");
|
||||
txtNewEMailUser.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewEMailUser.getId());
|
||||
txtNewEMailUser.setCols(25);
|
||||
txtNewEMailUser.setWidth("220px");
|
||||
|
||||
txtNewEMailUserPW = new Textbox();
|
||||
txtNewEMailUserPW.setId("txtNewEMailUserPW");
|
||||
txtNewEMailUserPW.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewEMailUserPW.getId());
|
||||
txtNewEMailUserPW.setCols(25);
|
||||
txtNewEMailUserPW.setWidth("220px");
|
||||
|
||||
confirmPanel = new ConfirmPanel(true);
|
||||
}
|
||||
|
||||
private void zkInit() throws Exception
|
||||
{
|
||||
gridPanel = GridFactory.newGridLayout();
|
||||
|
||||
Columns columns = new Columns();
|
||||
gridPanel.appendChild(columns);
|
||||
|
||||
Column column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("40%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("60%");
|
||||
|
||||
Rows rows = new Rows();
|
||||
gridPanel.appendChild(rows);
|
||||
|
||||
Row row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblUser.rightAlign());
|
||||
row.appendChild(fUser.getComponent());
|
||||
fUser.addValueChangeListener(this);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblOldPassword.rightAlign());
|
||||
row.appendChild(txtOldPassword);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblNewPassword.rightAlign());
|
||||
row.appendChild(txtNewPassword);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblRetypeNewPassword.rightAlign());
|
||||
row.appendChild(txtRetypeNewPassword);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblNewEMail.rightAlign());
|
||||
row.appendChild(txtNewEMail);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblRetypeNewEMail.rightAlign());
|
||||
row.appendChild(txtRetypeNewEMail);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblNewEMailUser.rightAlign());
|
||||
row.appendChild(txtNewEMailUser);
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblNewEMailUserPW.rightAlign());
|
||||
row.appendChild(txtNewEMailUserPW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void valueChange(ValueChangeEvent e) {
|
||||
log.info(e.getPropertyName() + "=" + e.getNewValue());
|
||||
if (e.getPropertyName().equals("AD_User_ID"))
|
||||
fUser.setValue(e.getNewValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(Event e) throws Exception
|
||||
{
|
||||
if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
{
|
||||
SessionManager.getAppDesktop().closeActiveWindow();
|
||||
return;
|
||||
}
|
||||
else if (e.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
validateChangePassword();
|
||||
}
|
||||
}
|
||||
|
||||
private void validateChangePassword()
|
||||
{
|
||||
int p_AD_User_ID = -1;
|
||||
if (fUser.getValue() != null)
|
||||
p_AD_User_ID = Integer.parseInt(fUser.getValue().toString());
|
||||
if (p_AD_User_ID < 0)
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "UserMandatory"));
|
||||
|
||||
String p_OldPassword = txtOldPassword.getValue();
|
||||
String p_NewPassword = txtNewPassword.getValue();
|
||||
String p_NewPasswordConfirm = txtRetypeNewPassword.getValue();
|
||||
String p_NewEMail = txtNewEMail.getValue();
|
||||
String p_NewEMailConfirm = txtRetypeNewEMail.getValue();
|
||||
String p_NewEMailUser = txtNewEMailUser.getValue();
|
||||
String p_NewEMailUserPW = txtNewEMailUserPW.getValue();
|
||||
|
||||
MUser user = MUser.get(Env.getCtx(), p_AD_User_ID);
|
||||
log.fine("User=" + user);
|
||||
|
||||
// Do we need a password ?
|
||||
if (Util.isEmpty(p_OldPassword)) // Password required
|
||||
{
|
||||
MUser operator = MUser.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()));
|
||||
log.fine("Operator=" + operator);
|
||||
|
||||
if (p_AD_User_ID == 0 // change of System
|
||||
|| p_AD_User_ID == 100 // change of SuperUser
|
||||
|| !operator.isAdministrator())
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "OldPasswordMandatory"));
|
||||
} else {
|
||||
// is entered Password correct ?
|
||||
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
|
||||
if (hash_password) {
|
||||
if (!user.authenticateHash(p_OldPassword))
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "OldPasswordNoMatch"));
|
||||
} else {
|
||||
if (!p_OldPassword.equals(user.getPassword()))
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "OldPasswordNoMatch"));
|
||||
}
|
||||
}
|
||||
|
||||
// new password confirm
|
||||
// if (!Util.isEmpty(p_NewPassword)) {
|
||||
if (Util.isEmpty(p_NewPasswordConfirm)) {
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "NewPasswordConfirmMandatory"));
|
||||
} else {
|
||||
if (!p_NewPassword.equals(p_NewPasswordConfirm)) {
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "PasswordNotMatch"));
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
if (!Util.isEmpty(p_NewEMailUserPW)) {
|
||||
if (Util.isEmpty(p_NewEMailConfirm)) {
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "NewEmailConfirmMandatory"));
|
||||
} else {
|
||||
if (!p_NewEMailUserPW.equals(p_NewEMailConfirm)) {
|
||||
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), "NewEmailNotMatch"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(p_NewPassword))
|
||||
user.set_ValueOfColumn("Password", p_NewPassword); // will be hashed and validate on saveEx
|
||||
if (!Util.isEmpty(p_NewEMail))
|
||||
user.setEMail(p_NewEMail);
|
||||
if (!Util.isEmpty(p_NewEMailUser))
|
||||
user.setEMailUser(p_NewEMailUser);
|
||||
if (!Util.isEmpty(p_NewEMailUserPW))
|
||||
user.setEMailUserPW(p_NewEMailUserPW);
|
||||
|
||||
user.saveEx();
|
||||
clearForm();
|
||||
FDialog.info(form.getWindowNo(), form, "RecordSaved");
|
||||
return;
|
||||
}
|
||||
|
||||
private void clearForm()
|
||||
{
|
||||
fUser.setValue(null);
|
||||
txtOldPassword.setValue(null);
|
||||
txtNewPassword.setValue(null);
|
||||
txtRetypeNewPassword.setValue(null);
|
||||
txtNewEMail.setValue(null);
|
||||
txtRetypeNewEMail.setValue(null);
|
||||
txtNewEMailUser.setValue(null);
|
||||
txtNewEMailUserPW.setValue(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ADForm getForm()
|
||||
{
|
||||
return form;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue