summaryrefslogtreecommitdiff
path: root/app/Module/SourcesTabModule.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2016-06-22 23:51:21 +0100
committerGreg Roach <fisharebest@gmail.com>2016-06-22 23:51:39 +0100
commit07660c6784de912dff03f94c7d3f0f2b3d77a4d9 (patch)
tree43923129850df72ce8d34225d1e73d5c0f2383c4 /app/Module/SourcesTabModule.php
parentd7e722d9af5cc8b25e6a0b73b437d57774212521 (diff)
downloadwebtrees-07660c6784de912dff03f94c7d3f0f2b3d77a4d9.tar.gz
webtrees-07660c6784de912dff03f94c7d3f0f2b3d77a4d9.tar.bz2
webtrees-07660c6784de912dff03f94c7d3f0f2b3d77a4d9.zip
Replace default checkbox settings with persistant user settings
Diffstat (limited to 'app/Module/SourcesTabModule.php')
-rw-r--r--app/Module/SourcesTabModule.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/Module/SourcesTabModule.php b/app/Module/SourcesTabModule.php
index 739f269d12..02baf06a9c 100644
--- a/app/Module/SourcesTabModule.php
+++ b/app/Module/SourcesTabModule.php
@@ -62,11 +62,16 @@ class SourcesTabModule extends AbstractModule implements ModuleTabInterface {
ob_start();
?>
+ <script>
+ persistant_toggle("checkbox_sour2", "row_sour2");
+ </script>
<table class="facts_table">
<tr class="noprint">
<td colspan="2" class="descriptionbox rela">
- <input id="checkbox_sour2" type="checkbox" <?php echo $WT_TREE->getPreference('SHOW_LEVEL2_NOTES') ? 'checked' : ''; ?> onclick="jQuery('tr.row_sour2').toggle();">
- <label for="checkbox_sour2"><?php echo I18N::translate('Show all sources'); ?></label>
+ <label>
+ <input id="checkbox_sour2" type="checkbox" checked">
+ <?php echo I18N::translate('Show all sources'); ?>
+ </label>
</td>
</tr>
<?php
@@ -99,9 +104,6 @@ class SourcesTabModule extends AbstractModule implements ModuleTabInterface {
?>
</table>
<?php
- if (!$WT_TREE->getPreference('SHOW_LEVEL2_NOTES')) {
- echo '<script>jQuery("tr.row_sour2").toggle();</script>';
- }
return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
}