# -*- encoding : utf-8 -*- class Card; module Set; class Type # Set: All "User" cards # module User; extend Card::Set def self.source_location; "/Users/ethan/dev/decko/gem/card/mod/account/set/type/user.rb"; end include Basic attr_accessor :email module HtmlFormat; parent.send :register_set_format, Card::Format::HtmlFormat, self; extend Card::Set::AbstractFormat view :setup, unknown: true, perms: ->(_fmt) { Auth.needs_setup? } do with_nest_mode :edit do voo.title = "Welcome, Shark!" # LOCALIZE voo.show! :help voo.hide! :menu Auth.as_bot { setup_form } end end def setup_form frame_and_form :create do [ setup_hidden_fields, _render_name_formgroup(help: "usually first and last name"), account_formgroup, setup_form_buttons ] end end def setup_form_buttons button_formgroup { setup_button } end def account_formgroup account = card.fetch trait: :account, new: {} subformat(account)._render :content_formgroup, structure: true end def setup_button submit_button text: "Set up", disable_with: "Setting up" end def setup_hidden_fields hidden_tags( setup: true, success: "REDIRECT: #{path mark: ''}", "card[type_id]" => Card.default_accounted_type_id ) end def help_text text = "