diff --git a/app/assets/javascripts/app/controllers/ticket_customer.js.coffee b/app/assets/javascripts/app/controllers/ticket_customer.js.coffee index f3b94d39e..5d09a51b7 100644 --- a/app/assets/javascripts/app/controllers/ticket_customer.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_customer.js.coffee @@ -1,26 +1,24 @@ class App.TicketCustomer extends App.ControllerModal constructor: -> super - @render() - - render: -> configure_attributes = [ { name: 'customer_id', display: 'Customer', tag: 'autocompletion', type: 'text', limit: 100, null: false, relation: 'User', class: 'span5', autocapitalize: false, help: 'Select the new customer of the Ticket.', source: @apiPath + '/users/search', minLengt: 2 }, ] - @html App.view('agent_ticket_customer')() - - new App.ControllerForm( - el: @el.find('#form-customer'), + controller = new App.ControllerForm( model: { configure_attributes: configure_attributes, className: 'update', }, autofocus: true, ) - @hide() + @head = 'Change Customer' + @close = true + @cancel = true + @button = true + @show( controller.form ) - submit: (e) => + onSubmit: (e) => e.preventDefault() params = @formParam(e.target) diff --git a/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco b/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco deleted file mode 100644 index ef00f83c3..000000000 --- a/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco +++ /dev/null @@ -1,17 +0,0 @@ -
- -