Add team password field to request form

pull/7734/head
YaFred 2020-12-14 17:30:14 +00:00
parent 8013a0d107
commit 730ecbbb1c
4 changed files with 11 additions and 2 deletions

View File

@ -32,7 +32,9 @@ object form {
Seq(0 -> aConfirmationIsRequiredToJoin.txt(), 1 -> anyoneCanJoin.txt())
)
},
form3.group(form("password"), trans.password(), help = teamPasswordDescriptionForLeader().some)(form3.input(_)),
form3.group(form("password"), teamPassword(), help = teamPasswordDescriptionForLeader().some)(
form3.input(_)
),
form3.group(form("location"), trans.location())(form3.input(_)),
form3.group(form("description"), trans.description())(form3.textarea(_)(rows := 10)),
views.html.base.captcha(form, captcha),
@ -63,7 +65,9 @@ object form {
Seq(0 -> aConfirmationIsRequiredToJoin.txt(), 1 -> anyoneCanJoin.txt())
)
},
form3.group(form("password"), trans.password(), help = teamPasswordDescriptionForLeader().some)(form3.input(_)),
form3.group(form("password"), teamPassword(), help = teamPasswordDescriptionForLeader().some)(
form3.input(_)
),
form3.group(form("location"), trans.location())(form3.input(_)),
form3.group(form("description"), trans.description())(form3.textarea(_)(rows := 10)),
form3.group(form("chat"), frag("Team chat")) { f =>

View File

@ -28,6 +28,9 @@ object request {
p(style := "margin:2em 0")(richText(t.description)),
postForm(cls := "form3", action := routes.Team.requestCreate(t.id))(
form3.group(form("message"), trans.message())(form3.textarea(_)()),
form3.group(form("password"), teamPassword(), help = teamPasswordDescriptionForRequester().some)(
form3.input(_)
),
p(willBeReviewed()),
form3.actions(
a(href := routes.Team.show(t.slug))(trans.cancel()),

View File

@ -1566,6 +1566,7 @@ val `usersWhoCanManageThisTeam` = new I18nKey("team:usersWhoCanManageThisTeam")
val `leadersChat` = new I18nKey("team:leadersChat")
val `closeTeam` = new I18nKey("team:closeTeam")
val `closeTeamDescription` = new I18nKey("team:closeTeamDescription")
val `teamPassword` = new I18nKey("team:teamPassword")
val `teamPasswordDescriptionForLeader` = new I18nKey("team:teamPasswordDescriptionForLeader")
val `teamPasswordDescriptionForRequester` = new I18nKey("team:teamPasswordDescriptionForRequester")
val `nbMembers` = new I18nKey("team:nbMembers")

View File

@ -44,6 +44,7 @@ Players who don't like receiving your messages might leave the team.</string>
<string name="leadersChat">Leaders chat</string>
<string name="closeTeam">Close team</string>
<string name="closeTeamDescription">Closes the team forever.</string>
<string name="teamPassword">Team password</string>
<string name="teamPasswordDescriptionForLeader">If your team is not open to everyone, you can set a password and send it to your guests. This will prevent spammers from requesting access.</string>
<string name="teamPasswordDescriptionForRequester">You cannot request access unless you know the team password.</string>
</resources>