BUG_12828 When not choosing a ldap provider an error is displayed

When not choosing a ldap provider and pressing continue, an error is displayed and it`s text says "File: Edit.xml not exists.".
This commit is contained in:
norahmollo
2014-06-18 10:06:34 -04:00
parent bdd98c2d6b
commit 1cb28a9a02

View File

@@ -93,36 +93,38 @@ var cboxAuthSourse = new Ext.form.ComboBox({
else else
window.location = 'authSources_New?AUTH_SOURCE_PROVIDER='+formAuthSourceOptoins.getForm().findField('AUTH_SOURCE_PROVIDER').getValue(); window.location = 'authSources_New?AUTH_SOURCE_PROVIDER='+formAuthSourceOptoins.getForm().findField('AUTH_SOURCE_PROVIDER').getValue();
return false;*/ return false;*/
formAuthSourceOptoins.getForm().submit({ if (formAuthSourceOptoins.getForm().findField('AUTH_SOURCE_PROVIDER').getValue() != '') {
waitTitle : " ", formAuthSourceOptoins.getForm().submit({
url: '../adminProxy/testingOption', waitTitle : " ",
params: { url: '../adminProxy/testingOption',
action : 'test', params: {
optionAuthS: formAuthSourceOptoins.getForm().findField('AUTH_SOURCE_PROVIDER').getValue() action : 'test',
}, optionAuthS: formAuthSourceOptoins.getForm().findField('AUTH_SOURCE_PROVIDER').getValue()
method: 'POST', },
waitMsg : _('ID_LOADING_GRID'), method: 'POST',
timeout : 500, waitMsg : _('ID_LOADING_GRID'),
success: function(f,a){ timeout : 500,
resp = Ext.util.JSON.decode(a.response.responseText); success: function(f,a){
// alert(resp.optionAuthS);return false; resp = Ext.util.JSON.decode(a.response.responseText);
// alert(resp.sUID);return false; if (resp.success) {
if (resp.success){ if (resp.optionAuthS=='ldap') {
if(resp.optionAuthS=='ldap') window.location = 'authSources_kindof?sprovider='+resp.optionAuthS;
// window.location = 'authSources_kindof?sUID='+resp.sUID+'&sprovider='+resp.optionAuthS; } else {
window.location = 'authSources_kindof?sprovider='+resp.optionAuthS; window.location = 'authSources_New?AUTH_SOURCE_PROVIDER='+resp.optionAuthS;
else }
window.location = 'authSources_New?AUTH_SOURCE_PROVIDER='+resp.optionAuthS; }
}
}, },
failure: function(f,a){ failure: function(f,a){
if (a.failureType === Ext.form.Action.CONNECT_FAILURE){ if (a.failureType === Ext.form.Action.CONNECT_FAILURE){
Ext.Msg.alert( _('ID_FAILURE'), _('ID_SERVER_REPORTED')+':'+a.response.status+' '+a.response.statusText); Ext.Msg.alert( _('ID_FAILURE'), _('ID_SERVER_REPORTED')+':'+a.response.status+' '+a.response.statusText);
} }
if (a.failureType === Ext.form.Action.SERVER_INVALID){ if (a.failureType === Ext.form.Action.SERVER_INVALID){
Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR')); Ext.Msg.alert( _('ID_WARNING'), _('ID_YOU_HAVE_ERROR'));
} }
}
});
} else {
Ext.Msg.alert( _('ID_FAILURE'), _('ID_CHOOSE_PROVIDER'));
} }
});
} }