Index: ssts-web/src/main/webapp/personalSetting/showModifyPWDWindowByExt.js =================================================================== diff -u -r36728 -r37652 --- ssts-web/src/main/webapp/personalSetting/showModifyPWDWindowByExt.js (.../showModifyPWDWindowByExt.js) (revision 36728) +++ ssts-web/src/main/webapp/personalSetting/showModifyPWDWindowByExt.js (.../showModifyPWDWindowByExt.js) (revision 37652) @@ -1,6 +1,64 @@ function showModifyPWDWindow() { // 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; + + if(!passwordNotContainLoginName){ + 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, @@ -39,6 +97,23 @@ allowBlank : false, blankText : '请输入确认新密码!', msgTarget : 'side' + }, { + items:[{ + hidden:msg == ''?true:false, + layout:'column', + items:[{ + id:'showPwdMessage', + xtype:'textfield', + width : 350, + allowBlank : true, + labelSeparator:'', + labelWidth:10, + anchor: '99%', + readOnly : true, + cls : 'fieldReadOnlyNoRemove', + value: msg + }] + }] }], buttons : [{ @@ -115,7 +190,7 @@ layout : 'fit', title : '修改密码', width : 410, - height : 180, + height : 190, modal : true, // autoHeight : true, border : false, @@ -127,7 +202,9 @@ window.show(); top.Ext.getCmp("oldPassword").focus(false, 100); - + if(msg !== ''){ + Ext.getCmp('showPwdMessage').el.dom.style.color = 'red'; + } } //DGKHYY-25:显示PDA安装包下载地址的二维码