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:
Arpit Jalan
2022-08-15 05:52:07 +05:30
committed by GitHub
parent 0be67cb513
commit 3a21618e4e
5 changed files with 17 additions and 4 deletions

View File

@@ -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