-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchbox.php
61 lines (53 loc) · 1.6 KB
/
searchbox.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
function deepi_selectbox(){
if(deepi_is_active()!=true or deepi_fetch_key('form_visibility')=='0'){
return;
}
if(is_user_logged_in()){
?>
<script>
jQuery(document).ready(function ( $ ) {
$("html").attr('style','margin-top:0 !important;');
});
</script>
<style>
.select2-selection__placeholder{
position:relative;
top:-4px;
}
</style>
<?php
}
else{
?>
<style>
.select2-selection__placeholder{
position:relative;
top:-7px;
}
</style>
<?php
}
$slug = deepi_fetch_key('slug');
$style = deepi_fetch_key('style');
deepi_loadJS();
?>
<div class='container' style="width:100%;">
<form id="searchform" class="deepi_search_forms form needs-validation"
novalidate
action="https://www.deepi.ir/en/dashboard/search/"
method="get" target="_blank">
<input type="hidden" id="project" name="project" value="<?php echo esc_html($slug); ?>">
<select style="width:100%;" id="js-data-ajax" class="left deepi_data_ajax" name="query" required></select>
</form>
</div>
<?php
}
function deepi_loadJS(){
$slug = deepi_fetch_key('slug');
$style = deepi_fetch_key('style');
include_once(deepi__PLUGIN_DIR . "script.php");
?>
<?php
}
add_shortcode('deepi_form', 'deepi_selectbox');