mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-12-22 02:49:01 +00:00
Fixed setting progress header in case of error
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
parent
3c132ba2e8
commit
9f1593d1c2
@ -82,7 +82,7 @@ class PatchFetcher {
|
||||
} catch (error) {
|
||||
try {
|
||||
if (response.error || response.success === false) {
|
||||
document.getElementById('patchtester-progress-header').innerText(Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED'));
|
||||
document.getElementById('patchtester-progress-header').innerText = Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED');
|
||||
document.getElementById('patchtester-progress-message').innerHTML = Joomla.sanitizeHtml(response.message);
|
||||
}
|
||||
} catch (ignore) {
|
||||
@ -90,7 +90,7 @@ class PatchFetcher {
|
||||
error = Joomla.JText._('COM_PATCHTESTER_NO_ERROR_RETURNED');
|
||||
}
|
||||
|
||||
document.getElementById('patchtester-progress-header').innerText(Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED'));
|
||||
document.getElementById('patchtester-progress-header').innerText = Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED');
|
||||
document.getElementById('patchtester-progress-message').innerHTML = Joomla.sanitizeHtml(error);
|
||||
document.getElementById('progress').remove();
|
||||
}
|
||||
@ -99,7 +99,7 @@ class PatchFetcher {
|
||||
},
|
||||
onError: (jqXHR) => {
|
||||
const json = (typeof jqXHR === 'object' && jqXHR.responseText) ? jqXHR.responseText : null;
|
||||
document.getElementById('patchtester-progress-header').innerText(Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED'));
|
||||
document.getElementById('patchtester-progress-header').innerText = Joomla.JText._('COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED');
|
||||
document.getElementById('patchtester-progress-message').innerHTML = Joomla.sanitizeHtml(json);
|
||||
document.getElementById('progress').remove();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user