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



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

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

#setup_formObject



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

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

#setup_form_buttonsObject



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

def setup_form_buttons
  button_formgroup { setup_button }
end

#setup_hidden_fieldsObject



46
47
48
49
50
51
52
53
54
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 46

def setup_hidden_fields
  hidden_tags(
    card: {
      type_id: Card.default_accounted_type_id,
      trigger: %w[check_setup]
    },
    success: { redirect: true, mark: path(mark: "") }
  )
end

#view: setupObject



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

view :setup, unknown: true, perms: :needs_setup?, cache: :never 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