hint for disabled registration

This commit is contained in:
Philip Häusler 2014-09-28 14:14:04 +02:00
parent e4a042c8c3
commit 0f77edc4fb
1 changed files with 15 additions and 4 deletions

View File

@ -1,4 +1,5 @@
<?php
function login_title() {
return _("Login");
}
@ -253,6 +254,19 @@ function guest_login() {
}
}
if (in_array('register', $privileges)) {
$register_hint = join('', array(
'<p>' . _("Please sign up, if you want to help us!") . '</p>',
buttons(array(
button(page_link_to('register'), register_title() . ' &raquo;')
))
));
} else {
$register_hint = join('', array(
error(_('Registration is disabled.'), true)
));
}
return page_with_title(login_title(), array(
msg(),
'<div class="row"><div class="col-md-6">',
@ -268,10 +282,7 @@ function guest_login() {
'</div>',
'<div class="col-md-6">',
'<h2>' . register_title() . '</h2>',
'<p>' . _("Please sign up, if you want to help us!") . '</p>',
buttons(array(
button(page_link_to('register'), register_title() . ' &raquo;')
)),
$register_hint,
'<h2>' . _("What can I do?") . '</h2>',
'<p>' . _("Please read about the jobs you can do to help us.") . '</p>',
buttons(array(