Index: ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.jsp =================================================================== diff -u -r29513 -r37656 --- ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.jsp (.../modifyPWDByExt.jsp) (revision 29513) +++ ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.jsp (.../modifyPWDByExt.jsp) (revision 37656) @@ -18,7 +18,7 @@
-
+
Index: ssts-web/src/main/webapp/personalSetting/showModifyPWDWindowByExt.js =================================================================== diff -u -r37654 -r37656 --- ssts-web/src/main/webapp/personalSetting/showModifyPWDWindowByExt.js (.../showModifyPWDWindowByExt.js) (revision 37654) +++ ssts-web/src/main/webapp/personalSetting/showModifyPWDWindowByExt.js (.../showModifyPWDWindowByExt.js) (revision 37656) @@ -71,7 +71,7 @@ inputType : 'password', name : 'oldPassword', id : 'oldPassword', - width : 250, + width : 280, allowBlank : false, blankText : '请输入旧密码!', msgTarget : 'side' @@ -81,7 +81,7 @@ inputType : 'password', name : 'newPassword', id : 'newPassword', - width : 250, + width : 280, allowBlank : false, blankText : '请输入新密码!', msgTarget : 'side' @@ -91,7 +91,7 @@ inputType : 'password', name : 'confirmNewPassword', id : 'confirmNewPassword', - width : 250, + width : 280, allowBlank : false, blankText : '请输入确认新密码!', msgTarget : 'side' @@ -102,10 +102,10 @@ items:[{ id:'showPwdMessage', xtype:'textfield', - width : 350, + width : 390, allowBlank : true, labelSeparator:'', - labelWidth:10, + labelWidth:0, anchor: '99%', readOnly : true, cls : 'fieldReadOnlyNoRemove', @@ -187,8 +187,8 @@ id : 'modifyPWDWindow', layout : 'fit', title : '修改密码', - width : 410, - height : 190, + width : 440, + height : 185, modal : true, // autoHeight : true, border : false, Index: ssts-web/src/main/webapp/systemmanage/adminModifyPWDByExt.js =================================================================== diff -u -r29171 -r37656 --- ssts-web/src/main/webapp/systemmanage/adminModifyPWDByExt.js (.../adminModifyPWDByExt.js) (revision 29171) +++ ssts-web/src/main/webapp/systemmanage/adminModifyPWDByExt.js (.../adminModifyPWDByExt.js) (revision 37656) @@ -62,7 +62,63 @@ Ext.onReady(function(){ Ext.QuickTips.init(); - + + //ZSRY-72:增加密码设置要求提示语 + var pwdConfig = sstsConfig.needBeStrongPwdWhenModifyPwd; + + var msg = ''; + + if (!isUndefinedOrNullOrEmpty(pwdConfig)) { + var minPwdLength = pwdConfig.minPwdLength; + var containLetter = pwdConfig.containLetter; + var containUppercaseLetter = pwdConfig.containUppercaseLetter; + var containLowerCaseLetter = pwdConfig.containLowerCaseLetter; + var containSpecialChar = pwdConfig.containSpecialChar; + var containNumber = pwdConfig.containNumber; + var passwordNotContainLoginName = pwdConfig.passwordNotContainLoginName; + //密码复杂度要求1,该要求包含以下三类字符中的二类字符:(QYSRMYY-27) + var passwordComplexityReq1 = pwdConfig.passwordComplexityReq1; + //密码复杂度要求2,该要求包含以下四类字符中的三类字符:(QYSRMYY-27) + var windowsPasswordComplexityReq = pwdConfig.windowsPasswordComplexityReq; + + minPwdLength = isUndefinedOrNullOrEmpty(minPwdLength) ? 6 : minPwdLength; + + msg = "密码至少需要"+ minPwdLength +"个字符"; + if(containUppercaseLetter && containLowerCaseLetter){ + msg += ',需要包含大小写字母'; + }else if(containUppercaseLetter){ + msg += ',需要包含大写字母'; + }else if(containLowerCaseLetter){ + msg += ',需要包含小写字母'; + }else if(containLetter){ + msg += ',需要包含字母'; + } + if(containUppercaseLetter || containLowerCaseLetter || containLetter){ + if(containSpecialChar){ + msg += '、特殊字符'; + } + if(containNumber){ + msg += '、数字'; + } + }else { + if(containSpecialChar){ + msg += ',需要包含特殊字符'; + if(containNumber){ + msg += '、数字'; + } + }else { + if(containNumber){ + msg += ',需要包含数字'; + } + } + } + if(windowsPasswordComplexityReq){ + msg += '中的三项'; + }else if(passwordComplexityReq1){ + msg += '中的两项'; + } + } + formObj = new Ext.FormPanel({ frame:true, labelWidth:70, @@ -98,7 +154,24 @@ name :'confirmNewPassword', width: 200, inputType:"password" - }] + }, { + items:[{ + hidden:msg == ''?true:false, + layout:'column', + items:[{ + id:'showPwdMessage', + xtype:'textarea', + width : 320, + allowBlank : true, + labelSeparator:'', + labelWidth:0, + anchor: '99%', + readOnly : true, + cls : 'fieldReadOnlyNoRemove', + value: msg + }] + }] + }] }], buttons: [{ text: '确定', @@ -117,4 +190,7 @@ formObj.render("formDiv"); initGetUserNameById(); Ext.getCmp('newPassword').focus(); + if(msg !== ''){ + Ext.getCmp('showPwdMessage').el.dom.style.color = 'red'; + } }); Index: ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.js =================================================================== diff -u -r29465 -r37656 --- ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.js (.../modifyPWDByExt.js) (revision 29465) +++ ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.js (.../modifyPWDByExt.js) (revision 37656) @@ -1,22 +1,78 @@ Ext.onReady(function(){ Ext.QuickTips.init(); + + //ZSRY-72:增加密码设置要求提示语 + var pwdConfig = sstsConfig.needBeStrongPwdWhenModifyPwd; + + var msg = ''; + + if (!isUndefinedOrNullOrEmpty(pwdConfig)) { + var minPwdLength = pwdConfig.minPwdLength; + var containLetter = pwdConfig.containLetter; + var containUppercaseLetter = pwdConfig.containUppercaseLetter; + var containLowerCaseLetter = pwdConfig.containLowerCaseLetter; + var containSpecialChar = pwdConfig.containSpecialChar; + var containNumber = pwdConfig.containNumber; + var passwordNotContainLoginName = pwdConfig.passwordNotContainLoginName; + //密码复杂度要求1,该要求包含以下三类字符中的二类字符:(QYSRMYY-27) + var passwordComplexityReq1 = pwdConfig.passwordComplexityReq1; + //密码复杂度要求2,该要求包含以下四类字符中的三类字符:(QYSRMYY-27) + var windowsPasswordComplexityReq = pwdConfig.windowsPasswordComplexityReq; + + minPwdLength = isUndefinedOrNullOrEmpty(minPwdLength) ? 6 : minPwdLength; + + msg = "密码至少需要"+ minPwdLength +"个字符"; + if(containUppercaseLetter && containLowerCaseLetter){ + msg += ',需要包含大小写字母'; + }else if(containUppercaseLetter){ + msg += ',需要包含大写字母'; + }else if(containLowerCaseLetter){ + msg += ',需要包含小写字母'; + }else if(containLetter){ + msg += ',需要包含字母'; + } + if(containUppercaseLetter || containLowerCaseLetter || containLetter){ + if(containSpecialChar){ + msg += '、特殊字符'; + } + if(containNumber){ + msg += '、数字'; + } + }else { + if(containSpecialChar){ + msg += ',需要包含特殊字符'; + if(containNumber){ + msg += '、数字'; + } + }else { + if(containNumber){ + msg += ',需要包含数字'; + } + } + } + if(windowsPasswordComplexityReq){ + msg += '中的三项'; + }else if(passwordComplexityReq1){ + msg += '中的两项'; + } + } var formObj = new Ext.FormPanel({ labelAlign: 'left', frame:true, labelSeparator:':', title: '密码设置', bodyStyle:'padding:5px 5px 0px 25px', - width: 400, + width: 440, labelWidth:80, items: [{ xtype: 'textfield', fieldLabel: '旧密码', inputType: 'password', name: 'oldPassword', id: 'oldPassword', - width: 250, + width: 280, allowBlank:false, blankText:'请输入旧密码!', msgTarget:'side' @@ -26,7 +82,7 @@ inputType: 'password', name: 'newPassword', id: 'newPassword', - width: 250, + width: 280, allowBlank:false, blankText:'请输入新密码!', msgTarget:'side' @@ -36,11 +92,28 @@ inputType: 'password', name: 'confirmNewPassword', id: 'confirmNewPassword', - width: 250, + width: 280, allowBlank:false, blankText:'请输入确认新密码!', msgTarget:'side' - }], + }, { + items:[{ + hidden:msg == ''?true:false, + layout:'column', + items:[{ + id:'showPwdMessage', + xtype:'textfield', + width : 390, + allowBlank : true, + labelSeparator:'', + labelWidth:0, + anchor: '99%', + readOnly : true, + cls : 'fieldReadOnlyNoRemove', + value: msg + }] + }] + }], buttons: [{ id:'saveBtn', @@ -53,6 +126,9 @@ }); formObj.render("formDiv"); + if(msg !== ''){ + Ext.getCmp('showPwdMessage').el.dom.style.color = 'red'; + } Ext.getCmp('oldPassword').focus(); function save(){ if(!formObj.form.isValid()){