Add token counters for individual fields. Optimize total counter display

This commit is contained in:
Cohee
2023-08-21 15:32:27 +03:00
parent f9573eb45d
commit c735bf546a
6 changed files with 77 additions and 107 deletions

View File

@ -6696,7 +6696,7 @@ async function createOrEditCharacter(e) {
},
});
} else {
$("#result_info").html("Name not entered");
toastr.error('Name is required');
}
} else {
let url = '/editcharacter';
@ -6789,7 +6789,6 @@ async function createOrEditCharacter(e) {
},
error: function (jqXHR, exception) {
$("#create_button").removeAttr("disabled");
$("#result_info").html("<font color=red>Error: no connection</font>");
console.log('Error! Either a file with the same name already existed, or the image file provided was in an invalid format. Double check that the image is not a webp.');
toastr.error('Something went wrong while saving the character, or the image file provided was in an invalid format. Double check that the image is not a webp.');
},