plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
451 stars 613 forks source link

Event: "whole day" and "open end" have no effect #3243

Open tisto opened 2 years ago

tisto commented 2 years ago

Describe the bug

In Plone Classic the UI for the start/end date adapts if the user checks the "whole day" checkbox (time fields disappear) and the "open end" checkbox (end date/time disappear). This is not the case in Volto and this confuses our editors.

Sprints-—-Plone-Enterprise-Level-CMS-Free-and-OpenSource-Community-Driven-Secure

Sprints-—-Plone-Enterprise-Level-CMS-Free-and-OpenSource-Community-Driven-Secure (1)

To Reproduce Steps to reproduce the behavior:

  1. As admin
  2. Go to https://volto.kitconcept.dev
  3. Create a new event https://volto.kitconcept.dev/add?type=Event
  4. Click the "whole day" or "open end" checkbox in the right column
  5. Nothing changes in the UI

Expected behavior

Screenshots

Add-Event (1)

Software (please complete the following information):

ichim-david commented 2 years ago

Since the Events content type isn't blocks enabled it uses the form widgets from the default form construction. The showing and hiding of the end and start date were hidden on toggle within Plone 5 with jQuery and not part of the Boolean or DateTime picker widgets. https://github.com/plone/plone.app.event/blob/3.2.x/plone/app/event/browser/resources/event.js#L184 There is no such functionality within Volto's Checkbox field to my knowledge. https://github.com/plone/plone.app.event/blob/master/plone/app/event/dx/behaviors.py#L129

tisto commented 2 years ago

@ichim-david we disabled those two fields in our project because they do not provide any functionality. If we can't come up with a solution, we should do the same (at least for now) in Volto. Then we have to live with the fact that we do not provide the functionality that Classic currently has.

cekk commented 2 years ago

@tisto any news with this issue or you still disable the fields?

tisto commented 1 year ago

@cekk those fields are still disabled. Unless someone picks this up and implements the full functionality, this is what we should do IMHO.

stevepiercy commented 8 months ago

I've included this in my draft PLIP for event content types: https://github.com/plone/volto/issues/5629.