32 lines
989 B
PHP
32 lines
989 B
PHP
<? global $lang;?>
|
|
<div id="search-form" >
|
|
<form method="POST" action="/wyszukiwarka/" class="search-form">
|
|
<button class="btn search-form__btn">
|
|
<i class="fa fa-search"></i>
|
|
</button>
|
|
<input type="text" name="search_txt" id="search_txt" placeholder="Szukaj na stronie" class="search-form__txt"/>
|
|
<input type="reset" value="x" class="search-form__clear search-close"/>
|
|
</form>
|
|
</div>
|
|
<script class="footer" type="text/javascript">
|
|
$( document ).ready( function()
|
|
{
|
|
$( 'body' ).on( 'click', '#search-form .btn', function()
|
|
{
|
|
var search_txt = $( '#search_txt' ).val();
|
|
search_txt = search_txt.trim();
|
|
if ( search_txt.length < 3 )
|
|
{
|
|
$.prompt( 'Proszę wpisać co najmniej 3 znaki.', {
|
|
title: '<?= ucfirst( $lang['blad'] );?>',
|
|
buttons: {
|
|
'<?= $lang['zamknij'];?>': true
|
|
}
|
|
} );
|
|
return false;
|
|
}
|
|
$( '#search-form form' ).submit();
|
|
});
|
|
});
|
|
</script>
|