first commit
This commit is contained in:
31
templates/search/search-form.php
Normal file
31
templates/search/search-form.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<? global $lang;?>
|
||||
<div id="search-form">
|
||||
<form method="POST" action="/wyszukiwarka">
|
||||
<label>Szukaj na stronie</label>
|
||||
<input type="text" name="search_txt" id="search_txt" />
|
||||
<button class="btn btn-primary">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</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>
|
||||
Reference in New Issue
Block a user