summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-09-28 14:14:04 +0200
committerPhilip Häusler <msquare@notrademark.de>2014-09-28 14:14:04 +0200
commit0f77edc4fb5581eacd0305ec9010b78afc489b55 (patch)
tree43a795e1ab0a61c09984a529f2a59610d937dd07
parente4a042c8c3e4fe6622c1a5022290c3e97ed89cec (diff)
hint for disabled registration
-rw-r--r--includes/pages/guest_login.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index c255266d..f738b69d 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -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(