disallow correspondence seeks to anon players
This commit is contained in:
parent
eab6a75544
commit
ab276bc0cb
|
@ -1,6 +1,7 @@
|
|||
@(form: Form[_], typ: String, title: Html, route: Call, fields: Html, error: Option[Html] = None)(implicit ctx: Context)
|
||||
|
||||
<div class="lichess_overboard game_config game_config_@typ">
|
||||
<div class="lichess_overboard game_config game_config_@typ"
|
||||
@if(ctx.isAnon){data-anon="1"}>
|
||||
<a href="@routes.Lobby.home" class="close icon" title="@trans.cancel()" data-icon="L"></a>
|
||||
<h2>@title</h2>
|
||||
@error.map { e =>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
@(field: play.api.data.Field, options: Seq[(String,String, Option[String])])
|
||||
@(field: play.api.data.Field, options: Seq[(String, String, Option[String])])
|
||||
<select id="@field.id" name="@field.name">
|
||||
@options.map { v =>
|
||||
<option value="@v._1" class="@{field.name}_@v._1" @v._3.map { title =>
|
||||
title="@title"
|
||||
} @if(field.value.contains(v._1)){selected="selected"}>@v._2</option>
|
||||
@options.map {
|
||||
case (value, name, title) => {
|
||||
<option value="@value" class="@{field.name}_@value" @title.map { t =>
|
||||
title="@t"
|
||||
} @if(field.value.contains(value)){selected="selected"}>@name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
|
|
@ -1290,6 +1290,12 @@ var storage = {
|
|||
};
|
||||
if (isHook) {
|
||||
var $formTag = $form.find('form');
|
||||
if ($form.data('anon')) {
|
||||
$timeModeSelect.val(1)
|
||||
.children('.timeMode_2, .timeMode_0')
|
||||
.prop('disabled', true)
|
||||
.attr('title', $.trans('You need an account to do that'));
|
||||
}
|
||||
var ajaxSubmit = function(color) {
|
||||
$.ajax({
|
||||
url: $formTag.attr('action').replace(/uid-placeholder/, lichess.StrongSocket.sri),
|
||||
|
|
Loading…
Reference in a new issue