This saves successfully:
screenshot

Patch will be attached.

Comments

super_romeo created an issue. See original summary.

super_romeo’s picture

Title: isEmpty() wrong behaviour » Slot with comment only saves successfully
Status: Active » Needs review
StatusFileSize
new2.03 KB
johnv’s picture

II am not sure i understand. IMO it is perfectly fine to only have a comment without hiurs. Don't you think? It could be "appointments only".

BTW. Thete is still an open issue "allow empty end time", to do/not throw an errror.

super_romeo’s picture

I guess to leave empty time fields (begin and end) is counterintuitive.

It could be "appointments only".

Right. But time should be filled out. "8:00 - 20:00 Please call for appointment"
Site visitors want know when they can call to this person.

johnv’s picture

Title: Slot with comment only saves successfully » Do not allow empty Slot with comment

  • johnv committed 57941b3 on 8.x-1.x authored by super_romeo
    Issue #3117654 by super_romeo: Do not allow empty Slot with comment
    
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.2
Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

el1_1el’s picture

If this is breaking your ability to save office hours when closed without saving fake hours, see https://www.drupal.org/project/office_hours/issues/3130660 for a patch that reverts this

johnv’s picture

This is reverted. You MAY add comments without hours.
See #3130660: Revert behavior to allow empty hours when closed.

super_romeo’s picture

Maybe we could do it as setting "Time input fields are required"?