Is it possible to hide the event specific features when the event module is not available or the node is no event node? These features are the reminder message and autoclose option.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 213239_hide_event_specific_features.5.patch | 8.29 KB | dww |
| #4 | 213239_hide_event_specific_features.4.patch | 8.01 KB | dww |
Comments
Comment #1
dwwYeah, that's sort of a bug in the UI, I'll agree. I'd be willing to commit a patch that fixes it even in the 5.x-1.* stable series. However, I'd be more interested in seeing this done in HEAD for the 5.x-2.* series, where we're already abstracting out the code to interface with different event back ends (event 5.x-1.*, event 5.x-2.*, date API + calendar, etc).
Comment #2
dwwSee #289326: Add event backend API for knowing if a node/node type is untimed which should probably happen first, especially in 5.x-2.*.
Comment #3
dwwThis can now be done using signup_node_has_date() from #289326: Add event backend API for knowing if a node/node type is untimed. However, I think we should only do it in the 5.x-2.* series, since that's the only one that has signup_node_has_date() and I now believe this is too much of a big change in the stable 5.x-1.* series.
Comment #4
dwwThis ended up being slightly bigger than I hoped. The "autoclose" thing is just a site-wide setting, so we can't test with a specific node or even node type. So, I had to add yet another method to the date backend API: signup_site_has_dates(). The reminder stuff is relatively straight-forward, although it's a little bit weird how _signup_admin_form() is named and reused in various tricky ways. ;) But, cleaning all that up is outside the scope of this issue.
Anyone else care to review/test this before I commit?
Thanks,
-Derek
Comment #5
dwwRerolled after recent commits to HEAD.
Comment #6
lut4rp commentedI tested this patch against the most recent HEAD version, and it gives me an error :(
After this error, I navigated to admin/settings/signup, to get the error:
Comment #7
dwwPlease checkout a clean copy of HEAD. I committed some stuff last night, and uploaded the new patch that I'm sure applies cleanly. Before you apply the patch, you should have the following revisions at the top of the following files:
If you start from there, then the patch from #5 applies cleanly:
Cheers,
-Derek
Comment #8
lut4rp commentedUgh. You're right, I checked out the DRUPAL-5 revision :)
Wokay, no issues with this too. Patch applies cleanly. Functionality working. Changed to RTBC.
Comment #9
dwwCommitted to HEAD, thanks for the testing.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.