Last active
December 4, 2016 02:26
-
-
Save ryan-senn/84a42f40244db568c4cd3bd8dbf2a313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Authentication.Login exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Html.Attributes exposing (..) | |
import Authentication.Msg exposing (Msg) | |
import Common.LoadingButton exposing (loadingButton) | |
login : String -> String -> Bool -> Html Authentication.Msg.Msg | |
login username password isAuthenticating = | |
div [ class "login" ] | |
[ div [ class "form-group" ] | |
[ label [ class "control-label" ] [ text "Username" ] | |
, input [ onInput Authentication.Msg.UpdateUsername, class "form-control", value username ] [] | |
] | |
, div [ class "form-group" ] | |
[ label [ class "control-label" ] [ text "Password" ] | |
, input [ type_ "password", onInput Authentication.Msg.UpdatePassword, class "form-control", value password ] [] | |
] | |
, loadingButton "Authenticate" "log-in" isAuthenticating Authentication.Msg.AuthenticateRequest | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment