diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-08-22 19:58:38 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-08-22 19:58:38 +0100 |
| commit | 2d8276bad0ebf65cd45fe2dcdd85b3d7175a059d (patch) | |
| tree | 172430103844137c81e28affa8fe0b7a6c0be47f /resources/views | |
| parent | 7aab89b47b7d7d19e855fde6d5c3fafef83b992a (diff) | |
| download | webtrees-2d8276bad0ebf65cd45fe2dcdd85b3d7175a059d.tar.gz webtrees-2d8276bad0ebf65cd45fe2dcdd85b3d7175a059d.tar.bz2 webtrees-2d8276bad0ebf65cd45fe2dcdd85b3d7175a059d.zip | |
Fix: #4000 - persistent checkbox toggles / BS5
Diffstat (limited to 'resources/views')
| -rw-r--r-- | resources/views/admin/locations.phtml | 9 | ||||
| -rw-r--r-- | resources/views/lists/families-table.phtml | 10 | ||||
| -rw-r--r-- | resources/views/lists/individuals-table.phtml | 10 | ||||
| -rw-r--r-- | resources/views/modules/notes/tab.phtml | 10 | ||||
| -rw-r--r-- | resources/views/modules/personal_facts/tab.phtml | 16 | ||||
| -rw-r--r-- | resources/views/modules/relatives/tab.phtml | 10 | ||||
| -rw-r--r-- | resources/views/modules/sources_tab/tab.phtml | 10 |
7 files changed, 19 insertions, 56 deletions
diff --git a/resources/views/admin/locations.phtml b/resources/views/admin/locations.phtml index d366f3e66f..ca28260e06 100644 --- a/resources/views/admin/locations.phtml +++ b/resources/views/admin/locations.phtml @@ -31,7 +31,7 @@ use Illuminate\Support\Collection; <p> <label> - <input id="hide-unused-locations" type="checkbox" data-bs-toggle="collapse" data-bs-target=".unused-location"> + <input id="hide-unused-locations" type="checkbox" data-bs-toggle="collapse" data-bs-target=".unused-location" data-wt-persist="hide-unused-locations"> <?= I18N::translate('Hide unused locations') ?> </label> </p> @@ -167,10 +167,3 @@ use Illuminate\Support\Collection; </tfoot> </table> -<?php View::push('javascript') ?> -<script> - 'use strict'; - - webtrees.persistentToggle("hide-unused-locations"); -</script> -<?php View::endpush() ?> diff --git a/resources/views/lists/families-table.phtml b/resources/views/lists/families-table.phtml index 7d053288bd..4a4fa3a2cc 100644 --- a/resources/views/lists/families-table.phtml +++ b/resources/views/lists/families-table.phtml @@ -417,12 +417,14 @@ $marriageAgeData = [ <tr> <th colspan="14"> <div class="btn-group btn-group-sm"> - <button id="btn-toggle-parents" class="btn btn-outline-secondary" data-bs-toggle="button" data-persist="show-parents"> + <input type="checkbox" class="btn-check" id="btn-toggle-parents" autocomplete="off" data-wt-persist="families-parents"> + <label class="btn btn-secondary" for="btn-toggle-parents"> <?= I18N::translate('Show parents') ?> - </button> - <button id="btn-toggle-statistics" class="btn btn-outline-secondary" data-bs-toggle="button" data-persist="show-statistics"> + </label> + <input type="checkbox" class="btn-check" id="btn-toggle-statistics" autocomplete="off" data-wt-persist="families-statistics"> + <label class="btn btn-secondary" for="btn-toggle-statistics"> <?= I18N::translate('Show statistics charts') ?> - </button> + </label> </div> </th> </tr> diff --git a/resources/views/lists/individuals-table.phtml b/resources/views/lists/individuals-table.phtml index 9010741be9..7d446d55a8 100644 --- a/resources/views/lists/individuals-table.phtml +++ b/resources/views/lists/individuals-table.phtml @@ -424,12 +424,14 @@ $deathAgeData = [ <tr> <th colspan="16"> <div class="btn-group btn-group-sm"> - <button id="btn-toggle-parents" class="btn btn-outline-secondary" data-bs-toggle="button" data-persist="show-parents"> + <input type="checkbox" class="btn-check" id="btn-toggle-parents" autocomplete="off" data-wt-persist="individuals-parents"> + <label class="btn btn-secondary" for="btn-toggle-parents"> <?= I18N::translate('Show parents') ?> - </button> - <button id="btn-toggle-statistics" class="btn btn-outline-secondary" data-bs-toggle="button" data-persist="show-statistics"> + </label> + <input type="checkbox" class="btn-check" id="btn-toggle-statistics" autocomplete="off" data-wt-persist="individuals-statistics"> + <label class="btn btn-secondary" for="btn-toggle-statistics"> <?= I18N::translate('Show statistics charts') ?> - </button> + </label> </div> </th> </tr> diff --git a/resources/views/modules/notes/tab.phtml b/resources/views/modules/notes/tab.phtml index 7d716d7126..6182c0f4eb 100644 --- a/resources/views/modules/notes/tab.phtml +++ b/resources/views/modules/notes/tab.phtml @@ -22,7 +22,7 @@ use Illuminate\Support\Collection; <tr> <td colspan="2"> <label> - <input id="show-level-2-notes" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-level-two-note"> + <input id="show-level-2-notes" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-level-two-note" data-wt-persist="level-two-notes"> <?= I18N::translate('Show all notes') ?> </label> </td> @@ -57,11 +57,3 @@ use Illuminate\Support\Collection; <?php endif ?> </table> </div> - -<?php View::push('javascript') ?> -<script> - 'use strict'; - - webtrees.persistentToggle("show-level-2-notes"); -</script> -<?php View::endpush() ?> diff --git a/resources/views/modules/personal_facts/tab.phtml b/resources/views/modules/personal_facts/tab.phtml index 6a6225f461..7aedc1271b 100644 --- a/resources/views/modules/personal_facts/tab.phtml +++ b/resources/views/modules/personal_facts/tab.phtml @@ -27,21 +27,21 @@ use Illuminate\Support\Collection; <td colspan="2"> <?php if ($has_associate_facts) : ?> <label> - <input id="show-associate-facts" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-associate-fact"> + <input id="show-associate-facts" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-associate-fact" data-wt-persist="associates"> <?= I18N::translate('Associated events') ?> </label> <?php endif ?> <?php if ($has_relative_facts) : ?> <label> - <input id="show-relatives-facts" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-relation-fact"> + <input id="show-relatives-facts" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-relation-fact" data-wt-persist="relatives"> <?= I18N::translate('Events of close relatives') ?> </label> <?php endif ?> <?php if ($has_historic_facts) : ?> <label> - <input id="show-historical-facts" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-historic-fact"> + <input id="show-historical-facts" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-historic-fact" data-wt-persist="historic-facts"> <?= I18N::translate('Historic events') ?> </label> <?php endif ?> @@ -66,13 +66,3 @@ use Illuminate\Support\Collection; </tbody> </table> </div> - -<?php View::push('javascript') ?> -<script> - 'use strict'; - - webtrees.persistentToggle('show-associate-facts'); - webtrees.persistentToggle('show-relatives-facts'); - webtrees.persistentToggle('show-historical-facts'); -</script> -<?php View::endpush() ?> diff --git a/resources/views/modules/relatives/tab.phtml b/resources/views/modules/relatives/tab.phtml index 8b07bbe8cf..422956dae4 100644 --- a/resources/views/modules/relatives/tab.phtml +++ b/resources/views/modules/relatives/tab.phtml @@ -32,7 +32,7 @@ use Illuminate\Support\Collection; <tr> <td> <label> - <input id="show-date-differences" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-date-difference"> + <input id="show-date-differences" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-date-difference" data-wt-persist="date-differences"> <?= I18N::translate('Date differences') ?> </label> </td> @@ -162,11 +162,3 @@ use Illuminate\Support\Collection; </table> <?php endif ?> </div> - -<?php View::push('javascript') ?> -<script> - 'use strict'; - - webtrees.persistentToggle("show-date-differences"); -</script> -<?php View::endpush() ?> diff --git a/resources/views/modules/sources_tab/tab.phtml b/resources/views/modules/sources_tab/tab.phtml index 1f015c0f6c..e5ce444712 100644 --- a/resources/views/modules/sources_tab/tab.phtml +++ b/resources/views/modules/sources_tab/tab.phtml @@ -22,7 +22,7 @@ use Illuminate\Support\Collection; <tr> <td colspan="2"> <label> - <input id="show-level-2-sources" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-level-two-source"> + <input id="show-level-2-sources" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-level-two-source" data-wt-persist="level-two-sources"> <?= I18N::translate('Show all sources') ?> </label> </td> @@ -55,11 +55,3 @@ use Illuminate\Support\Collection; <?php endif ?> </table> </div> - -<?php View::push('javascript') ?> -<script> - 'use strict'; - - webtrees.persistentToggle("show-level-2-sources"); -</script> -<?php View::endpush() ?> |
