implemented search and qso redirect

This commit is contained in:
HB9HIL 2023-11-04 21:15:36 +01:00
parent 605119f92f
commit 04ff8d7434

View File

@ -171,7 +171,7 @@
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo site_url('bandmap/list'); ?>" title="Bandmap"><i class="fa fa-id-card"></i> <?php echo lang('menu_bandmap'); ?></a>
<?php } ?>
<div class="dropdown-divider"></div>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo site_url('sattimers'); ?>" title="SAT Timers"><i class="fas fa-satellite"></i> SAT Timers</a>
</div>
</li>
@ -221,17 +221,42 @@
<?php } ?>
</ul>
<script>
function submitForm(action) {
var form = document.getElementById('quicklog-form');
var input = document.getElementById('quicklog-input');
if (action === 'search') {
form.action = "<?php echo site_url('search'); ?>";
form.method = "post";
} else if (action === 'qso') {
form.action = "<?php echo site_url('qso'); ?>";
form.method = "get";
input.name = "manual";
input.value = "1";
}
form.submit();
}
</script>
<?php if ($this->session->userdata('user_quicklog') == 1) { ?>
<form method="post" action="<?php echo site_url('search'); ?>" class="form-inline">
<form id="quicklog-form" class="form-inline">
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Search">
<button title="<?php echo lang('menu_search_button_qicksearch_log'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="submit" style="margin-right: 5px"><i class="fas fa-plus"></i><div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button_qicksearch_log'); ?></div></button>
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i><div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div></button>
<button title="<?php echo lang('menu_search_button_qicksearch_log'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="submitForm('qso')"><i class="fas fa-plus"></i>
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button_qicksearch_log'); ?></div>
</button>
<input type="hidden" id="quicklog-input">
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="submitForm('search')" style="margin-left: 5px"><i class="fas fa-search"></i>
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div>
</button>
</form>
<?php } else {?>
<?php } else { ?>
<form method="post" action="<?php echo site_url('search'); ?>" class="form-inline">
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" aria-label="Search">
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i><div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div></button>
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i>
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div>
</button>
</form>
<?php } ?>
@ -366,4 +391,4 @@
</div>
</div>
</nav>
</nav>