Module: Card::Set::Self::Signin::HtmlFormat

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

Instance Method Summary collapse

Instance Method Details

#edit_successObject



199
200
201
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 199

def edit_success
  { view: :reset_password_success }
end

#edit_view_hiddenObject



195
196
197
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 195

def edit_view_hidden
  hidden_tags card: { trigger: :send_reset_password_token }
end


190
191
192
193
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 190

def reset_password_link
  link_to_view :edit, t(:account_reset_password),
               path: { slot: { hide: :board_link } }
end

#reset_password_vooObject



166
167
168
169
170
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 166

def reset_password_voo
  voo.title ||= t :account_forgot_password
  voo.edit_structure = [(:email)]
  voo.hide :help
end

#signin_buttonObject



181
182
183
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 181

def 
  button_tag t(:account_sign_in), situation: "primary"
end

#signin_field(name) ⇒ Object



203
204
205
206
207
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 203

def  name
  nest_name = "".to_name.field(name)
  [nest_name, { title: name.to_s, view: "titled",
                nest_name: nest_name, skip_perms: true }]
end

#signin_successObject



177
178
179
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 177

def 
  { redirect: true, mark: (Env.interrupted_action || "*previous") }
end


185
186
187
188
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 185

def 
  link_to_card :signup, t(:account_or_sign_up),
               path: { action: :new, mark: :signup }
end

#view: coreObject



126
127
128
129
130
131
132
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 126

view :core, cache: :never do
  with_nest_mode :edit do
    card_form :update, recaptcha: :off, success:  do
      haml :core
    end
  end
end

#view: editObject

FORGOT PASSWORD



161
162
163
164
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 161

view :edit do
  reset_password_voo
  Auth.as_bot { super() }
end

#view: edit_buttonsObject



172
173
174
175
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 172

view :edit_buttons do
  button_tag t(:account_reset_password),
             situation: "primary", class: "_close-modal-on-success"
end

#view: one_line_contentObject



151
152
153
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 151

view :one_line_content do
  ""
end

#view: openObject



134
135
136
137
138
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 134

view :open do
  voo.show :help
  voo.hide :menu
  super()
end

#view: open_contentObject



146
147
148
149
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 146

view :open_content do
  # annoying step designed to avoid table of contents.  sigh
  _render_core
end

#view: reset_password_successObject



155
156
157
158
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 155

view :reset_password_success do
  # 'Check your email for a link to reset your password'
  frame { t :account_check_email }
end

#view: titleObject

FIXME: need a generic solution for this



141
142
143
144
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 141

view :title do
  voo.title ||= t(:account_sign_in_title)
  super()
end