mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
Error messages are now replaced and not appended
Error messages are now replaced and not appended in the #errormessage div, without removing the glyphicon (which a .text() would have done). This way, we don't have HTML code in the JS (which would be ugly). But it's still not a really elegant solution.
This commit is contained in:
parent
a2af88a36e
commit
9687144c92
@ -535,7 +535,9 @@ function showError(message) {
|
||||
if ($('#status').length) {
|
||||
$('#status').addClass('errorMessage').text(message);
|
||||
} else {
|
||||
$('#errormessage').removeClass('hidden').append(message);
|
||||
$('#errormessage').removeClass('hidden');
|
||||
var content = $('#errormessage').contents();
|
||||
content[content.length - 1].nodeValue = message;
|
||||
}
|
||||
$('#replystatus').addClass('errorMessage').text(message);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user