From 02a973bad119556931db17a251626954a7536495 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 19 May 2016 00:19:39 +0200 Subject: [PATCH] Added placeholder widget to signature edit. --- .../javascripts/app/models/signature.coffee | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/models/signature.coffee b/app/assets/javascripts/app/models/signature.coffee index b84ee125c..5d4f31a22 100644 --- a/app/assets/javascripts/app/models/signature.coffee +++ b/app/assets/javascripts/app/models/signature.coffee @@ -5,7 +5,24 @@ class App.Signature extends App.Model @configure_attributes = [ { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false }, - { name: 'body', display: 'Text', tag: 'richtext', limit: 500, 'null': true, rows: 10 }, + { name: 'body', display: 'Text', tag: 'richtext', limit: 500, 'null': true, plugins: [ + { + controller: 'WidgetPlaceholder' + params: + objects: [ + { + prefix: 'ticket' + object: 'Ticket' + display: 'Ticket' + }, + { + prefix: 'user' + object: 'User' + display: 'Current User' + }, + ] + }, + ]}, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, 'null': true }, { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 },