Bug fix: the result of CheckToWrite() was not taken into account (action failed silently) when creating an object using the [+] button inside a form.

SVN:trunk[4056]
This commit is contained in:
Denis Flaven
2016-05-11 12:09:45 +00:00
parent 1018dc6e74
commit e388e4b163
2 changed files with 21 additions and 8 deletions

View File

@@ -381,7 +381,13 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
me.ajax_request = $.post( AddAppContext(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php'), theMap,
function(data)
{
if (me.bSelectMode)
$('#fstatus_'+me.id).html('');
if (data.id == 0)
{
$('#label_'+me.id).removeClass('ac_dlg_loading');
alert(data.error);
}
else if (me.bSelectMode)
{
// Add the newly created object to the drop-down list and select it
$('<option/>', { value : data.id }).html(data.name).appendTo('#'+me.id);