follouwp: reduce duplicate code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-05-07 13:30:50 +00:00
parent abffa1a6dc
commit e7c0216d2e

View File

@ -293,15 +293,11 @@ Ext.define('PVE.storage.Upload', {
if (xhr.responseText !== "") {
var result = Ext.decode(xhr.responseText);
result.message = msg;
var htmlStatus = Proxmox.Utils.extractRequestError(result, true);
Ext.Msg.alert(gettext('Error'), htmlStatus, function(btn) {
me.close();
});
} else {
Ext.Msg.alert(gettext('Error'), msg, function(btn) {
me.close();
});
msg = Proxmox.Utils.extractRequestError(result, true);
}
Ext.Msg.alert(gettext('Error'), msg, function(btn) {
me.close();
});
}
}, false);