Skip to content

Commit

Permalink
Manually merge elements from pull request #17.
Browse files Browse the repository at this point in the history
  • Loading branch information
eraviart committed Jan 22, 2017
1 parent 7f6ee91 commit d4c3b9c
Show file tree
Hide file tree
Showing 13 changed files with 260 additions and 298 deletions.
69 changes: 39 additions & 30 deletions src/Authenticator/SignUp/View.elm
@@ -1,5 +1,6 @@
module Authenticator.SignUp.View exposing (..)

import Authenticator.Routes
import Authenticator.SignUp.Types exposing (..)
import Authenticator.ViewsParts exposing (..)
import Dict exposing (Dict)
Expand All @@ -11,6 +12,7 @@ import Html.Helpers exposing (aForPath)
import Http exposing (Error(BadStatus))
import Http.Error
import I18n
import Json.Decode


view : I18n.Language -> Model -> Html Msg
Expand Down Expand Up @@ -46,36 +48,9 @@ view language model =
in
div [ class "modal-body" ]
[ div [ class "row" ]
[ div [ class "col-xs-7" ]
[ div [ class "well" ]
[ Html.form [ onSubmit (ForSelf <| Submit) ]
[ viewUsernameControl
(ForSelf << UsernameInput)
language
(Dict.get "username" model.errors)
model.username
, viewEmailControl
(ForSelf << EmailInput)
language
(Dict.get "email" model.errors)
model.email
, viewPasswordControl
(ForSelf << PasswordInput)
language
(Dict.get "password" model.errors)
model.password
, alert
, button
[ class "btn btn-block btn-default grey", type_ "submit" ]
[ text (I18n.translate language I18n.Register) ]
]
]
]
, div [ class "col-xs-5" ]
[ div [ class "well well-right" ]
[ p [ class "lead" ]
[ text (I18n.translate language I18n.CreateAccountNow) ]
, ul [ class "list-unstyled" ]
[ div [ class "col-xs-6" ]
[ div [ class "well well-left" ]
[ ul [ class "list-unstyled" ]
[ li []
[ span [ class "fa fa-check text-success" ]
[]
Expand Down Expand Up @@ -107,6 +82,40 @@ view language model =
]
]
]
, a
[ class "btn btn-block btn-default grey haveanaccount"
, href "#"
, onWithOptions
"click"
{ preventDefault = True, stopPropagation = False }
(Json.Decode.succeed (ForParent (ChangeRoute Authenticator.Routes.SignInRoute)))
]
[ text (I18n.translate language I18n.HaveAnAccount) ]
]
]
, div [ class "col-xs-6" ]
[ div [ class "well" ]
[ Html.form [ onSubmit (ForSelf <| Submit) ]
[ viewUsernameControl
(ForSelf << UsernameInput)
language
(Dict.get "username" model.errors)
model.username
, viewEmailControl
(ForSelf << EmailInput)
language
(Dict.get "email" model.errors)
model.email
, viewPasswordControl
(ForSelf << PasswordInput)
language
(Dict.get "password" model.errors)
model.password
, alert
, button
[ class "btn btn-block btn-default", type_ "submit" ]
[ text (I18n.translate language I18n.Register) ]
]
]
]
]
Expand Down
21 changes: 12 additions & 9 deletions src/Cards/Item/View.elm
Expand Up @@ -761,18 +761,21 @@ viewEditPropertyModal language { ballots, cardId, keyId, properties, propertyIds
]
)
]
, div [ class "modal-body", style [ ( "min-height", "20em" ) ] ]
, div [ class "modal-body", style [ ( "min-height", "35em" ) ] ]
[ div [ class "row" ]
[ div [ class "col-xs-12" ]
[ div [ class "col-xs-8" ]
[ ul [ class "media-list" ]
(propertyIds
|> List.map (getProperty properties)
|> List.indexedMap viewProperty
)
, nav [ class "navbar-fixed-bottom grey" ]
[ Html.form
[ class "navbar-form navbar-left big"
, onSubmit (ForSelf (SubmitValue selectedField))
]
, div [ class "col-xs-4 grey fullheight-right" ]
[ div []
[ h5 [ attribute "aria-hidden" "true" ]
[ text (I18n.translate language I18n.AddYourContribution) ]
, Html.form
[ onSubmit (ForSelf (SubmitValue selectedField))
]
[ select
[ on "change"
Expand Down Expand Up @@ -830,10 +833,10 @@ viewEditPropertyModal language { ballots, cardId, keyId, properties, propertyIds
|> List.map (\s -> option [ value s ] [ text s ])
)
, div
[ class "form-group" ]
[ class "form-group " ]
[ viewField ]
, div [ class "navbar-right" ]
[ button [ class "btn btn-default", type_ "submit" ]
, div []
[ button [ class "btn btn-default btn-block", type_ "submit" ]
[ text (I18n.translate language (I18n.Add)) ]
]
]
Expand Down
21 changes: 18 additions & 3 deletions src/I18n.elm
Expand Up @@ -31,6 +31,7 @@ type TranslationId
| AddTool
| AddToolOrUseCase
| AddUseCase
| AddYourContribution
| AuthenticationFailed
| AuthenticationRequired
| AuthenticationRequiredExplanation
Expand Down Expand Up @@ -140,6 +141,7 @@ type TranslationId
| FooterAbout
| FooterDiscover
| GenericError
| HaveAnAccount
| HeaderTitle
| Help
| Home
Expand Down Expand Up @@ -387,6 +389,12 @@ getTranslationSet translationId =
, spanish = todo
}

AddYourContribution ->
{ english = s "Add your contribution"
, french = s "Ajouter votre contribution"
, spanish = todo
}

AuthenticationFailed ->
{ english = s "Authentication failed"
, french = s "L'authentification a échoué"
Expand Down Expand Up @@ -649,8 +657,8 @@ getTranslationSet translationId =
}

CreateAccountNow ->
{ english = s "Create your account now"
, french = s "Créez votre compte maintenant"
{ english = s "Create your account"
, french = s "Créez votre compte"
, spanish = todo
}

Expand Down Expand Up @@ -1114,6 +1122,12 @@ getTranslationSet translationId =
, spanish = todo
}

HaveAnAccount ->
{ english = s "I already have an account"
, french = s "J'ai déjà un compte"
, spanish = todo
}

HeaderTitle ->
{ english = s "digital solutions to improve democracy"
, french = s "solutions numériques pour la démocratie"
Expand Down Expand Up @@ -1222,7 +1236,7 @@ getTranslationSet translationId =
{ english = s "Logo"
, french = s "Logo"
, spanish = todo
}
}

MissingDescription ->
{ english = s "Missing description"
Expand Down Expand Up @@ -1898,6 +1912,7 @@ to strengthen governance.
}



-- INTERNALS


Expand Down

0 comments on commit d4c3b9c

Please sign in to comment.