Module: Card::Set::Type::User::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod014-account/type/user.rb

Instance Method Summary collapse

Instance Method Details

#setup_buttonObject



40
41
42
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 40

def setup_button
  submit_button text: "Set up", disable_with: "Setting up"
end

#setup_formObject



25
26
27
28
29
30
31
32
33
34
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 25

def setup_form
  frame_and_form :create do
    [
      setup_hidden_fields,
      _render_name_formgroup,
      ,
      setup_form_buttons
    ]
  end
end

#setup_form_buttonsObject



36
37
38
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 36

def setup_form_buttons
  button_formgroup { setup_button }
end

#setup_hidden_fieldsObject



44
45
46
47
48
49
50
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 44

def setup_hidden_fields
  hidden_tags(
    setup: true,
    success: { redirect: true, mark: path(mark: "") },
    "card[type_id]" => Card.default_accounted_type_id
  )
end

#view: setupObject



15
16
17
18
19
20
21
22
23
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 15

view :setup, unknown: true, perms: :needs_setup? do
  with_nest_mode :edit do
    voo.title = "Your deck is ready to go!" # LOCALIZE
    voo.show! :help
    voo.hide! :menu
    voo.help = haml :setup_help
    Auth.as_bot { setup_form }
  end
end