Development

#8446 (sfWidgetFormTime subwidgets do not respect id_format)

You must first sign up to be able to contribute.

Ticket #8446 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

sfWidgetFormTime subwidgets do not respect id_format

Reported by: boutell Assigned to: fabien
Priority: major Milestone: 1.4.5
Component: widget Version: 1.4.3
Keywords: sfWidgetFormTime Cc: agilbert, dordille
Qualification: Unreviewed

Description

sfWidgetFormTime generates and renders subwidgets that do not respect the id_format of the parent widget. In pages containing multiple forms, this results in select elements with redundant ids (invalid markup) and also breaks jQuery enhancements etc.

The fix is straightforward because the temporary widgets are made in the render() method and by this point a simple call to getIdFormat gets us the id format for the main widget.

I have appended an svn diff, hopefully this can be adopted soon so that progressive enhancement can work properly. The attached diff has been tested and should allow properly for the situation where there is no id format.

Attachments

sfWidgetFormTime.diff (2.2 kB) - added by boutell on 03/22/10 19:55:21.
Patch to correct the sfWidgetFormTime id_format bug

Change History

03/22/10 19:55:21 changed by boutell

  • attachment sfWidgetFormTime.diff added.

Patch to correct the sfWidgetFormTime id_format bug

03/29/10 15:35:42 changed by boutell

sfWidgetFormDate has the same bug and should be amenable to the same fix. I see that one can optionally pass special options for the day, month and year widgets (which you can't do with the time widget), and those should be merged last in case somebody is overriding the id format on purpose.

05/30/10 14:35:21 changed by Kris.Wallsmith

  • status changed from new to closed.
  • resolution set to fixed.

(In [29674]) [1.3, 1.4] updated date and time widgets so id_format is respected (closes #8446)

06/02/10 17:24:29 changed by boutell

Thanks for hitting this