From 218c2474780f642fbfb9decd3fcb700368bc8fd1 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 22 Jan 2015 11:47:11 +0100 Subject: [PATCH] Fixed form handler with noFieldset param. Browser tests on next commit. --- .../controllers/_application_controller_form.js.coffee | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee index 15d66648e..35397afa9 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -35,7 +35,11 @@ class App.ControllerForm extends App.Controller formGen: -> App.Log.debug 'ControllerForm', 'formGen', @model.configure_attributes - fieldset = $('
') + # check if own fieldset should be generated + if @noFieldset + fieldset = @el + else + fieldset = $('
') # collect form attributes @attributes = [] @@ -81,9 +85,6 @@ class App.ControllerForm extends App.Controller item = @formGenItem( attribute, className, fieldset, attribute_count ) item.appendTo(fieldset) - if @noFieldset - fieldset = fieldset.children() - if @fullForm if !@formClass @formClass = ''