Added ability to add custom notes to ticket create screen.
This commit is contained in:
parent
b1c57552d3
commit
cc1d38f506
3 changed files with 26 additions and 6 deletions
|
@ -94,6 +94,10 @@ class App.TicketCreate extends App.Controller
|
|||
else
|
||||
@$('[name="cc"]').closest('.form-group').addClass('hide')
|
||||
|
||||
# show notice
|
||||
@$('.js-note').addClass('hide')
|
||||
@$(".js-note[data-type='#{type}']").removeClass('hide')
|
||||
|
||||
App.TaskManager.touch(@task_key)
|
||||
|
||||
meta: =>
|
||||
|
|
|
@ -3,28 +3,31 @@
|
|||
<div class="newTicket">
|
||||
<div class="box box--newTicket">
|
||||
<div class="page-header">
|
||||
<h1><%- @T( @head ) %></h1>
|
||||
<h1><%- @T(@head) %></h1>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<ul class="tabs type-tabs">
|
||||
|
||||
<li class="tab u-textTruncate" data-type="phone-in">
|
||||
<%- @Icon('received-calls', 'tab-icon') %>
|
||||
<%- @T('Received Call') %>
|
||||
</li>
|
||||
|
||||
<li class="tab u-textTruncate" data-type="phone-out">
|
||||
<%- @Icon('outbound-calls', 'tab-icon') %>
|
||||
<%- @T('Outbound Call') %>
|
||||
</li>
|
||||
|
||||
<li class="tab u-textTruncate" data-type="email-out">
|
||||
<li class="tab u-textTruncate" data-type="email-out">
|
||||
<%- @Icon('email', 'tab-icon') %>
|
||||
<%- @T('Send Email') %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<% if !_.isEmpty(@C('ui_ticket_create_notes')): %>
|
||||
<% for type, note of @C('ui_ticket_create_notes'): %>
|
||||
<div class="alert alert--warning js-note" role="alert" data-type="<%= type %>"><%- @T(note) %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<form role="form" class="ticket-create">
|
||||
<input type="hidden" name="formSenderType"/>
|
||||
<input type="hidden" name="form_id" value="<%= @form_id %>"/>
|
||||
|
@ -46,7 +49,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabsSidebar vertical"></div>
|
||||
</div>
|
||||
<!--
|
||||
|
|
|
@ -698,6 +698,20 @@ Setting.create_if_not_exists(
|
|||
},
|
||||
frontend: true
|
||||
)
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Set notes for ticket create types.',
|
||||
name: 'ui_ticket_create_notes',
|
||||
area: 'UI::TicketCreate',
|
||||
description: 'Set notes for ticket create types by selecting type.',
|
||||
options: {},
|
||||
state: {
|
||||
#'email-out' => 'Attention: When creating a ticket an e-mail is sent.',
|
||||
},
|
||||
preferences: {
|
||||
permission: ['admin.ui'],
|
||||
},
|
||||
frontend: true
|
||||
)
|
||||
|
||||
Setting.create_if_not_exists(
|
||||
title: 'New User Accounts',
|
||||
|
|
Loading…
Reference in a new issue