Follow up fix for issue #1290 - Missing replacement of Config and Current User objects in text modules and signatures.
This commit is contained in:
parent
9026362d7a
commit
279478025e
3 changed files with 3 additions and 2 deletions
|
@ -228,7 +228,7 @@ class App.TicketCreate extends App.Controller
|
|||
type = @$('[name="formSenderType"]').val()
|
||||
|
||||
if signature isnt undefined && signature.body && type is 'email-out'
|
||||
signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get() })
|
||||
signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), config: App.Config.all() })
|
||||
|
||||
body = @$('[data-name=body]')
|
||||
if App.Utils.signatureCheck(body.html() || '', signatureFinished)
|
||||
|
|
|
@ -525,7 +525,7 @@ class App.TicketZoomArticleNew extends App.Controller
|
|||
@$('[data-name=body] [data-signature="true"]').remove()
|
||||
|
||||
# apply new signature
|
||||
signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), ticket: ticketCurrent })
|
||||
signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), ticket: ticketCurrent, config: App.Config.all() })
|
||||
|
||||
body = @$('[data-name=body]')
|
||||
if App.Utils.signatureCheck(body.html() || '', signatureFinished)
|
||||
|
|
|
@ -126,6 +126,7 @@ class App.Utils
|
|||
|
||||
# htmlEscapedAndPhoneified = App.Utils.phoneify(rawText)
|
||||
@phoneify: (string) ->
|
||||
return string if _.isEmpty(string)
|
||||
string = string.replace(/[^0-9,\+,#,\*]+/g, '')
|
||||
.replace(/(.)\+/, '$1')
|
||||
"tel:#{string}"
|
||||
|
|
Loading…
Reference in a new issue