Disable autocomplete on some input fields

This commit is contained in:
Eike Kettner 2019-10-28 18:05:34 +01:00
parent 30d21b0618
commit fd311b9688
3 changed files with 19 additions and 3 deletions

View File

@ -762,7 +762,10 @@ renderEditForm model =
] ]
,div [class "field"] ,div [class "field"]
[div [class "ui action input"] [div [class "ui action input"]
[textarea [rows 7, onInput SetNotes][Maybe.withDefault "" model.notesModel |> text] [textarea [ rows 6
, autocomplete False
, onInput SetNotes
][Maybe.withDefault "" model.notesModel |> text]
,button [class "ui icon button", onClick SaveNotes] ,button [class "ui icon button", onClick SaveNotes]
[i [class "save outline icon"][] [i [class "save outline icon"][]
] ]

View File

@ -21,11 +21,15 @@ view flags model =
[text "Sign in to Docspell" [text "Sign in to Docspell"
] ]
] ]
,Html.form [class "ui large error raised form segment", onSubmit Authenticate] ,Html.form [ class "ui large error raised form segment"
, onSubmit Authenticate
, autocomplete False
]
[div [class "field"] [div [class "field"]
[label [][text "Username"] [label [][text "Username"]
,div [class "ui left icon input"] ,div [class "ui left icon input"]
[input [type_ "text" [input [type_ "text"
,autocomplete False
,onInput SetUsername ,onInput SetUsername
,value model.username ,value model.username
,placeholder "Collective / Login" ,placeholder "Collective / Login"
@ -38,6 +42,7 @@ view flags model =
[label [][text "Password"] [label [][text "Password"]
,div [class "ui left icon input"] ,div [class "ui left icon input"]
[input [type_ "password" [input [type_ "password"
,autocomplete False
,onInput SetPassword ,onInput SetPassword
,value model.password ,value model.password
,placeholder "Password" ,placeholder "Password"

View File

@ -20,11 +20,15 @@ view flags model =
[text "Sign up @ Docspell" [text "Sign up @ Docspell"
] ]
] ]
,Html.form [class "ui large error form raised segment", onSubmit RegisterSubmit] ,Html.form [ class "ui large error form raised segment"
, onSubmit RegisterSubmit
, autocomplete False
]
[div [class "required field"] [div [class "required field"]
[label [][text "Collective ID"] [label [][text "Collective ID"]
,div [class "ui left icon input"] ,div [class "ui left icon input"]
[input [type_ "text" [input [type_ "text"
,autocomplete False
,onInput SetCollId ,onInput SetCollId
,value model.collId ,value model.collId
,autofocus True ,autofocus True
@ -36,6 +40,7 @@ view flags model =
[label [][text "User Login"] [label [][text "User Login"]
,div [class "ui left icon input"] ,div [class "ui left icon input"]
[input [type_ "text" [input [type_ "text"
,autocomplete False
,onInput SetLogin ,onInput SetLogin
,value model.login ,value model.login
][] ][]
@ -47,6 +52,7 @@ view flags model =
[label [][text "Password"] [label [][text "Password"]
,div [class "ui left icon action input"] ,div [class "ui left icon action input"]
[input [type_ <| if model.showPass1 then "text" else "password" [input [type_ <| if model.showPass1 then "text" else "password"
,autocomplete False
,onInput SetPass1 ,onInput SetPass1
,value model.pass1 ,value model.pass1
][] ][]
@ -61,6 +67,7 @@ view flags model =
[label [][text "Password (repeat)"] [label [][text "Password (repeat)"]
,div [class "ui left icon action input"] ,div [class "ui left icon action input"]
[input [type_ <| if model.showPass2 then "text" else "password" [input [type_ <| if model.showPass2 then "text" else "password"
,autocomplete False
,onInput SetPass2 ,onInput SetPass2
,value model.pass2 ,value model.pass2
][] ][]
@ -76,6 +83,7 @@ view flags model =
[label [][text "Invitation Key"] [label [][text "Invitation Key"]
,div [class "ui left icon input"] ,div [class "ui left icon input"]
[input [type_ "text" [input [type_ "text"
,autocomplete False
,onInput SetInvite ,onInput SetInvite
,model.invite |> Maybe.withDefault "" |> value ,model.invite |> Maybe.withDefault "" |> value
][] ][]