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

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

Instance Method Summary collapse

Instance Method Details

#edit_successObject



224
225
226
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 224

def edit_success
  { view: :reset_password_success }
end

#edit_view_hiddenObject



220
221
222
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 220

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


213
214
215
216
217
218
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 213

def reset_password_link
  text = I18n.t :reset_password, scope: "mod.card-mod-account.set.self.signin"
  link = link_to_view :edit, text, path: { slot: { hide: :bridge_link } }
  # FIXME: inline styling
  raw("<div style='float:right'>#{link}</div>")
end

#reset_password_vooObject



188
189
190
191
192
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 188

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

#signin_buttonObject



203
204
205
206
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 203

def 
  text = I18n.t :sign_in, scope: "mod.card-mod-account.set.self.signin"
  button_tag text, situation: "primary"
end

#signin_field(name) ⇒ Object



228
229
230
231
232
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 228

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

#signin_successObject



199
200
201
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 199

def 
  "REDIRECT: #{Env.interrupted_action || '*previous'}"
end


208
209
210
211
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 208

def 
  text = I18n.t :or_sign_up, scope: "mod.card-mod-account.set.self.signin"
  subformat(Card[:account_links]).render! :sign_up, title: text
end

#view: coreObject



138
139
140
141
142
143
144
145
146
147
148
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 138

view :core, cache: :never do
  voo.edit_structure = [(:email), (:password)]
  with_nest_mode :edit do
    card_form :update, recaptcha: :off, success:  do
      [
        _render_content_formgroups,
        
      ]
    end
  end
end

#view: editObject

FORGOT PASSWORD



183
184
185
186
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 183

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

#view: edit_buttonsObject



194
195
196
197
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 194

view :edit_buttons do
  text = I18n.t :reset_my_password, scope: "mod.card-mod-account.set.self.signin"
  button_tag text, situation: "primary", class: "_close-modal-on-success"
end

#view: one_line_contentObject



167
168
169
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 167

view :one_line_content do
  ""
end

#view: openObject



150
151
152
153
154
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 150

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

#view: open_contentObject



162
163
164
165
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 162

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

#view: reset_password_successObject



171
172
173
174
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 171

view :reset_password_success do
  # 'Check your email for a link to reset your password'
  frame { I18n.t(:check_email, scope: "mod.card-mod-account.set.self.signin") }
end

#view: signin_buttonsObject



176
177
178
179
180
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 176

view :signin_buttons do
  button_formgroup do
    [, , reset_password_link]
  end
end

#view: titleObject

FIXME: need a generic solution for this



157
158
159
160
# File 'card/tmpsets/set/mod011-card-mod-account/self/signin.rb', line 157

view :title do
  voo.title ||= I18n.t(:sign_in_title, scope: "mod.card-mod-account.set.self.signin")
  super()
end