Hide "Help" tab if no help text
starkos - February 7, 2009 - 17:19
| Project: | Watcher |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
Once I prevented users from changing the watcher settings (http://drupal.org/node/370715), the Help tab became unnecessary. I deleted the default help text, but the tab still appeared. This patch will hide the tab if there is no text to display.
One issue: you have to clear the caches before it will take effect. I was going to include that functionality in the patch, but I saw this at line 939:
<?php
// Add submit callback to clear menu cache if necessary
$form['#submit'][] = '_watcher_admin_settings_clear_menu_cache';
?>I couldn't find _watcher_admin_settings_clear_menu_cache -- is this something in progress?
Anyway, the patch will hide the tab, so long as you clear the caches after deleting the help text.
| Attachment | Size |
|---|---|
| hide_help_tab.patch | 895 bytes |

#1
My goal right now is to get a stable version out, Watcher is therefore feature frozen. I'll consider this for the next version (1.1).
The code there is a remnant from a feature that I've removed, thanks for spotting it.
#2
+1 to this feature as well. How about pre-populating it with some text? I am unsure what tips would be helpful to the user.
#3
The help page has a default text but a bug in version 1.1 made the text disappear from the module settings page. If you saved the page then, the default help text would disappear from the help page. The issue was addressed in release 1.2 of Watcher.