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'; + } });