Improved constructor. Added default values.
This commit is contained in:
parent
a36a325fd7
commit
43ec6fd79e
1 changed files with 6 additions and 0 deletions
|
@ -8,8 +8,14 @@ class App.ControllerForm extends App.Controller
|
|||
@handlers.push @_showHideToggle
|
||||
@handlers.push @_requiredMandantoryToggle
|
||||
|
||||
# set empty class attributes if needed
|
||||
if !@form
|
||||
@form = @formGen()
|
||||
if !@model
|
||||
@model = {}
|
||||
@attributes = []
|
||||
|
||||
# if element is given, prepend form to it
|
||||
if @el
|
||||
@el.prepend( @form )
|
||||
|
||||
|
|
Loading…
Reference in a new issue