forked from filipg/gonito
use tooltips instead of a list
This commit is contained in:
parent
8be73e73a1
commit
e3a3f28da0
@ -48,15 +48,18 @@ checkPassword Nothing = True
|
||||
checkPassword (Just "") = True
|
||||
checkPassword (Just passwd) = isPasswordAcceptable passwd
|
||||
|
||||
autocompleteOff name = setts { fsAttrs = (fsAttrs setts) ++ [("autocomplete", "nope")]}
|
||||
where setts = (bfs name)
|
||||
autocompleteOff name tooltip = setts { fsAttrs = (fsAttrs setts) ++ [("autocomplete", "nope")]}
|
||||
where setts = (bfs name) { fsTooltip = Just $ SomeMessage tooltip }
|
||||
|
||||
fieldWithTooltip :: forall master msg msg1. (RenderMessage master msg, RenderMessage master msg1) => msg -> msg1 -> FieldSettings master
|
||||
fieldWithTooltip name tooltip = (bfs name) { fsTooltip = Just $ SomeMessage tooltip }
|
||||
|
||||
yourAccountForm :: Maybe Text -> Maybe Text -> Maybe Text -> Bool -> Form (Maybe Text, Maybe Text, Maybe Text, Maybe Text, Maybe FileInfo, Bool)
|
||||
yourAccountForm maybeName maybeLocalId maybeSshPubKey anonimised = renderBootstrap3 BootstrapBasicForm $ (,,,,,)
|
||||
<$> aopt textField (bfs MsgAccountName) (Just maybeName)
|
||||
<*> aopt textField (autocompleteOff MsgId) (Just maybeLocalId)
|
||||
<$> aopt textField (fieldWithTooltip MsgAccountName MsgAccountNameTooltip) (Just maybeName)
|
||||
<*> aopt textField (autocompleteOff MsgId MsgIdTooltip) (Just maybeLocalId)
|
||||
<*> aopt passwordConfirmField (bfs MsgPassword) Nothing
|
||||
<*> aopt textField (bfs MsgSshPubKey) (Just maybeSshPubKey)
|
||||
<*> aopt textField (fieldWithTooltip MsgSshPubKey MsgSshPubKeyTooltip) (Just maybeSshPubKey)
|
||||
<*> fileAFormOpt (bfs MsgAvatar)
|
||||
<*> areq checkBoxField (bfs MsgWantToBeAnonimised) (Just anonimised)
|
||||
|
||||
|
@ -17,8 +17,11 @@ SubmissionTags: Submission tags
|
||||
YourAccount: your account
|
||||
AboutMe: about me
|
||||
AccountName: name
|
||||
AccountNameTooltip: your human-readable name (to be shown on the leaderboard)
|
||||
Id: ID
|
||||
IdTooltip: to be used in the URLs for your repos (only lower-case letters, digits or hyphens, must start with a lower-case letter), once set cannot be changed!
|
||||
SshPubKey: your SSH public key
|
||||
SshPubKeyTooltip: needed if you want to access repos hosted on Gonito.net (usually ".ssh/id_rsa.pub" in your home directory after you generated private/public key pair)
|
||||
Home: home
|
||||
Search: search
|
||||
GitCommitSha1: Git commit SHA1 hash
|
||||
|
@ -6,7 +6,7 @@
|
||||
$nothing
|
||||
<div class="alert alert-info" role="alert">
|
||||
<p>
|
||||
<strong>Please set up your password below so that you could log in when <a href="https://developer.mozilla.org/en-US/Persona">Persona</a> authentication system is shut down.
|
||||
<strong>Please set up your password below so that you could log in.
|
||||
<img style="max-width:80px;padding-bottom:30px" src=@{AvatarR userId}>
|
||||
<form method=post action=@{YourAccountR}#form enctype=#{formEnctype} autocomplete="off">
|
||||
^{formWidget}
|
||||
@ -14,9 +14,4 @@
|
||||
_{MsgSubmit} <span class="glyphicon glyphicon-upload"></span>
|
||||
<hr>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item"><b>Name</b> is your human-readable name (to be shown on the leaderboard).
|
||||
<li class="list-group-item"><b>ID</b> is used in the URLs for your repos (must be composed of lower-case letters, digits or hyphyns, must start with a lower-case letter).
|
||||
<li class="list-group-item"><b>Password</b> is needed when Persona is closed.
|
||||
<li class="list-group-item"><b>SSH public key</b> is needed if you want to access repos hosted on Gonito.net (usually it is <tt>.ssh/id_rsa.pub</tt> in your home directory after you generated private/public key pair).
|
||||
<li class="list-group-item">ID cannot be changed once it is set up.
|
||||
<li class="list-group-item">You don't need to specify your ID and SSH public key, if you don't use private repos hosted on Gonito.net.
|
||||
<li class="list-group-item">You don't need to specify your ID and SSH public key, if you don't use private repos hosted on Gonito.net.
|
||||
|
Loading…
Reference in New Issue
Block a user