mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: allow wizard checkbox field to be disabled (#17916)
* FEATURE: allow wizard checkbox field to be disabled * Changes per review feedback
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WizardFieldSerializer < ApplicationSerializer
|
||||
attributes :id, :type, :required, :value, :label, :placeholder, :description, :extra_description, :icon, :show_in_sidebar
|
||||
attributes :id, :type, :required, :value, :label, :placeholder, :description, :extra_description, :icon, :disabled, :show_in_sidebar
|
||||
has_many :choices, serializer: WizardFieldChoiceSerializer, embed: :objects
|
||||
|
||||
def id
|
||||
@@ -75,6 +75,14 @@ class WizardFieldSerializer < ApplicationSerializer
|
||||
object.icon.present?
|
||||
end
|
||||
|
||||
def disabled
|
||||
object.disabled
|
||||
end
|
||||
|
||||
def include_disabled?
|
||||
object.disabled
|
||||
end
|
||||
|
||||
def show_in_sidebar
|
||||
object.show_in_sidebar
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user