use Yesod forms

This commit is contained in:
Filip Gralinski 2016-02-15 21:52:22 +01:00
parent 0922cd9c5f
commit a8696057f6
2 changed files with 9 additions and 32 deletions

View File

@ -1,19 +1,8 @@
<h2>_{MsgSubmitSolution}
<hr>
<form class="form-horizontal" role="form" method="post" action=@{ChallengeSubmissionR (challengeName challenge)}#form enctype=#{formEnctype}>
<div class="form-group">
<label class="control-label col-sm-3" for="hident2">Submission description:
<div class="col-sm-5">
<input id="hident2" name="f1" type="text" value="" class="form-control" id="email" placeholder="Submission description">
<div class="form-group">
<label class="control-label col-sm-3" for="hident3">Submission repo URL:
<div class="col-sm-5">
<input id="hident3" name="f2" type="text" required value="" class="form-control" id="pwd" placeholder="Submission repo URL">
<div class="form-group">
<label class="control-label col-sm-3" for="hident4">Submission repo branch:
<div class="col-sm-5">
<input id="hident4" name="f3" type="text" required value="" class="form-control" id="pwd" placeholder="Submission repo branch">
<div class="form-group">
<div class="col-sm-offset-3 col-sm-10">
<button type="submit" class="btn btn-primary">_{MsgSubmit}
<p>
<form method=post action=@{ChallengeSubmissionR (challengeName challenge)}#form enctype=#{formEnctype}>
^{formWidget}
<button .btn .btn-primary type="submit">
_{MsgSubmit} <span class="glyphicon glyphicon-upload"></span>

View File

@ -2,22 +2,10 @@
<div id="main" role="main">
<h2>Your account
<hr>
<form class="form-horizontal" role="form" method="post" action=@{YourAccountR}#form enctype=#{formEnctype}>
<div class="form-group">
<label class="control-label col-sm-2" for="hident2">Name:
<div class="col-sm-2">
<input id="hident2" name="f1" type="text" value="" class="form-control" placeholder="Your name">
<div class="form-group">
<label class="control-label col-sm-2" for="hident3">ID:
<div class="col-sm-2">
<input id="hident3" name="f2" type="text" value="" class="form-control" placeholder="Your id">
<div class="form-group">
<label class="control-label col-sm-2" for="hident4">Your SSH public key:
<div class="col-sm-5">
<input id="hident4" name="f3" type="text" value="" class="form-control" placeholder="SSH public key">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">_{MsgSubmit}
<form method=post action=@{YourAccountR}#form enctype=#{formEnctype}>
^{formWidget}
<button .btn .btn-primary type="submit">
_{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).