I was looking for a module that would enable me to create a "help tip" that would appear on a particular page until the user dismissed it.

I found this module and thought, "If I put the help tip in a collapsible fieldset, this module would allow the user to collapse the tip and it would stay collapsed."

... except that in order for this to work, the cookie needs to be persistent instead of per-session.

Toward that end, the attached patch creates a "fieldset_helper_cookie_duration" setting which specifies the number of days that the cookie should persist. The default value of zero will result in the current (original) behavior where the cookie persists until the browser session is closed. Any other setting means that cookies persist for that many days.

Comments

pillarsdotnet’s picture

StatusFileSize
new3.8 KB

BAAH!!!

Original patch is b0rken; here's a replacement that I actually tested and verified.

jrockowitz’s picture

This is a great idea. I will apply and test the patch in the next day or so.

jrockowitz’s picture

pillarsdotnet,

Your patch worked perfectly. I made some minor changes which include:
- fieldset_helper.js - Removed global expiration variable.
- fieldset_helper.admin.inc - Added integer validation to the cookie duration and added 'days' suffix to text field.

I commited the change to the dev version and I will create a new release node in the next week or so.

Thanks,
~jake

pillarsdotnet’s picture

Status: Needs review » Reviewed & tested by the community
Branndon’s picture

Does the dev have this? Have you made a new node yet just not uploaded it? Just checking. Thanks for this, one of the best modules yet!

jrockowitz’s picture

The dev version has the change. I can roll out a new release if needed. I was hoping to resolve some outstanding issues first but I am really busy for the next few weeks.

jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Change has been committed to the 6.x-2.x-dev release and will be included in the 6.x-2.x version.

Status: Fixed » Closed (fixed)

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