mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Use translations for status
This commit is contained in:
parent
708f57537c
commit
0421a490e2
@ -304,10 +304,8 @@
|
||||
|
||||
try {
|
||||
|
||||
console.log("DATA " + data)
|
||||
|
||||
// Update the element's text with the status value
|
||||
$(this).text(data.status);
|
||||
$(this).text($(this).data(data["status"].toLowerCase()));
|
||||
|
||||
// Optionally, add classes based on status to style the element
|
||||
$(this).attr('data-message', data["message"]);
|
||||
@ -322,7 +320,7 @@
|
||||
$(this).addClass('badge-pill badge-outline-secondary btn');
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Invalid JSON string:', jsonString);
|
||||
console.error('Invalid JSON string:', e);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user