Merge pull request #1993 from Jennydmz/BUG-11484
BUG-11484 Campos "code" y "name" de admin->users->role permiten guardar roles con espacios en blanco.
This commit is contained in:
@@ -377,8 +377,15 @@ CloseWindow = function(){
|
||||
//Save New Role
|
||||
SaveNewRole = function(){
|
||||
rol_code = newForm.getForm().findField('code').getValue();
|
||||
rol_code.trim();
|
||||
if (rol_code == '') return;
|
||||
rol_code = rol_code.trim();
|
||||
|
||||
rol_name = newForm.getForm().findField('name').getValue();
|
||||
rol_name = rol_name.trim();
|
||||
|
||||
if (rol_code == '' || rol_name == '') {
|
||||
Ext.Msg.alert(_('ID_WARNING'),_('ID_COMPLETE_FIELDS'));
|
||||
return;
|
||||
}
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
Ext.Ajax.request({
|
||||
url: 'roles_Ajax',
|
||||
@@ -422,8 +429,15 @@ SaveNewRole = function(){
|
||||
UpdateRole = function(){
|
||||
rowSelected = infoGrid.getSelectionModel().getSelected();
|
||||
rol_code = editForm.getForm().findField('code').getValue();
|
||||
rol_code.trim();
|
||||
if (rol_code == '') return;
|
||||
rol_code = rol_code.trim();
|
||||
|
||||
rol_name = newForm.getForm().findField('name').getValue();
|
||||
rol_name = rol_name.trim();
|
||||
|
||||
if (rol_code == '' || rol_name == '') {
|
||||
Ext.Msg.alert(_('ID_WARNING'),_('ID_COMPLETE_FIELDS'));
|
||||
return;
|
||||
}
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
Ext.Ajax.request({
|
||||
url: 'roles_Ajax',
|
||||
|
||||
Reference in New Issue
Block a user