Skip to content

Commit

Permalink
Merge branch 'main' into manager_dates_restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico authored Aug 28, 2024
2 parents 8e90e17 + e392f85 commit 9e9fc29
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 7 deletions.
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Changelog
=========


2.7.7 (unreleased)
2.7.8 (unreleased)
------------------

- Apply validity dates restrictions for the Bookings Manger if selected flag 'apply_date_restrictions_to_manager'.
Expand All @@ -12,6 +12,13 @@ Changelog
[folix-01]


2.7.7 (2024-08-22)
------------------

- Bookings details help text in `Tipologia prenotazione`.
[folix-01]


2.7.6 (2024-06-27)
------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="redturtle.prenotazioni",
version="2.7.7.dev0",
version="2.7.8.dev0",
description="An add-on for Plone",
long_description=long_description,
# Get more from https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
9 changes: 9 additions & 0 deletions src/redturtle/prenotazioni/content/prenotazione_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ class IPrenotazioneType(model.Schema):
# default=[],
# )

booking_details_help_text = RichText(
required=False,
title=_("booking_details_help_text_label", default="Bookign detail help text"),
description=_(
"booking_details_help_text_label_help",
default='This field will be visualized as "Details" helptext during the booking steps',
),
)


@implementer(IPrenotazioneType)
class PrenotazioneType(Item):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-08-19 10:07+0000\n"
"POT-Creation-Date: 2024-08-19 14:54+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -647,6 +647,16 @@ msgstr ""
msgid "booking_deleted_success"
msgstr ""

#. Default: "Bookign detail help text"
#: redturtle/prenotazioni/content/prenotazione_type.py:41
msgid "booking_details_help_text_label"
msgstr ""

#. Default: "This field will be visualized as \"Details\" helptext during the booking steps"
#: redturtle/prenotazioni/content/prenotazione_type.py:42
msgid "booking_details_help_text_label_help"
msgstr ""

#. Default: "Booking fields"
#: redturtle/prenotazioni/content/prenotazioni_folder.py:548
msgid "booking_fields_label"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2024-08-19 10:07+0000\n"
"POT-Creation-Date: 2024-08-19 14:54+0000\n"
"PO-Revision-Date: 2014-05-27 17:36+0200\n"
"Last-Translator: Alessandro Pisa <[email protected]>\n"
"Language-Team: American English <[email protected]>\n"
Expand Down Expand Up @@ -650,6 +650,16 @@ msgstr "Prenotazione creata"
msgid "booking_deleted_success"
msgstr "La tua prenotazione è stata cancellata."

#. Default: "Bookign detail help text"
#: redturtle/prenotazioni/content/prenotazione_type.py:41
msgid "booking_details_help_text_label"
msgstr "Istruzioni per campo dettaglio nella prenotazione"

#. Default: "This field will be visualized as \"Details\" helptext during the booking steps"
#: redturtle/prenotazioni/content/prenotazione_type.py:42
msgid "booking_details_help_text_label_help"
msgstr "Il testo verra visualizzato come testo d'aiuto per la compilazione del campo \"Dettagli\" da parte del cittadino nella form della prenotazione"

#. Default: "Booking fields"
#: redturtle/prenotazioni/content/prenotazioni_folder.py:548
msgid "booking_fields_label"
Expand Down
12 changes: 11 additions & 1 deletion src/redturtle/prenotazioni/locales/redturtle.prenotazioni.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-08-19 10:07+0000\n"
"POT-Creation-Date: 2024-08-19 14:54+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -650,6 +650,16 @@ msgstr ""
msgid "booking_deleted_success"
msgstr ""

#. Default: "Bookign detail help text"
#: redturtle/prenotazioni/content/prenotazione_type.py:41
msgid "booking_details_help_text_label"
msgstr ""

#. Default: "This field will be visualized as \"Details\" helptext during the booking steps"
#: redturtle/prenotazioni/content/prenotazione_type.py:42
msgid "booking_details_help_text_label_help"
msgstr ""

#. Default: "Booking fields"
#: redturtle/prenotazioni/content/prenotazioni_folder.py:548
msgid "booking_fields_label"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from plone import api
from plone.restapi.serializer.converters import json_compatible
from zope.component import adapter
from zope.interface import implementer

Expand All @@ -23,4 +24,7 @@ def __call__(self, *args, **kwargs):
"name": self.context.title,
"duration": str(self.context.duration),
"hidden": hidden,
"booking_details_help_text": json_compatible(
self.context.booking_details_help_text, self.context
),
}
18 changes: 16 additions & 2 deletions src/redturtle/prenotazioni/tests/test_booking_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,14 @@ def test_booking_schema_no_bookable_available(
expected = {
"booking_types": {
"bookable": [],
"unbookable": [{"duration": "30", "name": "Type A", "hidden": True}],
"unbookable": [
{
"duration": "30",
"name": "Type A",
"hidden": True,
"booking_details_help_text": None,
}
],
},
"fields": [
{
Expand Down Expand Up @@ -217,7 +224,14 @@ def test_booking_schema_bookable_available(

expected = {
"booking_types": {
"bookable": [{"duration": "30", "name": "Type A", "hidden": True}],
"bookable": [
{
"duration": "30",
"name": "Type A",
"hidden": True,
"booking_details_help_text": None,
}
],
"unbookable": [],
},
"fields": [
Expand Down

0 comments on commit 9e9fc29

Please sign in to comment.