diff --git a/app/assets/javascripts/app/controllers/_ui_element/object_manager_attribute.coffee b/app/assets/javascripts/app/controllers/_ui_element/object_manager_attribute.coffee index 77065db3b..3ad58c43b 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/object_manager_attribute.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/object_manager_attribute.coffee @@ -11,7 +11,6 @@ class App.UiElement.object_manager_attribute extends App.UiElement.ApplicationUi updateDataMap = (localParams, localAttribute, localAttributes, localClassname, localForm, localA) => localItem = localForm.closest('.js-data') - console.log('updateDataMap', attribute, params) element = $(App.view("object_manager/attribute/#{localParams.data_type}")( attribute: attribute params: params @@ -49,7 +48,7 @@ class App.UiElement.object_manager_attribute extends App.UiElement.ApplicationUi objects = Ticket: Customer: - create: + create_bottom: shown: true required: false edit: diff --git a/app/assets/javascripts/app/controllers/customer_ticket_create.coffee b/app/assets/javascripts/app/controllers/customer_ticket_create.coffee index 1052f24a6..94e977c29 100644 --- a/app/assets/javascripts/app/controllers/customer_ticket_create.coffee +++ b/app/assets/javascripts/app/controllers/customer_ticket_create.coffee @@ -68,17 +68,18 @@ class Index extends App.ControllerContent params: defaults noFieldset: true ) - #new App.ControllerForm( - # el: @el.find('.ticket-form-bottom') - # form_id: @form_id - # model: App.Ticket - # screen: 'create_bottom'#@article_attributes['screen'] - # handlers: [ - # formChanges - # ] - # filter: @formMeta.filter - # params: defaults - #) + if !_.isEmpty(App.Ticket.attributesGet('create_bottom', false, true)) + new App.ControllerForm( + el: @el.find('.ticket-form-bottom') + form_id: @form_id + model: App.Ticket + screen: 'create_bottom' + handlers: [ + @ticketFormChanges + ] + filter: @formMeta.filter + params: defaults + ) new App.ControllerDrox( el: @el.find('.sidebar') diff --git a/app/assets/javascripts/app/models/_application_model.coffee b/app/assets/javascripts/app/models/_application_model.coffee index 29be7f712..a261d9255 100644 --- a/app/assets/javascripts/app/models/_application_model.coffee +++ b/app/assets/javascripts/app/models/_application_model.coffee @@ -184,7 +184,7 @@ class App.Model extends Spine.Model ### - @attributesGet: (screen = undefined, attributes = false) -> + @attributesGet: (screen = undefined, attributes = false, noDefaultAttributes = false) -> if !attributes attributes = clone(App[ @.className ].configure_attributes, true) else @@ -203,7 +203,7 @@ class App.Model extends Spine.Model attributesNew[ attribute.name ] = attribute # if no screen is given or no attribute has this screen - use default attributes - if !screen || _.isEmpty(attributesNew) + if (!screen || _.isEmpty(attributesNew)) && !noDefaultAttributes for attribute in attributes attributesNew[ attribute.name ] = attribute diff --git a/app/assets/javascripts/app/views/customer_ticket_create.jst.eco b/app/assets/javascripts/app/views/customer_ticket_create.jst.eco index f8c7b7f4e..c698e335a 100644 --- a/app/assets/javascripts/app/views/customer_ticket_create.jst.eco +++ b/app/assets/javascripts/app/views/customer_ticket_create.jst.eco @@ -3,7 +3,7 @@