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
-
#edit_success ⇒ Object
-
#edit_view_hidden ⇒ Object
-
#reset_password_link ⇒ Object
-
#reset_password_voo ⇒ Object
-
#signin_button ⇒ Object
-
#signin_field(name) ⇒ Object
-
#signin_success ⇒ Object
-
#signup_link ⇒ Object
-
#view: core ⇒ Object
-
#view: edit ⇒ Object
FORGOT PASSWORD.
-
#view: edit_buttons ⇒ Object
-
#view: one_line_content ⇒ Object
-
#view: open ⇒ Object
-
#view: open_content ⇒ Object
-
#view: reset_password_success ⇒ Object
-
#view: signin_buttons ⇒ Object
-
#view: title ⇒ Object
FIXME: need a generic solution for this.
Instance Method Details
#edit_success ⇒ Object
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_hidden ⇒ Object
205 206 207 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 205 def edit_view_hidden card: { trigger: :send_reset_password_token } end |
#reset_password_link ⇒ Object
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_voo ⇒ Object
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 = [signin_field(:email)] voo.hide :help end |
#signin_button ⇒ Object
191 192 193 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 191 def 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 signin_field name nest_name = "".to_name.field(name) [nest_name, { title: name.to_s, view: "titled", nest_name: nest_name, skip_perms: true }] end |
#signin_success ⇒ Object
187 188 189 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 187 def signin_success { redirect: true, mark: (Env.interrupted_action || "*previous") } end |
#signup_link ⇒ Object
195 196 197 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 195 def signup_link subformat(Card[:account_links]).render! :sign_up, title: t(:account_or_sign_up) end |
#view: core ⇒ Object
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 = [signin_field(:email), signin_field(:password)] with_nest_mode :edit do card_form :update, recaptcha: :off, success: signin_success do [ _render_content_formgroups, ] end end end |
#view: edit ⇒ Object
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_buttons ⇒ Object
182 183 184 185 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 182 view :edit_buttons do t(:account_reset_my_password), situation: "primary", class: "_close-modal-on-success" end |
#view: one_line_content ⇒ Object
151 152 153 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/self/signin.rb', line 151 view :one_line_content do "" end |
#view: open ⇒ Object
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_content ⇒ Object
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_success ⇒ Object
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_buttons ⇒ Object
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" do [ wrap_with("div", class: "pe-2") { [, signup_link] }, reset_password_link ] end end |
#view: title ⇒ Object
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 |