From ddb74976257cac1fe7a664e8352e05d6a825e589 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 18 Nov 2016 08:40:58 +0100 Subject: [PATCH] Fixed issue#437 - Customer should not have the internal attribute to set in customer interface. --- .../controllers/ticket_zoom/article_new.coffee | 15 ++++++++++----- .../app/views/ticket_zoom/article_new.jst.eco | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee index e769a72fe..26296dbd5 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee @@ -48,6 +48,7 @@ class App.TicketZoomArticleNew extends App.Controller possibleArticleType['email'] = true # gets referenced in @setArticleType + @internalSelector = true @type = @defaults['type'] || 'note' @articleTypes = [] if possibleArticleType.note @@ -115,6 +116,9 @@ class App.TicketZoomArticleNew extends App.Controller }, ] + if @permissionCheck('ticket.customer') + @internalSelector = false + @textareaHeight = open: 148 closed: 20 @@ -194,11 +198,12 @@ class App.TicketZoomArticleNew extends App.Controller ticket = App.Ticket.fullLocal(@ticket_id) @html App.view('ticket_zoom/article_new')( - ticket: ticket - articleTypes: @articleTypes - article: @defaults - form_id: @form_id - isCustomer: @permissionCheck('ticket.customer') + ticket: ticket + articleTypes: @articleTypes + article: @defaults + form_id: @form_id + isCustomer: @permissionCheck('ticket.customer') + internalSelector: @internalSelector ) @setArticleType(@type) diff --git a/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco index 122a7ebcd..becfceb2b 100644 --- a/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco @@ -21,6 +21,7 @@ <% end %> + <% if @internalSelector: %> + <% end %>