field.rb 426 B

12345678910111213141516171819
  1. class CustomWizard::Field
  2. def self.types
  3. @types ||= ['checkbox', 'composer', 'dropdown', 'image', 'text', 'textarea', 'text-only', 'upload', 'user-selector']
  4. end
  5. def self.require_assets
  6. @require_assets ||= {}
  7. end
  8. def self.add_assets(type, plugin = nil, asset_paths = [])
  9. if type
  10. types.push(*type)
  11. end
  12. if plugin && asset_paths
  13. require_assets[plugin] = asset_paths
  14. end
  15. end
  16. end