Allow control of password autocomplete by flag

This commit is contained in:
Julius 2013-12-22 23:21:14 +01:00
parent 53e611c1c0
commit ed228c4bd7
3 changed files with 16 additions and 5 deletions

View file

@ -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