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
|
@ -25,8 +25,4 @@ module CustomWizardFieldExtension
|
|||
def label
|
||||
@label ||= PrettyText.cook(@attrs[:label])
|
||||
end
|
||||
end
|
||||
|
||||
class Wizard::Field
|
||||
prepend CustomWizardFieldExtension if SiteSetting.custom_wizard_enabled
|
||||
end
|
|
@ -1,7 +1,3 @@
|
|||
module CustomWizardStepExtension
|
||||
attr_accessor :title, :description, :key, :permitted, :permitted_message
|
||||
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/endpoint.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/basic_endpoint_serializer.rb
|
||||
../serializers/custom_wizard/api/endpoint_serializer.rb
|
||||
|
@ -82,6 +80,8 @@ after_initialize do
|
|||
../serializers/custom_wizard/log_serializer.rb
|
||||
../extensions/extra_locales_controller.rb
|
||||
../extensions/invites_controller.rb
|
||||
../extensions/wizard_field.rb
|
||||
../extensions/wizard_step.rb
|
||||
].each do |path|
|
||||
load File.expand_path(path, __FILE__)
|
||||
end
|
||||
|
@ -161,6 +161,8 @@ after_initialize do
|
|||
if enabled?
|
||||
::ExtraLocalesController.prepend ExtraLocalesControllerCustomWizard
|
||||
::InvitesController.prepend InvitesControllerCustomWizard
|
||||
::Wizard::Field.prepend CustomWizardFieldExtension
|
||||
::Wizard::Step.prepend CustomWizardStepExtension
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren