Module: Card::Set::Right::EnabledRoles::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb

Instance Method Summary collapse

Instance Method Details

#checkbox_inputObject



58
59
60
61
62
63
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 58

def checkbox_input
  card.ensure_roles
  wrap_with :div, class: "pointer-checkbox-list" do
    (&method(:role_item_checkbox))
  end
end

#edit_successObject



50
51
52
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 50

def edit_success
  { reload: true }
end

#hidden_form_tags(_action, opts) ⇒ Object



54
55
56
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 54

def hidden_form_tags _action, opts
  "#{super} #{hidden_tags card: { type_id: SessionID }}"
end

#input_typeObject



46
47
48
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 46

def input_type
  :checkbox
end

#role_item_checkbox(role_name) ⇒ Object



65
66
67
68
69
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 65

def role_item_checkbox role_name
  haml :role_checkbox, id: "pointer-checkbox-#{role_name.to_name.key}",
                       checked: card.item_names.include?(role_name),
                       option_name: role_name
end

#view: edit_inlineObject

permission change compared to super



42
43
44
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 42

view :edit_inline, perms: :none, unknown: true, cache: :never, wrap: :slot do
  super()
end