Fixed an issue with sumup when used in simplified interface

Set version to 5.0.1
This commit is contained in:
Moron, Olivier
2023-10-18 14:21:20 +02:00
parent c6cd509511
commit 0b63878231
3 changed files with 9 additions and 3 deletions

View File

@@ -107,6 +107,12 @@ glpi_pm = {
// iframe has been validated then we must validate parent form
//debugger;
// set the content field (description)
if (typeof tinyMCE != 'undefined' && tinyMCE.activeEditor && data.userrequestsumup && data.userrequestsumup != '_') {
let userrequestsumup = data.userrequestsumup.replace(/(\r\n)|(\r)|(\n)/g, '<br>');
tinyMCE.activeEditor.setContent(userrequestsumup);
}
// the GLPI form must be submitted to validate fields
myformjq = $('#' + data.glpi_data.glpi_iframeid).parents('form');
myform = myformjq[0];