Moved show additional ticket attributes to bottom to middle in create screens.
This commit is contained in:
parent
082f8621da
commit
6f99e65361
4 changed files with 45 additions and 13 deletions
|
@ -48,14 +48,14 @@ class App.UiElement.object_manager_attribute extends App.UiElement.ApplicationUi
|
|||
objects =
|
||||
Ticket:
|
||||
Customer:
|
||||
create_bottom:
|
||||
create_middle:
|
||||
shown: true
|
||||
required: false
|
||||
edit:
|
||||
shown: true
|
||||
required: false
|
||||
Agent:
|
||||
create_bottom:
|
||||
create_middle:
|
||||
shown: true
|
||||
required: false
|
||||
edit:
|
||||
|
|
|
@ -135,6 +135,12 @@ class New extends App.ControllerGenericNew
|
|||
|
||||
onSubmit: (e) =>
|
||||
params = @formParam(e.target)
|
||||
|
||||
# show attributes for create_middle in two column style
|
||||
if params.screens && params.screens.create_middle
|
||||
for role, value of params.screens.create_middle
|
||||
value.item_class = 'column'
|
||||
|
||||
params.object = @pageData.head
|
||||
object = new App[@genericObject]
|
||||
object.load(params)
|
||||
|
@ -189,6 +195,12 @@ class Edit extends App.ControllerGenericEdit
|
|||
|
||||
onSubmit: (e) =>
|
||||
params = @formParam(e.target)
|
||||
|
||||
# show attributes for create_middle in two column style
|
||||
if params.screens && params.screens.create_middle
|
||||
for role, value of params.screens.create_middle
|
||||
value.item_class = 'column'
|
||||
|
||||
params.object = @pageData.head
|
||||
@item.load(params)
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
class UpdateObjectManagerAttributeCreateMiddle < ActiveRecord::Migration
|
||||
def up
|
||||
# return if it's a new setup
|
||||
return if !Setting.find_by(name: 'system_init_done')
|
||||
|
||||
ObjectManager::Attribute.all.each { |attribute|
|
||||
next if attribute.name == 'tags'
|
||||
next if !attribute.screens
|
||||
next if !attribute.screens['create_bottom']
|
||||
attribute.screens['create_middle'] = attribute.screens['create_bottom']
|
||||
attribute.screens.delete('create_bottom')
|
||||
attribute.save!
|
||||
}
|
||||
|
||||
attribute = ObjectManager::Attribute.find_by(name: 'priority_id')
|
||||
attribute.data_option['nulloption'] = false
|
||||
attribute.save!
|
||||
|
||||
Cache.clear
|
||||
end
|
||||
end
|
|
@ -3710,7 +3710,7 @@ ObjectManager::Attribute.add(
|
|||
data_type: 'select',
|
||||
data_option: {
|
||||
relation: 'TicketPriority',
|
||||
nulloption: true,
|
||||
nulloption: false,
|
||||
multiple: false,
|
||||
null: false,
|
||||
default: 2,
|
||||
|
@ -3728,7 +3728,6 @@ ObjectManager::Attribute.add(
|
|||
edit: {
|
||||
Agent: {
|
||||
null: false,
|
||||
nulloption: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -5296,7 +5295,7 @@ Trigger.create_or_update(
|
|||
'notification.email' => {
|
||||
'body' => '<div>Your request <b>(#{config.ticket_hook}#{ticket.number})</b> has been received and will be reviewed by our support staff.</div>
|
||||
<br/>
|
||||
<div>To provide additional information, please reply to this email or click on the following link:
|
||||
<div>To provide additional information, please reply to this email or click on the following link (for initial login, please request a new password):
|
||||
<a href="#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}">#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}</a>
|
||||
</div>
|
||||
<br/>
|
||||
|
|
Loading…
Reference in a new issue