From c3d8909c666f050d778a4cfd398211ab60c5ccfb Mon Sep 17 00:00:00 2001 From: jonathan Date: Thu, 7 May 2015 17:13:45 -0400 Subject: [PATCH 1/3] pm2646 --- .../engine/methods/login/authentication.php | 6 +- .../xmlform/login/changePasswordpm3.html | 47 ++++++++ .../xmlform/login/changePasswordpm3.xml | 114 ++++++++++++++++++ 3 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 workflow/engine/xmlform/login/changePasswordpm3.html create mode 100644 workflow/engine/xmlform/login/changePasswordpm3.xml diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index c3023828c..7ee62761d 100755 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -320,7 +320,11 @@ try { } $aFields['DESCRIPTION'] .= '
' . G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY') . '

'; $G_PUBLISH = new Publisher; - $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePassword', '', $aFields, 'changePassword'); + if(SYS_SKIN == 'neoclassic'){ + $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePasswordpm3', '', $aFields, 'changePassword'); + }else{ + $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePassword', '', $aFields, 'changePassword'); + } G::RenderPage('publish'); die; } diff --git a/workflow/engine/xmlform/login/changePasswordpm3.html b/workflow/engine/xmlform/login/changePasswordpm3.html new file mode 100644 index 000000000..ecbc54b0a --- /dev/null +++ b/workflow/engine/xmlform/login/changePasswordpm3.html @@ -0,0 +1,47 @@ +
+
 
 
 
+ + + + + +
+ + {$form.USR_PASSWORD} + {$form.USR_PASSWORD_CONFIRM} +
+
+ + {$form.btnSave} +
+ + + + + + + + + + + + + + + + +
{$form.PPP_MINIMUN_LENGTH}
{$form.PPP_MAXIMUN_LENGTH}
{$form.PPP_NUMERICAL_CHARACTER_REQUIRED}
{$form.PPP_UPPERCASE_CHARACTER_REQUIRED}
{$form.PPP_SPECIAL_CHARACTER_REQUIRED}
+
+ +
+ + \ No newline at end of file diff --git a/workflow/engine/xmlform/login/changePasswordpm3.xml b/workflow/engine/xmlform/login/changePasswordpm3.xml new file mode 100644 index 000000000..50945f886 --- /dev/null +++ b/workflow/engine/xmlform/login/changePasswordpm3.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + parseInt(oAux.value)) { + alert('@G::LoadTranslation(ID_PPP_MAXIMUN_LENGTH)' + ': ' + oAux.value); + return; + } + } + var oAux = getField('PPP_NUMERICAL_CHARACTER_REQUIRED'); + if (oAux.value != '') { + var sER = /[0-9]/; + if (!sER.test(oPassword1.value)) { + alert('@G::LoadTranslation(ID_PPP_NUMERICAL_CHARACTER_REQUIRED)'); + return; + } + } + var oAux = getField('PPP_UPPERCASE_CHARACTER_REQUIRED'); + if (oAux.value != '') { + var sER = /[A-Z]/; + if (!sER.test(oPassword1.value)) { + alert('@G::LoadTranslation(ID_PPP_UPPERCASE_CHARACTER_REQUIRED)'); + return; + } + } + var oAux = getField('PPP_SPECIAL_CHARACTER_REQUIRED'); + if (oAux.value != '') { + var sER = /[ºª\\!|"@·#$~%€&¬\/()=\'?¡¿*+\-_.:,;]/; + if (!sER.test(oPassword1.value)) { + alert('@G::LoadTranslation(ID_PPP_SPECIAL_CHARACTER_REQUIRED)'); + return; + } + } + oPassword1.form.submit(); +}; + +]]> + From 0a760f7de6813e5dd479c8b375e3d67fb6d7f17c Mon Sep 17 00:00:00 2001 From: dheeyi Date: Sat, 9 May 2015 13:17:31 -0400 Subject: [PATCH 2/3] PM-2695 Se corrigio ese error que solo ocurre en navegadores de tipo IE8 --- workflow/engine/templates/authSources/authSourcesEdit.js | 7 ++++++- .../engine/templates/authSources/authSourceskindof.js | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/workflow/engine/templates/authSources/authSourcesEdit.js b/workflow/engine/templates/authSources/authSourcesEdit.js index 76e845dbd..db394d455 100644 --- a/workflow/engine/templates/authSources/authSourcesEdit.js +++ b/workflow/engine/templates/authSources/authSourcesEdit.js @@ -327,7 +327,12 @@ Ext.onReady(function(){ Ext.Msg.alert('Failure', 'Server reported:'+a.response.status+' '+a.response.statusText); } if (a.failureType === Ext.form.Action.SERVER_INVALID){ - Ext.Msg.alert('Warning', 'you have an error'); + if(Ext.isIE){ + success = true; + window.location = 'authSources_List'; + }else{ + Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); + } } } }); diff --git a/workflow/engine/templates/authSources/authSourceskindof.js b/workflow/engine/templates/authSources/authSourceskindof.js index c26745472..c76731eaf 100644 --- a/workflow/engine/templates/authSources/authSourceskindof.js +++ b/workflow/engine/templates/authSources/authSourceskindof.js @@ -347,11 +347,18 @@ Ext.onReady(function(){ }, failure: function(f,a){ + console.log(a); + console.log(a.failureType); if (a.failureType === Ext.form.Action.CONNECT_FAILURE){ Ext.Msg.alert(_('ID_FAILURE'), _('ID_SERVER_REPORTED') + ':'+a.response.status+' '+a.response.statusText); } if (a.failureType === Ext.form.Action.SERVER_INVALID){ - Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); + if(Ext.isIE){ + success = true; + window.location = 'authSources_List'; + }else{ + Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); + } } } }); From e58d871190a7f874ae2876fb64e462a9ede74ec0 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Sat, 9 May 2015 13:21:25 -0400 Subject: [PATCH 3/3] PM-2695 Se soluciono ese error en navegadores de tipo IE --- .../engine/templates/authSources/authSourcesEdit.js | 12 ++++++------ .../templates/authSources/authSourceskindof.js | 12 +++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/workflow/engine/templates/authSources/authSourcesEdit.js b/workflow/engine/templates/authSources/authSourcesEdit.js index db394d455..6878e847e 100644 --- a/workflow/engine/templates/authSources/authSourcesEdit.js +++ b/workflow/engine/templates/authSources/authSourcesEdit.js @@ -327,12 +327,12 @@ Ext.onReady(function(){ Ext.Msg.alert('Failure', 'Server reported:'+a.response.status+' '+a.response.statusText); } if (a.failureType === Ext.form.Action.SERVER_INVALID){ - if(Ext.isIE){ - success = true; - window.location = 'authSources_List'; - }else{ - Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); - } + if(Ext.isIE){ + success = true; + window.location = 'authSources_List'; + }else{ + Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); + } } } }); diff --git a/workflow/engine/templates/authSources/authSourceskindof.js b/workflow/engine/templates/authSources/authSourceskindof.js index c76731eaf..46dd0b4eb 100644 --- a/workflow/engine/templates/authSources/authSourceskindof.js +++ b/workflow/engine/templates/authSources/authSourceskindof.js @@ -347,18 +347,16 @@ Ext.onReady(function(){ }, failure: function(f,a){ - console.log(a); - console.log(a.failureType); if (a.failureType === Ext.form.Action.CONNECT_FAILURE){ Ext.Msg.alert(_('ID_FAILURE'), _('ID_SERVER_REPORTED') + ':'+a.response.status+' '+a.response.statusText); } if (a.failureType === Ext.form.Action.SERVER_INVALID){ if(Ext.isIE){ - success = true; - window.location = 'authSources_List'; - }else{ - Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); - } + success = true; + window.location = 'authSources_List'; + }else{ + Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR') ); + } } } });