Fixed issue#437 - Customer should not have the internal attribute to set in customer interface.

This commit is contained in:
Martin Edenhofer 2016-11-18 08:40:58 +01:00
parent f601553f6d
commit ddb7497625
2 changed files with 12 additions and 5 deletions

View file

@ -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)

View file

@ -21,6 +21,7 @@
<% end %>
</div>
</div>
<% if @internalSelector: %>
<div class="editControls-item is-hidden js-toggleVisibility js-selectInternalPublic">
<div class="editControls-iconHolder">
<div class="editControls-icon icon-internal" title="<%- @Ti("set to public") %>">
@ -31,6 +32,7 @@
</div>
</div>
</div>
<% end %>
</div>
<div class="article-content bubble-gap">
<div class="internal-border">