Do nothing on empty input
这个提交包含在:
父节点
ce56183262
当前提交
7bb4d69aae
共有 2 个文件被更改,包括 9 次插入 和 1 次删除
|
|
@ -253,6 +253,14 @@
|
|||
$('[class*="buttons"]').css("color", "white");
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function validateForm() {
|
||||
let x = document.forms["searchForm"]["callsign"].value;
|
||||
if (x == "") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
<?php if (!empty($slug)) {
|
||||
$this->CI =& get_instance();
|
||||
if ($this->CI->public_search_enabled($slug) || $this->session->userdata('user_type') >= 2) { ?>
|
||||
<form method="post" action="<?php echo site_url('visitor/search'); ?>" class="form-inline">
|
||||
<form method="post" name="searchForm" action="<?php echo site_url('visitor/search'); ?>" onsubmit="return validateForm()" class="form-inline">
|
||||
<input class="form-control mr-sm-2" id="searchcall" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" <?php if (isset($callsign) && $callsign != '') { echo 'value="'.strtoupper($callsign).'"'; } ?> aria-label="Search">
|
||||
<input type="hidden" name="public_slug" value="<?php echo $slug; ?>">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> <?php echo lang('menu_search_button'); ?></button>
|
||||
|
|
|
|||
正在加载…
在新工单中引用