diff --git a/src/onegov/feriennet/locale/de_CH/LC_MESSAGES/onegov.feriennet.po b/src/onegov/feriennet/locale/de_CH/LC_MESSAGES/onegov.feriennet.po
index e06f68bb30..4f37bcfe88 100644
--- a/src/onegov/feriennet/locale/de_CH/LC_MESSAGES/onegov.feriennet.po
+++ b/src/onegov/feriennet/locale/de_CH/LC_MESSAGES/onegov.feriennet.po
@@ -2087,6 +2087,9 @@ msgstr "Löschen"
msgid "Enroll your child now."
msgstr "Jetzt anmelden."
+msgid "Enrolling not possible."
+msgstr "Anmeldungen nicht möglich."
+
msgid "Enroll"
msgstr "Anmelden"
diff --git a/src/onegov/feriennet/locale/fr_CH/LC_MESSAGES/onegov.feriennet.po b/src/onegov/feriennet/locale/fr_CH/LC_MESSAGES/onegov.feriennet.po
index bbdbd0aadd..63bd8a8d02 100644
--- a/src/onegov/feriennet/locale/fr_CH/LC_MESSAGES/onegov.feriennet.po
+++ b/src/onegov/feriennet/locale/fr_CH/LC_MESSAGES/onegov.feriennet.po
@@ -2097,6 +2097,9 @@ msgstr "Supprimer"
msgid "Enroll your child now."
msgstr "Inscrivez votre enfant maintenant."
+msgid "Enrolling not possible."
+msgstr "Inscription impossible."
+
msgid "Enroll"
msgstr "Inscrire"
diff --git a/src/onegov/feriennet/locale/it_CH/LC_MESSAGES/onegov.feriennet.po b/src/onegov/feriennet/locale/it_CH/LC_MESSAGES/onegov.feriennet.po
index 7978264be7..4efbd7e40c 100644
--- a/src/onegov/feriennet/locale/it_CH/LC_MESSAGES/onegov.feriennet.po
+++ b/src/onegov/feriennet/locale/it_CH/LC_MESSAGES/onegov.feriennet.po
@@ -2081,6 +2081,9 @@ msgstr "Cancellare"
msgid "Enroll your child now."
msgstr "Iscriva ora suo figlio/a."
+msgid "Enrolling not possible."
+msgstr "Iscrizione non possibile."
+
msgid "Enroll"
msgstr "Iscrizione"
diff --git a/src/onegov/feriennet/templates/macros.pt b/src/onegov/feriennet/templates/macros.pt
index cf4556953f..dc163a5f3e 100644
--- a/src/onegov/feriennet/templates/macros.pt
+++ b/src/onegov/feriennet/templates/macros.pt
@@ -585,14 +585,17 @@
-
-
+
diff --git a/src/onegov/feriennet/theme/styles/feriennet.scss b/src/onegov/feriennet/theme/styles/feriennet.scss
index 71593b50e0..10bdfaa629 100644
--- a/src/onegov/feriennet/theme/styles/feriennet.scss
+++ b/src/onegov/feriennet/theme/styles/feriennet.scss
@@ -783,6 +783,13 @@ ul.tags {
margin: 0;
width: 25%;
+ &.disabled {
+ background-color: $aluminum;
+ border-color: $aluminum;
+ color: $white;
+ cursor: default !important;
+ }
+
@media #{$medium-only} {
width: 30%;
}
diff --git a/tests/onegov/feriennet/test_views.py b/tests/onegov/feriennet/test_views.py
index 8bd121538a..ea8bdd34cc 100644
--- a/tests/onegov/feriennet/test_views.py
+++ b/tests/onegov/feriennet/test_views.py
@@ -1557,26 +1557,26 @@ def test_deadline(client, scenario):
assert period.is_prebooking_in_past is False
page = client.get('/activity/foo')
assert 'Anmelden' in page.pyquery('.call-to-action a')[0].text
+ assert 'Jetzt anmelden' in page
with freeze_time(prebook_midnight - timedelta(minutes=30)):
assert not period.wishlist_phase
assert period.is_prebooking_in_past is False
page = client.get('/activity/foo')
- assert not page.pyquery('.call-to-action')
+ # assert not page.pyquery('.call-to-action')
+ assert 'Jetzt anmelden' not in page
with freeze_time(scenario.latest_period.booking_end + timedelta(days=1)):
- # show no 'enroll' for ordinary users past the deadline
- # (there is one login link, for the ordinary login)
- assert str(client.get('/activity/foo')).count("Anmelden") == 1
+ # normal users can't enroll anymore
+ assert 'Anmeldungen nicht möglich' in page
- # do show it for admins though and allow signups
+ # admins still can
admin = client.spawn()
admin.login_admin()
# the ordinary login link vanishes
assert str(admin.get('/activity/foo')).count("Abmelden") == 1
- assert str(admin.get('/activity/foo')).count("Anmelden") == 1
page = admin.get('/activity/foo').click("Anmelden")
assert "Der Anmeldeschluss wurde erreicht" not in page.form.submit()