parent
1d65582abe
commit
ac631627ab
4
po/de.po
4
po/de.po
@ -504,5 +504,9 @@ msgstr ""
|
|||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#~ msgid "Your password should be at least 8 characters long"
|
#~ msgid "Your password should be at least 8 characters long"
|
||||||
#~ msgstr "Das Passwort sollte mindestens 8 Zeichen lang sein"
|
#~ msgstr "Das Passwort sollte mindestens 8 Zeichen lang sein"
|
||||||
|
4
po/en.po
4
po/en.po
@ -493,3 +493,7 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr ""
|
||||||
|
4
po/fr.po
4
po/fr.po
@ -500,3 +500,7 @@ msgstr "Fichier"
|
|||||||
|
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr "Envoyer"
|
msgstr "Envoyer"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr "Désolé, mais les inscriptions sont fermées sur cette instance. Essayez d'en trouver une autre."
|
||||||
|
4
po/gl.po
4
po/gl.po
@ -499,3 +499,7 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr ""
|
||||||
|
4
po/nb.po
4
po/nb.po
@ -508,6 +508,10 @@ msgstr ""
|
|||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#~ msgid "One reshare"
|
#~ msgid "One reshare"
|
||||||
#~ msgid_plural "{{ count }} reshares"
|
#~ msgid_plural "{{ count }} reshares"
|
||||||
#~ msgstr[0] "Én deling"
|
#~ msgstr[0] "Én deling"
|
||||||
|
4
po/pl.po
4
po/pl.po
@ -519,6 +519,10 @@ msgstr ""
|
|||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#~ msgid "One reshare"
|
#~ msgid "One reshare"
|
||||||
#~ msgid_plural "{{ count }} reshares"
|
#~ msgid_plural "{{ count }} reshares"
|
||||||
#~ msgstr[0] "Jedno udostępnienie"
|
#~ msgstr[0] "Jedno udostępnienie"
|
||||||
|
@ -483,3 +483,6 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Sorry, but registrations are closed on this instance. Try to find another one"
|
||||||
|
msgstr ""
|
||||||
|
@ -166,6 +166,7 @@ fn activity_details(name: String, conn: DbConn, _ap: ApRequest) -> ActivityStrea
|
|||||||
#[get("/users/new")]
|
#[get("/users/new")]
|
||||||
fn new(user: Option<User>, conn: DbConn) -> Template {
|
fn new(user: Option<User>, conn: DbConn) -> Template {
|
||||||
Template::render("users/new", json!({
|
Template::render("users/new", json!({
|
||||||
|
"enabled": Instance::get_local(&*conn).map(|i| i.open_registrations).unwrap_or(true),
|
||||||
"account": user.map(|u| u.to_json(&*conn)),
|
"account": user.map(|u| u.to_json(&*conn)),
|
||||||
"errors": null,
|
"errors": null,
|
||||||
"form": null
|
"form": null
|
||||||
@ -228,6 +229,10 @@ fn passwords_match(form: &NewUserForm) -> Result<(), ValidationError> {
|
|||||||
|
|
||||||
#[post("/users/new", data = "<data>")]
|
#[post("/users/new", data = "<data>")]
|
||||||
fn create(conn: DbConn, data: LenientForm<NewUserForm>) -> Result<Redirect, Template> {
|
fn create(conn: DbConn, data: LenientForm<NewUserForm>) -> Result<Redirect, Template> {
|
||||||
|
if !Instance::get_local(&*conn).map(|i| i.open_registrations).unwrap_or(true) {
|
||||||
|
return Ok(Redirect::to(uri!(new))); // Actually, it is an error
|
||||||
|
}
|
||||||
|
|
||||||
let form = data.get();
|
let form = data.get();
|
||||||
form.validate()
|
form.validate()
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
{% if enabled %}
|
||||||
<h1>{{ "Create an account" | _ }}</h1>
|
<h1>{{ "Create an account" | _ }}</h1>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{{ macros::input(name="username", label="Username", errors=errors, form=form, props='minlenght="1"') }}
|
{{ macros::input(name="username", label="Username", errors=errors, form=form, props='minlenght="1"') }}
|
||||||
@ -15,4 +16,7 @@
|
|||||||
|
|
||||||
<input type="submit" value="{{ "Create account" | _ }}" />
|
<input type="submit" value="{{ "Create account" | _ }}" />
|
||||||
</form>
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<p class="center">{{ "Sorry, but registrations are closed on this instance. Try to find another one" | _ }}</p>
|
||||||
|
{% endif %}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
Loading…
Reference in New Issue
Block a user