relocate form utilities
This commit is contained in:
parent
d2990b76fd
commit
c7d36e16bf
|
@ -14,35 +14,35 @@
|
|||
<ul>
|
||||
<li>
|
||||
<h2>@trans.pieceAnimation()</h2>
|
||||
@base.radios(form("display.animation"), translatedAnimationChoices)
|
||||
@base.form.radios(form("display.animation"), translatedAnimationChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.materialDifference()</h2>
|
||||
@base.radios(form("display.captured"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("display.captured"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.boardHighlights()</h2>
|
||||
@base.radios(form("display.highlight"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("display.highlight"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.pieceDestinations()</h2>
|
||||
@base.radios(form("display.destination"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("display.destination"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.boardCoordinates()</h2>
|
||||
@base.radios(form("display.coords"), translatedBoardCoordinateChoices)
|
||||
@base.form.radios(form("display.coords"), translatedBoardCoordinateChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.moveListWhilePlaying()</h2>
|
||||
@base.radios(form("display.replay"), translatedMoveListWhilePlayingChoices)
|
||||
@base.form.radios(form("display.replay"), translatedMoveListWhilePlayingChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>PGN piece notation</h2>
|
||||
@base.radios(form("display.pieceNotation"), lila.pref.Pref.PieceNotation.choices)
|
||||
@base.form.radios(form("display.pieceNotation"), lila.pref.Pref.PieceNotation.choices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.blindfoldChess()</h2>
|
||||
@base.radios(form("display.blindfold"), translatedBlindfoldChoices)
|
||||
@base.form.radios(form("display.blindfold"), translatedBlindfoldChoices)
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
|
@ -50,15 +50,15 @@
|
|||
<ul>
|
||||
<li>
|
||||
<h2>@trans.tenthsOfSeconds()</h2>
|
||||
@base.radios(form("clockTenths"), translatedClockTenthsChoices)
|
||||
@base.form.radios(form("clockTenths"), translatedClockTenthsChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.horizontalGreenProgressBars()</h2>
|
||||
@base.radios(form("clockBar"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("clockBar"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.soundWhenTimeGetsCritical()</h2>
|
||||
@base.radios(form("clockSound"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("clockSound"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
|
@ -66,35 +66,35 @@
|
|||
<ul>
|
||||
<li>
|
||||
<h2>How do you move pieces?</h2>
|
||||
@base.radios(form("moveEvent"), lila.pref.Pref.MoveEvent.choices)
|
||||
@base.form.radios(form("moveEvent"), lila.pref.Pref.MoveEvent.choices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.premovesPlayingDuringOpponentTurn()</h2>
|
||||
@base.radios(form("premove"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("premove"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.takebacksWithOpponentApproval()</h2>
|
||||
@base.radios(form("takeback"), translatedTakebackChoices)
|
||||
@base.form.radios(form("takeback"), translatedTakebackChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.promoteToQueenAutomatically()</h2>
|
||||
@base.radios(form("autoQueen"), translatedAutoQueenChoices)
|
||||
@base.form.radios(form("autoQueen"), translatedAutoQueenChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.claimDrawOnThreefoldRepetitionAutomatically("<a rel=\"nofollow\" href=\"http://en.wikipedia.org/wiki/Threefold_repetition\">", "</a>")</h2>
|
||||
@base.radios(form("autoThreefold"), translatedAutoThreefoldChoices)
|
||||
@base.form.radios(form("autoThreefold"), translatedAutoThreefoldChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.moveConfirmation()</h2>
|
||||
@base.radios(form("submitMove"), submitMoveChoices)
|
||||
@base.form.radios(form("submitMove"), submitMoveChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.confirmResignation()</h2>
|
||||
@base.radios(form("confirmResign"), confirmResignChoices)
|
||||
@base.form.radios(form("confirmResign"), confirmResignChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>Input moves with the keyboard</h2>
|
||||
@base.radios(form("keyboardMove"), lila.pref.Pref.KeyboardMove.choices)
|
||||
@base.form.radios(form("keyboardMove"), lila.pref.Pref.KeyboardMove.choices)
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
|
@ -102,19 +102,19 @@
|
|||
<ul>
|
||||
<li>
|
||||
<h2>@trans.letOtherPlayersFollowYou()</h2>
|
||||
@base.radios(form("follow"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
@base.form.radios(form("follow"), Seq(0 -> trans.no.str(), 1 -> trans.yes.str()))
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.letOtherPlayersChallengeYou()</h2>
|
||||
@base.radios(form("challenge"), translatedChallengeChoices)
|
||||
@base.form.radios(form("challenge"), translatedChallengeChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.letOtherPlayersMessageYou()</h2>
|
||||
@base.radios(form("message"), translatedMessageChoices)
|
||||
@base.form.radios(form("message"), translatedMessageChoices)
|
||||
</li>
|
||||
<li>
|
||||
<h2>@trans.shareYourInsightsData()</h2>
|
||||
@base.radios(form("insightShare"), lila.pref.Pref.InsightShare.choices)
|
||||
@base.form.radios(form("insightShare"), lila.pref.Pref.InsightShare.choices)
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ evenMoreCss =cssTag("material.form.css")) {
|
|||
<div class="form-group">@trans.allInformationIsPublicAndOptional()</div>
|
||||
<div>
|
||||
@base.form.group(form("country"), trans.country(), klass = "half") {
|
||||
@base.select(form("country"), lila.user.Countries.all, default = "".some)
|
||||
@base.form.select(form("country"), lila.user.Countries.all, default = "".some)
|
||||
}
|
||||
@base.form.group(form("location"), trans.location(), klass = "half") {
|
||||
@base.input(form("location"))
|
||||
@base.form.input(form("location"))
|
||||
}
|
||||
</div>
|
||||
@NotForKids {
|
||||
|
@ -26,16 +26,16 @@ evenMoreCss =cssTag("material.form.css")) {
|
|||
}
|
||||
<div>
|
||||
@base.form.group(form("firstName"), trans.firstName(), klass = "half") {
|
||||
@base.input(form("firstName"))
|
||||
@base.form.input(form("firstName"))
|
||||
}
|
||||
@base.form.group(form("lastName"), trans.lastName(), klass = "half") {
|
||||
@base.input(form("lastName"))
|
||||
@base.form.input(form("lastName"))
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
@base.form.group(form("fideRating"), Html("FIDE rating"), klass = "half") {
|
||||
@base.input(form("fideRating"), typ="number")
|
||||
@base.form.input(form("fideRating"), typ="number")
|
||||
}
|
||||
</div>
|
||||
@errMsg(form)
|
||||
|
|
5
app/views/base/form/input.scala.html
Normal file
5
app/views/base/form/input.scala.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
@(field: play.api.data.Field, placeholder: Option[String] = None, typ: String = "text", required: Boolean = false)
|
||||
|
||||
<input @placeholder.map { p =>
|
||||
placeholder="@p"
|
||||
} type="@typ" value="@field.value" name="@field.name"@if(required){ required}/>
|
|
@ -1,5 +0,0 @@
|
|||
@(field: play.api.data.Field, placeholder: Option[String] = None, typ: String = "text")
|
||||
|
||||
<input @placeholder.map { p =>
|
||||
placeholder="@p"
|
||||
} type="@typ" value="@field.value" name="@field.name" id="@field.id" />
|
|
@ -33,14 +33,14 @@ evenMoreCss = Some(cssTag("material.form.css"))) {
|
|||
</div>
|
||||
<div>
|
||||
@base.form.group(form("enabledByUser"), Html("Published in lichess coaches list"), half = true) {
|
||||
@base.select(form("enabledByUser"), booleanChoices)
|
||||
@base.form.select(form("enabledByUser"), booleanChoices)
|
||||
}
|
||||
@base.form.group(form("available"), Html("Currently available for lessons"), half = true) {
|
||||
@base.select(form("available"), booleanChoices)
|
||||
@base.form.select(form("available"), booleanChoices)
|
||||
}
|
||||
</div>
|
||||
@base.form.group(form("profile.headline"), Html("Short and inspiring headline")) {
|
||||
@base.input(form("profile.headline"))
|
||||
@base.form.input(form("profile.headline"))
|
||||
}
|
||||
@textarea(form("profile.description"), Html("Who are you?"), help = Html("age, profession, country... let your students know you").some)
|
||||
@textarea(form("profile.playingExperience"), Html("Playing experience"), help = Html("tournaments played, best wins, other achievements").some)
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
@(form: Form[_])(implicit ctx: Context)
|
||||
|
||||
@base.form.group(form("startsAt"), Html("Start date <strong>UTC</strong>"), half = true) {
|
||||
@base.flatpickr(form("startsAt"))
|
||||
@base.form.flatpickr(form("startsAt"))
|
||||
}
|
||||
@base.form.group(form("finishesAt"), Html("End date <strong>UTC</strong>"), half = true) {
|
||||
@base.flatpickr(form("finishesAt"))
|
||||
@base.form.flatpickr(form("finishesAt"))
|
||||
}
|
||||
@base.form.group(form("title"), Html("Short title")) {
|
||||
@base.input(form("title"))
|
||||
@base.form.input(form("title"))
|
||||
}
|
||||
@base.form.group(form("headline"), Html("Short headline")) {
|
||||
@base.input(form("headline"))
|
||||
@base.form.input(form("headline"))
|
||||
}
|
||||
@defining(form("description")) { field =>
|
||||
@base.form.group(field, Html("Possibly long description")) {
|
||||
|
@ -18,14 +18,14 @@
|
|||
}
|
||||
}
|
||||
@base.form.group(form("url"), Html("External URL")) {
|
||||
@base.input(form("url"))
|
||||
@base.form.input(form("url"))
|
||||
}
|
||||
<div>
|
||||
@base.form.group(form("enabled"), Html("Enabled"), half = true) {
|
||||
@base.select(form("enabled"), booleanChoices)
|
||||
@base.form.select(form("enabled"), booleanChoices)
|
||||
}
|
||||
@base.form.group(form("homepageHours"), Html("Hours on homepage (0 to 24)"), half = true) {
|
||||
@base.input(form("homepageHours"))
|
||||
@base.form.input(form("homepageHours"))
|
||||
}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
<div class="field_reason">
|
||||
<label for="@form("reason").id">@trans.reason()</label>
|
||||
@base.select(form("reason"), translatedReasonChoices, trans.whatIsIheMatter.str().some)
|
||||
@base.form.select(form("reason"), translatedReasonChoices, trans.whatIsIheMatter.str().some)
|
||||
@errMsg(form("reason"))
|
||||
</div>
|
||||
<div class="field_body">
|
||||
|
|
|
@ -30,8 +30,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>@trans.players() <span class="help" title="The name(s) of the player(s) you wish to search">(?)</span></label>
|
||||
</th>
|
||||
<td class="usernames">
|
||||
<div class="half">@base.input(form("players")("a"))</div>
|
||||
<div class="half">@base.input(form("players")("b"))</div>
|
||||
<div class="half">@base.form.input(form("players")("a"))</div>
|
||||
<div class="half">@base.form.input(form("players")("b"))</div>
|
||||
</td>
|
||||
</tr>
|
||||
@chess.Color.all.map { color =>
|
||||
|
@ -63,8 +63,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>@trans.rating() <span class="help" title="The average rating of both players">(?)</span></label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("ratingMin"), Query.averageRatings, "".some)</div>
|
||||
<div class="half">To @base.select(form("ratingMax"), Query.averageRatings, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("ratingMin"), Query.averageRatings, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("ratingMax"), Query.averageRatings, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -72,7 +72,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("hasAi").id">@trans.opponent() <span class="help" title="Whether the player's opponent was a human or a computer">(?)</span></label>
|
||||
</th>
|
||||
<td class="single opponent">
|
||||
@base.select(form("hasAi"), Query.hasAis, "".some)
|
||||
@base.form.select(form("hasAi"), Query.hasAis, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="aiLevel none">
|
||||
|
@ -80,8 +80,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("aiLevel").id">A.I. level</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("aiLevelMin"), Query.aiLevels, "".some)</div>
|
||||
<div class="half">To @base.select(form("aiLevelMax"), Query.aiLevels, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("aiLevelMin"), Query.aiLevels, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("aiLevelMax"), Query.aiLevels, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -89,7 +89,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("source").id">Source</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("source"), Query.sources, "".some)
|
||||
@base.form.select(form("source"), Query.sources, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -97,7 +97,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("perf").id">@trans.variant()</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("perf"), Query.perfs, "".some)
|
||||
@base.form.select(form("perf"), Query.perfs, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -105,7 +105,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("mode").id">@trans.mode()</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("mode"), Query.modes, "".some)
|
||||
@base.form.select(form("mode"), Query.modes, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -113,8 +113,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>Number of turns</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("turnsMin"), Query.turns, "".some)</div>
|
||||
<div class="half">To @base.select(form("turnsMax"), Query.turns, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("turnsMin"), Query.turns, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("turnsMax"), Query.turns, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -122,8 +122,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>@trans.duration()</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("durationMin"), Query.durations, "".some)</div>
|
||||
<div class="half">To @base.select(form("durationMax"), Query.durations, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("durationMin"), Query.durations, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("durationMax"), Query.durations, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -131,8 +131,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>Clock initial time</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("clock")("initMin"), Query.clockInits, "".some)</div>
|
||||
<div class="half">To @base.select(form("clock")("initMax"), Query.clockInits, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("clock")("initMin"), Query.clockInits, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("clock")("initMax"), Query.clockInits, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -140,8 +140,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>Clock increment</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("clock")("incMin"), Query.clockIncs, "".some)</div>
|
||||
<div class="half">To @base.select(form("clock")("incMax"), Query.clockIncs, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("clock")("incMin"), Query.clockIncs, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("clock")("incMax"), Query.clockIncs, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -149,7 +149,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("status").id">Result</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("status"), Query.statuses, "".some)
|
||||
@base.form.select(form("status"), Query.statuses, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -157,7 +157,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="@form("winnerColor").id">Winner color</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("winnerColor"), Query.winnerColors, "".some)
|
||||
@base.form.select(form("winnerColor"), Query.winnerColors, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -165,8 +165,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>Date</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("dateMin"), Query.dates, "".some)</div>
|
||||
<div class="half">To @base.select(form("dateMax"), Query.dates, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("dateMin"), Query.dates, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("dateMax"), Query.dates, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -174,8 +174,8 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label>Sort</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">By @base.select(form("sort")("field"), Sorting.fields)</div>
|
||||
<div class="half">@base.select(form("sort")("order"), Sorting.orders)</div>
|
||||
<div class="half">By @base.form.select(form("sort")("field"), Sorting.fields)</div>
|
||||
<div class="half">@base.form.select(form("sort")("order"), Sorting.orders)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -183,7 +183,7 @@ description = s"Search in ${nbGames.localize} chess games using advanced criteri
|
|||
<label for="analysed">Analysis <span class="help" title="Whether computer analysis is available or not">(?)</span></label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@{ base.checkbox(form("analysed"), "", 1) }
|
||||
@base.form.checkbox(form("analysed"), "", 1)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<label>Date</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("dateMin"), Query.dates, "".some)</div>
|
||||
<div class="half">To @base.select(form("dateMax"), Query.dates, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("dateMin"), Query.dates, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("dateMax"), Query.dates, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -24,8 +24,8 @@
|
|||
<label>@trans.rating() <span class="help" title="The average rating of both players">(?)</span></label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("ratingMin"), Query.averageRatings, "".some)</div>
|
||||
<div class="half">To @base.select(form("ratingMax"), Query.averageRatings, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("ratingMin"), Query.averageRatings, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("ratingMax"), Query.averageRatings, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -33,8 +33,8 @@
|
|||
<label>Number of turns</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("turnsMin"), Query.turns, "".some)</div>
|
||||
<div class="half">To @base.select(form("turnsMax"), Query.turns, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("turnsMin"), Query.turns, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("turnsMax"), Query.turns, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -42,8 +42,8 @@
|
|||
<label>@trans.duration()</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("durationMin"), Query.durations, "".some)</div>
|
||||
<div class="half">To @base.select(form("durationMax"), Query.durations, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("durationMin"), Query.durations, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("durationMax"), Query.durations, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -51,8 +51,8 @@
|
|||
<label>Clock initial time</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("clock")("initMin"), Query.clockInits, "".some)</div>
|
||||
<div class="half">To @base.select(form("clock")("initMax"), Query.clockInits, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("clock")("initMin"), Query.clockInits, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("clock")("initMax"), Query.clockInits, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -60,8 +60,8 @@
|
|||
<label>Clock increment</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("clock")("incMin"), Query.clockIncs, "".some)</div>
|
||||
<div class="half">To @base.select(form("clock")("incMax"), Query.clockIncs, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("clock")("incMin"), Query.clockIncs, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("clock")("incMax"), Query.clockIncs, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -69,7 +69,7 @@
|
|||
<label for="@form("source").id">Source</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("source"), Query.sources, "".some)
|
||||
@base.form.select(form("source"), Query.sources, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<label for="@form("perf").id">@trans.variant()</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("perf"), Query.perfs, "".some)
|
||||
@base.form.select(form("perf"), Query.perfs, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -85,7 +85,7 @@
|
|||
<label for="@form("mode").id">@trans.mode()</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("mode"), Query.modes, "".some)
|
||||
@base.form.select(form("mode"), Query.modes, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<label for="@form("hasAi").id">@trans.opponent() <span class="help" title="Whether the player's opponent was a human or a computer">(?)</span></label>
|
||||
</th>
|
||||
<td class="single opponent">
|
||||
@base.select(form("hasAi"), Query.hasAis, "".some)
|
||||
@base.form.select(form("hasAi"), Query.hasAis, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="aiLevel none">
|
||||
|
@ -103,8 +103,8 @@
|
|||
<label for="@form("aiLevel").id">A.I. level</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">From @base.select(form("aiLevelMin"), Query.aiLevels, "".some)</div>
|
||||
<div class="half">To @base.select(form("aiLevelMax"), Query.aiLevels, "".some)</div>
|
||||
<div class="half">From @base.form.select(form("aiLevelMin"), Query.aiLevels, "".some)</div>
|
||||
<div class="half">To @base.form.select(form("aiLevelMax"), Query.aiLevels, "".some)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="opponentName">
|
||||
|
@ -113,7 +113,7 @@
|
|||
</th>
|
||||
<td class="usernames">
|
||||
<input value="@u.id" name="players.a" type="hidden">
|
||||
@base.input(form("players")("b"))
|
||||
@base.form.input(form("players")("b"))
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="winner user_row">
|
||||
|
@ -143,7 +143,7 @@
|
|||
<label for="@form("status").id">Result</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("status"), Query.statuses, "".some)
|
||||
@base.form.select(form("status"), Query.statuses, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -151,7 +151,7 @@
|
|||
<label for="@form("winnerColor").id">Winner color</label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@base.select(form("winnerColor"), Query.winnerColors, "".some)
|
||||
@base.form.select(form("winnerColor"), Query.winnerColors, "".some)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -159,8 +159,8 @@
|
|||
<label>Sort</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="half">By @base.select(form("sort")("field"), Sorting.fields)</div>
|
||||
<div class="half">Order @base.select(form("sort")("order"), Sorting.orders)</div>
|
||||
<div class="half">By @base.form.select(form("sort")("field"), Sorting.fields)</div>
|
||||
<div class="half">Order @base.form.select(form("sort")("order"), Sorting.orders)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -168,7 +168,7 @@
|
|||
<label for="analysed">Analysis <span class="help" title="Whether computer analysis is available or not">(?)</span></label>
|
||||
</th>
|
||||
<td class="single">
|
||||
@{ base.checkbox(form("analysed"), "", 1) }
|
||||
@base.form.checkbox(form("analysed"), "", 1)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<a class="button thin hint--bottom" data-hint="@trans.boardEditor()" href="@href">
|
||||
<span data-icon="m"></span>
|
||||
</a>
|
||||
@base.input(field, placeholder=trans.pasteTheFenStringHere.str().some)
|
||||
@base.form.input(field, placeholder=trans.pasteTheFenStringHere.str().some)
|
||||
</div>
|
||||
<a class="board_editor" href="@href">
|
||||
<span class="preview">@validFen.map { vf =>
|
||||
|
|
|
@ -33,9 +33,9 @@ title = trans.hostANewSimul.str()) {
|
|||
<tr class="time">
|
||||
<th><label>@trans.timeControl()</label></th>
|
||||
<td class="inline">
|
||||
@base.select(form("clockTime"), config.clockTimeChoices)
|
||||
@base.form.select(form("clockTime"), config.clockTimeChoices)
|
||||
+
|
||||
@base.select(form("clockIncrement"), config.clockIncrementChoices)
|
||||
@base.form.select(form("clockIncrement"), config.clockIncrementChoices)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="help">
|
||||
|
@ -45,11 +45,11 @@ title = trans.hostANewSimul.str()) {
|
|||
</tr>
|
||||
<tr>
|
||||
<th><label for="@form("clockExtra").id">@trans.simulHostExtraTime()</label></th>
|
||||
<td>@base.select(form("clockExtra"), config.clockExtraChoices)</td>
|
||||
<td>@base.form.select(form("clockExtra"), config.clockExtraChoices)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="@form("color").id">Host color for each game</label></th>
|
||||
<td>@base.select(form("color"), config.colorChoices)</td>
|
||||
<td>@base.form.select(form("color"), config.colorChoices)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
<section class="team-data">
|
||||
<label>
|
||||
<span>@trans.joiningPolicy()</span>
|
||||
@base.select(form("open"), Seq(0 -> trans.aConfirmationIsRequiredToJoin.str(), 1 -> trans.anyoneCanJoin.str()))
|
||||
@base.form.select(form("open"), Seq(0 -> trans.aConfirmationIsRequiredToJoin.str(), 1 -> trans.anyoneCanJoin.str()))
|
||||
</label>
|
||||
<label>
|
||||
<span>@trans.location()</span>
|
||||
@base.input(form("location"))
|
||||
@base.form.input(form("location"))
|
||||
@errMsg(form("location"))
|
||||
</label>
|
||||
<label>
|
||||
|
|
|
@ -10,16 +10,16 @@ currentTab = "form".some) {
|
|||
<section class="team-data">
|
||||
<label>
|
||||
<span class="required">@trans.name()</span>
|
||||
@base.input(form("name"))
|
||||
@base.form.input(form("name"))
|
||||
@errMsg(form("name"))
|
||||
</label>
|
||||
<label>
|
||||
<span>@trans.joiningPolicy()</span>
|
||||
@base.select(form("open"), Seq(0 -> trans.aConfirmationIsRequiredToJoin.str(), 1 -> trans.anyoneCanJoin.str()))
|
||||
@base.form.select(form("open"), Seq(0 -> trans.aConfirmationIsRequiredToJoin.str(), 1 -> trans.anyoneCanJoin.str()))
|
||||
</label>
|
||||
<label>
|
||||
<span>@trans.location()</span>
|
||||
@base.input(form("location"))
|
||||
@base.form.input(form("location"))
|
||||
@errMsg(form("location"))
|
||||
</label>
|
||||
<label>
|
||||
|
|
|
@ -7,57 +7,57 @@
|
|||
|
||||
<div>
|
||||
@base.form.group(form("date"), Html("Start date <strong>UTC</strong>"), half = true) {
|
||||
@base.flatpickr(form("date"))
|
||||
@base.form.flatpickr(form("date"))
|
||||
}
|
||||
@base.form.group(form("name"), Html("Name"), half = true) {
|
||||
@base.input(form("name"))
|
||||
@base.form.input(form("name"))
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
@base.form.group(form("homepageHours"), Html("Hours on homepage (0 to 24)"), half = true) {
|
||||
@base.input(form("homepageHours"))
|
||||
@base.form.input(form("homepageHours"))
|
||||
}
|
||||
@base.form.group(form("image"), Html("Custom icon"), half = true) {
|
||||
@base.select(form("image"), imageChoices)
|
||||
@base.form.select(form("image"), imageChoices)
|
||||
}
|
||||
</div>
|
||||
@base.form.group(form("headline"), Html("Homepage headline")) {
|
||||
@base.input(form("headline"))
|
||||
@base.form.input(form("headline"))
|
||||
}
|
||||
@base.form.group(form("description"), Html("Full description")) {
|
||||
<textarea name="@form("description").name" id="@form("description").id">@form("description").value</textarea>
|
||||
}
|
||||
<div>
|
||||
@base.form.group(form("variant"), Html("Variant"), half = true) {
|
||||
@base.select(form("variant"), translatedVariantChoicesWithVariants.map(x => x._1 -> x._2))
|
||||
@base.form.select(form("variant"), translatedVariantChoicesWithVariants.map(x => x._1 -> x._2))
|
||||
}
|
||||
@base.form.group(form("minutes"), Html("Duration in minutes"), half = true) {
|
||||
@base.input(form("minutes"))
|
||||
@base.form.input(form("minutes"))
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
@base.form.group(form("clockTime"), Html("Clock time"), half = true) {
|
||||
@base.select(form("clockTime"), clockTimeChoices)
|
||||
@base.form.select(form("clockTime"), clockTimeChoices)
|
||||
}
|
||||
@base.form.group(form("clockIncrement"), Html("Clock increment"), half = true) {
|
||||
@base.select(form("clockIncrement"), clockIncrementChoices)
|
||||
@base.form.select(form("clockIncrement"), clockIncrementChoices)
|
||||
}
|
||||
</div>
|
||||
<h2>Conditions of entry</h2>
|
||||
<div>
|
||||
@base.form.group(form("conditions.nbRatedGame.nb"), Html("Minimum rated games"), half = true) {
|
||||
@base.select(form("conditions.nbRatedGame.nb"), Condition.DataForm.nbRatedGameChoices)
|
||||
@base.form.select(form("conditions.nbRatedGame.nb"), Condition.DataForm.nbRatedGameChoices)
|
||||
}
|
||||
@base.form.group(form("conditions.nbRatedGame.perf"), Html("In variant"), half = true) {
|
||||
@base.select(form("conditions.nbRatedGame.perf"), ("", "Any") :: Condition.DataForm.perfChoices)
|
||||
@base.form.select(form("conditions.nbRatedGame.perf"), ("", "Any") :: Condition.DataForm.perfChoices)
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
@base.form.group(form("conditions.maxRating.rating"), Html("Maximum top rating"), half = true) {
|
||||
@base.select(form("conditions.maxRating.rating"), Condition.DataForm.maxRatingChoices)
|
||||
@base.form.select(form("conditions.maxRating.rating"), Condition.DataForm.maxRatingChoices)
|
||||
}
|
||||
@base.form.group(form("conditions.maxRating.perf"), Html("In variant"), half = true) {
|
||||
@base.select(form("conditions.maxRating.perf"), Condition.DataForm.perfChoices)
|
||||
@base.form.select(form("conditions.maxRating.perf"), Condition.DataForm.perfChoices)
|
||||
}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ moreJs = moreJs) {
|
|||
<input type="hidden" name="@form("system").id" value="1" />
|
||||
<tr class="variant">
|
||||
<th><label for="@form("variant").id">@trans.variant()</label></th>
|
||||
<td>@base.select(form("variant"), translatedVariantChoicesWithVariants.map(x => x._1 -> x._2))</td>
|
||||
<td>@base.form.select(form("variant"), translatedVariantChoicesWithVariants.map(x => x._1 -> x._2))</td>
|
||||
</tr>
|
||||
<tr class="position">
|
||||
<th><label for="@form("position").id">@trans.startPosition()</label></th>
|
||||
|
@ -51,7 +51,7 @@ moreJs = moreJs) {
|
|||
<th><label for="@form("mode").id">@trans.mode()</label></th>
|
||||
<td>
|
||||
@globalCasualOnlyMessage.getOrElse {
|
||||
@base.select(form("mode"), translatedModeChoices.map(x => x._1 -> x._2))
|
||||
@base.form.select(form("mode"), translatedModeChoices.map(x => x._1 -> x._2))
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -65,7 +65,7 @@ moreJs = moreJs) {
|
|||
</tr>
|
||||
<tr>
|
||||
<th><label for="@form("waitMinutes").id">@trans.timeBeforeTournamentStarts()</label></th>
|
||||
<td>@base.select(form("waitMinutes"), waitMinuteChoices)</td>
|
||||
<td>@base.form.select(form("waitMinutes"), waitMinuteChoices)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -80,20 +80,20 @@ moreJs = moreJs) {
|
|||
</table>
|
||||
</form>
|
||||
<div class="none private_time">
|
||||
@base.select(form("clockTime"), clockTimePrivateChoices)
|
||||
@base.form.select(form("clockTime"), clockTimePrivateChoices)
|
||||
+
|
||||
@base.select(form("clockIncrement"), clockIncrementPrivateChoices)
|
||||
@base.form.select(form("clockIncrement"), clockIncrementPrivateChoices)
|
||||
</div>
|
||||
<div class="none public_time">
|
||||
@base.select(form("clockTime"), clockTimeChoices)
|
||||
@base.form.select(form("clockTime"), clockTimeChoices)
|
||||
+
|
||||
@base.select(form("clockIncrement"), clockIncrementChoices)
|
||||
@base.form.select(form("clockIncrement"), clockIncrementChoices)
|
||||
</div>
|
||||
<div class="none private_minutes">
|
||||
@base.select(form("minutes"), minutePrivateChoices)
|
||||
@base.form.select(form("minutes"), minutePrivateChoices)
|
||||
</div>
|
||||
<div class="none public_minutes">
|
||||
@base.select(form("minutes"), minuteChoices)
|
||||
@base.form.select(form("minutes"), minuteChoices)
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_box small_box faq_box tournament_box">
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<br />
|
||||
<br />
|
||||
<form class="fide_title" method="post" action="@routes.Mod.setTitle(u.username)">
|
||||
@base.select(lila.user.DataForm.title.fill(u.title)("title"), lila.user.User.titles, "No title".some)
|
||||
@base.form.select(lila.user.DataForm.title.fill(u.title)("title"), lila.user.User.titles, "No title".some)
|
||||
</form>
|
||||
}
|
||||
@if(isGranted(_.SetEmail)) {
|
||||
|
|
Loading…
Reference in a new issue