diff options
| author | Greg Roach <fisharebest@gmail.com> | 2016-06-22 23:51:21 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2016-06-22 23:51:39 +0100 |
| commit | 07660c6784de912dff03f94c7d3f0f2b3d77a4d9 (patch) | |
| tree | 43923129850df72ce8d34225d1e73d5c0f2383c4 /app/Module/NotesTabModule.php | |
| parent | d7e722d9af5cc8b25e6a0b73b437d57774212521 (diff) | |
| download | webtrees-07660c6784de912dff03f94c7d3f0f2b3d77a4d9.tar.gz webtrees-07660c6784de912dff03f94c7d3f0f2b3d77a4d9.tar.bz2 webtrees-07660c6784de912dff03f94c7d3f0f2b3d77a4d9.zip | |
Replace default checkbox settings with persistant user settings
Diffstat (limited to 'app/Module/NotesTabModule.php')
| -rw-r--r-- | app/Module/NotesTabModule.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/Module/NotesTabModule.php b/app/Module/NotesTabModule.php index 598bcfcec4..ef1e83813a 100644 --- a/app/Module/NotesTabModule.php +++ b/app/Module/NotesTabModule.php @@ -62,6 +62,9 @@ class NotesTabModule extends AbstractModule implements ModuleTabInterface { ob_start(); ?> + <script> + persistant_toggle("checkbox_note2", "row_note2"); + </script> <table class="facts_table"> <colgroup> <col class="width20"> @@ -69,8 +72,10 @@ class NotesTabModule extends AbstractModule implements ModuleTabInterface { </colgroup> <tr class="noprint"> <td colspan="2" class="descriptionbox rela"> - <input id="checkbox_note2" type="checkbox" <?php echo $WT_TREE->getPreference('SHOW_LEVEL2_NOTES') ? 'checked' : ''; ?> onclick="jQuery('tr.row_note2').toggle();"> - <label for="checkbox_note2"><?php echo I18N::translate('Show all notes'); ?></label> + <label> + <input id="checkbox_note2" type="checkbox" checked> + <?php echo I18N::translate('Show all notes'); ?> + </label> </td> </tr> @@ -116,9 +121,6 @@ class NotesTabModule extends AbstractModule implements ModuleTabInterface { ?> </table> <?php - if (!$WT_TREE->getPreference('SHOW_LEVEL2_NOTES')) { - echo '<script>jQuery("tr.row_note2").toggle();</script>'; - } return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>'; } |
