From 142bb8d43d643f007399f51d8906991ceed9f03c Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 31 Oct 2023 10:00:36 +0100 Subject: [PATCH] Hide gates --- .../prenotazioni/content/booking_type.py | 18 +++++++++--------- src/redturtle/prenotazioni/upgrades.py | 2 +- .../vocabularies/voc_durata_incontro.py | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/redturtle/prenotazioni/content/booking_type.py b/src/redturtle/prenotazioni/content/booking_type.py index 32d934f9..ab9175f8 100644 --- a/src/redturtle/prenotazioni/content/booking_type.py +++ b/src/redturtle/prenotazioni/content/booking_type.py @@ -26,15 +26,15 @@ class IBookingType(model.Schema): ), ) - gates = schema.List( - title=_("gates_label", default="Gates"), - description=_("gates_help", default="Put gates here (one per line)."), - required=True, - value_type=schema.Choice( - vocabulary="redturtle.prenotazioni.VocBookingTypeGates" - ), - default=[], - ) + # gates = schema.List( + # title=_("gates_label", default="Gates"), + # description=_("gates_help", default="Put gates here (one per line)."), + # required=True, + # value_type=schema.Choice( + # vocabulary="redturtle.prenotazioni.VocBookingTypeGates" + # ), + # default=[], + # ) @implementer(IBookingType) diff --git a/src/redturtle/prenotazioni/upgrades.py b/src/redturtle/prenotazioni/upgrades.py index c7f7b69e..66825a0c 100644 --- a/src/redturtle/prenotazioni/upgrades.py +++ b/src/redturtle/prenotazioni/upgrades.py @@ -484,7 +484,7 @@ def to_2000(context): duration=type.get("duration"), hidden=type.get("hidden"), container=obj, - gates=["all"], + # gates=["all"], ) if not type.get("hidden", False): diff --git a/src/redturtle/prenotazioni/vocabularies/voc_durata_incontro.py b/src/redturtle/prenotazioni/vocabularies/voc_durata_incontro.py index 5672183d..27d46ab2 100644 --- a/src/redturtle/prenotazioni/vocabularies/voc_durata_incontro.py +++ b/src/redturtle/prenotazioni/vocabularies/voc_durata_incontro.py @@ -20,7 +20,7 @@ class VocDurataIncontro(object): """ """ def __call__(self, context): - items = [VocabItem(str(x), str(x)) for x in range(10, 95, 5)] + items = [VocabItem(x, x) for x in range(10, 95, 5)] if not IDexterityContent.providedBy(context): req = getRequest() @@ -29,7 +29,7 @@ def __call__(self, context): terms = [] for item in items: terms.append( - SimpleTerm(value=item.token, token=str(item.token), title=item.value) + SimpleTerm(value=item.token, token=item.token, title=item.value) ) return SimpleVocabulary(terms)