diff options
author | Yorhel <git@yorhel.nl> | 2020-04-27 10:21:44 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-04-27 10:21:44 +0200 |
commit | 048524a1604e20791dad1b022d03f09cf18620e6 (patch) | |
tree | c2756fd88bb340f66c0979492be1e7cf6734a280 /elm/User/Edit.elm | |
parent | db7c295800d30208b7e48ebae593cabe867c3e7a (diff) |
User.Edit: Fix DOM update bug when opening password change form
Ugly fix for an ugly issue.
Diffstat (limited to 'elm/User/Edit.elm')
-rw-r--r-- | elm/User/Edit.elm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/elm/User/Edit.elm b/elm/User/Edit.elm index 380ac9fb..a178506b 100644 --- a/elm/User/Edit.elm +++ b/elm/User/Edit.elm @@ -4,6 +4,7 @@ import Bitwise exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) +import Html.Keyed as K import Browser import Browser.Navigation exposing (load) import Lib.Html exposing (..) @@ -201,16 +202,18 @@ view model = passform m = [ formField "" [ label [] [ inputCheck "" m.cpass (Pass << CPass), text " Change password" ] ] ] ++ if not m.cpass then [] else - [ formField "opass::Old password" [ inputPassword "opass" m.opass (Pass << OPass) GUE.valPasswordOld ] - , formField "pass1::New password" [ inputPassword "pass1" m.pass1 (Pass << Pass1) GUE.valPasswordNew ] - , formField "pass2::Repeat" - [ inputPassword "pass2" m.pass2 (Pass << Pass2) GUE.valPasswordNew - , br_ 1 - , if model.passNeq - then b [ class "standout" ] [ text "Passwords do not match" ] - else text "" + [ tr [] [ K.node "td" [colspan 2] [("pass_change", table [] + [ formField "opass::Old password" [ inputPassword "opass" m.opass (Pass << OPass) GUE.valPasswordOld ] + , formField "pass1::New password" [ inputPassword "pass1" m.pass1 (Pass << Pass1) GUE.valPasswordNew ] + , formField "pass2::Repeat" + [ inputPassword "pass2" m.pass2 (Pass << Pass2) GUE.valPasswordNew + , br_ 1 + , if model.passNeq + then b [ class "standout" ] [ text "Passwords do not match" ] + else text "" + ] + ])]] ] - ] supportform m = if not (opts.perm_usermod || opts.nodistract_can || opts.support_can || opts.uniname_can || opts.pubskin_can) then [] else |