CoquiCoders/bizwallet — pull request #27 by chrisrodz (2014-07-11 23:57:05+00:00)
Title: Admin improvs

### More improvements to the admin

@MrMaksimize I have some nice work for you to review courtesy of @clarita1980

#### Summary of things changed
- [x] Added Working Capital option to Purpose choices
- [x] Changed purpose to Array(Text) field
- [x] Changed age to Array(Int) field
- [x] Changed benefitType to Array(Text) field
- [x] Improved front-end field emptiness validation

#### Files changed

- lib/options.js
- Add `working_capital` to `purpose` dictionary
- models/defs/Opportunity.js
- Changed `DataType` to `Array` for `purpose`, `age` and `benefitType`
- Changed `widget` to `multiSelect` for `purpose`, `age` and `benefitType`
- Added field `multiple: true` for `purpose`, `age` and `benefitType`
- models/lib/modelUtils.js
- Updated other text fields name from `-other` to `Other`
- public/src/js/main.js
- Removed checkbox emptiness validation for admin models
- Added select2 emptiness validations for admin models
- test/mocks/opportunity.js
- Updated mock other field names from `-other` to `Other`
- Updates mock fields `purpose`, `age` and `benefitType` to be arrays.
- test/mocks/queryForm.js
- Updated mock other field names from `-other` to `Other`
- test/models.js
- Updated tests to consider migrated array fields
- views/mixins/forms.jade
- Removed `required` attribute from other fields
- Changed other field names from `-other` to `Other`

#### Files Added

- migrations/...add-more-multi-select-fields.js
- Migration from callback hell!