Admin>Settings>Users: En Grupos y Departamentos al querer crear con espacios en blanco no despliega mensaje de campos requerido

se aumento validacion y mensaje
This commit is contained in:
marcelo.cuiza
2015-04-24 14:34:06 -04:00
parent b30275a36d
commit d9b1c9b019
2 changed files with 12 additions and 1 deletions

View File

@@ -317,6 +317,11 @@ CloseWindow = function(){
Ext.getCmp('w').hide();
};
SaveNewDepartment = function(){
if( newForm.getForm().findField('dep_name').getValue().trim() == "") {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_DEPARTMENT_NAME")));
newForm.getForm().findField('dep_name').setValue("");
return false;
}
waitLoading.show();
var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode();
if (dep_node) dep_node.unselect();

View File

@@ -182,7 +182,13 @@ Ext.onReady(function(){
text: _("ID_SAVE"),
handler: function (btn, ev)
{
Ext.getCmp("btnCreateSave").setDisabled(true);
if( newForm.getForm().findField('name').getValue().trim() == "") {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_GROUP_NAME")));
newForm.getForm().findField('name').setValue("");
return false;
} else {
Ext.getCmp("btnCreateSave").setDisabled(true);
}
SaveNewGroupAction();
}