Allow control of password autocomplete by flag
This commit is contained in:
parent
53e611c1c0
commit
ed228c4bd7
3 changed files with 16 additions and 5 deletions
|
|
@ -203,5 +203,15 @@ module ApplicationHelper
|
|||
:title => I18n.t('helpers.application.write_message')
|
||||
end
|
||||
end
|
||||
|
||||
# provide input_html for password autocompletion
|
||||
def autocomplete_flag_to_password_html(password_autocomplete)
|
||||
case password_autocomplete
|
||||
when true then {autocomplete: 'on'}
|
||||
when false then {autocomplete: 'off'}
|
||||
when 'store-only' then {autocomplete: 'off', data: {store: 'on'}}
|
||||
else {}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue