Move wizard extensions to new extension handling
Dieser Commit ist enthalten in:
Ursprung
1f10a9e4f3
Commit
ef611f3b19
3 geänderte Dateien mit 4 neuen und 10 gelöschten Zeilen
|
@ -26,7 +26,3 @@ module CustomWizardFieldExtension
|
||||||
@label ||= PrettyText.cook(@attrs[:label])
|
@label ||= PrettyText.cook(@attrs[:label])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Wizard::Field
|
|
||||||
prepend CustomWizardFieldExtension if SiteSetting.custom_wizard_enabled
|
|
||||||
end
|
|
|
@ -1,7 +1,3 @@
|
||||||
module CustomWizardStepExtension
|
module CustomWizardStepExtension
|
||||||
attr_accessor :title, :description, :key, :permitted, :permitted_message
|
attr_accessor :title, :description, :key, :permitted, :permitted_message
|
||||||
end
|
end
|
||||||
|
|
||||||
class Wizard::Step
|
|
||||||
prepend CustomWizardStepExtension if SiteSetting.custom_wizard_enabled
|
|
||||||
end
|
|
|
@ -67,8 +67,6 @@ after_initialize do
|
||||||
../lib/custom_wizard/api/authorization.rb
|
../lib/custom_wizard/api/authorization.rb
|
||||||
../lib/custom_wizard/api/endpoint.rb
|
../lib/custom_wizard/api/endpoint.rb
|
||||||
../lib/custom_wizard/api/log_entry.rb
|
../lib/custom_wizard/api/log_entry.rb
|
||||||
../lib/wizard/field.rb
|
|
||||||
../lib/wizard/step.rb
|
|
||||||
../serializers/custom_wizard/api/authorization_serializer.rb
|
../serializers/custom_wizard/api/authorization_serializer.rb
|
||||||
../serializers/custom_wizard/api/basic_endpoint_serializer.rb
|
../serializers/custom_wizard/api/basic_endpoint_serializer.rb
|
||||||
../serializers/custom_wizard/api/endpoint_serializer.rb
|
../serializers/custom_wizard/api/endpoint_serializer.rb
|
||||||
|
@ -82,6 +80,8 @@ after_initialize do
|
||||||
../serializers/custom_wizard/log_serializer.rb
|
../serializers/custom_wizard/log_serializer.rb
|
||||||
../extensions/extra_locales_controller.rb
|
../extensions/extra_locales_controller.rb
|
||||||
../extensions/invites_controller.rb
|
../extensions/invites_controller.rb
|
||||||
|
../extensions/wizard_field.rb
|
||||||
|
../extensions/wizard_step.rb
|
||||||
].each do |path|
|
].each do |path|
|
||||||
load File.expand_path(path, __FILE__)
|
load File.expand_path(path, __FILE__)
|
||||||
end
|
end
|
||||||
|
@ -161,6 +161,8 @@ after_initialize do
|
||||||
if enabled?
|
if enabled?
|
||||||
::ExtraLocalesController.prepend ExtraLocalesControllerCustomWizard
|
::ExtraLocalesController.prepend ExtraLocalesControllerCustomWizard
|
||||||
::InvitesController.prepend InvitesControllerCustomWizard
|
::InvitesController.prepend InvitesControllerCustomWizard
|
||||||
|
::Wizard::Field.prepend CustomWizardFieldExtension
|
||||||
|
::Wizard::Step.prepend CustomWizardStepExtension
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren