remove title verification header - closes #8609
parent
441c199b14
commit
9a6f379e4a
|
@ -65,21 +65,6 @@ final class Pref(env: Env) extends LilaController(env) {
|
|||
}
|
||||
}
|
||||
|
||||
def verifyTitle =
|
||||
AuthBody { implicit ctx => me =>
|
||||
import play.api.data._, Forms._
|
||||
implicit val req = ctx.body
|
||||
Form(single("v" -> boolean))
|
||||
.bindFromRequest()
|
||||
.fold(
|
||||
_ => fuccess(Redirect(routes.User.show(me.username))),
|
||||
v =>
|
||||
api.saveTag(me, _.verifyTitle, v) inject Redirect {
|
||||
if (v) routes.Page.master else routes.User.show(me.username)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private lazy val setters = Map(
|
||||
"theme" -> (forms.theme -> save("theme") _),
|
||||
"pieceSet" -> (forms.pieceSet -> save("pieceSet") _),
|
||||
|
|
|
@ -64,32 +64,4 @@ object bits {
|
|||
img(src := assetUrl("images/trophy/Gold-Cup.png"))
|
||||
)
|
||||
}
|
||||
|
||||
def claimTitle =
|
||||
div(cls := "claim-title")(
|
||||
h2(dataIcon := "C", cls := "text")("Congratulations for breaking the 2500 rating threshold!"),
|
||||
p(
|
||||
"To ensure honest players aren't falsely accused of cheating, we request titled players ",
|
||||
"to identify themselves. For instance, ",
|
||||
a(href := routes.User.show("opperwezen"))("opperwezen"),
|
||||
" and ",
|
||||
a(href := routes.User.show("DrNykterstein"))("Magnus Carlsen"),
|
||||
" are verified IM, and GM. ",
|
||||
"You can confirm your title and decide to remain anonymous. We will not reveal your identity."
|
||||
),
|
||||
p(
|
||||
"To confirm your title, ",
|
||||
a(href := "https://goo.gl/forms/KymEzEIFpqTO2Jbr1")("please fill in this form"),
|
||||
"."
|
||||
),
|
||||
p(
|
||||
"If you need help or have any question, feel free to contact us by email at ",
|
||||
contactEmailLink,
|
||||
"."
|
||||
),
|
||||
postForm(action := routes.Pref.verifyTitle)(
|
||||
button(cls := "button text", dataIcon := "E", name := "v", value := true)("Got it, thanks!"),
|
||||
button(cls := "button", name := "v", value := false)("I don't have an official title")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -178,8 +178,6 @@ object header {
|
|||
)
|
||||
}
|
||||
),
|
||||
((ctx is u) && u.perfs.bestStandardRating > 2500 && !u.hasTitle && !u.isBot && !ctx.pref.hasSeenVerifyTitle) option
|
||||
views.html.user.bits.claimTitle,
|
||||
isGranted(_.UserModView) option div(cls := "mod-zone none"),
|
||||
standardFlash(),
|
||||
angle match {
|
||||
|
|
|
@ -372,7 +372,6 @@ GET /fishnet/status controllers.Fishnet.status
|
|||
POST /pref/:name controllers.Pref.set(name: String)
|
||||
GET /account/preferences/:categ controllers.Pref.form(categ: String)
|
||||
POST /account/preferences controllers.Pref.formApply
|
||||
POST /account/preferences/verify-title controllers.Pref.verifyTitle
|
||||
|
||||
# Setup
|
||||
GET /setup/ai controllers.Setup.aiForm
|
||||
|
|
|
@ -58,8 +58,7 @@ case class Pref(
|
|||
def coordColorName = Color.choices.toMap.get(coordColor).fold("random")(_.toLowerCase)
|
||||
def coordsClass = Coords classOf coords
|
||||
|
||||
def hasSeenVerifyTitle = tags contains Tag.verifyTitle
|
||||
def hasDgt = tags contains Tag.dgt
|
||||
def hasDgt = tags contains Tag.dgt
|
||||
|
||||
def set(name: String, value: String): Option[Pref] =
|
||||
name match {
|
||||
|
@ -157,8 +156,7 @@ object Pref {
|
|||
}
|
||||
|
||||
object Tag {
|
||||
val verifyTitle = "verifyTitle"
|
||||
val dgt = "dgt"
|
||||
val dgt = "dgt"
|
||||
}
|
||||
|
||||
object Color {
|
||||
|
|
Loading…
Reference in New Issue