Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
use proper structure for preloading category custom fields
Dieser Commit ist enthalten in:
Ursprung
892914d649
Commit
cdafffea2b
1 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen
|
@ -116,8 +116,15 @@ after_initialize do
|
||||||
load File.expand_path(path, __FILE__)
|
load File.expand_path(path, __FILE__)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# preloaded category custom fields
|
||||||
|
%w[
|
||||||
|
create_topic_wizard
|
||||||
|
]
|
||||||
|
.each do |custom_field|
|
||||||
|
Site.preloaded_category_custom_fields << custom_field
|
||||||
|
end
|
||||||
|
|
||||||
Liquid::Template.register_filter(::CustomWizard::LiquidFilter::FirstNonEmpty)
|
Liquid::Template.register_filter(::CustomWizard::LiquidFilter::FirstNonEmpty)
|
||||||
Site.preloaded_category_custom_fields << "create_topic_wizard"
|
|
||||||
|
|
||||||
add_class_method(:wizard, :user_requires_completion?) do |user|
|
add_class_method(:wizard, :user_requires_completion?) do |user|
|
||||||
wizard_result = self.new(user).requires_completion?
|
wizard_result = self.new(user).requires_completion?
|
||||||
|
|
Laden …
In neuem Issue referenzieren