           ui.callback(item)
         ui.close()
 
-      fail: ->
+      fail: (settings, details) ->
         ui.log 'errors'
-        ui.close()
+        ui.formEnable(e)
+        ui.controller.showAlert(details.error_human || details.error || 'Unable to update object!')
     )
 
 class App.ControllerGenericIndex extends App.Controller


  content: =>
    @head = @pageData.object
    controller = new App.ControllerForm(
      model:     App[ @genericObject ]
      params:    @item
      screen:    @screen || 'edit'
      autofocus: true
    )
    controller.form

  onSubmit: (e) ->
    params = @formParam(e.target)

    @item = App[ @genericObject ].find( @id )
    @head = @pageData.object

    @controller = new App.ControllerForm(
      model:      App[ @genericObject ]
      params:     @item
      screen:     @screen || 'edit'
      autofocus:  true
    )
    @controller.form

  onSubmit: (e) ->
    params = @formParam(e.target)
