From 92688ac732ab2dbad545edbec5ed5b2f6d316e21 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Mon, 9 Mar 2015 17:18:25 -0400 Subject: [PATCH 1/6] PM-1740 Admin>User>New: El field Last Name es "required" sin embargo no tiene asterisco rojo Causa: Definicion previa. Solucion: Hacer que estes campos tambien tenga esa caracteristica. --- workflow/engine/templates/users/users.js | 640 +++++++++++++++-------- 1 file changed, 431 insertions(+), 209 deletions(-) diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index e3efc75cf..fbe416470 100755 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -401,225 +401,447 @@ Ext.onReady(function () { mode : 'local' }); - var informationFields = new Ext.form.FieldSet({ - title : _('ID_PERSONAL_INFORMATION'), - items : [ - { - id : 'USR_FIRSTNAME', - fieldLabel : ' * ' + _('ID_FIRSTNAME'), - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - id : 'USR_LASTNAME', - fieldLabel : _('ID_LASTNAME'), - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - id : 'USR_USERNAME', - fieldLabel : ' * ' + _('ID_USER_ID'), - xtype : 'textfield', - width : 260, - allowBlank : false, - hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, - listeners: { - blur : function(ob) - { - // trim - this.value = this.getValue().replace(/^\s+|\s+$/g,""); - document.getElementById('USR_USERNAME').value = this.getValue().replace(/^\s+|\s+$/g,""); - - Ext.getCmp('saveB').disable(); - Ext.getCmp('cancelB').disable(); - - var spanAjax = ''; - var imageAjax = ''; - var labelAjax = _('ID_USERNAME_TESTING'); - - Ext.getCmp('usernameReview').setText(spanAjax + imageAjax + labelAjax + '', false); - Ext.getCmp('usernameReview').setVisible(true); - - usernameText = this.getValue(); - - validateUserName(); - - Ext.getCmp('usernameReview').setVisible(true); - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'usernameReview', - width: 300, - labelSeparator: '' - }, - { - id : 'USR_EMAIL', - fieldLabel : ' * ' + _('ID_EMAIL'), - vtype : 'email', - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - xtype : 'textarea', - name : 'USR_ADDRESS', - fieldLabel : _('ID_ADDRESS'), - labelSeparator : '', - height : 50, - width : 260 - }, - { - id : 'USR_ZIP_CODE', - fieldLabel : _('ID_ZIP_CODE'), - xtype : 'textfield', - width : 260 - }, - comboCountry, - comboRegion, - comboLocation, - { - id : 'USR_PHONE', - fieldLabel : _('ID_PHONE'), - xtype : 'textfield', - width : 260 - }, - { - id : 'USR_POSITION', - fieldLabel : _('ID_POSITION'), - xtype : 'textfield', - width : 260 - }, - comboReplacedBy, - dateField, - comboCalendar, - comboStatus, - comboRole - ] - }); - - var passwordFields = new Ext.form.FieldSet({ - title : _('ID_CHANGE_PASSWORD'), - items : [ - { - xtype : "textfield", - id : "currentPassword", - name : "currentPassword", - fieldLabel : _("ID_PASSWORD_CURRENT"), - inputType : "password", - hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true, - width : 260 - }, - { - id : 'USR_NEW_PASS', - fieldLabel : _('ID_NEW_PASSWORD'), - xtype : 'textfield', - inputType : 'password', - width : 260, - allowBlank : allowBlackStatus, - listeners: { - blur : function(ob) - { - Ext.getCmp('saveB').disable(); - Ext.getCmp('cancelB').disable(); - var spanAjax = ''; - var imageAjax = ''; - var labelAjax = _('ID_PASSWORD_TESTING'); - - Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '', false); - Ext.getCmp('passwordReview').setVisible(true); - - var passwordText = this.getValue(); - - Ext.Ajax.request({ - url : 'usersAjax', - method:'POST', - params : { - 'action' : 'testPassword', - 'PASSWORD_TEXT' : passwordText + if (MODE == "edit") { + var informationFields = new Ext.form.FieldSet({ + title : _('ID_PERSONAL_INFORMATION'), + items : [ + { + id : 'USR_FIRSTNAME', + fieldLabel : _('ID_FIRSTNAME'), + xtype : 'textfield', + width : 260, + allowBlank : false }, - success: function(r,o){ - var resp = Ext.util.JSON.decode(r.responseText); + { + id : 'USR_LASTNAME', + fieldLabel : _('ID_LASTNAME'), + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + id : 'USR_USERNAME', + fieldLabel : _('ID_USER_ID'), + xtype : 'textfield', + width : 260, + allowBlank : false, + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, + listeners: { + blur : function(ob) + { + // trim + this.value = this.getValue().replace(/^\s+|\s+$/g,""); + document.getElementById('USR_USERNAME').value = this.getValue().replace(/^\s+|\s+$/g,""); - if (resp.STATUS) { - flagPoliciesPassword = true; - } else { - flagPoliciesPassword = false; + Ext.getCmp('saveB').disable(); + Ext.getCmp('cancelB').disable(); + + var spanAjax = ''; + var imageAjax = ''; + var labelAjax = _('ID_USERNAME_TESTING'); + + Ext.getCmp('usernameReview').setText(spanAjax + imageAjax + labelAjax + '', false); + Ext.getCmp('usernameReview').setVisible(true); + + usernameText = this.getValue(); + + validateUserName(); + + Ext.getCmp('usernameReview').setVisible(true); + } } - - Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false); - Ext.getCmp('saveB').enable(); - Ext.getCmp('cancelB').enable(); }, - failure: function () { - Ext.MessageBox.show({ - title: _('ID_ERROR'), - msg: _('ID_FAILED_STORE_DATA'), - buttons: Ext.MessageBox.OK, - animEl: 'mb9', - icon: Ext.MessageBox.ERROR - }); - Ext.getCmp('saveB').enable(); - Ext.getCmp('cancelB').enable(); + { + xtype: 'label', + fieldLabel: ' ', + id:'usernameReview', + width: 300, + labelSeparator: '' + }, + { + id : 'USR_EMAIL', + fieldLabel : _('ID_EMAIL'), + vtype : 'email', + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + xtype : 'textarea', + name : 'USR_ADDRESS', + fieldLabel : _('ID_ADDRESS'), + labelSeparator : '', + height : 50, + width : 260 + }, + { + id : 'USR_ZIP_CODE', + fieldLabel : _('ID_ZIP_CODE'), + xtype : 'textfield', + width : 260 + }, + comboCountry, + comboRegion, + comboLocation, + { + id : 'USR_PHONE', + fieldLabel : _('ID_PHONE'), + xtype : 'textfield', + width : 260 + }, + { + id : 'USR_POSITION', + fieldLabel : _('ID_POSITION'), + xtype : 'textfield', + width : 260 + }, + comboReplacedBy, + dateField, + comboCalendar, + comboStatus, + comboRole + ] + }); + + var passwordFields = new Ext.form.FieldSet({ + title : _('ID_CHANGE_PASSWORD'), + items : [ + { + xtype : "textfield", + id : "currentPassword", + name : "currentPassword", + fieldLabel : _("ID_PASSWORD_CURRENT"), + inputType : "password", + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true, + width : 260 + }, + { + id : 'USR_NEW_PASS', + fieldLabel : _('ID_NEW_PASSWORD'), + xtype : 'textfield', + inputType : 'password', + width : 260, + allowBlank : allowBlackStatus, + listeners: { + blur : function(ob) + { + Ext.getCmp('saveB').disable(); + Ext.getCmp('cancelB').disable(); + var spanAjax = ''; + var imageAjax = ''; + var labelAjax = _('ID_PASSWORD_TESTING'); + + Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '', false); + Ext.getCmp('passwordReview').setVisible(true); + + var passwordText = this.getValue(); + + Ext.Ajax.request({ + url : 'usersAjax', + method:'POST', + params : { + 'action' : 'testPassword', + 'PASSWORD_TEXT' : passwordText + }, + success: function(r,o){ + var resp = Ext.util.JSON.decode(r.responseText); + + if (resp.STATUS) { + flagPoliciesPassword = true; + } else { + flagPoliciesPassword = false; + } + + Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false); + Ext.getCmp('saveB').enable(); + Ext.getCmp('cancelB').enable(); + }, + failure: function () { + Ext.MessageBox.show({ + title: _('ID_ERROR'), + msg: _('ID_FAILED_STORE_DATA'), + buttons: Ext.MessageBox.OK, + animEl: 'mb9', + icon: Ext.MessageBox.ERROR + }); + Ext.getCmp('saveB').enable(); + Ext.getCmp('cancelB').enable(); + } + }); + + Ext.getCmp('passwordReview').setVisible(true); + + if (Ext.getCmp('USR_CNF_PASS').getValue() != '') { + userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur'); + } + + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'passwordReview', + width: 300, + labelSeparator: '' + }, + { + id : 'USR_CNF_PASS', + fieldLabel : _('ID_CONFIRM_PASSWORD'), + xtype : 'textfield', + inputType : 'password', + width : 260, + allowBlank : allowBlackStatus, + listeners: { + blur : function(ob) + { + var passwordText = Ext.getCmp('USR_NEW_PASS').getValue(); + var passwordConfirm = this.getValue(); + + if (passwordText != passwordConfirm) { + var spanErrorConfirm = ''; + var imageErrorConfirm = ''; + var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS'); + + Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '', false); + Ext.getCmp('passwordConfirm').setVisible(true); + } else { + Ext.getCmp('passwordConfirm').setVisible(false); + } + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'passwordConfirm', + width: 300, + labelSeparator: '' } - }); - Ext.getCmp('passwordReview').setVisible(true); + ] + }); + }else{ + var informationFields = new Ext.form.FieldSet({ + title : _('ID_PERSONAL_INFORMATION'), + items : [ + { + id : 'USR_FIRSTNAME', + fieldLabel : ' * ' + _('ID_FIRSTNAME'), + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + id : 'USR_LASTNAME', + fieldLabel : ' * ' + _('ID_LASTNAME'), + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + id : 'USR_USERNAME', + fieldLabel : ' * ' + _('ID_USER_ID'), + xtype : 'textfield', + width : 260, + allowBlank : false, + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, + listeners: { + blur : function(ob) + { + // trim + this.value = this.getValue().replace(/^\s+|\s+$/g,""); + document.getElementById('USR_USERNAME').value = this.getValue().replace(/^\s+|\s+$/g,""); - if (Ext.getCmp('USR_CNF_PASS').getValue() != '') { - userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur'); + Ext.getCmp('saveB').disable(); + Ext.getCmp('cancelB').disable(); + + var spanAjax = ''; + var imageAjax = ''; + var labelAjax = _('ID_USERNAME_TESTING'); + + Ext.getCmp('usernameReview').setText(spanAjax + imageAjax + labelAjax + '', false); + Ext.getCmp('usernameReview').setVisible(true); + + usernameText = this.getValue(); + + validateUserName(); + + Ext.getCmp('usernameReview').setVisible(true); + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'usernameReview', + width: 300, + labelSeparator: '' + }, + { + id : 'USR_EMAIL', + fieldLabel : ' * ' + _('ID_EMAIL'), + vtype : 'email', + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + xtype : 'textarea', + name : 'USR_ADDRESS', + fieldLabel : _('ID_ADDRESS'), + labelSeparator : '', + height : 50, + width : 260 + }, + { + id : 'USR_ZIP_CODE', + fieldLabel : _('ID_ZIP_CODE'), + xtype : 'textfield', + width : 260 + }, + comboCountry, + comboRegion, + comboLocation, + { + id : 'USR_PHONE', + fieldLabel : _('ID_PHONE'), + xtype : 'textfield', + width : 260 + }, + { + id : 'USR_POSITION', + fieldLabel : _('ID_POSITION'), + xtype : 'textfield', + width : 260 + }, + comboReplacedBy, + dateField, + comboCalendar, + comboStatus, + comboRole + ] + }); + + var passwordFields = new Ext.form.FieldSet({ + title : _('ID_CHANGE_PASSWORD'), + items : [ + { + xtype : "textfield", + id : "currentPassword", + name : "currentPassword", + fieldLabel : _("ID_PASSWORD_CURRENT"), + inputType : "password", + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true, + width : 260 + }, + { + id : 'USR_NEW_PASS', + fieldLabel : ' * ' + _('ID_NEW_PASSWORD'), + xtype : 'textfield', + inputType : 'password', + width : 260, + allowBlank : allowBlackStatus, + listeners: { + blur : function(ob) + { + Ext.getCmp('saveB').disable(); + Ext.getCmp('cancelB').disable(); + var spanAjax = ''; + var imageAjax = ''; + var labelAjax = _('ID_PASSWORD_TESTING'); + + Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '', false); + Ext.getCmp('passwordReview').setVisible(true); + + var passwordText = this.getValue(); + + Ext.Ajax.request({ + url : 'usersAjax', + method:'POST', + params : { + 'action' : 'testPassword', + 'PASSWORD_TEXT' : passwordText + }, + success: function(r,o){ + var resp = Ext.util.JSON.decode(r.responseText); + + if (resp.STATUS) { + flagPoliciesPassword = true; + } else { + flagPoliciesPassword = false; + } + + Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false); + Ext.getCmp('saveB').enable(); + Ext.getCmp('cancelB').enable(); + }, + failure: function () { + Ext.MessageBox.show({ + title: _('ID_ERROR'), + msg: _('ID_FAILED_STORE_DATA'), + buttons: Ext.MessageBox.OK, + animEl: 'mb9', + icon: Ext.MessageBox.ERROR + }); + Ext.getCmp('saveB').enable(); + Ext.getCmp('cancelB').enable(); + } + }); + + Ext.getCmp('passwordReview').setVisible(true); + + if (Ext.getCmp('USR_CNF_PASS').getValue() != '') { + userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur'); + } + + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'passwordReview', + width: 300, + labelSeparator: '' + }, + { + id : 'USR_CNF_PASS', + fieldLabel : ' * ' + _('ID_CONFIRM_PASSWORD'), + xtype : 'textfield', + inputType : 'password', + width : 260, + allowBlank : allowBlackStatus, + listeners: { + blur : function(ob) + { + var passwordText = Ext.getCmp('USR_NEW_PASS').getValue(); + var passwordConfirm = this.getValue(); + + if (passwordText != passwordConfirm) { + var spanErrorConfirm = ''; + var imageErrorConfirm = ''; + var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS'); + + Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '', false); + Ext.getCmp('passwordConfirm').setVisible(true); + } else { + Ext.getCmp('passwordConfirm').setVisible(false); + } + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'passwordConfirm', + width: 300, + labelSeparator: '' } - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordReview', - width: 300, - labelSeparator: '' - }, - { - id : 'USR_CNF_PASS', - fieldLabel : _('ID_CONFIRM_PASSWORD'), - xtype : 'textfield', - inputType : 'password', - width : 260, - allowBlank : allowBlackStatus, - listeners: { - blur : function(ob) - { - var passwordText = Ext.getCmp('USR_NEW_PASS').getValue(); - var passwordConfirm = this.getValue(); - - if (passwordText != passwordConfirm) { - var spanErrorConfirm = ''; - var imageErrorConfirm = ''; - var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS'); - - Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '', false); - Ext.getCmp('passwordConfirm').setVisible(true); - } else { - Ext.getCmp('passwordConfirm').setVisible(false); - } - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordConfirm', - width: 300, - labelSeparator: '' + ] + }); } - - ] - }); var accountOptions = new Ext.form.FieldSet({ title: _('ID_ACCOUNT_OPTIONS'), From adac6d724f2b51101a36033a949982ad0c22dfa4 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Tue, 10 Mar 2015 09:40:29 -0400 Subject: [PATCH 2/6] PM-1740 Admin>User>New: El field Last Name es "required" sin embargo no tiene asterisco rojo Causa: Definicion previa. Solucion: Hacer que estes campos tambien tenga esa caracteristica. Nota.- Son requeridos solo en caso de creacion de un nuevo usuario en caso de edicion ya no se muestran como requeridos. --- workflow/engine/templates/users/users.js | 642 ++++++++--------------- 1 file changed, 210 insertions(+), 432 deletions(-) diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index fbe416470..b201f758b 100755 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -401,447 +401,225 @@ Ext.onReady(function () { mode : 'local' }); - if (MODE == "edit") { - var informationFields = new Ext.form.FieldSet({ - title : _('ID_PERSONAL_INFORMATION'), - items : [ - { - id : 'USR_FIRSTNAME', - fieldLabel : _('ID_FIRSTNAME'), - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - id : 'USR_LASTNAME', - fieldLabel : _('ID_LASTNAME'), - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - id : 'USR_USERNAME', - fieldLabel : _('ID_USER_ID'), - xtype : 'textfield', - width : 260, - allowBlank : false, - hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, - listeners: { - blur : function(ob) - { - // trim - this.value = this.getValue().replace(/^\s+|\s+$/g,""); - document.getElementById('USR_USERNAME').value = this.getValue().replace(/^\s+|\s+$/g,""); - - Ext.getCmp('saveB').disable(); - Ext.getCmp('cancelB').disable(); - - var spanAjax = ''; - var imageAjax = ''; - var labelAjax = _('ID_USERNAME_TESTING'); - - Ext.getCmp('usernameReview').setText(spanAjax + imageAjax + labelAjax + '', false); - Ext.getCmp('usernameReview').setVisible(true); - - usernameText = this.getValue(); - - validateUserName(); - - Ext.getCmp('usernameReview').setVisible(true); - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'usernameReview', - width: 300, - labelSeparator: '' - }, - { - id : 'USR_EMAIL', - fieldLabel : _('ID_EMAIL'), - vtype : 'email', - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - xtype : 'textarea', - name : 'USR_ADDRESS', - fieldLabel : _('ID_ADDRESS'), - labelSeparator : '', - height : 50, - width : 260 - }, - { - id : 'USR_ZIP_CODE', - fieldLabel : _('ID_ZIP_CODE'), - xtype : 'textfield', - width : 260 - }, - comboCountry, - comboRegion, - comboLocation, - { - id : 'USR_PHONE', - fieldLabel : _('ID_PHONE'), - xtype : 'textfield', - width : 260 - }, - { - id : 'USR_POSITION', - fieldLabel : _('ID_POSITION'), - xtype : 'textfield', - width : 260 - }, - comboReplacedBy, - dateField, - comboCalendar, - comboStatus, - comboRole - ] - }); - - var passwordFields = new Ext.form.FieldSet({ - title : _('ID_CHANGE_PASSWORD'), - items : [ - { - xtype : "textfield", - id : "currentPassword", - name : "currentPassword", - fieldLabel : _("ID_PASSWORD_CURRENT"), - inputType : "password", - hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true, - width : 260 - }, - { - id : 'USR_NEW_PASS', - fieldLabel : _('ID_NEW_PASSWORD'), - xtype : 'textfield', - inputType : 'password', - width : 260, - allowBlank : allowBlackStatus, - listeners: { - blur : function(ob) - { - Ext.getCmp('saveB').disable(); - Ext.getCmp('cancelB').disable(); - var spanAjax = ''; - var imageAjax = ''; - var labelAjax = _('ID_PASSWORD_TESTING'); - - Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '', false); - Ext.getCmp('passwordReview').setVisible(true); - - var passwordText = this.getValue(); - - Ext.Ajax.request({ - url : 'usersAjax', - method:'POST', - params : { - 'action' : 'testPassword', - 'PASSWORD_TEXT' : passwordText - }, - success: function(r,o){ - var resp = Ext.util.JSON.decode(r.responseText); - - if (resp.STATUS) { - flagPoliciesPassword = true; - } else { - flagPoliciesPassword = false; - } - - Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false); - Ext.getCmp('saveB').enable(); - Ext.getCmp('cancelB').enable(); - }, - failure: function () { - Ext.MessageBox.show({ - title: _('ID_ERROR'), - msg: _('ID_FAILED_STORE_DATA'), - buttons: Ext.MessageBox.OK, - animEl: 'mb9', - icon: Ext.MessageBox.ERROR - }); - Ext.getCmp('saveB').enable(); - Ext.getCmp('cancelB').enable(); - } - }); - - Ext.getCmp('passwordReview').setVisible(true); - - if (Ext.getCmp('USR_CNF_PASS').getValue() != '') { - userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur'); - } - - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordReview', - width: 300, - labelSeparator: '' - }, - { - id : 'USR_CNF_PASS', - fieldLabel : _('ID_CONFIRM_PASSWORD'), - xtype : 'textfield', - inputType : 'password', - width : 260, - allowBlank : allowBlackStatus, - listeners: { - blur : function(ob) - { - var passwordText = Ext.getCmp('USR_NEW_PASS').getValue(); - var passwordConfirm = this.getValue(); - - if (passwordText != passwordConfirm) { - var spanErrorConfirm = ''; - var imageErrorConfirm = ''; - var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS'); - - Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '', false); - Ext.getCmp('passwordConfirm').setVisible(true); - } else { - Ext.getCmp('passwordConfirm').setVisible(false); - } - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordConfirm', - width: 300, - labelSeparator: '' - } - - ] - }); - }else{ - var informationFields = new Ext.form.FieldSet({ - title : _('ID_PERSONAL_INFORMATION'), - items : [ + var informationFields = new Ext.form.FieldSet({ + title : _('ID_PERSONAL_INFORMATION'), + items : [ + { + id : 'USR_FIRSTNAME', + fieldLabel : MODE == 'edit' ? _('ID_FIRSTNAME') : ' * ' + _('ID_FIRSTNAME'), + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + id : 'USR_LASTNAME', + fieldLabel : MODE == 'edit' ? _('ID_LASTNAME') : ' * ' + _('ID_LASTNAME'), + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + id : 'USR_USERNAME', + fieldLabel : MODE == 'edit' ? _('ID_USER_ID') : ' * ' + _('ID_USER_ID'), + xtype : 'textfield', + width : 260, + allowBlank : false, + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, + listeners: { + blur : function(ob) { - id : 'USR_FIRSTNAME', - fieldLabel : ' * ' + _('ID_FIRSTNAME'), - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - id : 'USR_LASTNAME', - fieldLabel : ' * ' + _('ID_LASTNAME'), - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - id : 'USR_USERNAME', - fieldLabel : ' * ' + _('ID_USER_ID'), - xtype : 'textfield', - width : 260, - allowBlank : false, - hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, - listeners: { - blur : function(ob) - { - // trim - this.value = this.getValue().replace(/^\s+|\s+$/g,""); - document.getElementById('USR_USERNAME').value = this.getValue().replace(/^\s+|\s+$/g,""); + // trim + this.value = this.getValue().replace(/^\s+|\s+$/g,""); + document.getElementById('USR_USERNAME').value = this.getValue().replace(/^\s+|\s+$/g,""); - Ext.getCmp('saveB').disable(); - Ext.getCmp('cancelB').disable(); + Ext.getCmp('saveB').disable(); + Ext.getCmp('cancelB').disable(); - var spanAjax = ''; - var imageAjax = ''; - var labelAjax = _('ID_USERNAME_TESTING'); + var spanAjax = ''; + var imageAjax = ''; + var labelAjax = _('ID_USERNAME_TESTING'); - Ext.getCmp('usernameReview').setText(spanAjax + imageAjax + labelAjax + '', false); - Ext.getCmp('usernameReview').setVisible(true); + Ext.getCmp('usernameReview').setText(spanAjax + imageAjax + labelAjax + '', false); + Ext.getCmp('usernameReview').setVisible(true); - usernameText = this.getValue(); + usernameText = this.getValue(); - validateUserName(); + validateUserName(); - Ext.getCmp('usernameReview').setVisible(true); - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'usernameReview', - width: 300, - labelSeparator: '' - }, - { - id : 'USR_EMAIL', - fieldLabel : ' * ' + _('ID_EMAIL'), - vtype : 'email', - xtype : 'textfield', - width : 260, - allowBlank : false - }, - { - xtype : 'textarea', - name : 'USR_ADDRESS', - fieldLabel : _('ID_ADDRESS'), - labelSeparator : '', - height : 50, - width : 260 - }, - { - id : 'USR_ZIP_CODE', - fieldLabel : _('ID_ZIP_CODE'), - xtype : 'textfield', - width : 260 - }, - comboCountry, - comboRegion, - comboLocation, - { - id : 'USR_PHONE', - fieldLabel : _('ID_PHONE'), - xtype : 'textfield', - width : 260 - }, - { - id : 'USR_POSITION', - fieldLabel : _('ID_POSITION'), - xtype : 'textfield', - width : 260 - }, - comboReplacedBy, - dateField, - comboCalendar, - comboStatus, - comboRole - ] - }); - - var passwordFields = new Ext.form.FieldSet({ - title : _('ID_CHANGE_PASSWORD'), - items : [ - { - xtype : "textfield", - id : "currentPassword", - name : "currentPassword", - fieldLabel : _("ID_PASSWORD_CURRENT"), - inputType : "password", - hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true, - width : 260 - }, - { - id : 'USR_NEW_PASS', - fieldLabel : ' * ' + _('ID_NEW_PASSWORD'), - xtype : 'textfield', - inputType : 'password', - width : 260, - allowBlank : allowBlackStatus, - listeners: { - blur : function(ob) - { - Ext.getCmp('saveB').disable(); - Ext.getCmp('cancelB').disable(); - var spanAjax = ''; - var imageAjax = ''; - var labelAjax = _('ID_PASSWORD_TESTING'); - - Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '', false); - Ext.getCmp('passwordReview').setVisible(true); - - var passwordText = this.getValue(); - - Ext.Ajax.request({ - url : 'usersAjax', - method:'POST', - params : { - 'action' : 'testPassword', - 'PASSWORD_TEXT' : passwordText - }, - success: function(r,o){ - var resp = Ext.util.JSON.decode(r.responseText); - - if (resp.STATUS) { - flagPoliciesPassword = true; - } else { - flagPoliciesPassword = false; - } - - Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false); - Ext.getCmp('saveB').enable(); - Ext.getCmp('cancelB').enable(); - }, - failure: function () { - Ext.MessageBox.show({ - title: _('ID_ERROR'), - msg: _('ID_FAILED_STORE_DATA'), - buttons: Ext.MessageBox.OK, - animEl: 'mb9', - icon: Ext.MessageBox.ERROR - }); - Ext.getCmp('saveB').enable(); - Ext.getCmp('cancelB').enable(); - } - }); - - Ext.getCmp('passwordReview').setVisible(true); - - if (Ext.getCmp('USR_CNF_PASS').getValue() != '') { - userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur'); - } - - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordReview', - width: 300, - labelSeparator: '' - }, - { - id : 'USR_CNF_PASS', - fieldLabel : ' * ' + _('ID_CONFIRM_PASSWORD'), - xtype : 'textfield', - inputType : 'password', - width : 260, - allowBlank : allowBlackStatus, - listeners: { - blur : function(ob) - { - var passwordText = Ext.getCmp('USR_NEW_PASS').getValue(); - var passwordConfirm = this.getValue(); - - if (passwordText != passwordConfirm) { - var spanErrorConfirm = ''; - var imageErrorConfirm = ''; - var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS'); - - Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '', false); - Ext.getCmp('passwordConfirm').setVisible(true); - } else { - Ext.getCmp('passwordConfirm').setVisible(false); - } - } - } - }, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordConfirm', - width: 300, - labelSeparator: '' + Ext.getCmp('usernameReview').setVisible(true); } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'usernameReview', + width: 300, + labelSeparator: '' + }, + { + id : 'USR_EMAIL', + fieldLabel : MODE == 'edit' ? _('ID_EMAIL') : ' * ' + _('ID_EMAIL'), + vtype : 'email', + xtype : 'textfield', + width : 260, + allowBlank : false + }, + { + xtype : 'textarea', + name : 'USR_ADDRESS', + fieldLabel : _('ID_ADDRESS'), + labelSeparator : '', + height : 50, + width : 260 + }, + { + id : 'USR_ZIP_CODE', + fieldLabel : _('ID_ZIP_CODE'), + xtype : 'textfield', + width : 260 + }, + comboCountry, + comboRegion, + comboLocation, + { + id : 'USR_PHONE', + fieldLabel : _('ID_PHONE'), + xtype : 'textfield', + width : 260 + }, + { + id : 'USR_POSITION', + fieldLabel : _('ID_POSITION'), + xtype : 'textfield', + width : 260 + }, + comboReplacedBy, + dateField, + comboCalendar, + comboStatus, + comboRole + ] + }); - ] - }); - } + var passwordFields = new Ext.form.FieldSet({ + title : _('ID_CHANGE_PASSWORD'), + items : [ + { + xtype : "textfield", + id : "currentPassword", + name : "currentPassword", + fieldLabel : _("ID_PASSWORD_CURRENT"), + inputType : "password", + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true, + width : 260 + }, + { + id : 'USR_NEW_PASS', + fieldLabel : MODE == 'edit' ? _('ID_NEW_PASSWORD') : ' * ' + _('ID_NEW_PASSWORD'), + xtype : 'textfield', + inputType : 'password', + width : 260, + allowBlank : allowBlackStatus, + listeners: { + blur : function(ob) + { + Ext.getCmp('saveB').disable(); + Ext.getCmp('cancelB').disable(); + var spanAjax = ''; + var imageAjax = ''; + var labelAjax = _('ID_PASSWORD_TESTING'); + + Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '', false); + Ext.getCmp('passwordReview').setVisible(true); + + var passwordText = this.getValue(); + + Ext.Ajax.request({ + url : 'usersAjax', + method:'POST', + params : { + 'action' : 'testPassword', + 'PASSWORD_TEXT' : passwordText + }, + success: function(r,o){ + var resp = Ext.util.JSON.decode(r.responseText); + + if (resp.STATUS) { + flagPoliciesPassword = true; + } else { + flagPoliciesPassword = false; + } + + Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false); + Ext.getCmp('saveB').enable(); + Ext.getCmp('cancelB').enable(); + }, + failure: function () { + Ext.MessageBox.show({ + title: _('ID_ERROR'), + msg: _('ID_FAILED_STORE_DATA'), + buttons: Ext.MessageBox.OK, + animEl: 'mb9', + icon: Ext.MessageBox.ERROR + }); + Ext.getCmp('saveB').enable(); + Ext.getCmp('cancelB').enable(); + } + }); + + Ext.getCmp('passwordReview').setVisible(true); + + if (Ext.getCmp('USR_CNF_PASS').getValue() != '') { + userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur'); + } + + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'passwordReview', + width: 300, + labelSeparator: '' + }, + { + id : 'USR_CNF_PASS', + fieldLabel : MODE == 'edit' ? _('ID_CONFIRM_PASSWORD') : ' * ' + _('ID_CONFIRM_PASSWORD'), + xtype : 'textfield', + inputType : 'password', + width : 260, + allowBlank : allowBlackStatus, + listeners: { + blur : function(ob) + { + var passwordText = Ext.getCmp('USR_NEW_PASS').getValue(); + var passwordConfirm = this.getValue(); + + if (passwordText != passwordConfirm) { + var spanErrorConfirm = ''; + var imageErrorConfirm = ''; + var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS'); + + Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '', false); + Ext.getCmp('passwordConfirm').setVisible(true); + } else { + Ext.getCmp('passwordConfirm').setVisible(false); + } + } + } + }, + { + xtype: 'label', + fieldLabel: ' ', + id:'passwordConfirm', + width: 300, + labelSeparator: '' + } + + ] + }); var accountOptions = new Ext.form.FieldSet({ title: _('ID_ACCOUNT_OPTIONS'), From 54e01ad68ef39cf20fb0d397723bae9238bdb2da Mon Sep 17 00:00:00 2001 From: dheeyi Date: Tue, 10 Mar 2015 11:41:06 -0400 Subject: [PATCH 3/6] PM-1740 Admin>User>New: El field Last Name es "required" sin embargo no tiene asterisco rojo Causa: Definicion previa. Solucion: Hacer que estes campos tambien tenga esa caracteristica. Nota.- Son requeridos solo en caso de creacion de un nuevo usuario en caso de edicion ya no se muestran como requeridos. --- workflow/engine/templates/users/users.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index b201f758b..fbbc00315 100755 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -400,7 +400,7 @@ Ext.onReady(function () { triggerAction : 'all', mode : 'local' }); - + var informationFields = new Ext.form.FieldSet({ title : _('ID_PERSONAL_INFORMATION'), items : [ @@ -413,7 +413,7 @@ Ext.onReady(function () { }, { id : 'USR_LASTNAME', - fieldLabel : MODE == 'edit' ? _('ID_LASTNAME') : ' * ' + _('ID_LASTNAME'), + fieldLabel : ' * ' + _('ID_LASTNAME'), xtype : 'textfield', width : 260, allowBlank : false From 4240d8aff27d5d1df67f870ea96cf86b837bcafd Mon Sep 17 00:00:00 2001 From: dheeyi Date: Tue, 10 Mar 2015 12:00:50 -0400 Subject: [PATCH 4/6] PM-1740 Admin>User>New: El field Last Name es "required" sin embargo no tiene asterisco rojo Causa: Definicion previa. Solucion: Hacer que estes campos tambien tenga esa caracteristica. Nota.- Son requeridos solo en caso de creacion de un nuevo usuario en caso de edicion ya no se muestran como requeridos. --- workflow/engine/templates/users/users.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index fbbc00315..4f56e47a6 100755 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -406,7 +406,7 @@ Ext.onReady(function () { items : [ { id : 'USR_FIRSTNAME', - fieldLabel : MODE == 'edit' ? _('ID_FIRSTNAME') : ' * ' + _('ID_FIRSTNAME'), + fieldLabel : ' * ' + _('ID_FIRSTNAME'), xtype : 'textfield', width : 260, allowBlank : false @@ -420,7 +420,7 @@ Ext.onReady(function () { }, { id : 'USR_USERNAME', - fieldLabel : MODE == 'edit' ? _('ID_USER_ID') : ' * ' + _('ID_USER_ID'), + fieldLabel : ' * ' + _('ID_USER_ID'), xtype : 'textfield', width : 260, allowBlank : false, @@ -459,7 +459,7 @@ Ext.onReady(function () { }, { id : 'USR_EMAIL', - fieldLabel : MODE == 'edit' ? _('ID_EMAIL') : ' * ' + _('ID_EMAIL'), + fieldLabel : ' * ' + _('ID_EMAIL'), vtype : 'email', xtype : 'textfield', width : 260, From 148a68f9b8a9526bee7b6de54fac56d4dd30d9d8 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Tue, 10 Mar 2015 12:53:40 -0400 Subject: [PATCH 5/6] PM-1705 El boton "Search"del listado de CaseScheduler no esta estandarizado con las listas de Dynaform, InputDocuments, OutputDocuments,Triggers y DataBaseConnections. causa : Definicion previa de esa manera. solucion : Llevar al formato que tienen los demas componentes. --- workflow/engine/xmlform/cases/cases_Scheduler_Options.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml b/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml index f6d106c00..204d7af83 100755 --- a/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml +++ b/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml @@ -10,8 +10,7 @@ - - + Date: Tue, 10 Mar 2015 13:00:10 -0400 Subject: [PATCH 6/6] PM-1705 El boton "Search"del listado de CaseScheduler no esta estandarizado con las listas de Dynaform, InputDocuments, OutputDocuments,Triggers y DataBaseConnections. causa : Definicion previa de esa manera. solucion : Llevar al formato que tienen los demas componentes. --- .../engine/xmlform/cases/cases_Scheduler_Options.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml b/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml index 204d7af83..9ec9bd11c 100755 --- a/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml +++ b/workflow/engine/xmlform/cases/cases_Scheduler_Options.xml @@ -17,8 +17,8 @@ function $_GET(q,s) { var re = new RegExp('&'+q+'=([^&]*)','i'); return (s=s.replace(/^\?/,'&').match(re)) ? s=s[1] : s=''; } -function newScheduler() { - window.location = 'cases_Scheduler_New?PRO_UID='+$_GET('PRO_UID'); return false; +function newScheduler() { + window.location = 'cases_Scheduler_New?PRO_UID='+$_GET('PRO_UID'); return false; } function casesSchedulerDelete(schUID,proUid) { @@ -29,9 +29,9 @@ function casesSchedulerDelete(schUID,proUid) { } function editCaseScheduler(SCH_UID,PRO_UID) -{ - window.location = 'cases_Scheduler_Edit?SCH_UID='+SCH_UID+'&PRO_UID='+PRO_UID; - return false; +{ + window.location = 'cases_Scheduler_Edit?SCH_UID='+SCH_UID+'&PRO_UID='+PRO_UID; + return false; } ]]>