Merge pull request #3100 from int2001/show_active_filter

Show indication if filter is set
This commit is contained in:
Joerg (DJ7NT)
2026-03-20 10:28:10 +01:00
committed by GitHub
2 changed files with 118 additions and 49 deletions

View File

@@ -263,6 +263,18 @@
padding-right: 5px; padding-right: 5px;
padding-left: 5px; padding-left: 5px;
} }
.btn-filter-active {
background-color: #ffc107 !important;
border-color: #ffc107 !important;
color: #000 !important;
}
.btn-filter-active:hover {
background-color: #e0a800 !important;
border-color: #e0a800 !important;
}
.btn-filter-active .fas {
color: #000 !important;
}
</style> </style>
<?php <?php
$options = json_decode($options); $options = json_decode($options);
@@ -278,12 +290,12 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<form id="searchForm" name="searchForm" action="<?php echo base_url() . "index.php/logbookadvanced/search"; ?>" method="post"> <form id="searchForm" name="searchForm" action="<?php echo base_url() . "index.php/logbookadvanced/search"; ?>" method="post">
<input type="hidden" id="dupes" name="dupes" value=""> <input type="hidden" id="dupes" name="dupes" value="" class="filter-field">
<input type="hidden" id="invalid" name="invalid" value=""> <input type="hidden" id="invalid" name="invalid" value="" class="filter-field">
<input type="hidden" id="dupedate" name="dupedate" value=""> <input type="hidden" id="dupedate" name="dupedate" value="" class="filter-field">
<input type="hidden" id="dupemode" name="dupemode" value=""> <input type="hidden" id="dupemode" name="dupemode" value="" class="filter-field">
<input type="hidden" id="dupeband" name="dupeband" value=""> <input type="hidden" id="dupeband" name="dupeband" value="" class="filter-field">
<input type="hidden" id="dupesat" name="dupesat" value=""> <input type="hidden" id="dupesat" name="dupesat" value="" class="filter-field">
<div class="row pt-2"> <div class="row pt-2">
<div class="d-flex flex-wrap btn-group w-auto mx-auto"> <div class="d-flex flex-wrap btn-group w-auto mx-auto">
@@ -314,19 +326,19 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->datetime->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->datetime->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dateFrom"><?= __("From") . ": " ?></label> <label class="form-label" for="dateFrom"><?= __("From") . ": " ?></label>
<input name="dateFrom" id="dateFrom" type="date" class="form-control form-control-sm border border-secondary"> <input name="dateFrom" id="dateFrom" type="date" class="form-control form-control-sm border border-secondary filter-field">
</div> </div>
<div <?php if (($options->datetime->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->datetime->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dateTo"><?= __("To") . ": " ?></label> <label class="form-label" for="dateTo"><?= __("To") . ": " ?></label>
<input name="dateTo" id="dateTo" type="date" class="form-control form-control-sm border border-secondary"> <input name="dateTo" id="dateTo" type="date" class="form-control form-control-sm border border-secondary filter-field">
</div> </div>
<div <?php if (($options->dx->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->dx->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dx"><?= __("Dx"); ?></label> <label class="form-label" for="dx"><?= __("Dx"); ?></label>
<input onclick="this.select()" type="text" name="dx" id="dx" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="dx" id="dx" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->dxcc->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->dxcc->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dxcc"><?= __("DXCC"); ?></label> <label class="form-label" for="dxcc"><?= __("DXCC"); ?></label>
<select class="form-select form-select-sm border border-secondary" id="dxcc" name="dxcc"> <select class="form-select form-select-sm border border-secondary filter-field" id="dxcc" name="dxcc">
<option value="">-</option> <option value="">-</option>
<?php <?php
foreach ($dxccarray as $dxcc) { foreach ($dxccarray as $dxcc) {
@@ -347,17 +359,17 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->state->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->state->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="state"><?= __("State"); ?></label> <label class="form-label" for="state"><?= __("State"); ?></label>
<input onclick="this.select()" type="text" name="state" id="state" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="state" id="state" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div <?php if (($options->gridsquare->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->gridsquare->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="gridsquare"><?= __("Gridsquare"); ?></label> <label class="form-label" for="gridsquare"><?= __("Gridsquare"); ?></label>
<input onclick="this.select()" type="text" name="gridsquare" id="gridsquare" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="gridsquare" id="gridsquare" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->mode->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->mode->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="mode"><?= __("Mode"); ?></label> <label class="form-label" for="mode"><?= __("Mode"); ?></label>
<select id="mode" name="mode" class="form-select form-select-sm border border-secondary"> <select id="mode" name="mode" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<?php <?php
foreach ($modes as $modeId => $mode) { foreach ($modes as $modeId => $mode) {
@@ -368,7 +380,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->band->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->band->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="band"><?= __("Band"); ?></label> <label class="form-label" for="band"><?= __("Band"); ?></label>
<select id="band" name="band" class="form-select form-select-sm border border-secondary"> <select id="band" name="band" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<?php <?php
foreach ($bands as $band) { foreach ($bands as $band) {
@@ -379,7 +391,7 @@ $options = json_decode($options);
</div> </div>
<div hidden class="sats_dropdown mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div hidden class="sats_dropdown mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="sats"><?= __("Satellite"); ?></label> <label class="form-label" for="sats"><?= __("Satellite"); ?></label>
<select class="form-select form-select-sm border border-secondary" id="sats" name="sats"> <select class="form-select form-select-sm border border-secondary filter-field" id="sats" name="sats">
<option value="All"><?= __("All"); ?></option> <option value="All"><?= __("All"); ?></option>
<?php foreach ($sats as $sat) { <?php foreach ($sats as $sat) {
echo '<option value="' . htmlentities($sat) . '"' . '>' . htmlentities($sat) . '</option>' . "\n"; echo '<option value="' . htmlentities($sat) . '"' . '>' . htmlentities($sat) . '</option>' . "\n";
@@ -388,7 +400,7 @@ $options = json_decode($options);
</div> </div>
<div hidden class="orbits_dropdown mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div hidden class="orbits_dropdown mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="orbits"><?= __("Orbit"); ?></label> <label class="form-label" for="orbits"><?= __("Orbit"); ?></label>
<select class="form-select form-select-sm border border-secondary" id="orbits" name="orbits"> <select class="form-select form-select-sm border border-secondary filter-field" id="orbits" name="orbits">
<option value="All"><?= __("All"); ?></option> <option value="All"><?= __("All"); ?></option>
<?php foreach ($orbits as $orbit) { <?php foreach ($orbits as $orbit) {
echo '<option value="' . htmlentities($orbit) . '"' . '>' . htmlentities($orbit) . '</option>' . "\n"; echo '<option value="' . htmlentities($orbit) . '"' . '>' . htmlentities($orbit) . '</option>' . "\n";
@@ -397,7 +409,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->propagation->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->propagation->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="selectPropagation"><?= __("Propagation"); ?></label> <label class="form-label" for="selectPropagation"><?= __("Propagation"); ?></label>
<select id="selectPropagation" class="form-select form-select-sm border border-secondary" name="propmode"> <select id="selectPropagation" class="form-select form-select-sm border border-secondary filter-field" name="propmode">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="None"><?= _pgettext("Propagation Mode", "None/Empty"); ?></option> <option value="None"><?= _pgettext("Propagation Mode", "None/Empty"); ?></option>
<option value="AS"><?= _pgettext("Propagation Mode", "Aircraft Scatter"); ?></option> <option value="AS"><?= _pgettext("Propagation Mode", "Aircraft Scatter"); ?></option>
@@ -422,7 +434,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->cqzone->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->cqzone->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="cqzone"><?= __("CQ Zone"); ?></label> <label class="form-label" for="cqzone"><?= __("CQ Zone"); ?></label>
<select id="cqzone" name="cqzone" class="form-select form-select-sm border border-secondary"> <select id="cqzone" name="cqzone" class="form-select form-select-sm border border-secondary filter-field">
<option value="All"><?= __("All"); ?></option> <option value="All"><?= __("All"); ?></option>
<option value=""><?= __("Empty"); ?></option> <option value=""><?= __("Empty"); ?></option>
<?php <?php
@@ -436,7 +448,7 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->ituzone->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->ituzone->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="ituzone"><?= __("ITU Zone"); ?></label> <label class="form-label" for="ituzone"><?= __("ITU Zone"); ?></label>
<select id="ituzone" name="ituzone" class="form-select form-select-sm border border-secondary"> <select id="ituzone" name="ituzone" class="form-select form-select-sm border border-secondary filter-field">
<option value="All"><?= __("All"); ?></option> <option value="All"><?= __("All"); ?></option>
<option value=""><?= __("Empty"); ?></option> <option value=""><?= __("Empty"); ?></option>
<?php <?php
@@ -448,25 +460,25 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->county->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->county->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="county"><?= __("County"); ?></label> <label class="form-label" for="county"><?= __("County"); ?></label>
<input onclick="this.select()" type="text" name="county" id="county" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="county" id="county" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->dok->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->dok->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dok"><?= __("DOK"); ?></label> <label class="form-label" for="dok"><?= __("DOK"); ?></label>
<input onclick="this.select()" type="text" name="dok" id="dok" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="dok" id="dok" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->sota->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->sota->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="sota"><?= __("SOTA"); ?></label> <label class="form-label" for="sota"><?= __("SOTA"); ?></label>
<input onclick="this.select()" type="text" name="sota" id="sota" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="sota" id="sota" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->pota->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->pota->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="pota"><?= __("POTA"); ?></label> <label class="form-label" for="pota"><?= __("POTA"); ?></label>
<input onclick="this.select()" type="text" name="pota" id="pota" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="pota" id="pota" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div <?php if (($options->iota->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->iota->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="iota"><?= __("IOTA"); ?></label> <label class="form-label" for="iota"><?= __("IOTA"); ?></label>
<select class="form-select form-select-sm border border-secondary" id="iota" name="iota"> <select class="form-select form-select-sm border border-secondary filter-field" id="iota" name="iota">
<option value="">-</option> <option value="">-</option>
<?php <?php
foreach ($iotaarray as $iota) { foreach ($iotaarray as $iota) {
@@ -478,19 +490,19 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->wwff->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->wwff->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="wwff"><?= __("WWFF"); ?></label> <label class="form-label" for="wwff"><?= __("WWFF"); ?></label>
<input onclick="this.select()" type="text" name="wwff" id="wwff" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="wwff" id="wwff" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->operator->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->operator->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="operator"><?= __("Operator"); ?></label> <label class="form-label" for="operator"><?= __("Operator"); ?></label>
<input onclick="this.select()" type="text" name="operator" id="operator" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="operator" id="operator" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->contest->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->contest->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="contest"><?= __("Contest"); ?></label> <label class="form-label" for="contest"><?= __("Contest"); ?></label>
<input onclick="this.select()" type="text" name="contest" id="contest" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="contest" id="contest" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->continent->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->continent->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="continent"><?= __("Continent"); ?></label> <label class="form-label" for="continent"><?= __("Continent"); ?></label>
<select id="continent" name="continent" class="form-select form-select-sm border border-secondary"> <select id="continent" name="continent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="blank"><?= __("None/Empty"); ?></option> <option value="blank"><?= __("None/Empty"); ?></option>
<option value="af"><?= __("Africa"); ?></option> <option value="af"><?= __("Africa"); ?></option>
@@ -507,21 +519,21 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->comment->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->comment->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="comment"><?= __("Comment"); ?></label> <label class="form-label" for="comment"><?= __("Comment"); ?></label>
<input onclick="this.select()" type="text" name="comment" id="comment" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="comment" id="comment" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->distance->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->distance->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="distance"><?= __("Distance"); ?> <i class="fa fa-question-circle" aria-hidden="true" data-bs-toggle="tooltip" title="<?= __("Distance in kilometers. Search will look for distances greater than or equal to this value."); ?>"></i></label> <label class="form-label" for="distance"><?= __("Distance"); ?> <i class="fa fa-question-circle" aria-hidden="true" data-bs-toggle="tooltip" title="<?= __("Distance in kilometers. Search will look for distances greater than or equal to this value."); ?>"></i></label>
<input onclick="this.select()" type="text" name="distance" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="distance" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->duration->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->duration->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="duration"><?= __("Duration"); ?> <i class="fa fa-question-circle" aria-hidden="true" data-bs-toggle="tooltip" title="<?= __("Duration in minutes. Search will look for durations greater than or equal to this value."); ?>"></i></label> <label class="form-label" for="duration"><?= __("Duration"); ?> <i class="fa fa-question-circle" aria-hidden="true" data-bs-toggle="tooltip" title="<?= __("Duration in minutes. Search will look for durations greater than or equal to this value."); ?>"></i></label>
<input onclick="this.select()" type="text" name="duration" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="text" name="duration" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="sortcolumn"><?= __("Sort column"); ?></label> <label class="form-label" for="sortcolumn"><?= __("Sort column"); ?></label>
<select id="sortcolumn" name="sortcolumn" class="form-select form-select-sm border border-secondary"> <select id="sortcolumn" name="sortcolumn" class="form-select form-select-sm border border-secondary filter-field">
<option value="qsotime"><?= __("QSO Time"); ?></option> <option value="qsotime"><?= __("QSO Time"); ?></option>
<option value="band"><?= __("Band"); ?></option> <option value="band"><?= __("Band"); ?></option>
<option value="mode"><?= __("Mode"); ?></option> <option value="mode"><?= __("Mode"); ?></option>
@@ -530,7 +542,7 @@ $options = json_decode($options);
</div> </div>
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="sortdirection"><?= __("Sort direction"); ?></label> <label class="form-label" for="sortdirection"><?= __("Sort direction"); ?></label>
<select id="sortdirection" name="sortdirection" class="form-select form-select-sm border border-secondary"> <select id="sortdirection" name="sortdirection" class="form-select form-select-sm border border-secondary filter-field">
<option value="desc"><?= __("Descending"); ?></option> <option value="desc"><?= __("Descending"); ?></option>
<option value="asc"><?= __("Ascending"); ?></option> <option value="asc"><?= __("Ascending"); ?></option>
</select> </select>
@@ -557,7 +569,7 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslSent"><?= __("QSL sent"); ?></label> <label for="qslSent"><?= __("QSL sent"); ?></label>
<select id="qslSent" name="qslSent" class="form-select form-select-sm border border-secondary"> <select id="qslSent" name="qslSent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -568,7 +580,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslReceived"><?= __("QSL received"); ?></label> <label for="qslReceived"><?= __("QSL received"); ?></label>
<select id="qslReceived" name="qslReceived" class="form-select form-select-sm border border-secondary"> <select id="qslReceived" name="qslReceived" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -579,7 +591,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslSentMethod"><?= __("QSL send. method"); ?></label> <label for="qslSentMethod"><?= __("QSL send. method"); ?></label>
<select id="qslSentMethod" name="qslSentMethod" class="form-select form-select-sm border border-secondary"> <select id="qslSentMethod" name="qslSentMethod" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="B"><?= __("Bureau"); ?></option> <option value="B"><?= __("Bureau"); ?></option>
<option value="D"><?= __("Direct"); ?></option> <option value="D"><?= __("Direct"); ?></option>
@@ -589,7 +601,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslReceivedMethod"><?= __("QSL recv. method"); ?></label> <label for="qslReceivedMethod"><?= __("QSL recv. method"); ?></label>
<select id="qslReceivedMethod" name="qslReceivedMethod" class="form-select form-select-sm border border-secondary"> <select id="qslReceivedMethod" name="qslReceivedMethod" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="B"><?= __("Bureau"); ?></option> <option value="B"><?= __("Bureau"); ?></option>
<option value="D"><?= __("Direct"); ?></option> <option value="D"><?= __("Direct"); ?></option>
@@ -601,7 +613,7 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->lotw->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->lotw->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="lotwSent"><?= __("LoTW sent"); ?></label> <label for="lotwSent"><?= __("LoTW sent"); ?></label>
<select id="lotwSent" name="lotwSent" class="form-select form-select-sm border border-secondary"> <select id="lotwSent" name="lotwSent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -612,7 +624,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->lotw->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->lotw->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="lotwReceived"><?= __("LoTW received"); ?></label> <label for="lotwReceived"><?= __("LoTW received"); ?></label>
<select id="lotwReceived" name="lotwReceived" class="form-select form-select-sm border border-secondary"> <select id="lotwReceived" name="lotwReceived" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -624,7 +636,7 @@ $options = json_decode($options);
<div <?php if (($options->clublog->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->clublog->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="clublogSent"><?= __("Clublog sent"); ?></label> <label for="clublogSent"><?= __("Clublog sent"); ?></label>
<select id="clublogSent" name="clublogSent" class="form-select form-select-sm border border-secondary"> <select id="clublogSent" name="clublogSent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -635,7 +647,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->clublog->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->clublog->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="clublogReceived"><?= __("Clublog received"); ?></label> <label for="clublogReceived"><?= __("Clublog received"); ?></label>
<select id="clublogReceived" name="clublogReceived" class="form-select form-select-sm border border-secondary"> <select id="clublogReceived" name="clublogReceived" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -648,7 +660,7 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->eqsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->eqsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="eqslSent"><?= __("eQSL sent"); ?></label> <label for="eqslSent"><?= __("eQSL sent"); ?></label>
<select id="eqslSent" name="eqslSent" class="form-select form-select-sm border border-secondary"> <select id="eqslSent" name="eqslSent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -659,7 +671,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->eqsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->eqsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="eqslReceived"><?= __("eQSL received"); ?></label> <label for="eqslReceived"><?= __("eQSL received"); ?></label>
<select id="eqslReceived" name="eqslReceived" class="form-select form-select-sm border border-secondary"> <select id="eqslReceived" name="eqslReceived" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -670,7 +682,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->dcl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->dcl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="dclSent"><?= __("DCL sent"); ?></label> <label for="dclSent"><?= __("DCL sent"); ?></label>
<select id="dclSent" name="dclSent" class="form-select form-select-sm border border-secondary"> <select id="dclSent" name="dclSent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -679,7 +691,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->dcl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->dcl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="dclReceived"><?= __("DCL received"); ?></label> <label for="dclReceived"><?= __("DCL received"); ?></label>
<select id="dclReceived" name="dclReceived" class="form-select form-select-sm border border-secondary"> <select id="dclReceived" name="dclReceived" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -690,11 +702,11 @@ $options = json_decode($options);
<div class="row"> <div class="row">
<div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslvia"><?= __("QSL via"); ?></label> <label for="qslvia"><?= __("QSL via"); ?></label>
<input onclick="this.select()" type="search" name="qslvia" class="form-control form-control-sm border border-secondary" value="*" placeholder="<?= __("Empty"); ?>"> <input onclick="this.select()" type="search" name="qslvia" class="form-control form-control-sm border border-secondary filter-field" value="*" placeholder="<?= __("Empty"); ?>">
</div> </div>
<div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qsl->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslimages"><?= __("QSL Images"); ?></label> <label for="qslimages"><?= __("QSL Images"); ?></label>
<select class="form-select form-select-sm border border-secondary" id="qslimages" name="qslimages"> <select class="form-select form-select-sm border border-secondary filter-field" id="qslimages" name="qslimages">
<option value="">-</option> <option value="">-</option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -702,7 +714,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->qrz->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qrz->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qrzSent"><?= __("QRZ sent"); ?></label> <label for="qrzSent"><?= __("QRZ sent"); ?></label>
<select id="qrzSent" name="qrzSent" class="form-select form-select-sm border border-secondary"> <select id="qrzSent" name="qrzSent" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>
@@ -711,7 +723,7 @@ $options = json_decode($options);
</div> </div>
<div <?php if (($options->qrz->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl"> <div <?php if (($options->qrz->show ?? "true") == "false") { echo 'style="display:none"'; } ?> class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qrzReceived"><?= __("QRZ received"); ?></label> <label for="qrzReceived"><?= __("QRZ received"); ?></label>
<select id="qrzReceived" name="qrzReceived" class="form-select form-select-sm border border-secondary"> <select id="qrzReceived" name="qrzReceived" class="form-select form-select-sm border border-secondary filter-field">
<option value=""><?= __("All"); ?></option> <option value=""><?= __("All"); ?></option>
<option value="Y"><?= __("Yes"); ?></option> <option value="Y"><?= __("Yes"); ?></option>
<option value="N"><?= __("No"); ?></option> <option value="N"><?= __("No"); ?></option>

View File

@@ -6,6 +6,7 @@ let inStateFixing = false;
let stateFixStats = {fixed: 0, skipped: 0, fixedDxcc: new Set(), skippedDxcc: new Set(), skipReasons: new Set(), skippedDetails: []}; let stateFixStats = {fixed: 0, skipped: 0, fixedDxcc: new Set(), skippedDxcc: new Set(), skipReasons: new Set(), skippedDetails: []};
let lastChecked = null; let lastChecked = null;
let silentReset = false; let silentReset = false;
const filterDefaults = {};
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('.dropdown').forEach(dd => { document.querySelectorAll('.dropdown').forEach(dd => {
@@ -626,7 +627,22 @@ function unselectQsoID(qsoID) {
$('#checkBoxAll').prop("checked", false); $('#checkBoxAll').prop("checked", false);
} }
// Capture default values for all filter fields on page load
function captureFilterDefaults() {
$('.filter-field').each(function() {
const $el = $(this);
const id = $el.attr('id');
const name = $el.attr('name');
// Use id as key if available, otherwise use name
const key = id ? '#' + id : '[name="' + name + '"]';
filterDefaults[key] = $el.val();
});
}
$(document).ready(function () { $(document).ready(function () {
// Capture default filter values BEFORE any other initialization
captureFilterDefaults();
// initialize multiselect dropdown for locations // initialize multiselect dropdown for locations
// Documentation: https://davidstutz.github.io/bootstrap-multiselect/index.html // Documentation: https://davidstutz.github.io/bootstrap-multiselect/index.html
@@ -1592,6 +1608,7 @@ $(document).ready(function () {
} else { } else {
$("#"+type).val(col1); $("#"+type).val(col1);
} }
updateFilterButtonStates();
$('#searchForm').submit(); $('#searchForm').submit();
}); });
} }
@@ -1663,17 +1680,55 @@ $(document).ready(function () {
silentReset = false; // reset flag silentReset = false; // reset flag
return; // skip submit return; // skip submit
} }
requestAnimationFrame(function() {
updateFilterButtonStates();
});
setTimeout(function() { setTimeout(function() {
$('#searchForm').submit(); $('#searchForm').submit();
}); });
}); });
$('#searchForm').on('change', 'input, select', function() {
updateFilterButtonStates();
});
rebind_checkbox_trigger(); rebind_checkbox_trigger();
$('#searchForm').submit(); $('#searchForm').submit();
setTimeout(function() {
updateFilterButtonStates();
}, 100);
}); });
function hasActiveFilters() {
return Object.keys(filterDefaults).some(selector => {
const $el = $(selector);
if (!$el.length) return false;
const currentVal = $el.val();
const defaultVal = filterDefaults[selector];
// Handle arrays (multi-select)
if (Array.isArray(currentVal)) {
return false; // Multi-selects not currently used
}
// Compare current value to stored default
return currentVal !== defaultVal;
});
}
function updateFilterButtonStates() {
const hasActive = hasActiveFilters();
if (hasActive) {
$('#filterDropdown').addClass('btn-filter-active');
} else {
$('#filterDropdown').removeClass('btn-filter-active');
}
}
function rebind_checkbox_trigger() { function rebind_checkbox_trigger() {
$('#checkBoxAll').change(function (event) { $('#checkBoxAll').change(function (event) {
if (this.checked) { if (this.checked) {
@@ -1960,6 +2015,7 @@ function saveOptions() {
dateTo.value = ''; dateTo.value = '';
break; break;
} }
updateFilterButtonStates();
} }
// Reset dates function // Reset dates function
@@ -1968,6 +2024,7 @@ function saveOptions() {
const dateTo = document.getElementById('dateTo'); const dateTo = document.getElementById('dateTo');
dateFrom.value = ''; dateFrom.value = '';
dateTo.value = ''; dateTo.value = '';
updateFilterButtonStates();
} }
function checkUpdateDistances() { function checkUpdateDistances() {