Skip to content

Commit

Permalink
#2995 Added saving custom stylesheet to the database
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrykb0802 committed Sep 25, 2024
1 parent ed464ad commit 9a4b858
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WebContent/WEB-INF/jsp/systemSettings.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,15 @@
let req = new XMLHttpRequest();
req.open('POST', customCssUrl, true);
req.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
setUserMessage("CustomCssMessage");
setUserMessage("customCssMessage");
req.onload = () => {
if (req.status === 200) {
resolve(req.responseText);
setUserMessage("CustomCssMessage", "<spring:message code="systemSettings.customCssSaved"/>");
setUserMessage("customCssMessage", "<spring:message code="systemSettings.customCssSaved"/>");
} else if (req.status === 400) {
let errors = JSON.parse(req.responseText);
if(errors.length > 0) {
setUserMessage("CustomCssMessage", "<spring:message code="systemSettings.invalidCustomCss"/>");
setUserMessage("customCssMessage", "<spring:message code="systemSettings.invalidCustomCss"/>");
}
reject(errors);
} else {
Expand Down Expand Up @@ -1172,7 +1172,7 @@
</table>
<table>
<tr>
<td colspan="2" id="CustomCssMessage" class="formError"></td>
<td colspan="2" id="customCssMessage" class="formError"></td>
</tr>
</table>
</div>
Expand Down

0 comments on commit 9a4b858

Please sign in to comment.