From e66ef043321574e9d92c17cca535aea72135fa49 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 8 Feb 2015 09:49:05 +0100 Subject: [PATCH] Moved to own active element in forms. --- .../_application_controller_form.js.coffee | 29 ++++- .../app/controllers/object_manager.js.coffee | 2 +- .../app/models/email_address.js.coffee | 2 +- .../javascripts/app/models/group.js.coffee | 2 +- .../javascripts/app/models/job.js.coffee | 2 +- .../javascripts/app/models/network.js.coffee | 2 +- .../models/object_manager_attribute.js.coffee | 14 +-- .../app/models/organization.js.coffee | 2 +- .../javascripts/app/models/overview.js.coffee | 2 +- .../app/models/postmaster_filter.js.coffee | 2 +- .../javascripts/app/models/role.js.coffee | 2 +- .../app/models/signature.js.coffee | 2 +- .../javascripts/app/models/sla.js.coffee | 2 +- .../app/models/text_module.js.coffee | 8 +- .../app/models/ticket_priority.js.coffee | 2 +- .../app/models/ticket_state.js.coffee | 2 +- .../javascripts/app/models/user.js.coffee | 2 +- .../20141217000001_update_object_manager2.rb | 17 ++- .../20150208000001_update_object_manager3.rb | 100 ++++++++++++++++++ public/assets/tests/form-validation.js | 2 +- public/assets/tests/form.js | 6 +- 21 files changed, 163 insertions(+), 41 deletions(-) create mode 100644 db/migrate/20150208000001_update_object_manager3.rb 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 b7702955b..3b2e08282 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -175,7 +175,7 @@ class App.ControllerForm extends App.Controller ### formGenItem: (attribute_config, classname, form, attribute_count ) -> - attribute = clone( attribute_config ) + attribute = clone( attribute_config, true ) # create item id attribute.id = classname + '_' + attribute.name @@ -260,8 +260,8 @@ class App.ControllerForm extends App.Controller # build options list if _.isEmpty(attribute.options) attribute.options = [ - { name: 'active', value: true } - { name: 'inactive', value: false } + { name: 'yes', value: true } + { name: 'no', value: false } ] # set data type @@ -276,6 +276,29 @@ class App.ControllerForm extends App.Controller # return item item = $( App.view('generic/select')( attribute: attribute ) ) + else if attribute.tag is 'active' + + # active attribute is always required + attribute.null = false + + # build options list + attribute.options = [ + { name: 'active', value: true } + { name: 'inactive', value: false } + ] + + # set data type + if attribute.name + attribute.name = '{boolean}' + attribute.name + + # finde selected item of list + for record in attribute.options + if record.value is attribute.value + record.selected = 'selected' + + # return item + item = $( App.view('generic/select')( attribute: attribute ) ) + # select else if attribute.tag is 'select' item = $( App.view('generic/select')( attribute: attribute ) ) diff --git a/app/assets/javascripts/app/controllers/object_manager.js.coffee b/app/assets/javascripts/app/controllers/object_manager.js.coffee index 6d97db5c0..3d5f9c74f 100644 --- a/app/assets/javascripts/app/controllers/object_manager.js.coffee +++ b/app/assets/javascripts/app/controllers/object_manager.js.coffee @@ -250,7 +250,7 @@ class Edit extends App.ControllerModal configureAttributesBottom = [ - { name: 'active', display: 'Active', tag: 'boolean', 'default': true, 'null': false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, ] controller = new App.ControllerForm( model: { configure_attributes: configureAttributesBottom, className: '' }, diff --git a/app/assets/javascripts/app/models/email_address.js.coffee b/app/assets/javascripts/app/models/email_address.js.coffee index a2d045240..3da7514b5 100644 --- a/app/assets/javascripts/app/models/email_address.js.coffee +++ b/app/assets/javascripts/app/models/email_address.js.coffee @@ -8,7 +8,7 @@ class App.EmailAddress extends App.Model { name: 'email', display: 'Email', tag: 'input', type: 'text', limit: 250, null: false }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, ] @configure_overview = [ 'realname', 'email' diff --git a/app/assets/javascripts/app/models/group.js.coffee b/app/assets/javascripts/app/models/group.js.coffee index 85f6716e2..b7dee1d74 100644 --- a/app/assets/javascripts/app/models/group.js.coffee +++ b/app/assets/javascripts/app/models/group.js.coffee @@ -12,7 +12,7 @@ class App.Group extends App.Model { name: 'signature_id', display: 'Signature', tag: 'select', multiple: false, null: true, relation: 'Signature', nulloption: true }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, ] @configure_overview = [ 'name', diff --git a/app/assets/javascripts/app/models/job.js.coffee b/app/assets/javascripts/app/models/job.js.coffee index d73984319..a2842637b 100644 --- a/app/assets/javascripts/app/models/job.js.coffee +++ b/app/assets/javascripts/app/models/job.js.coffee @@ -8,7 +8,7 @@ class App.Job extends App.Model { name: 'condition', display: 'Conditions for matching objects.', tag: 'ticket_attribute_selection', null: true }, { name: 'execute', display: 'Execute changes on objects.', tag: 'ticket_attribute_set', null: true }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true }, - { name: 'active', display: 'Active', tag: 'boolean', note: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'matching', display: 'Matching', readonly: 1 }, { name: 'processed', display: 'Processed', readonly: 1 }, { name: 'last_run_at', display: 'Last run', tag: 'datetime', readonly: 1 }, diff --git a/app/assets/javascripts/app/models/network.js.coffee b/app/assets/javascripts/app/models/network.js.coffee index f5871cd59..17140fdb9 100644 --- a/app/assets/javascripts/app/models/network.js.coffee +++ b/app/assets/javascripts/app/models/network.js.coffee @@ -5,5 +5,5 @@ class App.Network extends App.Model { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false }, { name: 'note', display: 'Note', note: 'Notes are visible to agents only, never to customers.', tag: 'textarea', limit: 250, null: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, ] diff --git a/app/assets/javascripts/app/models/object_manager_attribute.js.coffee b/app/assets/javascripts/app/models/object_manager_attribute.js.coffee index bddd641fa..048808183 100644 --- a/app/assets/javascripts/app/models/object_manager_attribute.js.coffee +++ b/app/assets/javascripts/app/models/object_manager_attribute.js.coffee @@ -3,13 +3,13 @@ class App.ObjectManagerAttribute extends App.Model @extend Spine.Model.Ajax @url: @apiPath + '/object_manager_attributes' @configure_attributes = [ - { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false }, - { name: 'display', display: 'Anzeige', tag: 'input', type: 'text', limit: 100, null: false }, - { name: 'object', display: 'Object', tag: 'input', readonly: 1 }, - { name: 'position', display: 'Position', tag: 'input', readonly: 1 }, - { name: 'active', display: 'Active', tag: 'boolean', default: true, null: false }, - { name: 'data_type', display: 'Format', tag: 'input', type: 'text', limit: 100, null: false }, - { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, + { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false }, + { name: 'display', display: 'Anzeige', tag: 'input', type: 'text', limit: 100, null: false }, + { name: 'object', display: 'Object', tag: 'input', readonly: 1 }, + { name: 'position', display: 'Position', tag: 'input', readonly: 1 }, + { name: 'active', display: 'Active', tag: 'active', default: true }, + { name: 'data_type', display: 'Format', tag: 'input', type: 'text', limit: 100, null: false }, + { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, ] @configure_overview = [ #'name', diff --git a/app/assets/javascripts/app/models/organization.js.coffee b/app/assets/javascripts/app/models/organization.js.coffee index fac2fb4b4..14c7b3a2b 100644 --- a/app/assets/javascripts/app/models/organization.js.coffee +++ b/app/assets/javascripts/app/models/organization.js.coffee @@ -7,7 +7,7 @@ class App.Organization extends App.Model { name: 'shared', display: 'Shared organization', tag: 'boolean', note: 'Customers in the organization can view each other items.', type: 'boolean', default: true, null: false, info: false }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true, info: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1, info: false }, - { name: 'active', display: 'Active', tag: 'boolean', default: true, null: false, info: false }, + { name: 'active', display: 'Active', tag: 'active', default: true, info: false }, ] @configure_overview = [ 'name', diff --git a/app/assets/javascripts/app/models/overview.js.coffee b/app/assets/javascripts/app/models/overview.js.coffee index 8a344b63a..7e699df40 100644 --- a/app/assets/javascripts/app/models/overview.js.coffee +++ b/app/assets/javascripts/app/models/overview.js.coffee @@ -131,7 +131,7 @@ class App.Overview extends App.Model owner: 'Owner' class: 'span4' }, - { name: 'active', display: 'Active', tag: 'boolean', note: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, { name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1 }, diff --git a/app/assets/javascripts/app/models/postmaster_filter.js.coffee b/app/assets/javascripts/app/models/postmaster_filter.js.coffee index d5439fbc2..36a88110b 100644 --- a/app/assets/javascripts/app/models/postmaster_filter.js.coffee +++ b/app/assets/javascripts/app/models/postmaster_filter.js.coffee @@ -10,7 +10,7 @@ class App.PostmasterFilter extends App.Model { name: 'perform', display: 'Perform action of the following', tag: 'postmaster_set' }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, { name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1 }, diff --git a/app/assets/javascripts/app/models/role.js.coffee b/app/assets/javascripts/app/models/role.js.coffee index 660dce149..a78a6c103 100644 --- a/app/assets/javascripts/app/models/role.js.coffee +++ b/app/assets/javascripts/app/models/role.js.coffee @@ -5,7 +5,7 @@ class App.Role extends App.Model @configure_attributes = [ { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', 'default': true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, { name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1 }, diff --git a/app/assets/javascripts/app/models/signature.js.coffee b/app/assets/javascripts/app/models/signature.js.coffee index 68af43b08..88023f79e 100644 --- a/app/assets/javascripts/app/models/signature.js.coffee +++ b/app/assets/javascripts/app/models/signature.js.coffee @@ -7,7 +7,7 @@ class App.Signature extends App.Model { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false }, { name: 'body', display: 'Text', tag: 'textarea', limit: 250, 'null': true, rows: 10 }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, 'null': true }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', 'default': true, 'null': false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, { name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1 }, diff --git a/app/assets/javascripts/app/models/sla.js.coffee b/app/assets/javascripts/app/models/sla.js.coffee index a89a31e52..edd3de234 100644 --- a/app/assets/javascripts/app/models/sla.js.coffee +++ b/app/assets/javascripts/app/models/sla.js.coffee @@ -31,7 +31,7 @@ class App.Sla extends App.Model group: 'Group' owner: 'Owner' }, - { name: 'active', display: 'Active', tag: 'boolean', note: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, { name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1 }, diff --git a/app/assets/javascripts/app/models/text_module.js.coffee b/app/assets/javascripts/app/models/text_module.js.coffee index 8d9425129..e43e68315 100644 --- a/app/assets/javascripts/app/models/text_module.js.coffee +++ b/app/assets/javascripts/app/models/text_module.js.coffee @@ -3,11 +3,11 @@ class App.TextModule extends App.Model @extend Spine.Model.Ajax @url: @apiPath + '/text_modules' @configure_attributes = [ - { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' }, - { name: 'keywords', display: 'Keywords', tag: 'input', type: 'text', limit: 100, 'null': true, 'class': 'span4' }, - { name: 'content', display: 'Content', tag: 'textarea', limit: 250, 'null': false, 'class': 'span4' }, + { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false }, + { name: 'keywords', display: 'Keywords', tag: 'input', type: 'text', limit: 100, null: true }, + { name: 'content', display: 'Content', tag: 'textarea', limit: 250, null: false }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, - { name: 'active', display: 'Active', tag: 'boolean', note: 'boolean', 'default': true, 'null': false, 'class': 'span4' }, + { name: 'active', display: 'Active', tag: 'active', default: true }, ] @configure_delete = true @configure_overview = [ diff --git a/app/assets/javascripts/app/models/ticket_priority.js.coffee b/app/assets/javascripts/app/models/ticket_priority.js.coffee index 2051f025e..413cd55b9 100644 --- a/app/assets/javascripts/app/models/ticket_priority.js.coffee +++ b/app/assets/javascripts/app/models/ticket_priority.js.coffee @@ -4,7 +4,7 @@ class App.TicketPriority extends App.Model @url: @apiPath + '/ticket_priorities' @configure_attributes = [ { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, translate: true }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, ] diff --git a/app/assets/javascripts/app/models/ticket_state.js.coffee b/app/assets/javascripts/app/models/ticket_state.js.coffee index 649e6dcdc..5e3ab39fb 100644 --- a/app/assets/javascripts/app/models/ticket_state.js.coffee +++ b/app/assets/javascripts/app/models/ticket_state.js.coffee @@ -4,7 +4,7 @@ class App.TicketState extends App.Model @url: @apiPath + '/ticket_states' @configure_attributes = [ { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, translate: true }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', default: true, null: false }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, { name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 }, ] diff --git a/app/assets/javascripts/app/models/user.js.coffee b/app/assets/javascripts/app/models/user.js.coffee index 70a967f61..6071bb35a 100644 --- a/app/assets/javascripts/app/models/user.js.coffee +++ b/app/assets/javascripts/app/models/user.js.coffee @@ -22,7 +22,7 @@ class App.User extends App.Model { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true, info: true }, { name: 'role_ids', display: 'Roles', tag: 'checkbox', multiple: true, null: false, relation: 'Role' }, { name: 'group_ids', display: 'Groups', tag: 'checkbox', multiple: true, null: true, relation: 'Group', invite_agent: true }, - { name: 'active', display: 'Active', tag: 'boolean', default: true, null: true }, + { name: 'active', display: 'Active', tag: 'active', default: true }, { name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 }, ] @configure_overview = [ diff --git a/db/migrate/20141217000001_update_object_manager2.rb b/db/migrate/20141217000001_update_object_manager2.rb index 7da5b5be5..b0c2be88f 100644 --- a/db/migrate/20141217000001_update_object_manager2.rb +++ b/db/migrate/20141217000001_update_object_manager2.rb @@ -463,7 +463,7 @@ class UpdateObjectManager2 < ActiveRecord::Migration :maxlength => 100, :null => true, :autocomplete => 'off', - :item_class => 'formGroup--halfSize', + :item_class => 'formGroup--halfSize', }, :editable => false, :active => true, @@ -493,10 +493,11 @@ class UpdateObjectManager2 < ActiveRecord::Migration :display => 'Note', :data_type => 'richtext', :data_option => { - :type => 'text', - :maxlength => 250, - :null => true, - :note => 'Notes are visible to agents only, never to customers.', + :type => 'text', + :maxlength => 250, + :null => true, + :note => 'Notes are visible to agents only, never to customers.', +# :item_class => 'formGroup--halfSize', }, :editable => false, :active => true, @@ -592,7 +593,7 @@ class UpdateObjectManager2 < ActiveRecord::Migration :object => 'User', :name => 'active', :display => 'Active', - :data_type => 'boolean', + :data_type => 'active', :data_option => { :null => true, :default => true, @@ -722,10 +723,8 @@ class UpdateObjectManager2 < ActiveRecord::Migration :object => 'Organization', :name => 'active', :display => 'Active', - :data_type => 'boolean', + :data_type => 'active', :data_option => { - :maxlength => 250, - :null => true, :default => true, }, :editable => false, diff --git a/db/migrate/20150208000001_update_object_manager3.rb b/db/migrate/20150208000001_update_object_manager3.rb new file mode 100644 index 000000000..cee532577 --- /dev/null +++ b/db/migrate/20150208000001_update_object_manager3.rb @@ -0,0 +1,100 @@ +class UpdateObjectManager3 < ActiveRecord::Migration + def up + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'active', + :display => 'Active', + :data_type => 'active', + :data_option => { + :default => true, + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1800, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'Organization', + :name => 'active', + :display => 'Active', + :data_type => 'active', + :data_option => { + :default => true, + }, + :editable => false, + :active => true, + :screens => { + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1800, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'password', + :display => 'Password', + :data_type => 'input', + :data_option => { + :type => 'password', + :maxlength => 100, + :null => true, + :autocomplete => 'off', + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => { + '-all-' => { + :null => false, + }, + }, + :invite_agent => {}, + :edit => { + :Admin => { + :null => true, + }, + }, + :view => {} + }, + :pending_migration => false, + :position => 1400, + :created_by_id => 1, + :updated_by_id => 1, + ) + + end + + def down + end +end diff --git a/public/assets/tests/form-validation.js b/public/assets/tests/form-validation.js index 8a9dd6884..9309bbf61 100644 --- a/public/assets/tests/form-validation.js +++ b/public/assets/tests/form-validation.js @@ -17,7 +17,7 @@ test( "form validation check", function() { { name: 'richtext1', display: 'Richtext1', tag: 'richtext', maxlength: 100, null: false, type: 'richtext', multiline: true, upload: true, default: defaults['richtext1'] }, { name: 'datetime1', display: 'Datetime1', tag: 'datetime', null: false, default: defaults['datetime1'] }, { name: 'date1', display: 'Date1', tag: 'date', null: false, default: defaults['date1'] }, - { name: 'active1', display: 'Active1', tag: 'boolean', type: 'boolean', default: defaults['active1'], null: false }, + { name: 'active1', display: 'Active1', tag: 'active', default: defaults['active1'] }, ], }, params: defaults, diff --git a/public/assets/tests/form.js b/public/assets/tests/form.js index 2532f2dcc..0d33006f5 100644 --- a/public/assets/tests/form.js +++ b/public/assets/tests/form.js @@ -159,8 +159,8 @@ test( "form params check", function() { { name: 'date2', display: 'Date2', tag: 'date', null: true, default: defaults['date2'] }, { name: 'date3', display: 'Date3', tag: 'date', null: false, default: defaults['date3'] }, { name: 'date4', display: 'Date4', tag: 'date', null: false, default: defaults['date4'] }, - { name: 'active1', display: 'Active1', tag: 'boolean', type: 'boolean', default: defaults['active1'], null: false }, - { name: 'active2', display: 'Active2', tag: 'boolean', type: 'boolean', default: defaults['active2'], null: false }, + { name: 'active1', display: 'Active1', tag: 'active', default: defaults['active1'] }, + { name: 'active2', display: 'Active2', tag: 'active', default: defaults['active2'] }, ], }, params: defaults, @@ -795,7 +795,7 @@ test( "form required_if + shown_if", function() { { name: 'input2', display: 'Input2', tag: 'input', type: 'text', limit: 100, null: true, default: 'some used default', required_if: { active: true }, shown_if: { active: true } }, { name: 'input3', display: 'Input3', tag: 'input', type: 'text', limit: 100, null: true, default: 'some used default', required_if: { active: [true,false] }, shown_if: { active: [true,false] } }, { name: 'input4', display: 'Input4', tag: 'input', type: 'text', limit: 100, null: true, default: 'some used default', required_if: { active: [55,66] }, shown_if: { active: [55,66] } }, - { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', 'default': true, null: false }, + { name: 'active', display: 'Active', tag: 'active', 'default': true }, ], }, params: defaults,