Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Oct 26, 2023
1 parent 9cc497e commit 3685ca1
Show file tree
Hide file tree
Showing 10 changed files with 609 additions and 703 deletions.
9 changes: 5 additions & 4 deletions src/redturtle/prenotazioni/content/booking_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ class IBookingType(model.Schema):
"""Marker interface and Dexterity Python Schema for Prenotazione"""

duration = schema.Choice(
title=_("Duration value"),
title=_("booking_type_duration_label", default="Duration value"),
required=True,
vocabulary="redturtle.prenotazioni.VocDurataIncontro",
)

requirements = RichText(
required=False,
title=_("Cosa serve", default="Cosa serve"),
title=_("booking_type_requirements_labled", default="Requirements"),
description=_(
"Elencare le informazioni utili per il giorno della prenotazione, come ad esempio i documenti da presentare."
"booking_type_requirements_help",
default="List of requirements to recieve the service",
),
)

gates = schema.List(
title=_("gates_label", "Gates"),
title=_("gates_label", default="Gates"),
description=_("gates_help", default="Put gates here (one per line)."),
required=True,
value_type=schema.Choice(
Expand Down
33 changes: 0 additions & 33 deletions src/redturtle/prenotazioni/content/prenotazioni_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,6 @@ class IPauseTableRow(model.Schema):
)


# class IBookingTypeRow(Interface):
# name = schema.TextLine(title=_("Booking type name"), required=True)
# duration = schema.Choice(
# title=_("Duration value"),
# required=True,
# vocabulary="redturtle.prenotazioni.VocDurataIncontro",
# )
# hidden = schema.Bool(
# title=_("Hidden type"),
# required=False,
# default=False,
# )


@provider(IContextAwareDefaultFactory)
def notify_on_submit_subject_default_factory(context):
return getattr(context, "translate", translate)(
Expand Down Expand Up @@ -445,25 +431,6 @@ def get_options():
),
)

# booking_types = schema.List(
# title=_("booking_types_label", default="Booking types"),
# description=_(
# "booking_types_help",
# default="Put booking types there (one per line).\n"
# "If you do not provide this field, "
# "not type selection will be available. "
# "If the 'Hidden Type' flag is selected the type will only "
# "be available to users with the 'Bookings Manager' permission",
# ),
# value_type=DictRow(schema=IBookingTypeRow),
# )
# form.widget(
# "booking_types",
# DataGridFieldFactory,
# auto_append=False,
# frontendOptions={"widget": "data_grid"},
# )

gates = schema.List(
title=_("gates_label", "Gates"),
description=_("gates_help", default="Put gates here (one per line)."),
Expand Down
Loading

0 comments on commit 3685ca1

Please sign in to comment.