Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-14 13:52:54 +01:00
dfe8debda7
This reverts commit f8a8d5a964
.
19 Zeilen
445 B
Ruby
19 Zeilen
445 B
Ruby
class CustomWizard::Field
|
|
def self.types
|
|
@types ||= ['checkbox', 'composer', 'dropdown', 'tag', 'category', 'image', 'text', 'textarea', 'text-only', 'upload', 'user-selector']
|
|
end
|
|
|
|
def self.require_assets
|
|
@require_assets ||= {}
|
|
end
|
|
|
|
def self.add_assets(type, plugin = nil, asset_paths = [])
|
|
if type
|
|
types.push(*type)
|
|
end
|
|
|
|
if plugin && asset_paths
|
|
require_assets[plugin] = asset_paths
|
|
end
|
|
end
|
|
end
|