27 lines
829 B
PHP
27 lines
829 B
PHP
<? global $lang;?>
|
|
<div id="search-form">
|
|
<form method="POST" action="/wyszukiwarka/" class=" flex-end">
|
|
<input type="text" name="search_txt" id="search_txt" placeholder="Szukaj na stronie..." class="search-input" />
|
|
</form>
|
|
</div>
|
|
<script class="footer" type="text/javascript">
|
|
$( document ).ready( function()
|
|
{
|
|
$( 'body' ).on( 'click', '#search-form .search--button', 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>
|