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
|
else
|
||||||
@$('[name="cc"]').closest('.form-group').addClass('hide')
|
@$('[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)
|
App.TaskManager.touch(@task_key)
|
||||||
|
|
||||||
meta: =>
|
meta: =>
|
||||||
|
|
|
@ -3,28 +3,31 @@
|
||||||
<div class="newTicket">
|
<div class="newTicket">
|
||||||
<div class="box box--newTicket">
|
<div class="box box--newTicket">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><%- @T( @head ) %></h1>
|
<h1><%- @T(@head) %></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<ul class="tabs type-tabs">
|
<ul class="tabs type-tabs">
|
||||||
|
|
||||||
<li class="tab u-textTruncate" data-type="phone-in">
|
<li class="tab u-textTruncate" data-type="phone-in">
|
||||||
<%- @Icon('received-calls', 'tab-icon') %>
|
<%- @Icon('received-calls', 'tab-icon') %>
|
||||||
<%- @T('Received Call') %>
|
<%- @T('Received Call') %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="tab u-textTruncate" data-type="phone-out">
|
<li class="tab u-textTruncate" data-type="phone-out">
|
||||||
<%- @Icon('outbound-calls', 'tab-icon') %>
|
<%- @Icon('outbound-calls', 'tab-icon') %>
|
||||||
<%- @T('Outbound Call') %>
|
<%- @T('Outbound Call') %>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="tab u-textTruncate" data-type="email-out">
|
||||||
<li class="tab u-textTruncate" data-type="email-out">
|
|
||||||
<%- @Icon('email', 'tab-icon') %>
|
<%- @Icon('email', 'tab-icon') %>
|
||||||
<%- @T('Send Email') %>
|
<%- @T('Send Email') %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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">
|
<form role="form" class="ticket-create">
|
||||||
<input type="hidden" name="formSenderType"/>
|
<input type="hidden" name="formSenderType"/>
|
||||||
<input type="hidden" name="form_id" value="<%= @form_id %>"/>
|
<input type="hidden" name="form_id" value="<%= @form_id %>"/>
|
||||||
|
@ -46,7 +49,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tabsSidebar vertical"></div>
|
<div class="tabsSidebar vertical"></div>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -698,6 +698,20 @@ Setting.create_if_not_exists(
|
||||||
},
|
},
|
||||||
frontend: true
|
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(
|
Setting.create_if_not_exists(
|
||||||
title: 'New User Accounts',
|
title: 'New User Accounts',
|
||||||
|
|
Loading…
Reference in a new issue