Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
moqui
/
moqui-mjml
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
51502a1b
authored
2024-07-09 18:18:49 -0600
by
acetousk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Send better errors and set proper filename
1 parent
262b7086
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
screen/emails/GrapesJsEmail.xml
screen/emails/GrapesJsEmail.xml
View file @
51502a1
...
...
@@ -17,12 +17,15 @@ along with this software (see the LICENSE.md file). If not, see
<actions>
<entity-find-one
entity-name=
"moqui.basic.email.EmailTemplate"
value-field=
"emailTemplate"
auto-field-map=
"[emailTemplateId:emailTemplateId]"
/>
<if
condition=
"!emailTemplate || !emailTemplate.htmlLocation"
>
<if
condition=
"!emailTemplate || !emailTemplate.htmlLocation
|| !emailTemplate.htmlPublishedVersionName
"
>
<return
error=
"true"
message=
"Email Template not found"
/>
</if>
<set
field=
"dataPre"
from=
"ec.resource.getLocationReference(emailTemplate.htmlLocation).getText(emailTemplate.htmlPublishedVersionName)"
/>
<if
condition=
"dataPre == null"
>
<return
error=
"true"
message=
"Email Template does not exist at ${emailTemplate.htmlLocation} with version ${emailTemplate.htmlPublishedVersionName}"
/>
</if>
<script>
<![CDATA[
String location = "template.ftl";
String location =
emailTemplate?.htmlLocation ?:
"template.ftl";
freemarker.template.Template newTemplate;
Reader templateReader = null;
...
...
Please
register
or
sign in
to post a comment