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

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod011-card-mod-account/type/user.rb,
card/tmpsets/set/mod010-card-mod-account/type/user.rb

Instance Method Summary collapse

Instance Method Details

#setup_buttonObject



38
39
40
# File 'card/tmpsets/set/mod011-card-mod-account/type/user.rb', line 38

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

#setup_formObject



23
24
25
26
27
28
29
30
31
32
# File 'card/tmpsets/set/mod011-card-mod-account/type/user.rb', line 23

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

#setup_form_buttonsObject



34
35
36
# File 'card/tmpsets/set/mod011-card-mod-account/type/user.rb', line 34

def setup_form_buttons
  button_formgroup { setup_button }
end

#setup_hidden_fieldsObject



42
43
44
45
46
47
48
# File 'card/tmpsets/set/mod011-card-mod-account/type/user.rb', line 42

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

#view: setupObject



13
14
15
16
17
18
19
20
21
# File 'card/tmpsets/set/mod011-card-mod-account/type/user.rb', line 13

view :setup, unknown: true, perms: ->(_fmt) { Auth.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