From 1a59498713e84aa8f55a5a7862ceec09475cb9ef Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Tue, 18 Dec 2012 15:31:34 -0400 Subject: [PATCH] BUG 10211 No existe validacion en la opcion "Base Skin", el mismo puede guardarse sin seleccionar el skin de base SOLVED - Error in form validation - Fix error in the form validation --- workflow/engine/templates/setup/skinList.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/workflow/engine/templates/setup/skinList.js b/workflow/engine/templates/setup/skinList.js index 6ef714a26..644959b2b 100755 --- a/workflow/engine/templates/setup/skinList.js +++ b/workflow/engine/templates/setup/skinList.js @@ -524,14 +524,18 @@ newSkin = function(){ PMExt.notify(_('ID_SKINS'),_('ID_SKIN_SUCCESS_CREATE')); }, failure: function(form, action) { - Ext.getCmp("newDialog").destroy(); - - if( !action.result ) { - Ext.MessageBox.alert("error", action.response.responseText); + if (typeof(action.failureType) != 'undefined') { + Ext.MessageBox.alert("error", _('ID_REQUIRED_FIELDS_ERROR')); + newDialog.getEl().unmask(); return; + } else { + Ext.getCmp("newDialog").destroy(); + if( !action.result ) { + Ext.MessageBox.alert("error", action.response.responseText); + return; + } + Ext.MessageBox.alert("error", action.result.error); } - Ext.MessageBox.alert("error", action.result.error); - }, scope: Ext.getCmp("newform"), // add some vars to the request, similar to hidden fields