Module: Card::Set::Type::User::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- tmpsets/set/mod025-account/type/user.rb
Instance Method Summary collapse
- #account_formgroup ⇒ Object
- #help_text ⇒ Object
- #setup_button ⇒ Object
- #setup_form ⇒ Object
- #setup_form_buttons ⇒ Object
- #setup_hidden_fields ⇒ Object
Instance Method Details
#account_formgroup ⇒ Object
38 39 40 41 |
# File 'tmpsets/set/mod025-account/type/user.rb', line 38 def account_formgroup account = card.fetch trait: :account, new: {} subformat(account)._render :content_formgroup, structure: true end |
#help_text ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'tmpsets/set/mod025-account/type/user.rb', line 55 def help_text text = "<h3>To get started, set up an account.</h3>" if Card.config.action_mailer.perform_deliveries == false text += <<-HTML <br>WARNING: Email delivery is turned off. Change settings in config/application.rb to send sign up notifications. HTML end text end |
#setup_button ⇒ Object
43 44 45 |
# File 'tmpsets/set/mod025-account/type/user.rb', line 43 def text: "Set up", disable_with: "Setting up" end |
#setup_form ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'tmpsets/set/mod025-account/type/user.rb', line 23 def setup_form frame_and_form :create do [ setup_hidden_fields, _render_name_formgroup(help: "usually first and last name"), account_formgroup, ] end end |
#setup_form_buttons ⇒ Object
34 35 36 |
# File 'tmpsets/set/mod025-account/type/user.rb', line 34 def { } end |
#setup_hidden_fields ⇒ Object
47 48 49 50 51 52 53 |
# File 'tmpsets/set/mod025-account/type/user.rb', line 47 def setup_hidden_fields ( setup: true, success: "REDIRECT: #{path mark: ''}", "card[type_id]" => Card.default_accounted_type_id ) end |