move helper to new module

This commit is contained in:
wvengen 2013-12-23 11:48:06 +01:00
parent 0a6e0ab514
commit 45ad8e6524
2 changed files with 13 additions and 10 deletions

View file

@ -204,14 +204,4 @@ module ApplicationHelper
end end
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 end

View file

@ -0,0 +1,13 @@
module SharedHelper
# 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