Skip to content

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Dec 25, 2023
1 parent 633bda2 commit fe5a2ec
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/files/misc/workflows/actions/markdown2html.hl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

/*
* Transforms the specified [markdown] to HTML and returns to caller.
*/
.arguments
markdown
type:string
mandatory:bool:true
.icon:shield

// Transforming Markdown to HTML.
markdown2html:x:@.arguments/*/markdown

// Returning resulting HTML to caller.
yield
html:x:@markdown2html
16 changes: 16 additions & 0 deletions backend/files/misc/workflows/actions/send-email.hl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
body
type:textarea
mandatory:bool:true
html
type:bool
mandatory:bool:false
.icon:email

// Sanity checking invocation.
Expand All @@ -26,6 +29,19 @@ validators.email:x:@.arguments/*/email
validators.mandatory:x:@.arguments/*/subject
validators.mandatory:x:@.arguments/*/body

// Applying defaults.
validators.default:x:@.arguments
html:bool:false

// Making sure we send email as HTML if we should.
if
get-value:x:@.arguments/*/html
.lambda

// Making sure MIME message becomes HTML Content-Type.
set-value:x:../*/mail.smtp.send/**/entity
.:text/html

// Forward evaluating arguments to [mail.smtp.send].
unwrap:x:./*/mail.smtp.send/**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ export class ParametriseActionDialog implements OnInit {
}
} else if (Object.prototype.toString.call(model[idx]) === '[object Array]') {
result[idx] = model[idx];
} else if (typeof model[idx] === 'boolean') {
result[idx] = model[idx];
} else if (typeof model[idx] === 'number') {
result[idx] = model[idx];
} else {
result[idx] = this.getModel(model[idx]);
}
Expand Down

0 comments on commit fe5a2ec

Please sign in to comment.