1
1
<?php
2
2
/**
3
3
* @file
4
- * @package Tawk .to module for Drupal
5
- * @copyright (C) 2014- Tawk .to
4
+ * @package tawk .to module for Drupal
5
+ * @copyright (C) 2021 tawk .to
6
6
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
7
7
*/
8
8
@@ -13,6 +13,18 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
13
13
{
14
14
ob_start ();
15
15
?> <link href="https://plugins.tawk.to/public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
16
+ <style>
17
+ #module_form .checkbox {
18
+ display: inline-block;
19
+ min-height: 20px;
20
+ }
21
+
22
+ @media only screen and (min-width: 1200px) {
23
+ #module_form .checkbox {
24
+ display: block;
25
+ }
26
+ }
27
+ </style>
16
28
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
17
29
<?php if (!$ sameUser ) : ?>
18
30
<div id="widget_already_set" style="width: 100%; float: left; color: #3c763d; border-color: #d6e9c6; font-weight: bold; margin: 20px 0 0;" class="alert alert-warning">Notice: Widget already set by other user</div>
@@ -42,7 +54,7 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
42
54
}
43
55
}
44
56
?>
45
- <input type="checkbox" class="col-lg-6 " name="always_display" id="always_display" value="1"
57
+ <input type="checkbox" class="checkbox " name="always_display" id="always_display" value="1"
46
58
<?php echo ($ checked )?'checked ' :'' ;?> />
47
59
</div>
48
60
</div>
@@ -51,7 +63,7 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
51
63
<div class="col-lg-6 control-label">
52
64
<?php if (!empty ($ display_opts ->hide_oncustom )) : ?>
53
65
<?php $ whitelist = json_decode ($ display_opts ->hide_oncustom ) ?>
54
- <textarea class="form-control hide_specific" name="hide_oncustom"
66
+ <textarea class="form-control hide_specific" name="hide_oncustom"
55
67
id="hide_oncustom" cols="30" rows="10"><?php foreach ($ whitelist as $ page ) { echo $ page ."\r\n" ; } ?> </textarea>
56
68
<?php else : ?>
57
69
<textarea class="form-control hide_specific" name="hide_oncustom" id="hide_oncustom" cols="30" rows="10"></textarea>
@@ -63,7 +75,7 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
63
75
</p>
64
76
</div>
65
77
</div>
66
-
78
+
67
79
<div class="form-group col-lg-12">
68
80
<label for="show_onfrontpage" class="col-lg-6 control-label">Show on frontpage</label>
69
81
<div class="col-lg-6 control-label ">
@@ -75,12 +87,12 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
75
87
}
76
88
}
77
89
?>
78
- <input type="checkbox" class="col-lg-6 show_specific" name="show_onfrontpage"
79
- id="show_onfrontpage" value="1"
90
+ <input type="checkbox" class="checkbox show_specific" name="show_onfrontpage"
91
+ id="show_onfrontpage" value="1"
80
92
<?php echo ($ checked )?'checked ' :'' ;?> />
81
93
</div>
82
94
</div>
83
-
95
+
84
96
<div class="form-group col-lg-12">
85
97
<label for="show_oncategory" class="col-lg-6 control-label">Show on category pages</label>
86
98
<div class="col-lg-6 control-label ">
@@ -92,7 +104,7 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
92
104
}
93
105
}
94
106
?>
95
- <input type="checkbox" class="col-lg-6 show_specific" name="show_oncategory" id="show_oncategory" value="1"
107
+ <input type="checkbox" class="checkbox show_specific" name="show_oncategory" id="show_oncategory" value="1"
96
108
<?php echo ($ checked )?'checked ' :'' ;?> />
97
109
</div>
98
110
</div>
@@ -101,7 +113,7 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
101
113
<div class="col-lg-6 control-label">
102
114
<?php if (isset ($ display_opts ->show_oncustom ) && !empty ($ display_opts ->show_oncustom )) : ?>
103
115
<?php $ whitelist = json_decode ($ display_opts ->show_oncustom ) ?>
104
- <textarea class="form-control show_specific" name="show_oncustom"
116
+ <textarea class="form-control show_specific" name="show_oncustom"
105
117
id="show_oncustom" cols="30" rows="10"><?php foreach ($ whitelist as $ page ) { echo $ page ."\r\n" ; } ?> </textarea>
106
118
<?php else : ?>
107
119
<textarea class="form-control show_specific" name="show_oncustom" id="show_oncustom" cols="30" rows="10"></textarea>
@@ -113,16 +125,35 @@ function tawk_to_render_widget_iframe($base_url, $iframe_url, $widget=array(), $
113
125
</p>
114
126
</div>
115
127
</div>
128
+
129
+ <div class="form-group col-lg-12">
130
+ <div class="panel-heading"><strong>Privacy Options</strong></div>
131
+ </div>
132
+ <br>
133
+ <div class="form-group col-lg-12">
134
+ <label for="enable_visitor_recognition" class="col-lg-6 control-label">Enable Visitor Recognition</label>
135
+ <div class="col-lg-6 control-label">
136
+ <?php
137
+ $ checked = 'checked ' ;
138
+ if (!is_null ($ display_opts ) && !$ display_opts ->enable_visitor_recognition ) {
139
+ $ checked = '' ;
140
+ }
141
+ ?>
142
+ <input type="checkbox" class="checkbox" name="enable_visitor_recognition" id="enable_visitor_recognition" value="1"
143
+ <?php echo $ checked ?> />
144
+ </div>
145
+ </div>
116
146
</div>
117
- <div class="panel-footer" style="position: relative; overflow: hidden; width: 100%; padding: 5px 0;">
118
- <div id="optionsSuccessMessage" style="position:absolute;top:0;left;0;background-color: #dff0d8; color: #3c763d; border-color: #d6e9c6; font-weight: bold;padding: 8px 15px; display: none;" class="alert alert-success col-lg-5">Successfully set widget options to your site</div>
119
- <label for="show_oncustom" class="col-lg-6 control-label"></label>
120
- <div class="form-group">
121
- <button type="submit" value="1" id="module_form_submit_btn" name="submitBlockCategories" class="btn btn-default pull-right"><i class="process-icon-save"></i> Save</button>
147
+ <div class="panel-footer">
148
+ <div class="col-lg-6 col-xs-12" style="text-align: right; margin-bottom: 10px;">
149
+ <button type="submit" value="1" id="module_form_submit_btn" name="submitBlockCategories" class="btn btn-default"><i class="process-icon-save"></i> Save</button>
150
+ </div>
151
+ <div class="col-lg-6 col-xs-12" style="min-height: 60px;">
152
+ <div id="optionsSuccessMessage" style="background-color: #dff0d8; color: #3c763d; border-color: #d6e9c6; font-weight:bold; display: none; margin-bottom: 0;" class="alert alert-success col-lg-12">Successfully set widget options to your site</div>
122
153
</div>
123
154
</div>
124
155
</form>
125
-
156
+
126
157
</div>
127
158
<div class="col-lg-4"></div>
128
159
</div>
0 commit comments