branch develop updated (3fb11db2 -> ecb2ceaf)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git from 3fb11db2 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new ecb2ceaf fixes #10028 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit ecb2ceaf454e4d6e41a4c3cfead12e670aef45c8 Author: jcouteau <couteau@codelutin.com> Date: Wed Jul 11 17:59:33 2018 +0200 fixes #10028 Summary of changes: .../ui/swing/content/reply/ReplyFormUIHandler.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit ecb2ceaf454e4d6e41a4c3cfead12e670aef45c8 Author: jcouteau <couteau@codelutin.com> Date: Wed Jul 11 17:59:33 2018 +0200 fixes #10028 --- .../ui/swing/content/reply/ReplyFormUIHandler.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java index 3eb83530..13754bfd 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java @@ -586,12 +586,12 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo String message = model.getMessage(); DemandeUIModel demand = model.getOriginalDemand(); if (message != null && demand != null) { - message = createReferences(demand) + message; + message = createReferences(message, demand); model.setMessage(message); } } - protected String createReferences(DemandeUIModel demande) { + protected String createReferences(String message, DemandeUIModel demande) { String refs = ""; String projectReference = demande.getProjectReference(); String companyReference = demande.getCompanyReference(); @@ -614,7 +614,23 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo if (StringUtils.isNotBlank(refs)) { refs += "<br>"; } - return refs; + + //insert refs après le premier body + StringBuilder returnMessage= new StringBuilder(); + if (message.contains("<body>")) { + String[] parts = message.split("(?<=<body>)"); + returnMessage = new StringBuilder(parts[0] + "<p>" + refs + "</p>" + parts[1]); + if (parts.length>2){ + for (int i=2;i<parts.length;i++){ + returnMessage.append(parts[i]); + } + } + + } else { + returnMessage = new StringBuilder(refs + message); + } + + return returnMessage.toString(); } public void replaceSigning() { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm