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



209
210
211
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 209

def edit_success
  { view: :reset_password_success }
end

#edit_view_hiddenObject



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

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


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

def reset_password_link
  link_to_view :edit, t(:account_reset_password),
               path: { slot: { hide: :bridge_link } },
               class: "btn btn-secondary btn-reset-password"
end

#reset_password_vooObject



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

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

#signin_buttonObject



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

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

#signin_field(name) ⇒ Object



213
214
215
216
217
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 213

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



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

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


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

def 
  subformat(Card[:account_links]).render! :sign_up, title: t(:account_or_sign_up)
end

#view: coreObject



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

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



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

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

#view: edit_buttonsObject



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

view :edit_buttons do
  button_tag t(:account_reset_my_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: signin_buttonsObject



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

view :signin_buttons do
  class_up "button-form-group", "signin-buttons justify-content-between"
  button_formgroup do
    [
      wrap_with("div", class: "pe-2") { [, ] },
      reset_password_link
    ]
  end
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