Module: PasswordHelper

Defined in:
app/helpers/password_helper.rb

Instance Method Summary collapse

Instance Method Details

#password_strength_containerObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/helpers/password_helper.rb', line 3

def password_strength_container
  (:div, '', class: 'password_strength_container', data: {
    lib_script_path: asset_path('password_strength.js'),
    min_score: 4,
    password_strength_advice: t('password_strength.advice'),
    score_descriptions: t([:s0, :s1, :s2, :s3, :s4],
    scope: 'password_strength.score_descriptions'),
    user_inputs: [],
    triggerwords: [
      # Eingabe-Regexp, Antwort des Systems, Tooltip
      ['abend lustig bowle lecker', 'Selber ausdenken!', ''],
      ['abendlustigbowlelecker', 'Selber ausdenken!', ''],
      ['p4ssw0rt!', 'Schlechte Idee!', ''],
      ['correcthorsebatterystaple', 'Plagiat!! :)', "Whoa there, don't take advice from a webcomic too literally"],
      ['correct horse battery staple', 'Gute Idee :/', "Whoa there, don't take advice from a webcomic too literally"],
      ['Tr0ub4do[u]?r&3','Lieber nochmal nachdenken','']
    ]
  }).html_safe
end