Version Description
- Fixed: Shortcode editor pop-up styles.
- Fixed: Scripts enqueue in Manage Forms page.
- Fixed: MySQL Mapping fields list scrolling.
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.11.6 |
Comparing to | |
See all releases |
Code changes from version 1.11.5 to 1.11.6
- admin/views/FMViewFormMakerSQLMapping.php +1470 -1466
- admin/views/FMViewFormmakerwindow.php +352 -291
- admin/views/FMViewManage_fm.php +3507 -3508
- css/jquery-ui-1.12.1.css +1311 -0
- form-maker.php +3 -2
- js/form_maker_editor_button.js +22 -21
- readme.txt +6 -1
admin/views/FMViewFormMakerSQLMapping.php
CHANGED
@@ -1,1467 +1,1471 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FMViewFormMakerSQLMapping {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
|
26 |
-
public function edit_query($id, $form_id) {
|
27 |
-
wp_print_scripts('jquery');
|
28 |
-
wp_print_scripts('jquery-ui-tooltip');
|
29 |
-
?>
|
30 |
-
<link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
|
31 |
-
<link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
|
32 |
-
<?php
|
33 |
-
$label = $this->model->get_labels($form_id);
|
34 |
-
$query_obj = $this->model->get_query($id);
|
35 |
-
|
36 |
-
$temp = explode('***wdfcon_typewdf***',$query_obj->details);
|
37 |
-
$con_type = $temp[0];
|
38 |
-
$temp = explode('***wdfcon_methodwdf***',$temp[1]);
|
39 |
-
$con_method = $temp[0];
|
40 |
-
$temp = explode('***wdftablewdf***',$temp[1]);
|
41 |
-
$table_cur = $temp[0];
|
42 |
-
$temp = explode('***wdfhostwdf***',$temp[1]);
|
43 |
-
$host = $temp[0];
|
44 |
-
$temp = explode('***wdfportwdf***',$temp[1]);
|
45 |
-
$port = $temp[0];
|
46 |
-
$temp = explode('***wdfusernamewdf***',$temp[1]);
|
47 |
-
$username = $temp[0];
|
48 |
-
$temp = explode('***wdfpasswordwdf***',$temp[1]);
|
49 |
-
$password = $temp[0];
|
50 |
-
$temp = explode('***wdfdatabasewdf***',$temp[1]);
|
51 |
-
$database = $temp[0];
|
52 |
-
$details = $temp[1];
|
53 |
-
|
54 |
-
$tables = $this->model->get_tables_saved($con_type, $username, $password, $database, $host);
|
55 |
-
$table_struct = $this->model->get_table_struct_saved($con_type, $username, $password, $database, $host, $table_cur, $con_method);
|
56 |
-
|
57 |
-
$filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
|
58 |
-
$label_id= array();
|
59 |
-
$label_order= array();
|
60 |
-
$label_order_original= array();
|
61 |
-
$label_type= array();
|
62 |
-
|
63 |
-
$label_all = explode('#****#',$label);
|
64 |
-
$label_all = array_slice($label_all,0, count($label_all)-1);
|
65 |
-
|
66 |
-
foreach($label_all as $key => $label_each) {
|
67 |
-
$label_id_each=explode('#**id**#',$label_each);
|
68 |
-
$label_oder_each=explode('#**label**#', $label_id_each[1]);
|
69 |
-
|
70 |
-
if(in_array($label_oder_each[1],$filter_types))
|
71 |
-
continue;
|
72 |
-
|
73 |
-
array_push($label_id, $label_id_each[0]);
|
74 |
-
array_push($label_order_original, $label_oder_each[0]);
|
75 |
-
$ptn = "/[^a-zA-Z0-9_]/";
|
76 |
-
$rpltxt = "";
|
77 |
-
$label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
78 |
-
array_push($label_order, $label_temp);
|
79 |
-
array_push($label_type, $label_oder_each[1]);
|
80 |
-
}
|
81 |
-
|
82 |
-
$form_fields='';
|
83 |
-
foreach($label_id as $key => $lid) {
|
84 |
-
$form_fields.='<a onclick="insert_field('.$lid.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
|
85 |
-
}
|
86 |
-
$user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
|
87 |
-
foreach($user_fields as $user_key=>$user_field) {
|
88 |
-
$form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
|
89 |
-
}
|
90 |
-
|
91 |
-
$cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
|
92 |
-
foreach($table_struct as $col) {
|
93 |
-
$cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
|
94 |
-
}
|
95 |
-
$cond.='</select>';
|
96 |
-
$cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. WD_FM_VERSION.'" onclick="delete_cond("condid")" style="vertical-align: middle;"></div>';
|
97 |
-
?>
|
98 |
-
<script>
|
99 |
-
function connect() {
|
100 |
-
jQuery("input[type='radio']").attr('disabled','');
|
101 |
-
jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
102 |
-
jQuery("#struct").load('index.php?option=com_formmaker&task=db_tables&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&format=row');
|
103 |
-
}
|
104 |
-
jQuery(document).ready(function() {
|
105 |
-
jQuery("#tables").change(function (){
|
106 |
-
jQuery("#struct").removeClass("fm_loading");
|
107 |
-
jQuery("#table_struct").load('index.php?option=com_formmaker&task=db_table_struct&name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row&id='+jQuery("#form_id").val());
|
108 |
-
});
|
109 |
-
jQuery('html').click(function() {
|
110 |
-
if(jQuery("#fieldlist").css('display')=="block") {
|
111 |
-
jQuery("#fieldlist").hide();
|
112 |
-
}
|
113 |
-
});
|
114 |
-
jQuery('.cols input[type="text"]').on('click', function(event) {
|
115 |
-
event.stopPropagation();
|
116 |
-
jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
|
117 |
-
jQuery("#fieldlist").css("left",jQuery(this).offset().left);
|
118 |
-
jQuery("#fieldlist").slideDown('fast');
|
119 |
-
selected_field=this.id;
|
120 |
-
});
|
121 |
-
jQuery('#query_txt').click(function(event) {
|
122 |
-
event.stopPropagation();
|
123 |
-
jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
|
124 |
-
jQuery("#fieldlist").css("left",jQuery(this).offset().left);
|
125 |
-
jQuery("#fieldlist").slideDown('fast');
|
126 |
-
selected_field=this.id;
|
127 |
-
});
|
128 |
-
jQuery('#fieldlist').click(function(event){
|
129 |
-
event.stopPropagation();
|
130 |
-
});
|
131 |
-
jQuery('.add_cond').click( function() {
|
132 |
-
jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
|
133 |
-
update_vis();
|
134 |
-
});
|
135 |
-
});
|
136 |
-
var selected_field ='';
|
137 |
-
var isvisible = 1;
|
138 |
-
var cond_id = 1;
|
139 |
-
conds='<?php echo $cond ?>';
|
140 |
-
fields=new Array(<?php
|
141 |
-
$fields = "";
|
142 |
-
if($table_struct) {
|
143 |
-
foreach($table_struct as $col) {
|
144 |
-
$fields.=' "'.$col->Field.'",';
|
145 |
-
}
|
146 |
-
echo substr($fields, 0, -1);
|
147 |
-
}
|
148 |
-
?>);
|
149 |
-
|
150 |
-
function dis(id, x) {
|
151 |
-
if(x)
|
152 |
-
jQuery('#'+id).removeAttr('disabled');
|
153 |
-
else
|
154 |
-
jQuery('#'+id).attr('disabled','disabled');
|
155 |
-
}
|
156 |
-
function update_vis() {
|
157 |
-
previous=0;
|
158 |
-
for(i=1; i<cond_id; i++) {
|
159 |
-
if(jQuery('#'+i).html()) {
|
160 |
-
jQuery('#andor_'+i).css('visibility', 'hidden');
|
161 |
-
if(previous)
|
162 |
-
jQuery('#andor_'+previous).css('visibility', 'visible');
|
163 |
-
previous=i;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
}
|
167 |
-
function delete_cond(id) {
|
168 |
-
jQuery('#'+id).remove();
|
169 |
-
update_vis();
|
170 |
-
}
|
171 |
-
function save_query() {
|
172 |
-
con_type =jQuery('input[name=con_type]:checked').val();
|
173 |
-
con_method =jQuery('input[name=con_method]:checked').val();
|
174 |
-
table =jQuery('#tables').val();
|
175 |
-
host =jQuery('#host_rem').val();
|
176 |
-
port =jQuery('#port_rem').val();
|
177 |
-
username =jQuery('#username_rem').val();
|
178 |
-
password =jQuery('#password_rem').val();
|
179 |
-
database =jQuery('#database_rem').val();
|
180 |
-
|
181 |
-
str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
|
182 |
-
|
183 |
-
if(fields.length) {
|
184 |
-
for(i=0; i<fields.length; i++) {
|
185 |
-
str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
for(i=1; i<cond_id; i++) {
|
190 |
-
if(jQuery('#'+i).html()) {
|
191 |
-
str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
|
192 |
-
}
|
193 |
-
}
|
194 |
-
if(!jQuery('#query_txt').val()) {
|
195 |
-
gen_query();
|
196 |
-
}
|
197 |
-
jQuery('#details').val(str);
|
198 |
-
var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
|
199 |
-
|
200 |
-
if(jQuery('#query_txt').val()) {
|
201 |
-
jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
202 |
-
|
203 |
-
jQuery.ajax({
|
204 |
-
type: "POST",
|
205 |
-
url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => $id, 'form_id' => $form_id, 'task' => 'update_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
|
206 |
-
data: datatxt,
|
207 |
-
success: function(data) {
|
208 |
-
window.parent.wd_fm_apply_options('apply_options');
|
209 |
-
window.parent.tb_remove();
|
210 |
-
}
|
211 |
-
});
|
212 |
-
}
|
213 |
-
else {
|
214 |
-
alert('The query is empty.');
|
215 |
-
}
|
216 |
-
return false;
|
217 |
-
}
|
218 |
-
|
219 |
-
function gen_query() {
|
220 |
-
if(jQuery('#query_txt').val())
|
221 |
-
if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.'))
|
222 |
-
return;
|
223 |
-
query="";
|
224 |
-
fields=new Array(<?php
|
225 |
-
$fields = "";
|
226 |
-
if($table_struct) {
|
227 |
-
foreach($table_struct as $col) {
|
228 |
-
$fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
|
229 |
-
}
|
230 |
-
echo substr($fields, 0, -1);
|
231 |
-
}
|
232 |
-
?>);
|
233 |
-
|
234 |
-
con_type =jQuery('input[name=con_type]:checked').val();
|
235 |
-
con_method =jQuery('input[name=con_method]:checked').val();
|
236 |
-
table =jQuery('#tables').val();
|
237 |
-
fls='';
|
238 |
-
vals='';
|
239 |
-
valsA=new Array();
|
240 |
-
flsA=new Array();
|
241 |
-
|
242 |
-
if(fields.length) {
|
243 |
-
for(i=0; i<fields.length; i++) {
|
244 |
-
if(jQuery('#ch_'+fields[i]+":checked" ).length) {
|
245 |
-
flsA.push(fields[i]);
|
246 |
-
valsA.push(jQuery('#'+fields[i]).val());
|
247 |
-
}
|
248 |
-
}
|
249 |
-
}
|
250 |
-
if(con_method=="insert") {
|
251 |
-
if(flsA.length) {
|
252 |
-
for(i=0; i<flsA.length-1; i++) {
|
253 |
-
fls+= '`'+flsA[i]+'`, ';
|
254 |
-
vals+= '"'+valsA[i]+'", ';
|
255 |
-
}
|
256 |
-
fls+= '`'+flsA[i]+'`';
|
257 |
-
vals+= '"'+valsA[i]+'"';
|
258 |
-
}
|
259 |
-
if(fls)
|
260 |
-
query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
|
261 |
-
}
|
262 |
-
|
263 |
-
if(con_method=="update") {
|
264 |
-
if(flsA.length) {
|
265 |
-
for(i=0; i<flsA.length-1; i++) {
|
266 |
-
vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
|
267 |
-
}
|
268 |
-
vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
|
269 |
-
}
|
270 |
-
where="";
|
271 |
-
previous='';
|
272 |
-
|
273 |
-
for(i=1; i<cond_id; i++) {
|
274 |
-
if(jQuery('#'+i).html()) {
|
275 |
-
if(jQuery('#op_'+i).val()=="%..%")
|
276 |
-
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
|
277 |
-
else if(jQuery('#op_'+i).val()=="%..")
|
278 |
-
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
|
279 |
-
else if(jQuery('#op_'+i).val()=="..%")
|
280 |
-
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
281 |
-
else
|
282 |
-
op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
|
283 |
-
where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
|
284 |
-
previous=' '+ jQuery('#andor_'+i).val();
|
285 |
-
}
|
286 |
-
}
|
287 |
-
if(vals)
|
288 |
-
query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
|
289 |
-
}
|
290 |
-
if(con_method=="delete") {
|
291 |
-
where="";
|
292 |
-
previous='';
|
293 |
-
for(i=1; i<cond_id; i++) {
|
294 |
-
if(jQuery('#'+i).html()) {
|
295 |
-
if(jQuery('#op_'+i).val()=="%..%")
|
296 |
-
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
|
297 |
-
else if(jQuery('#op_'+i).val()=="%..")
|
298 |
-
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
|
299 |
-
else if(jQuery('#op_'+i).val()=="..%")
|
300 |
-
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
301 |
-
else
|
302 |
-
op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
|
303 |
-
where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
|
304 |
-
previous=' '+ jQuery('#andor_'+i).val();
|
305 |
-
}
|
306 |
-
}
|
307 |
-
if(where)
|
308 |
-
query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
|
309 |
-
}
|
310 |
-
jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
|
311 |
-
}
|
312 |
-
|
313 |
-
jQuery(document).ready(function () {
|
314 |
-
jQuery(".hasTip").tooltip({
|
315 |
-
track: true,
|
316 |
-
content: function () {
|
317 |
-
return jQuery(this).prop('title');
|
318 |
-
}
|
319 |
-
});
|
320 |
-
});
|
321 |
-
|
322 |
-
function insert_field(myValue) {
|
323 |
-
if(!selected_field)
|
324 |
-
return;
|
325 |
-
myField=document.getElementById(selected_field);
|
326 |
-
if (document.selection) {
|
327 |
-
myField.focus();
|
328 |
-
sel = document.selection.createRange();
|
329 |
-
sel.text = myValue;
|
330 |
-
}
|
331 |
-
else {
|
332 |
-
if (myField.selectionStart || myField.selectionStart == '0') {
|
333 |
-
var startPos = myField.selectionStart;
|
334 |
-
var endPos = myField.selectionEnd;
|
335 |
-
myField.value = myField.value.substring(0, startPos)
|
336 |
-
+ "{"+myValue+"}"
|
337 |
-
+ myField.value.substring(endPos, myField.value.length);
|
338 |
-
}
|
339 |
-
else {
|
340 |
-
myField.value += "{"+myValue+"}";
|
341 |
-
}
|
342 |
-
}
|
343 |
-
}
|
344 |
-
</script>
|
345 |
-
<style>
|
346 |
-
.c1 {
|
347 |
-
padding: 0 10px;
|
348 |
-
}
|
349 |
-
|
350 |
-
.main_func{
|
351 |
-
font-family: Segoe UI;
|
352 |
-
display: inline-block;
|
353 |
-
width: 550px;
|
354 |
-
}
|
355 |
-
|
356 |
-
.main_func .admintable {
|
357 |
-
width: 100%;
|
358 |
-
padding: 10px 0;
|
359 |
-
margin-bottom: 15px;
|
360 |
-
}
|
361 |
-
|
362 |
-
.main_func .admintable .key{
|
363 |
-
width: 36%;
|
364 |
-
}
|
365 |
-
|
366 |
-
.main_func .admintable input[type='text'],
|
367 |
-
.main_func .admintable input[type='password']{
|
368 |
-
padding: 4px 6px;
|
369 |
-
width:244px;
|
370 |
-
}
|
371 |
-
|
372 |
-
.btn.connect {
|
373 |
-
background:#4EC0D9;
|
374 |
-
width:78px;
|
375 |
-
height:32px;
|
376 |
-
border:1px solid #4EC0D9;
|
377 |
-
border-radius:0px;
|
378 |
-
color:#fff;
|
379 |
-
cursor:pointer;
|
380 |
-
}
|
381 |
-
|
382 |
-
.desc {
|
383 |
-
font-size: 13px;
|
384 |
-
display: inline-block;
|
385 |
-
width:
|
386 |
-
|
387 |
-
|
388 |
-
margin
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
.cols div {
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
<input type="radio" name="con_type" id="
|
585 |
-
<label for="
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
<input type="radio" name="con_method" id="
|
624 |
-
<label for="
|
625 |
-
<input type="radio" name="con_method" id="
|
626 |
-
<label for="
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
$temps
|
651 |
-
$
|
652 |
-
$
|
653 |
-
$
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
$temp=explode('***
|
659 |
-
array_push($
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
$title
|
669 |
-
$title.="<
|
670 |
-
$title.="<li>
|
671 |
-
$title.="<li>
|
672 |
-
$title.="<li>
|
673 |
-
$title.="</
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
$temp=explode('***
|
691 |
-
$
|
692 |
-
$temp=explode('***
|
693 |
-
$
|
694 |
-
$
|
695 |
-
|
696 |
-
|
697 |
-
jQuery("
|
698 |
-
jQuery("#
|
699 |
-
jQuery("#
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
<br/>
|
711 |
-
<
|
712 |
-
|
713 |
-
|
714 |
-
<
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
<?php
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
<?php
|
750 |
-
|
751 |
-
|
752 |
-
$
|
753 |
-
|
754 |
-
$
|
755 |
-
$
|
756 |
-
$
|
757 |
-
|
758 |
-
$
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
$
|
769 |
-
$
|
770 |
-
$
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
function
|
779 |
-
|
780 |
-
|
781 |
-
jQuery('
|
782 |
-
jQuery.
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
jQuery("
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
jQuery(".remote_info").
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
}
|
857 |
-
|
858 |
-
.desc div
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
<label
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
<input type="
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
</td>
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
<input type="radio" name="con_method" id="
|
944 |
-
<label for="
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
$
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
$
|
1011 |
-
|
1012 |
-
|
1013 |
-
$
|
1014 |
-
$
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
array_push($
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
$
|
1034 |
-
}
|
1035 |
-
$
|
1036 |
-
foreach($
|
1037 |
-
$form_fields.='<a onclick="insert_field(
|
1038 |
-
}
|
1039 |
-
$
|
1040 |
-
foreach($
|
1041 |
-
$
|
1042 |
-
}
|
1043 |
-
$cond
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
});
|
1117 |
-
|
1118 |
-
function
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
}
|
1146 |
-
|
1147 |
-
jQuery('#
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
1233 |
-
else
|
1234 |
-
op_val='
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
1255 |
-
else
|
1256 |
-
op_val='
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
jQuery(
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
}
|
1311 |
-
|
1312 |
-
.cols
|
1313 |
-
display: inline-block;
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
}
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
border
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
.
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
}
|
1412 |
-
|
1413 |
-
.select-db-op
|
1414 |
-
|
1415 |
-
}
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
$title
|
1429 |
-
$title.="<
|
1430 |
-
$title.="<li>
|
1431 |
-
$title.="</
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
<
|
1450 |
-
|
1451 |
-
|
1452 |
-
</
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1465 |
-
|
1466 |
-
|
|
|
|
|
|
|
|
|
1467 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMViewFormMakerSQLMapping {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
|
26 |
+
public function edit_query($id, $form_id) {
|
27 |
+
wp_print_scripts('jquery');
|
28 |
+
wp_print_scripts('jquery-ui-tooltip');
|
29 |
+
?>
|
30 |
+
<link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
|
31 |
+
<link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
|
32 |
+
<?php
|
33 |
+
$label = $this->model->get_labels($form_id);
|
34 |
+
$query_obj = $this->model->get_query($id);
|
35 |
+
|
36 |
+
$temp = explode('***wdfcon_typewdf***',$query_obj->details);
|
37 |
+
$con_type = $temp[0];
|
38 |
+
$temp = explode('***wdfcon_methodwdf***',$temp[1]);
|
39 |
+
$con_method = $temp[0];
|
40 |
+
$temp = explode('***wdftablewdf***',$temp[1]);
|
41 |
+
$table_cur = $temp[0];
|
42 |
+
$temp = explode('***wdfhostwdf***',$temp[1]);
|
43 |
+
$host = $temp[0];
|
44 |
+
$temp = explode('***wdfportwdf***',$temp[1]);
|
45 |
+
$port = $temp[0];
|
46 |
+
$temp = explode('***wdfusernamewdf***',$temp[1]);
|
47 |
+
$username = $temp[0];
|
48 |
+
$temp = explode('***wdfpasswordwdf***',$temp[1]);
|
49 |
+
$password = $temp[0];
|
50 |
+
$temp = explode('***wdfdatabasewdf***',$temp[1]);
|
51 |
+
$database = $temp[0];
|
52 |
+
$details = $temp[1];
|
53 |
+
|
54 |
+
$tables = $this->model->get_tables_saved($con_type, $username, $password, $database, $host);
|
55 |
+
$table_struct = $this->model->get_table_struct_saved($con_type, $username, $password, $database, $host, $table_cur, $con_method);
|
56 |
+
|
57 |
+
$filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
|
58 |
+
$label_id= array();
|
59 |
+
$label_order= array();
|
60 |
+
$label_order_original= array();
|
61 |
+
$label_type= array();
|
62 |
+
|
63 |
+
$label_all = explode('#****#',$label);
|
64 |
+
$label_all = array_slice($label_all,0, count($label_all)-1);
|
65 |
+
|
66 |
+
foreach($label_all as $key => $label_each) {
|
67 |
+
$label_id_each=explode('#**id**#',$label_each);
|
68 |
+
$label_oder_each=explode('#**label**#', $label_id_each[1]);
|
69 |
+
|
70 |
+
if(in_array($label_oder_each[1],$filter_types))
|
71 |
+
continue;
|
72 |
+
|
73 |
+
array_push($label_id, $label_id_each[0]);
|
74 |
+
array_push($label_order_original, $label_oder_each[0]);
|
75 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
76 |
+
$rpltxt = "";
|
77 |
+
$label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
78 |
+
array_push($label_order, $label_temp);
|
79 |
+
array_push($label_type, $label_oder_each[1]);
|
80 |
+
}
|
81 |
+
|
82 |
+
$form_fields='';
|
83 |
+
foreach($label_id as $key => $lid) {
|
84 |
+
$form_fields.='<a onclick="insert_field('.$lid.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
|
85 |
+
}
|
86 |
+
$user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
|
87 |
+
foreach($user_fields as $user_key=>$user_field) {
|
88 |
+
$form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
|
89 |
+
}
|
90 |
+
|
91 |
+
$cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
|
92 |
+
foreach($table_struct as $col) {
|
93 |
+
$cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
|
94 |
+
}
|
95 |
+
$cond.='</select>';
|
96 |
+
$cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. WD_FM_VERSION.'" onclick="delete_cond("condid")" style="vertical-align: middle;"></div>';
|
97 |
+
?>
|
98 |
+
<script>
|
99 |
+
function connect() {
|
100 |
+
jQuery("input[type='radio']").attr('disabled','');
|
101 |
+
jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
102 |
+
jQuery("#struct").load('index.php?option=com_formmaker&task=db_tables&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&format=row');
|
103 |
+
}
|
104 |
+
jQuery(document).ready(function() {
|
105 |
+
jQuery("#tables").change(function (){
|
106 |
+
jQuery("#struct").removeClass("fm_loading");
|
107 |
+
jQuery("#table_struct").load('index.php?option=com_formmaker&task=db_table_struct&name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row&id='+jQuery("#form_id").val());
|
108 |
+
});
|
109 |
+
jQuery('html').click(function() {
|
110 |
+
if(jQuery("#fieldlist").css('display')=="block") {
|
111 |
+
jQuery("#fieldlist").hide();
|
112 |
+
}
|
113 |
+
});
|
114 |
+
jQuery('.cols input[type="text"]').on('click', function(event) {
|
115 |
+
event.stopPropagation();
|
116 |
+
jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
|
117 |
+
jQuery("#fieldlist").css("left",jQuery(this).offset().left);
|
118 |
+
jQuery("#fieldlist").slideDown('fast');
|
119 |
+
selected_field=this.id;
|
120 |
+
});
|
121 |
+
jQuery('#query_txt').click(function(event) {
|
122 |
+
event.stopPropagation();
|
123 |
+
jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
|
124 |
+
jQuery("#fieldlist").css("left",jQuery(this).offset().left);
|
125 |
+
jQuery("#fieldlist").slideDown('fast');
|
126 |
+
selected_field=this.id;
|
127 |
+
});
|
128 |
+
jQuery('#fieldlist').click(function(event){
|
129 |
+
event.stopPropagation();
|
130 |
+
});
|
131 |
+
jQuery('.add_cond').click( function() {
|
132 |
+
jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
|
133 |
+
update_vis();
|
134 |
+
});
|
135 |
+
});
|
136 |
+
var selected_field ='';
|
137 |
+
var isvisible = 1;
|
138 |
+
var cond_id = 1;
|
139 |
+
conds='<?php echo $cond ?>';
|
140 |
+
fields=new Array(<?php
|
141 |
+
$fields = "";
|
142 |
+
if($table_struct) {
|
143 |
+
foreach($table_struct as $col) {
|
144 |
+
$fields.=' "'.$col->Field.'",';
|
145 |
+
}
|
146 |
+
echo substr($fields, 0, -1);
|
147 |
+
}
|
148 |
+
?>);
|
149 |
+
|
150 |
+
function dis(id, x) {
|
151 |
+
if(x)
|
152 |
+
jQuery('#'+id).removeAttr('disabled');
|
153 |
+
else
|
154 |
+
jQuery('#'+id).attr('disabled','disabled');
|
155 |
+
}
|
156 |
+
function update_vis() {
|
157 |
+
previous=0;
|
158 |
+
for(i=1; i<cond_id; i++) {
|
159 |
+
if(jQuery('#'+i).html()) {
|
160 |
+
jQuery('#andor_'+i).css('visibility', 'hidden');
|
161 |
+
if(previous)
|
162 |
+
jQuery('#andor_'+previous).css('visibility', 'visible');
|
163 |
+
previous=i;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
function delete_cond(id) {
|
168 |
+
jQuery('#'+id).remove();
|
169 |
+
update_vis();
|
170 |
+
}
|
171 |
+
function save_query() {
|
172 |
+
con_type =jQuery('input[name=con_type]:checked').val();
|
173 |
+
con_method =jQuery('input[name=con_method]:checked').val();
|
174 |
+
table =jQuery('#tables').val();
|
175 |
+
host =jQuery('#host_rem').val();
|
176 |
+
port =jQuery('#port_rem').val();
|
177 |
+
username =jQuery('#username_rem').val();
|
178 |
+
password =jQuery('#password_rem').val();
|
179 |
+
database =jQuery('#database_rem').val();
|
180 |
+
|
181 |
+
str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
|
182 |
+
|
183 |
+
if(fields.length) {
|
184 |
+
for(i=0; i<fields.length; i++) {
|
185 |
+
str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
for(i=1; i<cond_id; i++) {
|
190 |
+
if(jQuery('#'+i).html()) {
|
191 |
+
str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
|
192 |
+
}
|
193 |
+
}
|
194 |
+
if(!jQuery('#query_txt').val()) {
|
195 |
+
gen_query();
|
196 |
+
}
|
197 |
+
jQuery('#details').val(str);
|
198 |
+
var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
|
199 |
+
|
200 |
+
if(jQuery('#query_txt').val()) {
|
201 |
+
jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
202 |
+
|
203 |
+
jQuery.ajax({
|
204 |
+
type: "POST",
|
205 |
+
url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => $id, 'form_id' => $form_id, 'task' => 'update_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
|
206 |
+
data: datatxt,
|
207 |
+
success: function(data) {
|
208 |
+
window.parent.wd_fm_apply_options('apply_options');
|
209 |
+
window.parent.tb_remove();
|
210 |
+
}
|
211 |
+
});
|
212 |
+
}
|
213 |
+
else {
|
214 |
+
alert('The query is empty.');
|
215 |
+
}
|
216 |
+
return false;
|
217 |
+
}
|
218 |
+
|
219 |
+
function gen_query() {
|
220 |
+
if(jQuery('#query_txt').val())
|
221 |
+
if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.'))
|
222 |
+
return;
|
223 |
+
query="";
|
224 |
+
fields=new Array(<?php
|
225 |
+
$fields = "";
|
226 |
+
if($table_struct) {
|
227 |
+
foreach($table_struct as $col) {
|
228 |
+
$fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
|
229 |
+
}
|
230 |
+
echo substr($fields, 0, -1);
|
231 |
+
}
|
232 |
+
?>);
|
233 |
+
|
234 |
+
con_type =jQuery('input[name=con_type]:checked').val();
|
235 |
+
con_method =jQuery('input[name=con_method]:checked').val();
|
236 |
+
table =jQuery('#tables').val();
|
237 |
+
fls='';
|
238 |
+
vals='';
|
239 |
+
valsA=new Array();
|
240 |
+
flsA=new Array();
|
241 |
+
|
242 |
+
if(fields.length) {
|
243 |
+
for(i=0; i<fields.length; i++) {
|
244 |
+
if(jQuery('#ch_'+fields[i]+":checked" ).length) {
|
245 |
+
flsA.push(fields[i]);
|
246 |
+
valsA.push(jQuery('#'+fields[i]).val());
|
247 |
+
}
|
248 |
+
}
|
249 |
+
}
|
250 |
+
if(con_method=="insert") {
|
251 |
+
if(flsA.length) {
|
252 |
+
for(i=0; i<flsA.length-1; i++) {
|
253 |
+
fls+= '`'+flsA[i]+'`, ';
|
254 |
+
vals+= '"'+valsA[i]+'", ';
|
255 |
+
}
|
256 |
+
fls+= '`'+flsA[i]+'`';
|
257 |
+
vals+= '"'+valsA[i]+'"';
|
258 |
+
}
|
259 |
+
if(fls)
|
260 |
+
query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
|
261 |
+
}
|
262 |
+
|
263 |
+
if(con_method=="update") {
|
264 |
+
if(flsA.length) {
|
265 |
+
for(i=0; i<flsA.length-1; i++) {
|
266 |
+
vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
|
267 |
+
}
|
268 |
+
vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
|
269 |
+
}
|
270 |
+
where="";
|
271 |
+
previous='';
|
272 |
+
|
273 |
+
for(i=1; i<cond_id; i++) {
|
274 |
+
if(jQuery('#'+i).html()) {
|
275 |
+
if(jQuery('#op_'+i).val()=="%..%")
|
276 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
|
277 |
+
else if(jQuery('#op_'+i).val()=="%..")
|
278 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
|
279 |
+
else if(jQuery('#op_'+i).val()=="..%")
|
280 |
+
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
281 |
+
else
|
282 |
+
op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
|
283 |
+
where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
|
284 |
+
previous=' '+ jQuery('#andor_'+i).val();
|
285 |
+
}
|
286 |
+
}
|
287 |
+
if(vals)
|
288 |
+
query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
|
289 |
+
}
|
290 |
+
if(con_method=="delete") {
|
291 |
+
where="";
|
292 |
+
previous='';
|
293 |
+
for(i=1; i<cond_id; i++) {
|
294 |
+
if(jQuery('#'+i).html()) {
|
295 |
+
if(jQuery('#op_'+i).val()=="%..%")
|
296 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
|
297 |
+
else if(jQuery('#op_'+i).val()=="%..")
|
298 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
|
299 |
+
else if(jQuery('#op_'+i).val()=="..%")
|
300 |
+
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
301 |
+
else
|
302 |
+
op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
|
303 |
+
where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
|
304 |
+
previous=' '+ jQuery('#andor_'+i).val();
|
305 |
+
}
|
306 |
+
}
|
307 |
+
if(where)
|
308 |
+
query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
|
309 |
+
}
|
310 |
+
jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
|
311 |
+
}
|
312 |
+
|
313 |
+
jQuery(document).ready(function () {
|
314 |
+
jQuery(".hasTip").tooltip({
|
315 |
+
track: true,
|
316 |
+
content: function () {
|
317 |
+
return jQuery(this).prop('title');
|
318 |
+
}
|
319 |
+
});
|
320 |
+
});
|
321 |
+
|
322 |
+
function insert_field(myValue) {
|
323 |
+
if(!selected_field)
|
324 |
+
return;
|
325 |
+
myField=document.getElementById(selected_field);
|
326 |
+
if (document.selection) {
|
327 |
+
myField.focus();
|
328 |
+
sel = document.selection.createRange();
|
329 |
+
sel.text = myValue;
|
330 |
+
}
|
331 |
+
else {
|
332 |
+
if (myField.selectionStart || myField.selectionStart == '0') {
|
333 |
+
var startPos = myField.selectionStart;
|
334 |
+
var endPos = myField.selectionEnd;
|
335 |
+
myField.value = myField.value.substring(0, startPos)
|
336 |
+
+ "{"+myValue+"}"
|
337 |
+
+ myField.value.substring(endPos, myField.value.length);
|
338 |
+
}
|
339 |
+
else {
|
340 |
+
myField.value += "{"+myValue+"}";
|
341 |
+
}
|
342 |
+
}
|
343 |
+
}
|
344 |
+
</script>
|
345 |
+
<style>
|
346 |
+
.c1 {
|
347 |
+
padding: 0 10px;
|
348 |
+
}
|
349 |
+
|
350 |
+
.main_func{
|
351 |
+
font-family: Segoe UI;
|
352 |
+
display: inline-block;
|
353 |
+
width: 550px;
|
354 |
+
}
|
355 |
+
|
356 |
+
.main_func .admintable {
|
357 |
+
width: 100%;
|
358 |
+
padding: 10px 0;
|
359 |
+
margin-bottom: 15px;
|
360 |
+
}
|
361 |
+
|
362 |
+
.main_func .admintable .key{
|
363 |
+
width: 36%;
|
364 |
+
}
|
365 |
+
|
366 |
+
.main_func .admintable input[type='text'],
|
367 |
+
.main_func .admintable input[type='password']{
|
368 |
+
padding: 4px 6px;
|
369 |
+
width:244px;
|
370 |
+
}
|
371 |
+
|
372 |
+
.btn.connect {
|
373 |
+
background:#4EC0D9;
|
374 |
+
width:78px;
|
375 |
+
height:32px;
|
376 |
+
border:1px solid #4EC0D9;
|
377 |
+
border-radius:0px;
|
378 |
+
color:#fff;
|
379 |
+
cursor:pointer;
|
380 |
+
}
|
381 |
+
|
382 |
+
.desc {
|
383 |
+
font-size: 13px;
|
384 |
+
display: inline-block;
|
385 |
+
width: 100%;
|
386 |
+
height: 100%;
|
387 |
+
position: fixed;
|
388 |
+
margin: 15px;
|
389 |
+
margin-left: 45px;
|
390 |
+
overflow: scroll;
|
391 |
+
}
|
392 |
+
|
393 |
+
.desc > div {
|
394 |
+
margin-top:3px;
|
395 |
+
}
|
396 |
+
|
397 |
+
.desc div span {
|
398 |
+
width: 62px;
|
399 |
+
display: inline-block;
|
400 |
+
}
|
401 |
+
|
402 |
+
.desc button {
|
403 |
+
max-width: 190px;
|
404 |
+
overflow: hidden;
|
405 |
+
white-space: nowrap;
|
406 |
+
text-overflow: ellipsis;
|
407 |
+
padding: 4px;
|
408 |
+
background: #eee;
|
409 |
+
border: 1px solid #ccc;
|
410 |
+
border-radius:0px;
|
411 |
+
height:27px;
|
412 |
+
}
|
413 |
+
|
414 |
+
.key label {
|
415 |
+
display:inline-block;
|
416 |
+
width:150px;
|
417 |
+
}
|
418 |
+
|
419 |
+
.select-db-label {
|
420 |
+
display: inline-block;
|
421 |
+
font-size: 16px;
|
422 |
+
width: 201px;
|
423 |
+
|
424 |
+
}
|
425 |
+
|
426 |
+
.select-db-select {
|
427 |
+
width:325px;
|
428 |
+
padding:6px;
|
429 |
+
}
|
430 |
+
|
431 |
+
.struct {
|
432 |
+
border: 3px solid red;
|
433 |
+
padding: 4px 6px;
|
434 |
+
display: inline-block;
|
435 |
+
margin-top:10px;
|
436 |
+
}
|
437 |
+
|
438 |
+
.cols div:nth-child(even) {background: #FFF}
|
439 |
+
.cols div:nth-child(odd) {background: #F5F5F5}
|
440 |
+
.cols div {
|
441 |
+
height: 28px;
|
442 |
+
padding: 5px
|
443 |
+
}
|
444 |
+
|
445 |
+
.cols label {
|
446 |
+
display: inline-block;
|
447 |
+
width: 175px;
|
448 |
+
font-size: 15px;
|
449 |
+
overflow: hidden;
|
450 |
+
white-space: nowrap;
|
451 |
+
text-overflow: ellipsis;
|
452 |
+
vertical-align: middle;
|
453 |
+
}
|
454 |
+
|
455 |
+
.cols input[type="text"] {
|
456 |
+
width: 295px;
|
457 |
+
line-height: 18px;
|
458 |
+
height: 28px;
|
459 |
+
border: 1px solid #ccc;
|
460 |
+
padding: 0 3px;
|
461 |
+
margin-right: 2px;
|
462 |
+
}
|
463 |
+
|
464 |
+
.cols input[type="text"]:disabled {
|
465 |
+
cursor: not-allowed;
|
466 |
+
background-color: #eee;
|
467 |
+
}
|
468 |
+
|
469 |
+
.cols input[type="checkbox"] {
|
470 |
+
width: 20px;
|
471 |
+
line-height: 18px;
|
472 |
+
height: 20px;
|
473 |
+
vertical-align: middle;
|
474 |
+
}
|
475 |
+
|
476 |
+
.cols select {
|
477 |
+
line-height: 18px;
|
478 |
+
height: 28px;
|
479 |
+
margin-right: 2px;
|
480 |
+
}
|
481 |
+
|
482 |
+
#fieldlist {
|
483 |
+
position: absolute;
|
484 |
+
width:225px;
|
485 |
+
background: #fff;
|
486 |
+
border: solid 1px #c7c7c7;
|
487 |
+
top: 0;
|
488 |
+
left: 0;
|
489 |
+
z-index: 1000;
|
490 |
+
}
|
491 |
+
|
492 |
+
#fieldlist a {
|
493 |
+
padding: 5px;
|
494 |
+
cursor:pointer;
|
495 |
+
overflow: hidden;
|
496 |
+
white-space: nowrap;
|
497 |
+
text-overflow: ellipsis;
|
498 |
+
}
|
499 |
+
|
500 |
+
#fieldlist a:hover {
|
501 |
+
background: #ccc;
|
502 |
+
}
|
503 |
+
|
504 |
+
.gen_query, .gen_query:focus {
|
505 |
+
width: 148px;
|
506 |
+
height: 38px;
|
507 |
+
background: #4EC0D9;
|
508 |
+
color: white;
|
509 |
+
cursor: pointer;
|
510 |
+
border: 0px;
|
511 |
+
font-size: 14px;
|
512 |
+
font-weight: bold;
|
513 |
+
margin: 20px 0;
|
514 |
+
border-radius: 0px;
|
515 |
+
}
|
516 |
+
|
517 |
+
.gen_query:active {
|
518 |
+
background: #ccc;
|
519 |
+
}
|
520 |
+
|
521 |
+
.fm-query-save {
|
522 |
+
float: right;
|
523 |
+
font-size: 13px;
|
524 |
+
margin: 0 20px;
|
525 |
+
background: #4EC0D9;
|
526 |
+
width: 83px;
|
527 |
+
height: 34px;
|
528 |
+
border: 1px solid #4EC0D9;
|
529 |
+
border-radius: 0px;
|
530 |
+
color: #fff;
|
531 |
+
cursor: pointer;
|
532 |
+
}
|
533 |
+
|
534 |
+
.select-db-op {
|
535 |
+
display: inline-block;
|
536 |
+
text-align: right;
|
537 |
+
font-weight: bold;
|
538 |
+
font-size: 18px;
|
539 |
+
padding: 5px 0;
|
540 |
+
margin: 5px 0;
|
541 |
+
background:none !important;
|
542 |
+
}
|
543 |
+
|
544 |
+
.select-db-op.where{
|
545 |
+
width: 272px;
|
546 |
+
}
|
547 |
+
|
548 |
+
.select-db-op img{
|
549 |
+
float:left;
|
550 |
+
}
|
551 |
+
|
552 |
+
.select-db-label {
|
553 |
+
display: inline-block;
|
554 |
+
font-size: 16px;
|
555 |
+
width: 201px;
|
556 |
+
|
557 |
+
}
|
558 |
+
.select-db-select {
|
559 |
+
width:325px;
|
560 |
+
padding:6px;
|
561 |
+
}
|
562 |
+
|
563 |
+
.fm-query-save {
|
564 |
+
float: right;
|
565 |
+
font-size: 13px;
|
566 |
+
margin: 0 20px;
|
567 |
+
background: #4EC0D9;
|
568 |
+
width: 83px;
|
569 |
+
height: 34px;
|
570 |
+
border: 1px solid #4EC0D9;
|
571 |
+
border-radius: 0px;
|
572 |
+
color: #fff;
|
573 |
+
cursor: pointer;
|
574 |
+
}
|
575 |
+
</style>
|
576 |
+
<div class="c1">
|
577 |
+
<div class="main_func">
|
578 |
+
<table class="admintable">
|
579 |
+
<tr valign="top">
|
580 |
+
<td class="key">
|
581 |
+
<label style="font-size:20px;">Connection type: </label>
|
582 |
+
</td>
|
583 |
+
<td>
|
584 |
+
<input type="radio" name="con_type" id="local" value="local" <?php if($con_type=='local') echo 'checked="checked"'?> disabled>
|
585 |
+
<label for="local">Local</label>
|
586 |
+
<input type="radio" name="con_type" id="remote" value="remote" <?php if($con_type=='remote') echo 'checked="checked"'?> disabled>
|
587 |
+
<label for="remote">Remote</label>
|
588 |
+
</td>
|
589 |
+
<td rowspan="2">
|
590 |
+
<input type="button" value="Connect" onclick="connect()" class="btn connect" disabled>
|
591 |
+
</td>
|
592 |
+
</tr>
|
593 |
+
<tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
|
594 |
+
<td class="key">Host</td>
|
595 |
+
<td>
|
596 |
+
<input type="text" name="host" id="host_rem" style="width:150px" value="<?php echo $host; ?>" disabled>
|
597 |
+
Port : <input type="text" name="port" id="port_rem" value="<?php echo $port; ?>" style="width:48px" disabled>
|
598 |
+
</td>
|
599 |
+
</tr>
|
600 |
+
<tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
|
601 |
+
<td class="key">Username</td>
|
602 |
+
<td>
|
603 |
+
<input type="text" name="username" id="username_rem" value="<?php echo $username; ?>" disabled>
|
604 |
+
</td>
|
605 |
+
</tr>
|
606 |
+
<tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
|
607 |
+
<td class="key">Password</td>
|
608 |
+
<td>
|
609 |
+
<input type="password" name="password" id="password_rem" value="<?php echo $password; ?>" disabled>
|
610 |
+
</td>
|
611 |
+
</tr>
|
612 |
+
<tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
|
613 |
+
<td class="key">Database</td>
|
614 |
+
<td>
|
615 |
+
<input type="text"name="database" id="database_rem" value="<?php echo $database; ?>" disabled>
|
616 |
+
</td>
|
617 |
+
</tr>
|
618 |
+
<tr valign="top">
|
619 |
+
<td class="key">
|
620 |
+
<label style="font-size:20px;">Type: </label>
|
621 |
+
</td>
|
622 |
+
<td>
|
623 |
+
<input type="radio" name="con_method" id="insert" value="insert" <?php if($con_method=='insert') echo 'checked="checked"'?> disabled>
|
624 |
+
<label for="insert">Insert</label>
|
625 |
+
<input type="radio" name="con_method" id="update" value="update" <?php if($con_method=='update') echo 'checked="checked"'?> disabled>
|
626 |
+
<label for="update">Update</label>
|
627 |
+
<input type="radio" name="con_method" id="delete" value="delete" <?php if($con_method=='delete') echo 'checked="checked"'?> disabled>
|
628 |
+
<label for="delete">Delete</label>
|
629 |
+
</td>
|
630 |
+
</tr>
|
631 |
+
</table>
|
632 |
+
<div id="struct">
|
633 |
+
<label for="tables" class="select-db-label">Select a table</label>
|
634 |
+
<select name="tables" id="tables" class="select-db-select" disabled>
|
635 |
+
<option value="" ></option>
|
636 |
+
<?php
|
637 |
+
foreach($tables as $table) {
|
638 |
+
echo '<option value="'.$table.'" '.($table_cur==$table ? 'selected' : '').' >'.$table.'</option>';
|
639 |
+
}
|
640 |
+
?>
|
641 |
+
</select>
|
642 |
+
<br/>
|
643 |
+
<div id="table_struct">
|
644 |
+
<?php
|
645 |
+
if($table_struct) {
|
646 |
+
?>
|
647 |
+
<div class="struct">
|
648 |
+
<div class="cols">
|
649 |
+
<?php
|
650 |
+
$temps=explode('***wdffieldwdf***',$details);
|
651 |
+
$wheres = $temps[count($temps)-1];
|
652 |
+
$temps = array_slice($temps,0, count($temps)-1);
|
653 |
+
$col_names= array();
|
654 |
+
$col_vals= array();
|
655 |
+
$col_checks= array();
|
656 |
+
|
657 |
+
foreach($temps as $temp) {
|
658 |
+
$temp=explode('***wdfnamewdf***',$temp);
|
659 |
+
array_push($col_names, $temp[0]);
|
660 |
+
$temp=explode('***wdfvaluewdf***',$temp[1]);
|
661 |
+
array_push($col_vals, $temp[0]);
|
662 |
+
array_push($col_checks, $temp[1]);
|
663 |
+
}
|
664 |
+
if($con_method=='insert' or $con_method=='update') {
|
665 |
+
echo '<div style="background: none;text-align: center;font-size: 20px;color: #000;font-weight: bold;"> SET </div>';
|
666 |
+
|
667 |
+
foreach($table_struct as $key =>$col) {
|
668 |
+
$title=' '.$col->Field;
|
669 |
+
$title.="<ul style='padding-left: 17px;'>";
|
670 |
+
$title.="<li>Type - ".$col->Type."</li>";
|
671 |
+
$title.="<li>Null - ".$col->Null."</li>";
|
672 |
+
$title.="<li>Key - ".$col->Key."</li>";
|
673 |
+
$title.="<li>Default - ".$col->Default."</li>";
|
674 |
+
$title.="<li>Extra - ".$col->Extra."</li>";
|
675 |
+
$title.="</ul>";
|
676 |
+
?>
|
677 |
+
<div><label title="<?php echo $title; ?>" class="hasTip"><b><?php echo $col->Field; ?></b><img src="<?php echo WD_FM_URL . '/images/info.png?ver='. WD_FM_VERSION.''; ?>" style="width:20px; vertical-align:middle;padding-left: 10px;" /></label><input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" <?php if(!$col_checks[$key]) echo 'disabled="disabled"'?> value="<?php echo $col_vals[$key]; ?>" /><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" <?php if($col_checks[$key]) echo 'checked="checked"'?> /></div>
|
678 |
+
<?php
|
679 |
+
}
|
680 |
+
}
|
681 |
+
|
682 |
+
if($con_method=='delete' or $con_method=='update') {
|
683 |
+
echo '<div class="select-db-op where"><img src="'.WD_FM_URL . '/images/add_condition.png?ver='. WD_FM_VERSION.'" title="ADD" class="add_cond"/>WHERE</div>';
|
684 |
+
if($wheres) {
|
685 |
+
echo '<script>';
|
686 |
+
|
687 |
+
$wheres = explode('***where***',$wheres);
|
688 |
+
$wheres = array_slice($wheres,0, count($wheres)-1);
|
689 |
+
foreach($wheres as $where) {
|
690 |
+
$temp=explode('***sel***',$where);
|
691 |
+
$sel = $temp[0];
|
692 |
+
$temp=explode('***op***',$temp[1]);
|
693 |
+
$op = $temp[0];
|
694 |
+
$temp=explode('***val***',$temp[1]);
|
695 |
+
$val = $temp[0];
|
696 |
+
$andor = $temp[1];
|
697 |
+
echo 'jQuery(".cols").append(conds.replace(/condid/g, cond_id++).replace(\'SingleQuot\', "\'")); update_vis();
|
698 |
+
jQuery("#sel_"+(cond_id-1)).val("'.html_entity_decode($sel, ENT_QUOTES).'");
|
699 |
+
jQuery("#op_"+(cond_id-1)).val("'.$op.'");
|
700 |
+
jQuery("#val_"+(cond_id-1)).val("'.$val.'");
|
701 |
+
jQuery("#andor_"+(cond_id-1)).val("'.$andor.'");';
|
702 |
+
}
|
703 |
+
echo '</script>';
|
704 |
+
}
|
705 |
+
}
|
706 |
+
?>
|
707 |
+
</div>
|
708 |
+
<div style="color:red; background: none">The changes above will not affect the query until you click "Generate query".</div>
|
709 |
+
</div>
|
710 |
+
<br/>
|
711 |
+
<input type="button" value="Generate Query" class="gen_query" onclick="gen_query()">
|
712 |
+
<br/>
|
713 |
+
<form name="query_form" id="query_form" >
|
714 |
+
<label style="vertical-align: top; width: 102px; display: inline-block;" for="query_txt" > Query: </label><textarea id="query_txt" name="query" rows=5 style="width:428px" ><?php echo $query_obj->query; ?></textarea>
|
715 |
+
<input type="hidden" name="details" id="details">
|
716 |
+
<input type="hidden" name="id" value="<?php echo $query_obj->id; ?>">
|
717 |
+
</form>
|
718 |
+
<input type="button" value="Save" class="fm-query-save" onclick="save_query()">
|
719 |
+
<div id="fieldlist" style="display: none;">
|
720 |
+
<?php echo $form_fields; ?>
|
721 |
+
</div>
|
722 |
+
<?php
|
723 |
+
}
|
724 |
+
?>
|
725 |
+
</div>
|
726 |
+
</div>
|
727 |
+
<input type="hidden" value="<?php echo $form_id ?>" id="form_id">
|
728 |
+
</div>
|
729 |
+
<div class="desc">
|
730 |
+
<?php
|
731 |
+
foreach($label_id as $key => $lid) {
|
732 |
+
echo '<div>{'.$lid.'} - <button onclick="insert_field('.$lid.');">'.$label_order_original[$key].'</button></div>';
|
733 |
+
}
|
734 |
+
$user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
|
735 |
+
foreach($user_fields as $user_key=>$user_field) {
|
736 |
+
echo '<div>{'.$user_key.'} - <button onclick="insert_field(\''.$user_key.'\');">'.$user_field.'</button></div>';
|
737 |
+
}
|
738 |
+
?>
|
739 |
+
</div>
|
740 |
+
</div>
|
741 |
+
<?php
|
742 |
+
die();
|
743 |
+
}
|
744 |
+
|
745 |
+
public function add_query($form_id){
|
746 |
+
wp_print_scripts('jquery');
|
747 |
+
wp_print_scripts('jquery-ui-tooltip');
|
748 |
+
?>
|
749 |
+
<link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
|
750 |
+
<link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
|
751 |
+
<?php
|
752 |
+
$label = $this->model->get_labels($form_id);
|
753 |
+
|
754 |
+
$filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
|
755 |
+
$label_id= array();
|
756 |
+
$label_order= array();
|
757 |
+
$label_order_original= array();
|
758 |
+
$label_type= array();
|
759 |
+
|
760 |
+
$label_all = explode('#****#',$label);
|
761 |
+
$label_all = array_slice($label_all,0, count($label_all)-1);
|
762 |
+
foreach($label_all as $key => $label_each) {
|
763 |
+
$label_id_each=explode('#**id**#',$label_each);
|
764 |
+
$label_oder_each=explode('#**label**#', $label_id_each[1]);
|
765 |
+
|
766 |
+
if(in_array($label_oder_each[1],$filter_types))
|
767 |
+
continue;
|
768 |
+
array_push($label_id, $label_id_each[0]);
|
769 |
+
array_push($label_order_original, $label_oder_each[0]);
|
770 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
771 |
+
$rpltxt = "";
|
772 |
+
$label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
773 |
+
array_push($label_order, $label_temp);
|
774 |
+
array_push($label_type, $label_oder_each[1]);
|
775 |
+
}
|
776 |
+
?>
|
777 |
+
<script>
|
778 |
+
function insert_field(){}
|
779 |
+
|
780 |
+
function connect() {
|
781 |
+
jQuery("input[type='radio']").attr('disabled','');
|
782 |
+
jQuery(".connect").attr('disabled','');
|
783 |
+
jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
784 |
+
jQuery.ajax({
|
785 |
+
type: "POST",
|
786 |
+
url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'db_tables', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
|
787 |
+
data: 'con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row',
|
788 |
+
success: function(data) {
|
789 |
+
jQuery("#struct").removeClass("fm_loading");
|
790 |
+
if(data==1) {
|
791 |
+
jQuery("#struct").html('<div style="font-size: 22px; text-align: center; padding-top: 15px;">Could not connect to MySQL.</div>')
|
792 |
+
jQuery(".connect").removeAttr('disabled');
|
793 |
+
jQuery("input[type='radio']").removeAttr('disabled','');
|
794 |
+
}
|
795 |
+
else {
|
796 |
+
jQuery("#struct").html(data);
|
797 |
+
}
|
798 |
+
|
799 |
+
}
|
800 |
+
});
|
801 |
+
}
|
802 |
+
|
803 |
+
function shh(x) {
|
804 |
+
if(x)
|
805 |
+
jQuery(".remote_info").show();
|
806 |
+
else
|
807 |
+
jQuery(".remote_info").hide();
|
808 |
+
}
|
809 |
+
</script>
|
810 |
+
<style>
|
811 |
+
.c1 {
|
812 |
+
padding: 0 10px;
|
813 |
+
}
|
814 |
+
|
815 |
+
.main_func{
|
816 |
+
font-family: Segoe UI;
|
817 |
+
display: inline-block;
|
818 |
+
width: 550px;
|
819 |
+
}
|
820 |
+
|
821 |
+
.main_func .admintable {
|
822 |
+
width: 100%;
|
823 |
+
padding: 10px 0;
|
824 |
+
margin-bottom: 15px;
|
825 |
+
}
|
826 |
+
|
827 |
+
.main_func .admintable .key{
|
828 |
+
width: 36%;
|
829 |
+
}
|
830 |
+
|
831 |
+
.main_func .admintable input[type='text'],
|
832 |
+
.main_func .admintable input[type='password']{
|
833 |
+
padding: 4px 6px;
|
834 |
+
width:244px;
|
835 |
+
}
|
836 |
+
|
837 |
+
.btn.connect {
|
838 |
+
background:#4EC0D9;
|
839 |
+
width:78px;
|
840 |
+
height:32px;
|
841 |
+
border:1px solid #4EC0D9;
|
842 |
+
border-radius:0px;
|
843 |
+
color:#fff;
|
844 |
+
cursor:pointer;
|
845 |
+
}
|
846 |
+
|
847 |
+
.desc {
|
848 |
+
font-size: 13px;
|
849 |
+
display: inline-block;
|
850 |
+
width: 100%;
|
851 |
+
height: 100%;
|
852 |
+
position: fixed;
|
853 |
+
margin: 15px;
|
854 |
+
margin-left: 45px;
|
855 |
+
overflow: scroll;
|
856 |
+
}
|
857 |
+
|
858 |
+
.desc > div {
|
859 |
+
margin-top:3px;
|
860 |
+
}
|
861 |
+
|
862 |
+
.desc div span {
|
863 |
+
width: 62px;
|
864 |
+
display: inline-block;
|
865 |
+
}
|
866 |
+
|
867 |
+
.desc button {
|
868 |
+
max-width: 190px;
|
869 |
+
overflow: hidden;
|
870 |
+
white-space: nowrap;
|
871 |
+
text-overflow: ellipsis;
|
872 |
+
padding: 4px;
|
873 |
+
background: #eee;
|
874 |
+
border: 1px solid #ccc;
|
875 |
+
border-radius:0px;
|
876 |
+
height:27px;
|
877 |
+
}
|
878 |
+
|
879 |
+
.key label {
|
880 |
+
display:inline-block;
|
881 |
+
width:150px;
|
882 |
+
}
|
883 |
+
|
884 |
+
.select-db-label {
|
885 |
+
display: inline-block;
|
886 |
+
font-size: 16px;
|
887 |
+
width: 201px;
|
888 |
+
|
889 |
+
}
|
890 |
+
|
891 |
+
.select-db-select {
|
892 |
+
width:325px;
|
893 |
+
padding:6px;
|
894 |
+
}
|
895 |
+
</style>
|
896 |
+
<div class="c1">
|
897 |
+
<div class="main_func">
|
898 |
+
<table class="admintable">
|
899 |
+
<tr valign="top">
|
900 |
+
<td class="key">
|
901 |
+
<label style="font-size:20px;">Connection type: </label>
|
902 |
+
</td>
|
903 |
+
<td>
|
904 |
+
<input type="radio" name="con_type" id="local" value="local" checked="checked" onclick="shh(false)">
|
905 |
+
<label for="local">Local</label>
|
906 |
+
<input type="radio" name="con_type" id="remote" value="remote" onclick="shh(true)">
|
907 |
+
<label for="remote">Remote</label>
|
908 |
+
</td>
|
909 |
+
<td rowspan="2">
|
910 |
+
<input type="button" value="Connect" onclick="connect()" class="btn connect">
|
911 |
+
</td>
|
912 |
+
</tr>
|
913 |
+
<tr class="remote_info" style="display:none">
|
914 |
+
<td class="key">Host</td>
|
915 |
+
<td>
|
916 |
+
<input type="text" name="host" id="host_rem" style="width:150px">
|
917 |
+
Port : <input type="text" name="port" id="port_rem" value="3306" style="width:48px">
|
918 |
+
</td>
|
919 |
+
</tr>
|
920 |
+
<tr class="remote_info" style="display:none">
|
921 |
+
<td class="key">Username</td>
|
922 |
+
<td>
|
923 |
+
<input type="text" name="username" id="username_rem">
|
924 |
+
</td>
|
925 |
+
</tr>
|
926 |
+
<tr class="remote_info" style="display:none">
|
927 |
+
<td class="key">Password</td>
|
928 |
+
<td>
|
929 |
+
<input type="password" name="password" id="password_rem">
|
930 |
+
</td>
|
931 |
+
</tr>
|
932 |
+
<tr class="remote_info" style="display:none">
|
933 |
+
<td class="key">Database</td>
|
934 |
+
<td>
|
935 |
+
<input type="text"name="database" id="database_rem">
|
936 |
+
</td>
|
937 |
+
</tr>
|
938 |
+
<tr valign="top">
|
939 |
+
<td class="key">
|
940 |
+
<label style="font-size:20px;">Type: </label>
|
941 |
+
</td>
|
942 |
+
<td >
|
943 |
+
<input type="radio" name="con_method" id="insert" value="insert" checked="checked">
|
944 |
+
<label for="insert">Insert</label>
|
945 |
+
<input type="radio" name="con_method" id="update" value="update">
|
946 |
+
<label for="update">Update</label>
|
947 |
+
<input type="radio" name="con_method" id="delete" value="delete">
|
948 |
+
<label for="delete">Delete</label>
|
949 |
+
</td>
|
950 |
+
</tr>
|
951 |
+
</table>
|
952 |
+
<div id="struct">
|
953 |
+
</div>
|
954 |
+
<input type="hidden" value="<?php echo $form_id ?>" id="form_id">
|
955 |
+
</div>
|
956 |
+
<div class="desc">
|
957 |
+
<?php
|
958 |
+
foreach($label_id as $key => $lid) {
|
959 |
+
echo '<div><span>{'.$lid.'}</span> - <button onclick="insert_field('.$lid.');">'.$label_order_original[$key].'</button></div>';
|
960 |
+
}
|
961 |
+
|
962 |
+
$user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
|
963 |
+
foreach($user_fields as $user_key=>$user_field) {
|
964 |
+
echo '<div><span>{'.$user_key.'}</span> - <button onclick="insert_field(\''.$user_key.'\');">'.$user_field.'</button></div>';
|
965 |
+
}
|
966 |
+
?>
|
967 |
+
</div>
|
968 |
+
</div>
|
969 |
+
<?php
|
970 |
+
die();
|
971 |
+
}
|
972 |
+
|
973 |
+
public function db_tables($form_id){
|
974 |
+
$tables = $this->model->get_tables();
|
975 |
+
?>
|
976 |
+
<label for="tables" class="select-db-label">Select a table</label>
|
977 |
+
<select name="tables" id="tables" class="select-db-select">
|
978 |
+
<option value="" ></option>
|
979 |
+
<?php
|
980 |
+
foreach($tables as $table) {
|
981 |
+
echo '<option value="' . $table . '" >' . $table . '</option>';
|
982 |
+
}
|
983 |
+
?>
|
984 |
+
</select>
|
985 |
+
<br/>
|
986 |
+
<div id="table_struct">
|
987 |
+
</div>
|
988 |
+
<script>
|
989 |
+
jQuery("#tables").change(function (){
|
990 |
+
jQuery('#table_struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
991 |
+
jQuery.ajax({
|
992 |
+
type: "POST",
|
993 |
+
url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'db_table_struct', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
|
994 |
+
data: 'name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row',
|
995 |
+
success: function(data) {
|
996 |
+
jQuery("#table_struct").removeClass("fm_loading");
|
997 |
+
jQuery("#table_struct").html(data);
|
998 |
+
}
|
999 |
+
});
|
1000 |
+
})
|
1001 |
+
</script>
|
1002 |
+
<?php
|
1003 |
+
die();
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
public function db_table_struct ($form_id) {
|
1007 |
+
$table_struct = $this->model->get_table_struct();
|
1008 |
+
$label = $this->model->get_labels($form_id);
|
1009 |
+
$con_method = isset($_POST['con_method']) ? $_POST['con_method'] : '';
|
1010 |
+
$filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
|
1011 |
+
$label_id= array();
|
1012 |
+
$label_order= array();
|
1013 |
+
$label_order_original= array();
|
1014 |
+
$label_type= array();
|
1015 |
+
|
1016 |
+
///stexic
|
1017 |
+
$label_all = explode('#****#',$label);
|
1018 |
+
$label_all = array_slice($label_all,0, count($label_all)-1);
|
1019 |
+
|
1020 |
+
foreach($label_all as $key => $label_each) {
|
1021 |
+
$label_id_each=explode('#**id**#',$label_each);
|
1022 |
+
$label_oder_each=explode('#**label**#', $label_id_each[1]);
|
1023 |
+
|
1024 |
+
if(in_array($label_oder_each[1],$filter_types)) {
|
1025 |
+
continue;
|
1026 |
+
}
|
1027 |
+
array_push($label_id, $label_id_each[0]);
|
1028 |
+
array_push($label_order_original, $label_oder_each[0]);
|
1029 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
1030 |
+
$rpltxt = "";
|
1031 |
+
$label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
1032 |
+
array_push($label_order, $label_temp);
|
1033 |
+
array_push($label_type, $label_oder_each[1]);
|
1034 |
+
}
|
1035 |
+
$form_fields='';
|
1036 |
+
foreach($label_id as $key => $id) {
|
1037 |
+
$form_fields.='<a onclick="insert_field('.$id.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
|
1038 |
+
}
|
1039 |
+
$user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
|
1040 |
+
foreach($user_fields as $user_key=>$user_field) {
|
1041 |
+
$form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
|
1042 |
+
}
|
1043 |
+
$cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
|
1044 |
+
foreach($table_struct as $col) {
|
1045 |
+
$cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
|
1046 |
+
}
|
1047 |
+
$cond.='</select>';
|
1048 |
+
|
1049 |
+
$cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. WD_FM_VERSION.'" onclick="delete_cond("condid")" style="vertical-align: middle;"></div>';
|
1050 |
+
?>
|
1051 |
+
<script>
|
1052 |
+
var selected_field ='';
|
1053 |
+
var isvisible = 1;
|
1054 |
+
var cond_id = 1;
|
1055 |
+
|
1056 |
+
conds='<?php echo $cond ?>';
|
1057 |
+
fields=new Array(<?php
|
1058 |
+
$fields = "";
|
1059 |
+
if($table_struct) {
|
1060 |
+
foreach($table_struct as $col) {
|
1061 |
+
$fields.=' "'.$col->Field.'",';
|
1062 |
+
}
|
1063 |
+
echo substr($fields, 0, -1);
|
1064 |
+
}
|
1065 |
+
?>);
|
1066 |
+
function dis(id, x) {
|
1067 |
+
if(x)
|
1068 |
+
jQuery('#'+id).removeAttr('disabled');
|
1069 |
+
else
|
1070 |
+
jQuery('#'+id).attr('disabled','disabled');
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
function update_vis() {
|
1074 |
+
previous=0;
|
1075 |
+
for(i=1; i<cond_id; i++) {
|
1076 |
+
if(jQuery('#'+i).html()) {
|
1077 |
+
jQuery('#andor_'+i).css('visibility', 'hidden');
|
1078 |
+
if(previous) {
|
1079 |
+
jQuery('#andor_'+previous).css('visibility', 'visible');
|
1080 |
+
}
|
1081 |
+
previous=i;
|
1082 |
+
}
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
function delete_cond(id) {
|
1087 |
+
jQuery('#'+id).remove();
|
1088 |
+
update_vis();
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
jQuery('.add_cond').click( function() {
|
1092 |
+
jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
|
1093 |
+
update_vis();
|
1094 |
+
});
|
1095 |
+
|
1096 |
+
jQuery('html').click(function() {
|
1097 |
+
if(jQuery("#fieldlist").css('display')=="block") {
|
1098 |
+
jQuery("#fieldlist").hide();
|
1099 |
+
}
|
1100 |
+
});
|
1101 |
+
|
1102 |
+
jQuery('.cols input[type="text"]').on('click', function(event) {
|
1103 |
+
event.stopPropagation();
|
1104 |
+
jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
|
1105 |
+
jQuery("#fieldlist").css("left",jQuery(this).offset().left);
|
1106 |
+
jQuery("#fieldlist").slideDown('fast');
|
1107 |
+
selected_field=this.id;
|
1108 |
+
});
|
1109 |
+
|
1110 |
+
jQuery('#query_txt').click(function(event) {
|
1111 |
+
event.stopPropagation();
|
1112 |
+
jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
|
1113 |
+
jQuery("#fieldlist").css("left",jQuery(this).offset().left);
|
1114 |
+
jQuery("#fieldlist").slideDown('fast');
|
1115 |
+
selected_field=this.id;
|
1116 |
+
});
|
1117 |
+
|
1118 |
+
jQuery('#fieldlist').click(function(event){
|
1119 |
+
event.stopPropagation();
|
1120 |
+
});
|
1121 |
+
|
1122 |
+
function save_query() {
|
1123 |
+
con_type =jQuery('input[name=con_type]:checked').val();
|
1124 |
+
con_method =jQuery('input[name=con_method]:checked').val();
|
1125 |
+
table =jQuery('#tables').val();
|
1126 |
+
table =jQuery('#tables').val();
|
1127 |
+
host =jQuery('#host_rem').val();
|
1128 |
+
port =jQuery('#port_rem').val();
|
1129 |
+
username =jQuery('#username_rem').val();
|
1130 |
+
password =jQuery('#password_rem').val();
|
1131 |
+
database =jQuery('#database_rem').val();
|
1132 |
+
|
1133 |
+
str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
|
1134 |
+
|
1135 |
+
if(fields.length) {
|
1136 |
+
for(i=0; i<fields.length; i++) {
|
1137 |
+
str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
|
1138 |
+
}
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
for(i=1; i<cond_id; i++) {
|
1142 |
+
if(jQuery('#'+i).html()) {
|
1143 |
+
str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
|
1144 |
+
}
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
if(!jQuery('#query_txt').val()) {
|
1148 |
+
gen_query();
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
jQuery('#details').val(str);
|
1152 |
+
|
1153 |
+
var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
|
1154 |
+
if(jQuery('#query_txt').val()) {
|
1155 |
+
jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
1156 |
+
jQuery.ajax({
|
1157 |
+
type: "POST",
|
1158 |
+
url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'save_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
|
1159 |
+
data: datatxt,
|
1160 |
+
success: function(data) {
|
1161 |
+
window.parent.wd_fm_apply_options('apply_options');
|
1162 |
+
window.parent.tb_remove();
|
1163 |
+
}
|
1164 |
+
});
|
1165 |
+
}
|
1166 |
+
else {
|
1167 |
+
alert('The query is empty.');
|
1168 |
+
}
|
1169 |
+
return false;
|
1170 |
+
}
|
1171 |
+
|
1172 |
+
function gen_query() {
|
1173 |
+
if(jQuery('#query_txt').val()) {
|
1174 |
+
if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.')) {
|
1175 |
+
return;
|
1176 |
+
}
|
1177 |
+
}
|
1178 |
+
query="";
|
1179 |
+
fields=new Array(<?php
|
1180 |
+
$fields = "";
|
1181 |
+
if($table_struct) {
|
1182 |
+
foreach($table_struct as $col) {
|
1183 |
+
$fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
|
1184 |
+
}
|
1185 |
+
echo substr($fields, 0, -1);
|
1186 |
+
}
|
1187 |
+
?>);
|
1188 |
+
|
1189 |
+
con_type =jQuery('input[name=con_type]:checked').val();
|
1190 |
+
con_method =jQuery('input[name=con_method]:checked').val();
|
1191 |
+
table =jQuery('#tables').val();
|
1192 |
+
fls='';
|
1193 |
+
vals='';
|
1194 |
+
valsA=new Array();
|
1195 |
+
flsA=new Array();
|
1196 |
+
|
1197 |
+
if(fields.length) {
|
1198 |
+
for(i=0; i<fields.length; i++) {
|
1199 |
+
if(jQuery('#ch_'+fields[i]+":checked" ).length) {
|
1200 |
+
flsA.push(fields[i]);
|
1201 |
+
valsA.push(jQuery('#'+fields[i]).val());
|
1202 |
+
}
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
if(con_method=="insert") {
|
1207 |
+
if(flsA.length) {
|
1208 |
+
for(i=0; i<flsA.length-1; i++) {
|
1209 |
+
fls+= '`'+flsA[i]+'`, ';
|
1210 |
+
vals+= '"'+valsA[i]+'", ';
|
1211 |
+
}
|
1212 |
+
fls+= '`'+flsA[i]+'`';
|
1213 |
+
vals+= '"'+valsA[i]+'"';
|
1214 |
+
}
|
1215 |
+
if(fls) {
|
1216 |
+
query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
if(con_method=="update") {
|
1221 |
+
if(flsA.length) {
|
1222 |
+
for(i=0; i<flsA.length-1; i++) {
|
1223 |
+
vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
|
1224 |
+
}
|
1225 |
+
vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
|
1226 |
+
}
|
1227 |
+
where="";
|
1228 |
+
previous='';
|
1229 |
+
for(i=1; i<cond_id; i++) {
|
1230 |
+
if(jQuery('#'+i).html()) {
|
1231 |
+
if(jQuery('#op_'+i).val()=="%..%")
|
1232 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
|
1233 |
+
else if(jQuery('#op_'+i).val()=="%..")
|
1234 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
|
1235 |
+
else if(jQuery('#op_'+i).val()=="..%")
|
1236 |
+
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
1237 |
+
else
|
1238 |
+
op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
|
1239 |
+
where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
|
1240 |
+
previous=' '+ jQuery('#andor_'+i).val();
|
1241 |
+
}
|
1242 |
+
}
|
1243 |
+
if(vals) {
|
1244 |
+
query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
|
1245 |
+
}
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
if(con_method=="delete") {
|
1249 |
+
where="";
|
1250 |
+
previous='';
|
1251 |
+
for(i=1; i<cond_id; i++) {
|
1252 |
+
if(jQuery('#'+i).html()) {
|
1253 |
+
if(jQuery('#op_'+i).val()=="%..%")
|
1254 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
|
1255 |
+
else if(jQuery('#op_'+i).val()=="%..")
|
1256 |
+
op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
|
1257 |
+
else if(jQuery('#op_'+i).val()=="..%")
|
1258 |
+
op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
|
1259 |
+
else
|
1260 |
+
op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
|
1261 |
+
where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
|
1262 |
+
previous=' '+ jQuery('#andor_'+i).val();
|
1263 |
+
}
|
1264 |
+
}
|
1265 |
+
if(where) {
|
1266 |
+
query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
|
1267 |
+
}
|
1268 |
+
}
|
1269 |
+
jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
jQuery(document).ready(function () {
|
1273 |
+
jQuery(".hasTip").tooltip({
|
1274 |
+
track: true,
|
1275 |
+
content: function () {
|
1276 |
+
return jQuery(this).prop('title');
|
1277 |
+
}
|
1278 |
+
});
|
1279 |
+
});
|
1280 |
+
|
1281 |
+
function insert_field(myValue) {
|
1282 |
+
if(!selected_field)
|
1283 |
+
return;
|
1284 |
+
myField=document.getElementById(selected_field);
|
1285 |
+
if (document.selection) {
|
1286 |
+
myField.focus();
|
1287 |
+
sel = document.selection.createRange();
|
1288 |
+
sel.text = myValue;
|
1289 |
+
}
|
1290 |
+
else {
|
1291 |
+
if (myField.selectionStart || myField.selectionStart == '0') {
|
1292 |
+
var startPos = myField.selectionStart;
|
1293 |
+
var endPos = myField.selectionEnd;
|
1294 |
+
myField.value = myField.value.substring(0, startPos)
|
1295 |
+
+ "{"+myValue+"}"
|
1296 |
+
+ myField.value.substring(endPos, myField.value.length);
|
1297 |
+
}
|
1298 |
+
else {
|
1299 |
+
myField.value += "{"+myValue+"}";
|
1300 |
+
}
|
1301 |
+
}
|
1302 |
+
}
|
1303 |
+
</script>
|
1304 |
+
<style>
|
1305 |
+
.cols div:nth-child(even) {background: #FFF;}
|
1306 |
+
.cols div:nth-child(odd) {background: #F5F5F5;}
|
1307 |
+
.cols div {
|
1308 |
+
height: 28px;
|
1309 |
+
padding: 5px;
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
.cols {
|
1313 |
+
display: inline-block;
|
1314 |
+
}
|
1315 |
+
|
1316 |
+
.cols label {
|
1317 |
+
display: inline-block;
|
1318 |
+
width: 200px;
|
1319 |
+
font-size: 15px;
|
1320 |
+
overflow: hidden;
|
1321 |
+
white-space: nowrap;
|
1322 |
+
text-overflow: ellipsis;
|
1323 |
+
vertical-align: middle;
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
.cols input[type="text"] {
|
1327 |
+
width: 295px;
|
1328 |
+
line-height: 18px;
|
1329 |
+
height: 28px;
|
1330 |
+
border: 1px solid #ccc;
|
1331 |
+
padding: 0 3px;
|
1332 |
+
margin-right: 2px;
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
.cols input[type="text"]:disabled {
|
1336 |
+
cursor: not-allowed;
|
1337 |
+
background-color: #eee;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
.cols input[type="checkbox"] {
|
1341 |
+
width: 20px;
|
1342 |
+
line-height: 18px;
|
1343 |
+
height: 20px;
|
1344 |
+
vertical-align: middle;
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
.cols select {
|
1348 |
+
line-height: 18px;
|
1349 |
+
height: 28px;
|
1350 |
+
margin-right: 2px;
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
#fieldlist {
|
1354 |
+
position: absolute;
|
1355 |
+
width:225px;
|
1356 |
+
background: #fff;
|
1357 |
+
border: solid 1px #c7c7c7;
|
1358 |
+
top: 0;
|
1359 |
+
left: 0;
|
1360 |
+
z-index: 1000;
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
#fieldlist a {
|
1364 |
+
padding: 5px;
|
1365 |
+
cursor:pointer;
|
1366 |
+
overflow: hidden;
|
1367 |
+
white-space: nowrap;
|
1368 |
+
text-overflow: ellipsis;
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
#fieldlist a:hover {
|
1372 |
+
background: #ccc;
|
1373 |
+
}
|
1374 |
+
.gen_query, .gen_query:focus {
|
1375 |
+
width: 148px;
|
1376 |
+
height: 38px;
|
1377 |
+
background: #4EC0D9;
|
1378 |
+
color: white;
|
1379 |
+
cursor: pointer;
|
1380 |
+
border: 0px;
|
1381 |
+
font-size: 14px;
|
1382 |
+
font-weight: bold;
|
1383 |
+
margin: 20px 0;
|
1384 |
+
border-radius: 0px;
|
1385 |
+
}
|
1386 |
+
.gen_query:active {
|
1387 |
+
background: #ccc;
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
.fm-query-save {
|
1391 |
+
float: right;
|
1392 |
+
font-size: 13px;
|
1393 |
+
margin: 0 20px;
|
1394 |
+
background: #4EC0D9;
|
1395 |
+
width: 83px;
|
1396 |
+
height: 34px;
|
1397 |
+
border: 1px solid #4EC0D9;
|
1398 |
+
border-radius: 0px;
|
1399 |
+
color: #fff;
|
1400 |
+
cursor: pointer;
|
1401 |
+
}
|
1402 |
+
|
1403 |
+
.select-db-op {
|
1404 |
+
display: inline-block;
|
1405 |
+
text-align: right;
|
1406 |
+
font-weight: bold;
|
1407 |
+
font-size: 18px;
|
1408 |
+
padding: 5px 0;
|
1409 |
+
margin: 5px 0;
|
1410 |
+
background:none !important;
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
.select-db-op.where{
|
1414 |
+
width: 272px;
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
.select-db-op img{
|
1418 |
+
float:left;
|
1419 |
+
}
|
1420 |
+
</style>
|
1421 |
+
<?php
|
1422 |
+
if($table_struct) { ?>
|
1423 |
+
<div class="cols">
|
1424 |
+
<?php
|
1425 |
+
if($con_method=='insert' or $con_method=='update') {
|
1426 |
+
echo '<div style="background: none;text-align: center;font-size: 20px;color: #000;font-weight: bold;"> SET </div>';
|
1427 |
+
foreach($table_struct as $col) {
|
1428 |
+
$title=' '.$col->Field;
|
1429 |
+
$title.="<ul style='padding-left: 17px;'>";
|
1430 |
+
$title.="<li>Type - ".$col->Type."</li>";
|
1431 |
+
$title.="<li>Null - ".$col->Null."</li>";
|
1432 |
+
$title.="<li>Key - ".$col->Key."</li>";
|
1433 |
+
$title.="<li>Default - ".$col->Default."</li>";
|
1434 |
+
$title.="<li>Extra - ".$col->Extra."</li>";
|
1435 |
+
$title.="</ul>";
|
1436 |
+
?>
|
1437 |
+
<div><label title="<?php echo $title; ?>" class="hasTip"><b><?php echo $col->Field; ?></b><img src="<?php echo WD_FM_URL . '/images/info.png?ver='. WD_FM_VERSION.''; ?>" style="width:20px; vertical-align:middle;padding-left: 10px;" /></label><input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" disabled="disabled"/><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)"/></div>
|
1438 |
+
<?php
|
1439 |
+
}
|
1440 |
+
}
|
1441 |
+
if($con_method=='delete' or $con_method=='update') {
|
1442 |
+
echo '<div class="select-db-op where"><img src="'.WD_FM_URL . '/images/add_condition.png?ver='. WD_FM_VERSION.'" title="ADD" class="add_cond"/>WHERE</div>';
|
1443 |
+
}
|
1444 |
+
?>
|
1445 |
+
</div>
|
1446 |
+
<br/>
|
1447 |
+
<input type="button" value="Generate Query" class="gen_query" onclick="gen_query()">
|
1448 |
+
<br/>
|
1449 |
+
<form name="query_form" id="query_form" >
|
1450 |
+
<label style="vertical-align: top; width: 102px; display: inline-block;" for="query_txt" > Query: </label><textarea id="query_txt" name="query" rows=5 style="width:428px"></textarea>
|
1451 |
+
<input type="hidden" name="details" id="details">
|
1452 |
+
</form>
|
1453 |
+
<input type="button" value="Save" class="fm-query-save" onclick="save_query()">
|
1454 |
+
<div id="fieldlist" style="display: none;">
|
1455 |
+
<?php echo $form_fields ?>
|
1456 |
+
</div>
|
1457 |
+
<?php
|
1458 |
+
}
|
1459 |
+
die();
|
1460 |
+
}
|
1461 |
+
|
1462 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1463 |
+
// Getters & Setters //
|
1464 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1465 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1466 |
+
// Private Methods //
|
1467 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1468 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1469 |
+
// Listeners //
|
1470 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1471 |
}
|
admin/views/FMViewFormmakerwindow.php
CHANGED
@@ -1,292 +1,353 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FMViewFormmakerwindow {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function display() {
|
26 |
-
$rows = $this->model->get_form_data();
|
27 |
-
?>
|
28 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
29 |
-
<head>
|
30 |
-
<title>Form Maker</title>
|
31 |
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
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 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
<td class="smaller_font"
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
</
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
<
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMViewFormmakerwindow {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$rows = $this->model->get_form_data();
|
27 |
+
?>
|
28 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
29 |
+
<head>
|
30 |
+
<title>Form Maker</title>
|
31 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
32 |
+
<?php
|
33 |
+
wp_print_scripts('jquery');
|
34 |
+
wp_print_scripts('jquery-ui-tabs');
|
35 |
+
?>
|
36 |
+
<link rel="stylesheet" href="<?php echo WD_FM_URL; ?>/css/jquery-ui-1.12.1.css">
|
37 |
+
<style>
|
38 |
+
#WD-FormMaker {
|
39 |
+
margin-top: 0;
|
40 |
+
outline:none;
|
41 |
+
}
|
42 |
+
#WD-FormMaker #tabs {
|
43 |
+
display:none;
|
44 |
+
min-height: 335px;
|
45 |
+
}
|
46 |
+
#WD-FormMaker #tab-Submissions ul {
|
47 |
+
list-style-type: none;
|
48 |
+
}
|
49 |
+
#WD-FormMaker .ui-widget-header {
|
50 |
+
border-bottom: 1px solid #dddddd;
|
51 |
+
background: transparent;
|
52 |
+
font-size: 12px;
|
53 |
+
}
|
54 |
+
#WD-FormMaker .ui-tabs .ui-tabs-panel {
|
55 |
+
font-size: 12px;
|
56 |
+
border: 1px solid #c5c5c5;
|
57 |
+
border-top:none;
|
58 |
+
margin-left: 3px;
|
59 |
+
margin-right: 2px;
|
60 |
+
height: 280px;
|
61 |
+
}
|
62 |
+
#WD-FormMaker .ui-widget-header {
|
63 |
+
border-style: none;
|
64 |
+
border-bottom: 1px solid #dddddd;
|
65 |
+
background: transparent;
|
66 |
+
}
|
67 |
+
|
68 |
+
#WD-FormMaker .ui-widget.ui-widget-content {
|
69 |
+
border-style: none;
|
70 |
+
}
|
71 |
+
|
72 |
+
#WD-FormMaker .ui-state-active,
|
73 |
+
#WD-FormMaker .ui-widget-content
|
74 |
+
#WD-FormMaker .ui-state-active,
|
75 |
+
#WD-FormMaker .ui-widget-header
|
76 |
+
#WD-FormMaker .ui-state-active{
|
77 |
+
border: 1px solid #c5c5c5;
|
78 |
+
border-bottom: none;
|
79 |
+
background: #f6f6f6;
|
80 |
+
outline:none
|
81 |
+
}
|
82 |
+
|
83 |
+
#WD-FormMaker .mceActionPanel #insert {
|
84 |
+
float: right;
|
85 |
+
outline:none;
|
86 |
+
display: inline-block;
|
87 |
+
text-decoration: none;
|
88 |
+
font-size: 13px;
|
89 |
+
line-height: 26px;
|
90 |
+
height: 28px;
|
91 |
+
margin: 5px 5px 0 0;
|
92 |
+
padding: 0 10px 1px;
|
93 |
+
cursor: pointer;
|
94 |
+
border-width: 1px;
|
95 |
+
border-style: solid;
|
96 |
+
-webkit-appearance: none;
|
97 |
+
-webkit-border-radius: 3px;
|
98 |
+
-webkit-box-sizing: border-box;
|
99 |
+
-webkit-box-shadow: 0 1px 0 #ccc;
|
100 |
+
box-shadow: 0 1px 0 #ccc;
|
101 |
+
border-radius: 3px;
|
102 |
+
white-space: nowrap;
|
103 |
+
-moz-box-sizing: border-box;
|
104 |
+
box-sizing: border-box;
|
105 |
+
background: #0085ba;
|
106 |
+
border-color: #0073aa #006799 #006799;
|
107 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
108 |
+
box-shadow: 0 1px 0 #006799;
|
109 |
+
color: #fff;
|
110 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
111 |
+
}
|
112 |
+
#WD-FormMaker .ui-state-active a,
|
113 |
+
#WD-FormMaker .ui-state-active a:link,
|
114 |
+
#WD-FormMaker .ui-state-active a:visited {
|
115 |
+
background: #ffffff;
|
116 |
+
color: #000000;
|
117 |
+
outline:none
|
118 |
+
}
|
119 |
+
#WD-FormMaker table {
|
120 |
+
font-size:12px;
|
121 |
+
}
|
122 |
+
</style>
|
123 |
+
<base target="_self">
|
124 |
+
</head>
|
125 |
+
<body id="WD-FormMaker">
|
126 |
+
<div id="tabs">
|
127 |
+
<ul>
|
128 |
+
<li><a href="#tab-FormMaker">Form Maker</a></li>
|
129 |
+
<li><a href="#tab-Submissions">Submissions</a></li>
|
130 |
+
</ul>
|
131 |
+
<div id="tab-FormMaker" class="panel">
|
132 |
+
<table>
|
133 |
+
<tr>
|
134 |
+
<td style="vertical-align: middle; text-align: left;">Select a Form</td>
|
135 |
+
<td style="vertical-align: middle; text-align: left;">
|
136 |
+
<select name="form_maker_id" id="form_maker_id" style="width: 230px; text-align: left;">
|
137 |
+
<option value="0" selected="selected">- Select a Form -</option>
|
138 |
+
<?php
|
139 |
+
foreach ($rows as $row) {
|
140 |
+
?>
|
141 |
+
<option value="<?php echo $row->id; ?>"><?php echo $row->title; ?></option>
|
142 |
+
<?php
|
143 |
+
}
|
144 |
+
?>
|
145 |
+
</select>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
</table>
|
149 |
+
</div>
|
150 |
+
<div id="tab-Submissions">
|
151 |
+
<div class="error" style="position: relative; padding:0 5px 10px 5px; font-size: 15px; color: red; opacity: 1; font-weight: bolder;">Front end submissions are disabled in free version.</div>
|
152 |
+
<div style="position: absolute; background: gray; width: 93%; height: 75%; opacity: 0.3;"></div>
|
153 |
+
<table>
|
154 |
+
<tr>
|
155 |
+
<td class="smaller_font">Select a Form:</td>
|
156 |
+
<td class="smaller_font">
|
157 |
+
<select name="submissions_id" id="submissions_id" style="width: 230px; text-align: left;">
|
158 |
+
<option value="- Select Form -" selected="selected">- Select a Form -</option>
|
159 |
+
<?php
|
160 |
+
foreach ($rows as $row) {
|
161 |
+
?>
|
162 |
+
<option value="<?php echo $row->id; ?>"><?php echo $row->title; ?></option>
|
163 |
+
<?php
|
164 |
+
}
|
165 |
+
?>
|
166 |
+
</select>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
+
<tr>
|
170 |
+
<td class="smaller_font">Select Date Range:</td>
|
171 |
+
<td class="smaller_font">
|
172 |
+
<!--<label style="min-width:30px !important;">From:</label>-->
|
173 |
+
<input class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="" />
|
174 |
+
<input type="reset" style="width: 22px;" class="button" value="..." onclick="return showCalendar('startdate','%Y-%m-%d');" />
|
175 |
+
<label style="min-width:30px !important;">To:</label>
|
176 |
+
<input class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="" />
|
177 |
+
<input type="reset" style="width: 22px;" class="button" value="..." onclick="return showCalendar('enddate','%Y-%m-%d');" />
|
178 |
+
</td>
|
179 |
+
</tr>
|
180 |
+
<tr>
|
181 |
+
<td colspan="2">
|
182 |
+
<table width="100%">
|
183 |
+
<tr>
|
184 |
+
<td style="border-right: 1px solid black;">
|
185 |
+
<table>
|
186 |
+
<tr>
|
187 |
+
<td class="smaller_font" style="vertical-align: top;">Select fields:</td>
|
188 |
+
<td class="smaller_font">
|
189 |
+
<ul>
|
190 |
+
<li>
|
191 |
+
<input type="checkbox" checked="checked" id="submit_date" name="submit_date" value="submit_date">
|
192 |
+
<label for="submit_date">Submit Date</label>
|
193 |
+
</li>
|
194 |
+
<li>
|
195 |
+
<input type="checkbox" checked="checked" id="submitter_ip" name="submitter_ip" value="submitter_ip">
|
196 |
+
<label for="submitter_ip">Submitter's IP Address</label>
|
197 |
+
</li>
|
198 |
+
<li>
|
199 |
+
<input type="checkbox" checked="checked" id="username" name="username" value="username">
|
200 |
+
<label for="username">Submitter's Username</label>
|
201 |
+
</li>
|
202 |
+
<li>
|
203 |
+
<input type="checkbox" checked="checked" id="useremail" name="useremail" value="useremail">
|
204 |
+
<label for="useremail">Submitter's Email Address</label>
|
205 |
+
</li>
|
206 |
+
<li>
|
207 |
+
<input type="checkbox" checked="checked" id="form_fields" name="form_fields" value="form_fields">
|
208 |
+
<label for="form_fields">Form Fields</label>
|
209 |
+
</li>
|
210 |
+
<li><label style="font-size: 10px; width: 160px;">You can hide specific form fields from Form General Options.</label></li>
|
211 |
+
</ul>
|
212 |
+
</td>
|
213 |
+
</tr>
|
214 |
+
<tr>
|
215 |
+
<td class="smaller_font" style="vertical-align: top;">Export to:</td>
|
216 |
+
<td class="smaller_font">
|
217 |
+
<ul>
|
218 |
+
<li>
|
219 |
+
<input type="checkbox" checked="checked" id="csv" name="csv" value="csv">
|
220 |
+
<label for="csv">CSV</label>
|
221 |
+
</li>
|
222 |
+
<li>
|
223 |
+
<input type="checkbox" checked="checked" id="xml" name="xml" value="xml">
|
224 |
+
<label for="xml">XML</label>
|
225 |
+
</li>
|
226 |
+
</ul>
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
</table>
|
230 |
+
</td>
|
231 |
+
<td style="vertical-align: top;">
|
232 |
+
<table>
|
233 |
+
<tr>
|
234 |
+
<td class="smaller_font" style="vertical-align: top;">Show:</td>
|
235 |
+
<td class="smaller_font" style="width:240px;">
|
236 |
+
<ul>
|
237 |
+
<li>
|
238 |
+
<input type="checkbox" checked="checked" id="title" name="title" value="title">
|
239 |
+
<label for="title">Title</label>
|
240 |
+
</li>
|
241 |
+
<li>
|
242 |
+
<input type="checkbox" checked="checked" id="search" name="search" value="search">
|
243 |
+
<label for="search">Search</label>
|
244 |
+
</li>
|
245 |
+
<li>
|
246 |
+
<input type="checkbox" checked="checked" id="ordering" name="ordering" value="ordering">
|
247 |
+
<label for="ordering">Ordering</label>
|
248 |
+
</li>
|
249 |
+
<li>
|
250 |
+
<input type="checkbox" checked="checked" id="entries" name="entries" value="entries">
|
251 |
+
<label for="entries">Entries</label>
|
252 |
+
</li>
|
253 |
+
<li>
|
254 |
+
<input type="checkbox" checked="checked" id="views" name="views" value="views">
|
255 |
+
<label for="views">Views</label>
|
256 |
+
</li>
|
257 |
+
<li>
|
258 |
+
<input type="checkbox" checked="checked" id="conversion_rate" name="conversion_rate" value="conversion_rate">
|
259 |
+
<label for="conversion_rate">Conversion Rate</label>
|
260 |
+
</li>
|
261 |
+
<li>
|
262 |
+
<input type="checkbox" checked="checked" id="pagination" name="pagination" value="pagination">
|
263 |
+
<label for="pagination">Pagination</label>
|
264 |
+
</li>
|
265 |
+
<li>
|
266 |
+
<input type="checkbox" checked="checked" id="stats" name="stats" value="stats">
|
267 |
+
<label for="stats">Statistics</label>
|
268 |
+
</li>
|
269 |
+
</ul>
|
270 |
+
</td>
|
271 |
+
</tr>
|
272 |
+
</table>
|
273 |
+
</td>
|
274 |
+
</tr>
|
275 |
+
</table>
|
276 |
+
</td>
|
277 |
+
</tr>
|
278 |
+
</table>
|
279 |
+
</div>
|
280 |
+
</div>
|
281 |
+
<div class="mceActionPanel">
|
282 |
+
<input type="submit" id="insert" name="insert" value="Insert" onClick="form_maker_insert_shortcode();"/>
|
283 |
+
</div>
|
284 |
+
<script type="text/javascript">
|
285 |
+
jQuery.noConflict();
|
286 |
+
jQuery(document).ready(function() {
|
287 |
+
jQuery("#tabs").tabs();
|
288 |
+
jQuery('#WD-FormMaker #tabs').show();
|
289 |
+
});
|
290 |
+
|
291 |
+
var short_code = get_params("Form");
|
292 |
+
if (short_code) {
|
293 |
+
if (!short_code['type']) {
|
294 |
+
document.getElementById("form_maker_id").value = short_code['id'];
|
295 |
+
}
|
296 |
+
}
|
297 |
+
// Get shortcodes attributes.
|
298 |
+
function get_params(module_name) {
|
299 |
+
var selected_text = top.tinyMCE.activeEditor.selection.getContent();
|
300 |
+
var module_start_index = selected_text.indexOf("[" + module_name);
|
301 |
+
var module_end_index = selected_text.indexOf("]", module_start_index);
|
302 |
+
var module_str = "";
|
303 |
+
if ((module_start_index == 0) && (module_end_index > 0)) {
|
304 |
+
module_str = selected_text.substring(module_start_index + 1, module_end_index);
|
305 |
+
}
|
306 |
+
else {
|
307 |
+
return false;
|
308 |
+
}
|
309 |
+
var params_str = module_str.substring(module_str.indexOf(" ") + 1);
|
310 |
+
var key_values = params_str.split(" ");
|
311 |
+
var short_code_attr = new Array();
|
312 |
+
for (var key in key_values) {
|
313 |
+
var short_code_index = key_values[key].split('=')[0];
|
314 |
+
var short_code_value = key_values[key].split('=')[1];
|
315 |
+
short_code_value = short_code_value.substring(1, short_code_value.length - 1);
|
316 |
+
short_code_attr[short_code_index] = short_code_value;
|
317 |
+
}
|
318 |
+
return short_code_attr;
|
319 |
+
}
|
320 |
+
|
321 |
+
function form_maker_insert_shortcode() {
|
322 |
+
if (jQuery('#tabs .ui-tabs-panel[aria-hidden=false]').attr('id') == 'tab-FormMaker') {
|
323 |
+
if (document.getElementById('form_maker_id').value == '0') {
|
324 |
+
top.tinyMCE.activeEditor.windowManager.close(window);
|
325 |
+
}
|
326 |
+
else {
|
327 |
+
var tagtext;
|
328 |
+
tagtext = '[Form id="' + document.getElementById('form_maker_id').value + '"]';
|
329 |
+
top.tinyMCE.execCommand('mceInsertContent', false, tagtext);
|
330 |
+
top.tinyMCE.activeEditor.windowManager.close(window);
|
331 |
+
}
|
332 |
+
}
|
333 |
+
else {
|
334 |
+
alert("Front end submissions are disabled in free version.");
|
335 |
+
}
|
336 |
+
}
|
337 |
+
</script>
|
338 |
+
</body>
|
339 |
+
</html>
|
340 |
+
<?php
|
341 |
+
die();
|
342 |
+
}
|
343 |
+
|
344 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
345 |
+
// Getters & Setters //
|
346 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
347 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
348 |
+
// Private Methods //
|
349 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
350 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
351 |
+
// Listeners //
|
352 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
353 |
}
|
admin/views/FMViewManage_fm.php
CHANGED
@@ -1,3508 +1,3507 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FMViewManage_fm {
|
4 |
-
|
5 |
-
private $model;
|
6 |
-
|
7 |
-
public function __construct($model) {
|
8 |
-
$this->model = $model;
|
9 |
-
}
|
10 |
-
|
11 |
-
public function display() {
|
12 |
-
$rows_data = $this->model->get_rows_data();
|
13 |
-
$page_nav = $this->model->page_nav();
|
14 |
-
$search_value = ((isset($_POST['search_value'])) ? esc_html($_POST['search_value']) : '');
|
15 |
-
$search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
|
16 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
|
17 |
-
$order_by_array = array('id', 'title', 'mail');
|
18 |
-
$order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
|
19 |
-
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
20 |
-
$ids_string = '';
|
21 |
-
?>
|
22 |
-
<form onkeypress="fm_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
|
23 |
-
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
24 |
-
<div class="fm-page-banner">
|
25 |
-
<div class="fm-logo">
|
26 |
-
</div>
|
27 |
-
<div class="fm-logo-title">Form</br>Maker</div>
|
28 |
-
<button class="fm-button add-button medium" onclick="fm_set_input_value('task', 'add'); fm_form_submit(event, 'manage_form')">
|
29 |
-
<span></span>
|
30 |
-
Add New
|
31 |
-
</button>
|
32 |
-
<div class="fm-page-actions">
|
33 |
-
<button class="fm-button delete-button medium" onclick="if (confirm('Do you want to delete selected items?')) { fm_set_input_value('task', 'delete_all'); fm_form_submit(event, 'manage_form'); } else { return false; }">
|
34 |
-
<span></span>
|
35 |
-
Delete
|
36 |
-
</button>
|
37 |
-
</div>
|
38 |
-
</div>
|
39 |
-
<div class="tablenav top">
|
40 |
-
<?php
|
41 |
-
WDW_FM_Library::search('Title', $search_value, 'manage_form');
|
42 |
-
WDW_FM_Library::html_page_nav($page_nav['total'], $page_nav['limit'], 'manage_form');
|
43 |
-
?>
|
44 |
-
</div>
|
45 |
-
<table class="wp-list-table widefat fixed pages">
|
46 |
-
<thead>
|
47 |
-
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;"/></th>
|
48 |
-
<th class="table_small_col <?php if ($order_by == 'id') { echo $order_class; } ?>">
|
49 |
-
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'id'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
50 |
-
<span>ID</span><span class="sorting-indicator"></span></a>
|
51 |
-
</th>
|
52 |
-
<th class="<?php if ($order_by == 'title') { echo $order_class; } ?>">
|
53 |
-
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'title'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'title' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
54 |
-
<span>Title</span><span class="sorting-indicator"></span></a>
|
55 |
-
</th>
|
56 |
-
<th class="<?php if ($order_by == 'type') { echo $order_class; } ?>">
|
57 |
-
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'type'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'type' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
58 |
-
<span>Type</span><span class="sorting-indicator"></span></a>
|
59 |
-
</th>
|
60 |
-
<th class="<?php if ($order_by == 'mail') { echo $order_class; } ?>">
|
61 |
-
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'mail'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'mail' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
62 |
-
<span>Email to send submissions to</span><span class="sorting-indicator"></span></a>
|
63 |
-
</th>
|
64 |
-
<th class="table_large_col">Shortcode</th>
|
65 |
-
<th class="table_large_col">PHP function</th>
|
66 |
-
<th class="table_small_col">Edit</th>
|
67 |
-
<th class="table_small_col">Delete</th>
|
68 |
-
</thead>
|
69 |
-
<tbody id="tbody_arr">
|
70 |
-
<?php
|
71 |
-
if ($rows_data) {
|
72 |
-
foreach ($rows_data as $row_data) {
|
73 |
-
$alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
|
74 |
-
$old = isset($row_data->form) && ($row_data->form != '');
|
75 |
-
?>
|
76 |
-
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
77 |
-
<td class="table_small_col check-column">
|
78 |
-
<input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" type="checkbox"/>
|
79 |
-
</td>
|
80 |
-
<td class="table_small_col"><?php echo $row_data->id; ?></td>
|
81 |
-
<td>
|
82 |
-
<?php
|
83 |
-
if (!$old) {
|
84 |
-
?>
|
85 |
-
<a onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')" href="" title="Edit"><?php echo $row_data->title; ?></a>
|
86 |
-
<?php
|
87 |
-
}
|
88 |
-
else {
|
89 |
-
echo $row_data->title;
|
90 |
-
}
|
91 |
-
?>
|
92 |
-
</td>
|
93 |
-
<td>
|
94 |
-
<?php echo $row_data->type; ?>
|
95 |
-
</td>
|
96 |
-
<td><?php echo $row_data->mail; ?></td>
|
97 |
-
<td class="table_big_col" style="padding-left: 0; padding-right: 0;">
|
98 |
-
<?php if($row_data->type == 'embedded'){ ?>
|
99 |
-
<input type="text" value='[Form id="<?php echo $row_data->id; ?>"]' onclick="fm_select_value(this)" size="12" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
|
100 |
-
<?php } else { ?>
|
101 |
-
<a href="<?php echo add_query_arg(array('current_id' => $row_data->id, 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=manage_fm&task=display_options')); ?>">Set Display Options</a>
|
102 |
-
<?php } ?>
|
103 |
-
</td>
|
104 |
-
<td class="table_large_col" style="padding-left: 0; padding-right: 0;">
|
105 |
-
<input type="text" value='<?php wd_form_maker(<?php echo $row_data->id; ?>, "<?php echo $row_data->type; ?>"); ?>' onclick="fm_select_value(this)" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
|
106 |
-
</td>
|
107 |
-
<td class="table_small_col">
|
108 |
-
<?php
|
109 |
-
if (!$old) {
|
110 |
-
?>
|
111 |
-
<button class="fm-icon edit-icon" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')">
|
112 |
-
<span></span>
|
113 |
-
</button>
|
114 |
-
<?php
|
115 |
-
}
|
116 |
-
?>
|
117 |
-
</td>
|
118 |
-
<td class="table_small_col">
|
119 |
-
<button class="fm-icon delete-icon" onclick="if (confirm('Do you want to delete selected item(s)?')) { fm_set_input_value('task', 'delete'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form'); } else { return false; }">
|
120 |
-
<span></span>
|
121 |
-
</button>
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
<?php
|
125 |
-
$ids_string .= $row_data->id . ',';
|
126 |
-
}
|
127 |
-
}
|
128 |
-
?>
|
129 |
-
</tbody>
|
130 |
-
</table>
|
131 |
-
<input id="task" name="task" type="hidden" value=""/>
|
132 |
-
<input id="current_id" name="current_id" type="hidden" value=""/>
|
133 |
-
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
|
134 |
-
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
|
135 |
-
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
|
136 |
-
</form>
|
137 |
-
<?php
|
138 |
-
}
|
139 |
-
|
140 |
-
public function edit($id) {
|
141 |
-
?>
|
142 |
-
<img src="<?php echo WD_FM_URL . '/images/icons.png'; ?>" style="display:none;"/>
|
143 |
-
<?php
|
144 |
-
$row = $this->model->get_row_data_new($id);
|
145 |
-
$themes = $this->model->get_theme_rows_data();
|
146 |
-
global $wpdb;
|
147 |
-
$default_theme = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes where `default`=1');
|
148 |
-
$labels = array();
|
149 |
-
$label_id = array();
|
150 |
-
$label_order_original = array();
|
151 |
-
$label_type = array();
|
152 |
-
$label_all = explode('#****#', $row->label_order);
|
153 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
154 |
-
foreach ($label_all as $key => $label_each) {
|
155 |
-
$label_id_each = explode('#**id**#', $label_each);
|
156 |
-
array_push($label_id, $label_id_each[0]);
|
157 |
-
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
158 |
-
array_push($label_order_original, addslashes($label_oder_each[0]));
|
159 |
-
array_push($label_type, $label_oder_each[1]);
|
160 |
-
}
|
161 |
-
$labels['id'] = '"' . implode('","', $label_id) . '"';
|
162 |
-
$labels['label'] = '"' . implode('","', $label_order_original) . '"';
|
163 |
-
$labels['type'] = '"' . implode('","', $label_type) . '"';
|
164 |
-
$page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
|
165 |
-
$is_addon_stripe_active = (defined('WD_FM_STRIPE') && is_plugin_active(constant('WD_FM_STRIPE')));
|
166 |
-
if ($is_addon_stripe_active) {
|
167 |
-
require_once (WD_FM_STRIPE_DIR . '/controller.php');
|
168 |
-
}
|
169 |
-
?>
|
170 |
-
<script type="text/javascript">
|
171 |
-
var plugin_url = "<?php echo WD_FM_URL; ?>";
|
172 |
-
</script>
|
173 |
-
<script
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
document.getElementById('
|
191 |
-
|
192 |
-
jQuery('
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
wdform_page
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
wdform_column
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
wdform_row
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
l_label =
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
id_for_country
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
form_fields +=
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
s
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
form_fields +=
|
332 |
-
form_fields += "
|
333 |
-
form_fields +=
|
334 |
-
form_fields +=
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
document.getElementById('
|
350 |
-
|
351 |
-
|
352 |
-
document.getElementById('
|
353 |
-
document.getElementById('
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
document.getElementById('
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
<
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
<div class="fm-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
$
|
424 |
-
$backup_id
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
$
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
<
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
$
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
<div class="fm-
|
502 |
-
|
503 |
-
|
504 |
-
<
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
$
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
?>
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
<div
|
543 |
-
<div id="
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
<
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
<
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
<
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
<
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
<
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
<
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
<
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
<
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
<
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
<
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
<
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
<
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
<
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
<
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
<
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
<td
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
<
|
642 |
-
<
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
<input type="hidden" id="
|
665 |
-
<input type="hidden" id="
|
666 |
-
<input type="hidden" id="
|
667 |
-
<input type="hidden" id="
|
668 |
-
<
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
'
|
687 |
-
'
|
688 |
-
'
|
689 |
-
'
|
690 |
-
'
|
691 |
-
'
|
692 |
-
'
|
693 |
-
'
|
694 |
-
'
|
695 |
-
'
|
696 |
-
'
|
697 |
-
'
|
698 |
-
'
|
699 |
-
'
|
700 |
-
'
|
701 |
-
'
|
702 |
-
'
|
703 |
-
'
|
704 |
-
'
|
705 |
-
'
|
706 |
-
'
|
707 |
-
'
|
708 |
-
'
|
709 |
-
'
|
710 |
-
'
|
711 |
-
'
|
712 |
-
'
|
713 |
-
'
|
714 |
-
'
|
715 |
-
'
|
716 |
-
'
|
717 |
-
'
|
718 |
-
'
|
719 |
-
'
|
720 |
-
'
|
721 |
-
'
|
722 |
-
'
|
723 |
-
'
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
<
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
<
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
<
|
756 |
-
<
|
757 |
-
|
758 |
-
<?php
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
<
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
<
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
<
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
<div align="
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
<div align="
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
<img src="<?php echo WD_FM_URL . '/images/
|
836 |
-
<img src="<?php echo WD_FM_URL . '/images/
|
837 |
-
<img src="<?php echo WD_FM_URL . '/images/
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
<input type="hidden" name="
|
847 |
-
<input type="hidden" name="
|
848 |
-
<input type="hidden" name="
|
849 |
-
<input type="hidden" name="
|
850 |
-
<input type="hidden" name="
|
851 |
-
<input type="hidden" name="
|
852 |
-
<input type="hidden" name="
|
853 |
-
<input type="hidden" name="
|
854 |
-
<input type="hidden" id="
|
855 |
-
<input type="hidden"
|
856 |
-
<input type="hidden"
|
857 |
-
<input type="hidden" id="
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
jQuery("#
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
//
|
894 |
-
//
|
895 |
-
//
|
896 |
-
//
|
897 |
-
//
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
jQuery(
|
908 |
-
jQuery("input.first").
|
909 |
-
|
910 |
-
var
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
jQuery(
|
920 |
-
jQuery("input.last").
|
921 |
-
|
922 |
-
var
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
jQuery(
|
932 |
-
jQuery("input.title_").
|
933 |
-
|
934 |
-
var
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
jQuery(
|
944 |
-
jQuery("input.middle").
|
945 |
-
|
946 |
-
var
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
jQuery(
|
961 |
-
jQuery("input.area_code").
|
962 |
-
|
963 |
-
var
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
jQuery(
|
973 |
-
jQuery("input.phone_number").
|
974 |
-
|
975 |
-
var
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
jQuery(
|
990 |
-
jQuery("input.day").
|
991 |
-
|
992 |
-
var
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
jQuery(
|
1002 |
-
jQuery("input.month").
|
1003 |
-
|
1004 |
-
var
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
jQuery(
|
1014 |
-
jQuery("input.year").
|
1015 |
-
|
1016 |
-
var
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
jQuery(
|
1031 |
-
jQuery("input.hh").
|
1032 |
-
|
1033 |
-
var
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
jQuery(
|
1043 |
-
jQuery("input.mm").
|
1044 |
-
|
1045 |
-
var
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
jQuery(
|
1055 |
-
jQuery("input.ss").
|
1056 |
-
|
1057 |
-
var
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
jQuery(
|
1067 |
-
jQuery("input.am_pm").
|
1068 |
-
|
1069 |
-
var
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
jQuery(
|
1084 |
-
jQuery("input.dollars").
|
1085 |
-
|
1086 |
-
var
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
jQuery(
|
1096 |
-
jQuery("input.cents").
|
1097 |
-
|
1098 |
-
var
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
jQuery(
|
1113 |
-
jQuery("input.street1").
|
1114 |
-
|
1115 |
-
var
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
jQuery(
|
1125 |
-
jQuery("input.street2").
|
1126 |
-
|
1127 |
-
var
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
jQuery(
|
1137 |
-
jQuery("input.city").
|
1138 |
-
|
1139 |
-
var
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
jQuery(
|
1149 |
-
jQuery("input.state").
|
1150 |
-
|
1151 |
-
var
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
jQuery(
|
1161 |
-
jQuery("input.postal").
|
1162 |
-
|
1163 |
-
var
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
jQuery(
|
1173 |
-
jQuery("input.country").
|
1174 |
-
|
1175 |
-
var
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
jQuery(
|
1190 |
-
jQuery("input.worst").
|
1191 |
-
|
1192 |
-
var
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
jQuery(
|
1202 |
-
jQuery("input.best").
|
1203 |
-
|
1204 |
-
var
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
var
|
1214 |
-
var
|
1215 |
-
var
|
1216 |
-
|
1217 |
-
jQuery("#" + t + "_elementform_id_temp")
|
1218 |
-
spinner
|
1219 |
-
|
1220 |
-
jQuery("#" + t + "_elementform_id_temp").spinner({
|
1221 |
-
jQuery("#" + t + "_elementform_id_temp").spinner({
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
var
|
1226 |
-
var
|
1227 |
-
var
|
1228 |
-
var
|
1229 |
-
|
1230 |
-
jQuery(
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
var
|
1246 |
-
|
1247 |
-
jQuery("#" + t + "
|
1248 |
-
jQuery("#" + t + "
|
1249 |
-
spinner0
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
spinner1
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
jQuery(
|
1262 |
-
jQuery("input.from").
|
1263 |
-
|
1264 |
-
var
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
jQuery(
|
1274 |
-
jQuery("input.to").
|
1275 |
-
|
1276 |
-
var
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
var
|
1286 |
-
var
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
jQuery("#"+t+"
|
1292 |
-
jQuery("#"+t+"
|
1293 |
-
jQuery("#"+t+"
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
var
|
1321 |
-
|
1322 |
-
jQuery("#"+t+"_elementform_id_temp").datepicker();
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
tbody_img
|
1361 |
-
tbody_img.
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
img.setAttribute('
|
1366 |
-
img.setAttribute(
|
1367 |
-
img.setAttribute(
|
1368 |
-
img.setAttribute('
|
1369 |
-
img.setAttribute(
|
1370 |
-
img.setAttribute("
|
1371 |
-
|
1372 |
-
|
1373 |
-
img_X.setAttribute(
|
1374 |
-
img_X.setAttribute(
|
1375 |
-
img_X.setAttribute("
|
1376 |
-
img_X.setAttribute("
|
1377 |
-
img_X.setAttribute("
|
1378 |
-
|
1379 |
-
|
1380 |
-
img_X_all.setAttribute(
|
1381 |
-
img_X_all.setAttribute(
|
1382 |
-
img_X_all.setAttribute("
|
1383 |
-
img_X_all.setAttribute("
|
1384 |
-
img_X_all.setAttribute("
|
1385 |
-
|
1386 |
-
|
1387 |
-
img_EDIT.setAttribute(
|
1388 |
-
img_EDIT.setAttribute(
|
1389 |
-
img_EDIT.setAttribute("
|
1390 |
-
img_EDIT.setAttribute("
|
1391 |
-
img_EDIT.setAttribute("
|
1392 |
-
|
1393 |
-
tr_img.appendChild(
|
1394 |
-
tr_img.appendChild(
|
1395 |
-
tr_img.appendChild(
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
img_EDIT.
|
1414 |
-
img_EDIT.
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
<input type="hidden" name="
|
1451 |
-
<input type="hidden" name="
|
1452 |
-
<input type="hidden" name="
|
1453 |
-
<input type="hidden" id="
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
$
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
$
|
1467 |
-
$
|
1468 |
-
$
|
1469 |
-
$
|
1470 |
-
$
|
1471 |
-
$
|
1472 |
-
$label_all =
|
1473 |
-
$label_all
|
1474 |
-
|
1475 |
-
$
|
1476 |
-
|
1477 |
-
$
|
1478 |
-
array_push($
|
1479 |
-
|
1480 |
-
|
1481 |
-
$
|
1482 |
-
|
1483 |
-
$
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
$
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
jQuery("#
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
field_condition+=document.getElementById("
|
1513 |
-
field_condition+=document.getElementById("
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
conditions+=document.getElementById("
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
var
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
field_condition+=
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
jQuery(".
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
jQuery(".
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
$
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
?>
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
<
|
1707 |
-
|
1708 |
-
|
1709 |
-
<
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
$
|
1718 |
-
$
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
?>
|
1727 |
-
<input type="
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
$
|
1735 |
-
$
|
1736 |
-
$
|
1737 |
-
$
|
1738 |
-
$
|
1739 |
-
|
1740 |
-
$
|
1741 |
-
$
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
$label_all_for_submissions
|
1749 |
-
$label_all_for_submissions
|
1750 |
-
|
1751 |
-
$label_id_each
|
1752 |
-
|
1753 |
-
$
|
1754 |
-
array_push($
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
array_push($
|
1761 |
-
array_push($
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
$
|
1768 |
-
$
|
1769 |
-
|
1770 |
-
|
1771 |
-
$
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
var
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
document.getElementById("
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
document.getElementById("
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
<
|
1861 |
-
<
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
<
|
1889 |
-
<
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
$field_label
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
<
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
<
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
<input type="
|
1932 |
-
<
|
1933 |
-
<
|
1934 |
-
|
1935 |
-
|
1936 |
-
$mail_array
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
<?php echo $mail; ?>
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
$
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
?>
|
1976 |
-
|
1977 |
-
<
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
<
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
echo
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
$
|
1999 |
-
$fld_label
|
2000 |
-
|
2001 |
-
$fld_label =
|
2002 |
-
$fld_label =
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
echo
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
$
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
<
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
?>
|
2040 |
-
|
2041 |
-
<
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
<
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
$fld_label
|
2080 |
-
|
2081 |
-
|
2082 |
-
$fld_label =
|
2083 |
-
$fld_label =
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
echo
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
<
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
$
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
$
|
2142 |
-
$fld_label
|
2143 |
-
|
2144 |
-
$fld_label =
|
2145 |
-
$fld_label =
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
?>
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2163 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2164 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2165 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
<
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
$
|
2193 |
-
$fields_count
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
<
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
<
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
$
|
2234 |
-
$fld_label
|
2235 |
-
|
2236 |
-
$fld_label =
|
2237 |
-
$fld_label =
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
echo "<a onClick=\"insertAtCursor(".$choise.",'
|
2244 |
-
echo
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
<
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
$fld_label
|
2291 |
-
|
2292 |
-
|
2293 |
-
$fld_label =
|
2294 |
-
$fld_label =
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
echo
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
<
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
$
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
$
|
2361 |
-
$fld_label
|
2362 |
-
|
2363 |
-
$fld_label =
|
2364 |
-
$fld_label =
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
?>
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2381 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2382 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2383 |
-
<input style="border: 1px solid silver; font-size: 10px; margin:
|
2384 |
-
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
<
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
<
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
<
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
<
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
<
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
<
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
$args
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
$pages
|
2468 |
-
|
2469 |
-
|
2470 |
-
?>
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
$
|
2490 |
-
$fld_label
|
2491 |
-
|
2492 |
-
$fld_label =
|
2493 |
-
$fld_label =
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
?>
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2503 |
-
<input style="border: 1px solid silver; font-size: 10px; margin:
|
2504 |
-
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="
|
2505 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
<div><input type="radio" name="paypal_mode" id="
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
<
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
$
|
2566 |
-
$
|
2567 |
-
$
|
2568 |
-
$
|
2569 |
-
$
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
$fields=
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
$temp
|
2582 |
-
array_push($
|
2583 |
-
|
2584 |
-
$temp
|
2585 |
-
|
2586 |
-
$temp
|
2587 |
-
array_push($
|
2588 |
-
array_push($
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
unset($
|
2596 |
-
unset($
|
2597 |
-
unset($
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
$
|
2603 |
-
$
|
2604 |
-
$
|
2605 |
-
|
2606 |
-
|
2607 |
-
$
|
2608 |
-
$
|
2609 |
-
$
|
2610 |
-
|
2611 |
-
|
2612 |
-
$
|
2613 |
-
|
2614 |
-
|
2615 |
-
$
|
2616 |
-
$
|
2617 |
-
$
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
$
|
2622 |
-
|
2623 |
-
$conditions=
|
2624 |
-
$
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
$temp
|
2629 |
-
|
2630 |
-
$
|
2631 |
-
|
2632 |
-
$
|
2633 |
-
array_push($
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
$
|
2639 |
-
$
|
2640 |
-
$
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
<option value="
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
</
|
2671 |
-
<
|
2672 |
-
|
2673 |
-
<option value="
|
2674 |
-
|
2675 |
-
|
2676 |
-
<
|
2677 |
-
<img src="<?php echo WD_FM_URL . '/images/
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
$_params =
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
$
|
2687 |
-
$
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
<
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
$
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
<
|
2717 |
-
<option value="
|
2718 |
-
<option value="
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
<?php
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
case "
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
case "
|
2740 |
-
case "
|
2741 |
-
case "
|
2742 |
-
case "
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
$
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
$
|
2757 |
-
$w_choices_value =
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
$
|
2769 |
-
$
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
$
|
2796 |
-
$
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
?>
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
<th style="width:4%;" class="table_small_col count_col sub-align"
|
2854 |
-
<th style="width:
|
2855 |
-
|
2856 |
-
|
2857 |
-
</th>
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
$
|
2863 |
-
|
2864 |
-
$
|
2865 |
-
$
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
<td align="center" class="table_small_col"><?php echo $
|
2870 |
-
<td align="center" class="table_small_col"><?php echo $
|
2871 |
-
<td align="center"
|
2872 |
-
<
|
2873 |
-
|
2874 |
-
|
2875 |
-
</
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
$_GET['
|
2891 |
-
$
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
<input type="hidden" name="
|
2898 |
-
<input type="hidden"
|
2899 |
-
<input type="hidden" id="
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
$
|
2950 |
-
$
|
2951 |
-
$
|
2952 |
-
$
|
2953 |
-
$fields =
|
2954 |
-
|
2955 |
-
|
2956 |
-
$
|
2957 |
-
|
2958 |
-
$
|
2959 |
-
|
2960 |
-
$
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
var
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
text
|
2990 |
-
editor.
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
editor.
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
editor.
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
editor.
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
<
|
3034 |
-
<p>
|
3035 |
-
|
3036 |
-
<b><span class="cm-tag"><div
|
3037 |
-
|
3038 |
-
<
|
3039 |
-
<
|
3040 |
-
<
|
3041 |
-
<
|
3042 |
-
<
|
3043 |
-
<input type="
|
3044 |
-
<input type="hidden"
|
3045 |
-
<input type="hidden" id="
|
3046 |
-
<
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
?>
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
<
|
3060 |
-
<
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
editor.
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
editor.
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
$
|
3088 |
-
$
|
3089 |
-
$
|
3090 |
-
|
3091 |
-
'
|
3092 |
-
'
|
3093 |
-
'
|
3094 |
-
'
|
3095 |
-
'
|
3096 |
-
'
|
3097 |
-
'
|
3098 |
-
'
|
3099 |
-
'
|
3100 |
-
'
|
3101 |
-
'
|
3102 |
-
'
|
3103 |
-
'
|
3104 |
-
'
|
3105 |
-
'
|
3106 |
-
'
|
3107 |
-
'
|
3108 |
-
'
|
3109 |
-
'
|
3110 |
-
'
|
3111 |
-
'
|
3112 |
-
'
|
3113 |
-
'
|
3114 |
-
'
|
3115 |
-
'
|
3116 |
-
'
|
3117 |
-
'
|
3118 |
-
'
|
3119 |
-
'
|
3120 |
-
'
|
3121 |
-
'
|
3122 |
-
'
|
3123 |
-
'
|
3124 |
-
'
|
3125 |
-
'
|
3126 |
-
'
|
3127 |
-
'
|
3128 |
-
'
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
<input type="hidden" id="
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
<div class="fm-page-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
<label
|
3161 |
-
|
3162 |
-
|
3163 |
-
<?php echo $row->type == 'embedded' ? '
|
3164 |
-
<
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
<?php echo $row->type == 'popover' ? '
|
3170 |
-
<
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
<?php echo $row->type == 'topbar' ? '
|
3176 |
-
<
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
<
|
3181 |
-
<
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
<
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
<
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
<
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
<
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
<
|
3271 |
-
|
3272 |
-
</
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
<
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
<
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
<
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
<
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
<
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
<
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
$
|
3381 |
-
|
3382 |
-
|
3383 |
-
$
|
3384 |
-
|
3385 |
-
'
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
$
|
3390 |
-
$
|
3391 |
-
$
|
3392 |
-
$
|
3393 |
-
$
|
3394 |
-
|
3395 |
-
$
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
$
|
3411 |
-
$
|
3412 |
-
$
|
3413 |
-
$
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
<
|
3434 |
-
<
|
3435 |
-
|
3436 |
-
|
3437 |
-
$posts_include
|
3438 |
-
|
3439 |
-
|
3440 |
-
$
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
<input type="
|
3448 |
-
<
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
<
|
3465 |
-
<
|
3466 |
-
|
3467 |
-
|
3468 |
-
$pages_include
|
3469 |
-
|
3470 |
-
|
3471 |
-
$
|
3472 |
-
|
3473 |
-
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
<input type="
|
3479 |
-
<
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
3501 |
-
</
|
3502 |
-
|
3503 |
-
|
3504 |
-
|
3505 |
-
|
3506 |
-
|
3507 |
-
|
3508 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMViewManage_fm {
|
4 |
+
|
5 |
+
private $model;
|
6 |
+
|
7 |
+
public function __construct($model) {
|
8 |
+
$this->model = $model;
|
9 |
+
}
|
10 |
+
|
11 |
+
public function display() {
|
12 |
+
$rows_data = $this->model->get_rows_data();
|
13 |
+
$page_nav = $this->model->page_nav();
|
14 |
+
$search_value = ((isset($_POST['search_value'])) ? esc_html($_POST['search_value']) : '');
|
15 |
+
$search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
|
16 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
|
17 |
+
$order_by_array = array('id', 'title', 'mail');
|
18 |
+
$order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
|
19 |
+
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
20 |
+
$ids_string = '';
|
21 |
+
?>
|
22 |
+
<form onkeypress="fm_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
|
23 |
+
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
24 |
+
<div class="fm-page-banner">
|
25 |
+
<div class="fm-logo">
|
26 |
+
</div>
|
27 |
+
<div class="fm-logo-title">Form</br>Maker</div>
|
28 |
+
<button class="fm-button add-button medium" onclick="fm_set_input_value('task', 'add'); fm_form_submit(event, 'manage_form')">
|
29 |
+
<span></span>
|
30 |
+
Add New
|
31 |
+
</button>
|
32 |
+
<div class="fm-page-actions">
|
33 |
+
<button class="fm-button delete-button medium" onclick="if (confirm('Do you want to delete selected items?')) { fm_set_input_value('task', 'delete_all'); fm_form_submit(event, 'manage_form'); } else { return false; }">
|
34 |
+
<span></span>
|
35 |
+
Delete
|
36 |
+
</button>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
<div class="tablenav top">
|
40 |
+
<?php
|
41 |
+
WDW_FM_Library::search('Title', $search_value, 'manage_form');
|
42 |
+
WDW_FM_Library::html_page_nav($page_nav['total'], $page_nav['limit'], 'manage_form');
|
43 |
+
?>
|
44 |
+
</div>
|
45 |
+
<table class="wp-list-table widefat fixed pages">
|
46 |
+
<thead>
|
47 |
+
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;"/></th>
|
48 |
+
<th class="table_small_col <?php if ($order_by == 'id') { echo $order_class; } ?>">
|
49 |
+
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'id'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
50 |
+
<span>ID</span><span class="sorting-indicator"></span></a>
|
51 |
+
</th>
|
52 |
+
<th class="<?php if ($order_by == 'title') { echo $order_class; } ?>">
|
53 |
+
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'title'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'title' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
54 |
+
<span>Title</span><span class="sorting-indicator"></span></a>
|
55 |
+
</th>
|
56 |
+
<th class="<?php if ($order_by == 'type') { echo $order_class; } ?>">
|
57 |
+
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'type'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'type' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
58 |
+
<span>Type</span><span class="sorting-indicator"></span></a>
|
59 |
+
</th>
|
60 |
+
<th class="<?php if ($order_by == 'mail') { echo $order_class; } ?>">
|
61 |
+
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'mail'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'mail' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
62 |
+
<span>Email to send submissions to</span><span class="sorting-indicator"></span></a>
|
63 |
+
</th>
|
64 |
+
<th class="table_large_col">Shortcode</th>
|
65 |
+
<th class="table_large_col">PHP function</th>
|
66 |
+
<th class="table_small_col">Edit</th>
|
67 |
+
<th class="table_small_col">Delete</th>
|
68 |
+
</thead>
|
69 |
+
<tbody id="tbody_arr">
|
70 |
+
<?php
|
71 |
+
if ($rows_data) {
|
72 |
+
foreach ($rows_data as $row_data) {
|
73 |
+
$alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
|
74 |
+
$old = isset($row_data->form) && ($row_data->form != '');
|
75 |
+
?>
|
76 |
+
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
77 |
+
<td class="table_small_col check-column">
|
78 |
+
<input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" type="checkbox"/>
|
79 |
+
</td>
|
80 |
+
<td class="table_small_col"><?php echo $row_data->id; ?></td>
|
81 |
+
<td>
|
82 |
+
<?php
|
83 |
+
if (!$old) {
|
84 |
+
?>
|
85 |
+
<a onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')" href="" title="Edit"><?php echo $row_data->title; ?></a>
|
86 |
+
<?php
|
87 |
+
}
|
88 |
+
else {
|
89 |
+
echo $row_data->title;
|
90 |
+
}
|
91 |
+
?>
|
92 |
+
</td>
|
93 |
+
<td>
|
94 |
+
<?php echo $row_data->type; ?>
|
95 |
+
</td>
|
96 |
+
<td><?php echo $row_data->mail; ?></td>
|
97 |
+
<td class="table_big_col" style="padding-left: 0; padding-right: 0;">
|
98 |
+
<?php if($row_data->type == 'embedded'){ ?>
|
99 |
+
<input type="text" value='[Form id="<?php echo $row_data->id; ?>"]' onclick="fm_select_value(this)" size="12" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
|
100 |
+
<?php } else { ?>
|
101 |
+
<a href="<?php echo add_query_arg(array('current_id' => $row_data->id, 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=manage_fm&task=display_options')); ?>">Set Display Options</a>
|
102 |
+
<?php } ?>
|
103 |
+
</td>
|
104 |
+
<td class="table_large_col" style="padding-left: 0; padding-right: 0;">
|
105 |
+
<input type="text" value='<?php wd_form_maker(<?php echo $row_data->id; ?>, "<?php echo $row_data->type; ?>"); ?>' onclick="fm_select_value(this)" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
|
106 |
+
</td>
|
107 |
+
<td class="table_small_col">
|
108 |
+
<?php
|
109 |
+
if (!$old) {
|
110 |
+
?>
|
111 |
+
<button class="fm-icon edit-icon" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')">
|
112 |
+
<span></span>
|
113 |
+
</button>
|
114 |
+
<?php
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
</td>
|
118 |
+
<td class="table_small_col">
|
119 |
+
<button class="fm-icon delete-icon" onclick="if (confirm('Do you want to delete selected item(s)?')) { fm_set_input_value('task', 'delete'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form'); } else { return false; }">
|
120 |
+
<span></span>
|
121 |
+
</button>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<?php
|
125 |
+
$ids_string .= $row_data->id . ',';
|
126 |
+
}
|
127 |
+
}
|
128 |
+
?>
|
129 |
+
</tbody>
|
130 |
+
</table>
|
131 |
+
<input id="task" name="task" type="hidden" value=""/>
|
132 |
+
<input id="current_id" name="current_id" type="hidden" value=""/>
|
133 |
+
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
|
134 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
|
135 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
|
136 |
+
</form>
|
137 |
+
<?php
|
138 |
+
}
|
139 |
+
|
140 |
+
public function edit($id) {
|
141 |
+
?>
|
142 |
+
<img src="<?php echo WD_FM_URL . '/images/icons.png'; ?>" style="display:none;"/>
|
143 |
+
<?php
|
144 |
+
$row = $this->model->get_row_data_new($id);
|
145 |
+
$themes = $this->model->get_theme_rows_data();
|
146 |
+
global $wpdb;
|
147 |
+
$default_theme = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes where `default`=1');
|
148 |
+
$labels = array();
|
149 |
+
$label_id = array();
|
150 |
+
$label_order_original = array();
|
151 |
+
$label_type = array();
|
152 |
+
$label_all = explode('#****#', $row->label_order);
|
153 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
154 |
+
foreach ($label_all as $key => $label_each) {
|
155 |
+
$label_id_each = explode('#**id**#', $label_each);
|
156 |
+
array_push($label_id, $label_id_each[0]);
|
157 |
+
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
158 |
+
array_push($label_order_original, addslashes($label_oder_each[0]));
|
159 |
+
array_push($label_type, $label_oder_each[1]);
|
160 |
+
}
|
161 |
+
$labels['id'] = '"' . implode('","', $label_id) . '"';
|
162 |
+
$labels['label'] = '"' . implode('","', $label_order_original) . '"';
|
163 |
+
$labels['type'] = '"' . implode('","', $label_type) . '"';
|
164 |
+
$page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
|
165 |
+
$is_addon_stripe_active = (defined('WD_FM_STRIPE') && is_plugin_active(constant('WD_FM_STRIPE')));
|
166 |
+
if ($is_addon_stripe_active) {
|
167 |
+
require_once (WD_FM_STRIPE_DIR . '/controller.php');
|
168 |
+
}
|
169 |
+
?>
|
170 |
+
<script type="text/javascript">
|
171 |
+
var plugin_url = "<?php echo WD_FM_URL; ?>";
|
172 |
+
</script>
|
173 |
+
<script type="text/javascript">
|
174 |
+
is_addon_calculator_active = <?php echo (defined('WD_FM_CALCULATOR') && is_plugin_active(constant('WD_FM_CALCULATOR'))) ? 1 : 0; ?>;
|
175 |
+
is_addon_stripe_active = <?php echo $is_addon_stripe_active ? 1 : 0; ?>;
|
176 |
+
is_stripe_enabled = <?php echo ($is_addon_stripe_active && (int) WD_FM_STRIPE_controller::stripe_enable($row->id) ? 1 : 0); ?>;
|
177 |
+
form_view = 1;
|
178 |
+
form_view_count = 1;
|
179 |
+
form_view_max = 1;
|
180 |
+
function submitbutton() {
|
181 |
+
<?php if ($id) { ?>
|
182 |
+
if (!document.getElementById('araqel') || (document.getElementById('araqel').value == '0')) {
|
183 |
+
alert('Please wait while page loading.');
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
<?php } ?>
|
187 |
+
tox = '';
|
188 |
+
form_fields = '';
|
189 |
+
document.getElementById('take').style.display = "none";
|
190 |
+
document.getElementById('page_bar').style.display = "none";
|
191 |
+
jQuery('#saving').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
192 |
+
jQuery('.wdform_section').each(function() {
|
193 |
+
var this2 = this;
|
194 |
+
jQuery(this2).find('.wdform_column').each(function() {
|
195 |
+
if(!jQuery(this).html() && jQuery(this2).children().length>1)
|
196 |
+
jQuery(this).remove();
|
197 |
+
});
|
198 |
+
});
|
199 |
+
remove_whitespace(document.getElementById('take'));
|
200 |
+
l_id_array = [<?php echo $labels['id']?>];
|
201 |
+
l_label_array = [<?php echo $labels['label']?>];
|
202 |
+
l_type_array = [<?php echo $labels['type']?>];
|
203 |
+
l_id_removed = [];
|
204 |
+
for (x = 0; x < l_id_array.length; x++) {
|
205 |
+
l_id_removed[l_id_array[x]] = true;
|
206 |
+
}
|
207 |
+
for (t = 1; t <= form_view_max; t++) {
|
208 |
+
if (document.getElementById('form_id_tempform_view' + t)) {
|
209 |
+
wdform_page = document.getElementById('form_id_tempform_view' + t);
|
210 |
+
remove_whitespace(wdform_page);
|
211 |
+
n = wdform_page.childNodes.length - 2;
|
212 |
+
for (q = 0; q <= n; q++) {
|
213 |
+
if (!wdform_page.childNodes[q].getAttribute("wdid")) {
|
214 |
+
wdform_section = wdform_page.childNodes[q];
|
215 |
+
for (x = 0; x < wdform_section.childNodes.length; x++) {
|
216 |
+
wdform_column = wdform_section.childNodes[x];
|
217 |
+
if (wdform_column.firstChild) {
|
218 |
+
for (y=0; y < wdform_column.childNodes.length; y++) {
|
219 |
+
is_in_old = false;
|
220 |
+
wdform_row = wdform_column.childNodes[y];
|
221 |
+
if (wdform_row.nodeType == 3) {
|
222 |
+
continue;
|
223 |
+
}
|
224 |
+
wdid = wdform_row.getAttribute("wdid");
|
225 |
+
if (!wdid) {
|
226 |
+
continue;
|
227 |
+
}
|
228 |
+
l_id = wdid;
|
229 |
+
l_label = document.getElementById(wdid + '_element_labelform_id_temp').innerHTML;
|
230 |
+
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
231 |
+
wdtype = wdform_row.firstChild.getAttribute('type');
|
232 |
+
|
233 |
+
for (var z = 0; z < l_id_array.length; z++) {
|
234 |
+
if (l_type_array[z] == "type_address") {
|
235 |
+
if (document.getElementById(l_id + "_mini_label_street1") || document.getElementById(l_id + "_mini_label_street2") || document.getElementById(l_id + "_mini_label_city") || document.getElementById(l_id + "_mini_label_state") || document.getElementById(l_id+"_mini_label_postal") || document.getElementById(l_id+"_mini_label_country")) {
|
236 |
+
l_id_removed[l_id_array[z]] = false;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
else {
|
240 |
+
if (l_id_array[z] == wdid) {
|
241 |
+
l_id_removed[l_id] = false;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
}
|
246 |
+
|
247 |
+
if (wdtype == "type_address") {
|
248 |
+
addr_id = parseInt(wdid);
|
249 |
+
id_for_country = addr_id;
|
250 |
+
if (document.getElementById(id_for_country + "_mini_label_street1"))
|
251 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_street1").innerHTML + '#**label**#type_address#****#';
|
252 |
+
addr_id++;
|
253 |
+
if (document.getElementById(id_for_country + "_mini_label_street2"))
|
254 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_street2").innerHTML + '#**label**#type_address#****#';
|
255 |
+
addr_id++;
|
256 |
+
if (document.getElementById(id_for_country+"_mini_label_city"))
|
257 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_city").innerHTML + '#**label**#type_address#****#';
|
258 |
+
addr_id++;
|
259 |
+
if (document.getElementById(id_for_country + "_mini_label_state"))
|
260 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_state").innerHTML + '#**label**#type_address#****#';
|
261 |
+
addr_id++;
|
262 |
+
if (document.getElementById(id_for_country + "_mini_label_postal"))
|
263 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_postal").innerHTML + '#**label**#type_address#****#';
|
264 |
+
addr_id++;
|
265 |
+
if (document.getElementById(id_for_country+"_mini_label_country")) {
|
266 |
+
tox=tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_country").innerHTML + '#**label**#type_address#****#';
|
267 |
+
}
|
268 |
+
|
269 |
+
}
|
270 |
+
else {
|
271 |
+
tox = tox + wdid + '#**id**#' + l_label + '#**label**#' + wdtype + '#****#';
|
272 |
+
}
|
273 |
+
|
274 |
+
id = wdid;
|
275 |
+
form_fields += wdid + "*:*id*:*";
|
276 |
+
form_fields += wdtype + "*:*type*:*";
|
277 |
+
w_choices = new Array();
|
278 |
+
w_choices_value=new Array();
|
279 |
+
w_choices_checked = new Array();
|
280 |
+
w_choices_disabled = new Array();
|
281 |
+
w_choices_params =new Array();
|
282 |
+
w_allow_other_num = 0;
|
283 |
+
w_property = new Array();
|
284 |
+
w_property_type = new Array();
|
285 |
+
w_property_values = new Array();
|
286 |
+
w_choices_price = new Array();
|
287 |
+
if (document.getElementById(id+'_element_labelform_id_temp').innerHTML) {
|
288 |
+
w_field_label = document.getElementById(id + '_element_labelform_id_temp').innerHTML.replace(/(\r\n|\n|\r)/gm," ");
|
289 |
+
}
|
290 |
+
else {
|
291 |
+
w_field_label = " ";
|
292 |
+
}
|
293 |
+
if (document.getElementById(id + '_label_sectionform_id_temp')) {
|
294 |
+
if (document.getElementById(id + '_label_sectionform_id_temp').style.display == "block") {
|
295 |
+
w_field_label_pos = "top";
|
296 |
+
}
|
297 |
+
else {
|
298 |
+
w_field_label_pos = "left";
|
299 |
+
}
|
300 |
+
}
|
301 |
+
if (document.getElementById(id + "_elementform_id_temp")) {
|
302 |
+
s = document.getElementById(id + "_elementform_id_temp").style.width;
|
303 |
+
w_size=s.substring(0,s.length - 2);
|
304 |
+
}
|
305 |
+
if (document.getElementById(id + "_label_sectionform_id_temp")) {
|
306 |
+
s = document.getElementById(id + "_label_sectionform_id_temp").style.width;
|
307 |
+
w_field_label_size = s.substring(0, s.length - 2);
|
308 |
+
}
|
309 |
+
if (document.getElementById(id + "_requiredform_id_temp")) {
|
310 |
+
w_required = document.getElementById(id + "_requiredform_id_temp").value;
|
311 |
+
}
|
312 |
+
if (document.getElementById(id + "_uniqueform_id_temp")) {
|
313 |
+
w_unique = document.getElementById(id + "_uniqueform_id_temp").value;
|
314 |
+
}
|
315 |
+
if (document.getElementById(id + '_label_sectionform_id_temp')) {
|
316 |
+
w_class = document.getElementById(id + '_label_sectionform_id_temp').getAttribute("class");
|
317 |
+
if (!w_class) {
|
318 |
+
w_class = "";
|
319 |
+
}
|
320 |
+
}
|
321 |
+
gen_form_fields();
|
322 |
+
wdform_row.innerHTML = "%" + id + " - " + l_label + "%";
|
323 |
+
}
|
324 |
+
}
|
325 |
+
}
|
326 |
+
}
|
327 |
+
else {
|
328 |
+
id = wdform_page.childNodes[q].getAttribute("wdid");
|
329 |
+
w_editor = document.getElementById(id + "_element_sectionform_id_temp").innerHTML;
|
330 |
+
form_fields += id + "*:*id*:*";
|
331 |
+
form_fields += "type_section_break" + "*:*type*:*";
|
332 |
+
form_fields += "custom_" + id + "*:*w_field_label*:*";
|
333 |
+
form_fields += w_editor + "*:*w_editor*:*";
|
334 |
+
form_fields += "*:*new_field*:*";
|
335 |
+
wdform_page.childNodes[q].innerHTML = "%" + id + " - " + "custom_" + id + "%";
|
336 |
+
}
|
337 |
+
}
|
338 |
+
}
|
339 |
+
}
|
340 |
+
document.getElementById('label_order_current').value = tox;
|
341 |
+
|
342 |
+
for (x = 0; x < l_id_array.length; x++) {
|
343 |
+
if (l_id_removed[l_id_array[x]]) {
|
344 |
+
tox = tox + l_id_array[x] + '#**id**#' + l_label_array[x] + '#**label**#' + l_type_array[x] + '#****#';
|
345 |
+
}
|
346 |
+
}
|
347 |
+
|
348 |
+
document.getElementById('label_order').value = tox;
|
349 |
+
document.getElementById('form_fields').value = form_fields;
|
350 |
+
refresh_();
|
351 |
+
document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
|
352 |
+
document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
|
353 |
+
document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
|
354 |
+
return true;
|
355 |
+
}
|
356 |
+
|
357 |
+
gen = <?php echo (($id != 0) ? $row->counter : 1); ?>;
|
358 |
+
|
359 |
+
function enable() {
|
360 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
361 |
+
for (x = 0; x < 14; x++) {
|
362 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FM_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo WD_FM_VERSION; ?>";
|
363 |
+
}
|
364 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
365 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
366 |
+
}
|
367 |
+
else {
|
368 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
369 |
+
}
|
370 |
+
|
371 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
372 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
373 |
+
}
|
374 |
+
else {
|
375 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
376 |
+
}
|
377 |
+
document.getElementById('when_edit').style.display = 'none';
|
378 |
+
}
|
379 |
+
|
380 |
+
function enable2() {
|
381 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
382 |
+
for (x = 0; x < 14; x++) {
|
383 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FM_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo WD_FM_VERSION; ?>";
|
384 |
+
}
|
385 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
386 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
387 |
+
}
|
388 |
+
else {
|
389 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
390 |
+
}
|
391 |
+
|
392 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
393 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
394 |
+
}
|
395 |
+
else {
|
396 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
397 |
+
}
|
398 |
+
document.getElementById('when_edit').style.display = 'block';
|
399 |
+
if (document.getElementById('field_types').offsetWidth) {
|
400 |
+
document.getElementById('when_edit').style.width = 'inherit';
|
401 |
+
}
|
402 |
+
if (document.getElementById('field_types').offsetHeight) {
|
403 |
+
document.getElementById('when_edit').style.height = 'inherit';
|
404 |
+
}
|
405 |
+
}
|
406 |
+
</script>
|
407 |
+
<form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
|
408 |
+
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
409 |
+
<h2 class="fm-h2-message"></h2>
|
410 |
+
<div class="fm-page-header">
|
411 |
+
<!-- <div class="fm-page-title">
|
412 |
+
<?php echo $page_title; ?>
|
413 |
+
</div> -->
|
414 |
+
<div style="float:left;">
|
415 |
+
<div class="fm-logo-edit-page"></div>
|
416 |
+
<div class="fm-title-edit-page">Form</br>Maker</div>
|
417 |
+
</div>
|
418 |
+
<div class="fm-page-actions">
|
419 |
+
<?php
|
420 |
+
if(isset($row->backup_id) )
|
421 |
+
if($row->backup_id!="") {
|
422 |
+
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > ".$row->backup_id." AND id = ".$row->id." ORDER BY backup_id ASC LIMIT 0 , 1 ";
|
423 |
+
$backup_id = $wpdb->get_var($query);
|
424 |
+
if($backup_id) { ?>
|
425 |
+
<button class="fm-button redo-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; jQuery('#saving_text').html('Redo');fm_set_input_value('task', 'redo');">
|
426 |
+
<span></span>
|
427 |
+
Redo
|
428 |
+
</button>
|
429 |
+
<?php
|
430 |
+
}
|
431 |
+
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id < ".$row->backup_id." AND id = ".$row->id." ORDER BY backup_id DESC LIMIT 0 , 1 ";
|
432 |
+
$backup_id = $wpdb->get_var($query);
|
433 |
+
|
434 |
+
if($backup_id) { ?>
|
435 |
+
<button class="fm-button undo-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; jQuery('#saving_text').html('Undo');fm_set_input_value('task', 'undo');">
|
436 |
+
<span></span>
|
437 |
+
Undo
|
438 |
+
</button>
|
439 |
+
<?php
|
440 |
+
}
|
441 |
+
}
|
442 |
+
?>
|
443 |
+
|
444 |
+
<?php if ($id) { ?>
|
445 |
+
<button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_as_copy');">
|
446 |
+
<span></span>
|
447 |
+
Save as Copy
|
448 |
+
</button>
|
449 |
+
<?php } ?>
|
450 |
+
<button class="fm-button save-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save');">
|
451 |
+
<span></span>
|
452 |
+
Save
|
453 |
+
</button>
|
454 |
+
<button class="fm-button apply-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply');">
|
455 |
+
<span></span>
|
456 |
+
Apply
|
457 |
+
</button>
|
458 |
+
<button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel');">
|
459 |
+
<span></span>
|
460 |
+
Cancel
|
461 |
+
</button>
|
462 |
+
</div>
|
463 |
+
<div class="fm-clear"></div>
|
464 |
+
</div>
|
465 |
+
|
466 |
+
<div class="fm-theme-banner">
|
467 |
+
<div class="fm-title">
|
468 |
+
<span style="">Title: </span>
|
469 |
+
<input id="title" name="title" value="<?php echo $row->title; ?>"/>
|
470 |
+
</div>
|
471 |
+
<div class="fm-page-actions">
|
472 |
+
<button class="fm-button display-options-button large" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'view_display_options');">
|
473 |
+
<span></span>
|
474 |
+
Display Options
|
475 |
+
</button>
|
476 |
+
<button class="fm-button form-options-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'view_options');">
|
477 |
+
<span></span>
|
478 |
+
Form Options
|
479 |
+
</button>
|
480 |
+
<?php
|
481 |
+
$fm_settings = get_option('fm_settings');
|
482 |
+
$fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) ? $fm_settings['fm_advanced_layout'] : '';
|
483 |
+
if ($row->id) {
|
484 |
+
$autogen_layout = $wpdb->get_var($wpdb->prepare('SELECT autogen_layout FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $row->id));
|
485 |
+
}
|
486 |
+
else {
|
487 |
+
$autogen_layout = 1;
|
488 |
+
}
|
489 |
+
if ($fm_advanced_layout || $autogen_layout == 0) {
|
490 |
+
?>
|
491 |
+
<button class="fm-button form-layout-button large" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_layout');">
|
492 |
+
<span></span>
|
493 |
+
Advanced Layout
|
494 |
+
</button>
|
495 |
+
<?php
|
496 |
+
}
|
497 |
+
?>
|
498 |
+
</div>
|
499 |
+
</div>
|
500 |
+
<div class="fm-clear"></div>
|
501 |
+
<div class="fm-theme-banner">
|
502 |
+
<div class="fm-theme" style="float:left;">
|
503 |
+
<span style="">Theme: </span>
|
504 |
+
<select id="theme" name="theme" onChange="set_preview()">
|
505 |
+
<optgroup label="New Themes">
|
506 |
+
<option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2">Inherit From Website Theme</option>
|
507 |
+
<?php
|
508 |
+
$optiongroup = true;
|
509 |
+
foreach ($themes as $theme) {
|
510 |
+
if ($optiongroup && $theme->version == 1) {
|
511 |
+
$optiongroup = false;
|
512 |
+
?>
|
513 |
+
</optgroup>
|
514 |
+
<optgroup label="Outdated Themes">
|
515 |
+
<?php
|
516 |
+
}
|
517 |
+
?>
|
518 |
+
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
|
519 |
+
<?php
|
520 |
+
}
|
521 |
+
?>
|
522 |
+
</optgroup>
|
523 |
+
</select>
|
524 |
+
<button id="preview_form" class="fm-button preview-button medium"<?php if (!$id) echo ' disabled="disabled"' ?> onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'form_preview' => 1, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
525 |
+
<span></span>
|
526 |
+
Preview
|
527 |
+
</button>
|
528 |
+
<button id="edit_css" class="fm-button options-edit-button medium" onclick="window.open('<?php echo add_query_arg(array('current_id' => ($row->theme ? $row->theme : $default_theme), 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>'); return false;">
|
529 |
+
<span></span>
|
530 |
+
Edit
|
531 |
+
</button>
|
532 |
+
<div id="old_theme_notice" class="wd_error" style="display: none;">The theme you have selected is outdated. Please choose one from New Themes section.</div>
|
533 |
+
</div>
|
534 |
+
<div style="float:right;">
|
535 |
+
<button class="fm-button add-new-button large" onclick="enable(); Enable(); return false;">
|
536 |
+
Add a New Field
|
537 |
+
<span></span>
|
538 |
+
</button>
|
539 |
+
</div>
|
540 |
+
</div>
|
541 |
+
<div class="fm-clear"></div>
|
542 |
+
<div id="formMakerDiv" onclick="close_window()"></div>
|
543 |
+
<div id="formMakerDiv1">
|
544 |
+
<table class="formMakerDiv1_table" border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">
|
545 |
+
<tr>
|
546 |
+
<td style="padding:0px">
|
547 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
|
548 |
+
<tr valign="top">
|
549 |
+
<td width="20%" height="100%" id="field_types">
|
550 |
+
<div id="when_edit" style="display: none;"></div>
|
551 |
+
<table border="0" cellpadding="0" cellspacing="3" width="100%" style="border-collapse: separate; border-spacing: 3px;">
|
552 |
+
<tbody>
|
553 |
+
<tr>
|
554 |
+
<td align="center" onclick="addRow('customHTML')" class="field_buttons" id="table_editor">
|
555 |
+
<img src="<?php echo WD_FM_URL; ?>/images/customHTML.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_customHTML">
|
556 |
+
<div>Custom HTML</div>
|
557 |
+
</td>
|
558 |
+
<td align="center" onclick="addRow('text')" class="field_buttons" id="table_text">
|
559 |
+
<img src="<?php echo WD_FM_URL; ?>/images/text.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_text">
|
560 |
+
<div>Text input</div>
|
561 |
+
</td>
|
562 |
+
</tr>
|
563 |
+
<tr>
|
564 |
+
<td align="center" onclick="addRow('checkbox')" class="field_buttons" id="table_checkbox">
|
565 |
+
<img src="<?php echo WD_FM_URL; ?>/images/checkbox.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_checkbox">
|
566 |
+
<div>Multiple Choice</div>
|
567 |
+
</td>
|
568 |
+
<td align="center" onclick="addRow('radio')" class="field_buttons" id="table_radio">
|
569 |
+
<img src="<?php echo WD_FM_URL; ?>/images/radio.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_radio">
|
570 |
+
<div>Single Choice</div>
|
571 |
+
</td>
|
572 |
+
</tr>
|
573 |
+
<tr>
|
574 |
+
<td align="center" onclick="addRow('survey')" class="field_buttons" id="table_survey">
|
575 |
+
<img src="<?php echo WD_FM_URL; ?>/images/survey.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_survey">
|
576 |
+
<div>Survey Tools</div>
|
577 |
+
</td>
|
578 |
+
<td align="center" onclick="addRow('time_and_date')" class="field_buttons" id="table_time_and_date">
|
579 |
+
<img src="<?php echo WD_FM_URL; ?>/images/time_and_date.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_time_and_date">
|
580 |
+
<div>Time and Date</div>
|
581 |
+
</td>
|
582 |
+
</tr>
|
583 |
+
<tr>
|
584 |
+
<td align="center" onclick="addRow('select')" class="field_buttons" id="table_select">
|
585 |
+
<img src="<?php echo WD_FM_URL; ?>/images/select.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_select">
|
586 |
+
<div>Select Box</div>
|
587 |
+
</td>
|
588 |
+
<td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" class="field_buttons field_disabled" id="table_file_upload">
|
589 |
+
<img src="<?php echo WD_FM_URL; ?>/images/file_upload.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_file_upload">
|
590 |
+
<div>File Upload</div>
|
591 |
+
</td>
|
592 |
+
</tr>
|
593 |
+
<tr>
|
594 |
+
<td align="center" onclick="addRow('section_break')" class="field_buttons" id="table_section_break">
|
595 |
+
<img src="<?php echo WD_FM_URL; ?>/images/section_break.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_section_break">
|
596 |
+
<div>Section Break</div>
|
597 |
+
</td>
|
598 |
+
<td align="center" onclick="addRow('page_break')" class="field_buttons" id="table_page_break">
|
599 |
+
<img src="<?php echo WD_FM_URL; ?>/images/page_break.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_page_break">
|
600 |
+
<div>Page Break</div>
|
601 |
+
</td>
|
602 |
+
</tr>
|
603 |
+
<tr>
|
604 |
+
<td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" class="field_buttons field_disabled" id="table_map">
|
605 |
+
<img src="<?php echo WD_FM_URL; ?>/images/map.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_map">
|
606 |
+
<div>Map</div>
|
607 |
+
</td>
|
608 |
+
<td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" id="table_paypal" class="field_buttons field_disabled">
|
609 |
+
<img src="<?php echo WD_FM_URL; ?>/images/paypal.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_paypal">
|
610 |
+
<div>Payment</div>
|
611 |
+
</td>
|
612 |
+
</tr>
|
613 |
+
<tr>
|
614 |
+
<td align="center" onclick="addRow('captcha')" class="field_buttons" id="table_captcha">
|
615 |
+
<img src="<?php echo WD_FM_URL; ?>/images/captcha.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_captcha">
|
616 |
+
<div>Captcha</div>
|
617 |
+
</td>
|
618 |
+
<td align="center" onclick="addRow('button')" id="table_button" class="field_buttons">
|
619 |
+
<img src="<?php echo WD_FM_URL; ?>/images/button.png?ver=<?php echo WD_FM_VERSION; ?>" style="margin:5px" id="img_button">
|
620 |
+
<div>Button</div>
|
621 |
+
</td>
|
622 |
+
</tr>
|
623 |
+
</tbody>
|
624 |
+
</table>
|
625 |
+
</td>
|
626 |
+
<td width="40%" height="100%" align="left">
|
627 |
+
<div id="edit_table"></div>
|
628 |
+
</td>
|
629 |
+
<td align="center" valign="top" style="background: url("<?php echo WD_FM_URL . '/images/border2.png'; ?>") repeat-y;"> </td>
|
630 |
+
<td style="padding:15px;">
|
631 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
|
632 |
+
<tr>
|
633 |
+
<td align="right">
|
634 |
+
<input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
|
635 |
+
At The End
|
636 |
+
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
637 |
+
At The Beginning
|
638 |
+
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
639 |
+
Before
|
640 |
+
<select style="width: 100px; margin-left: 5px;" id="sel_el_pos" onclick="change_before()" disabled="disabled"></select>
|
641 |
+
<br>
|
642 |
+
<button class="fm-button field-save-button medium" onclick="add(0, false); return false;">
|
643 |
+
Save
|
644 |
+
<span></span>
|
645 |
+
</button>
|
646 |
+
<button class="fm-button cancel-button medium" onclick="close_window(); return false;">
|
647 |
+
Cancel
|
648 |
+
<span></span>
|
649 |
+
</button>
|
650 |
+
<hr style="margin-bottom:10px" />
|
651 |
+
</td>
|
652 |
+
</tr>
|
653 |
+
<tr height="100%" valign="top">
|
654 |
+
<td id="show_table"></td>
|
655 |
+
</tr>
|
656 |
+
</table>
|
657 |
+
</td>
|
658 |
+
</tr>
|
659 |
+
</table>
|
660 |
+
</td>
|
661 |
+
</tr>
|
662 |
+
</table>
|
663 |
+
<input type="hidden" id="old" />
|
664 |
+
<input type="hidden" id="old_selected" />
|
665 |
+
<input type="hidden" id="element_type" />
|
666 |
+
<input type="hidden" id="editing_id" />
|
667 |
+
<input type="hidden" value="<?php echo WD_FM_URL; ?>" id="form_plugins_url" />
|
668 |
+
<div id="main_editor" style="position: fixed; display: none; z-index: 140;">
|
669 |
+
<?php if (user_can_richedit()) {
|
670 |
+
wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
671 |
+
}
|
672 |
+
else { ?>
|
673 |
+
<textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="5" style="width: 440px; height: 350px;" class="mce_editable" aria-hidden="true"></textarea>
|
674 |
+
<?php
|
675 |
+
}
|
676 |
+
?>
|
677 |
+
</div>
|
678 |
+
</div>
|
679 |
+
<?php if (!function_exists('the_editor')) { ?>
|
680 |
+
<iframe id="tinymce" style="display: none;"></iframe>
|
681 |
+
<?php } ?>
|
682 |
+
|
683 |
+
<?php
|
684 |
+
$animation_effects = array(
|
685 |
+
'none' => 'None',
|
686 |
+
'bounce' => 'Bounce',
|
687 |
+
'tada' => 'Tada',
|
688 |
+
'bounceInDown' => 'BounceInDown',
|
689 |
+
'fadeInLeft' => 'FadeInLeft',
|
690 |
+
'flash' => 'Flash',
|
691 |
+
'pulse' => 'Pulse',
|
692 |
+
'rubberBand' => 'RubberBand',
|
693 |
+
'shake' => 'Shake',
|
694 |
+
'swing' => 'Swing',
|
695 |
+
'wobble' => 'Wobble',
|
696 |
+
'hinge' => 'Hinge',
|
697 |
+
'lightSpeedIn' => 'LightSpeedIn',
|
698 |
+
'rollIn' => 'RollIn',
|
699 |
+
'bounceIn' => 'BounceIn',
|
700 |
+
'bounceInLeft' => 'BounceInLeft',
|
701 |
+
'bounceInRight' => 'BounceInRight',
|
702 |
+
'bounceInUp' => 'BounceInUp',
|
703 |
+
'fadeIn' => 'FadeIn',
|
704 |
+
'fadeInDown' => 'FadeInDown',
|
705 |
+
'fadeInDownBig' => 'FadeInDownBig',
|
706 |
+
'fadeInLeftBig' => 'FadeInLeftBig',
|
707 |
+
'fadeInRight' => 'FadeInRight',
|
708 |
+
'fadeInRightBig' => 'FadeInRightBig',
|
709 |
+
'fadeInUp' => 'FadeInUp',
|
710 |
+
'fadeInUpBig' => 'FadeInUpBig',
|
711 |
+
'flip' => 'Flip',
|
712 |
+
'flipInX' => 'FlipInX',
|
713 |
+
'flipInY' => 'FlipInY',
|
714 |
+
'rotateIn' => 'RotateIn',
|
715 |
+
'rotateInDownLeft' => 'RotateInDownLeft',
|
716 |
+
'rotateInDownRight' => 'RotateInDownRight',
|
717 |
+
'rotateInUpLeft' => 'RotateInUpLeft',
|
718 |
+
'rotateInUpRight' => 'RotateInUpRight',
|
719 |
+
'zoomIn' => 'ZoomIn',
|
720 |
+
'zoomInDown' => 'ZoomInDown',
|
721 |
+
'zoomInLeft' => 'ZoomInLeft',
|
722 |
+
'zoomInRight' => 'ZoomInRight',
|
723 |
+
'zoomInUp' => 'ZoomInUp',
|
724 |
+
);
|
725 |
+
?>
|
726 |
+
<div class="fm-edit-content panel form-header">
|
727 |
+
<div class="panel-heading">
|
728 |
+
<span class="fm-header-bg"></span>
|
729 |
+
Header
|
730 |
+
<span class="fm-expcol pull-right" onclick="jQuery(this).toggleClass('fm-expanded'); jQuery('#fm-header-content').toggleClass('fm-hide');"></span>
|
731 |
+
</div>
|
732 |
+
<div id="fm-header-content" class="panel-content fm-hide">
|
733 |
+
<div class="col-md-6 col-xs-12">
|
734 |
+
<div class="fm-row">
|
735 |
+
<label>Title: </label>
|
736 |
+
<input type="text" id="header_title" name="header_title" value="<?php echo $row->header_title; ?>"/>
|
737 |
+
</div>
|
738 |
+
<div class="fm-row">
|
739 |
+
<label>Description: </label>
|
740 |
+
<div id="description_editor" style="width:470px; display: inline-block; vertical-align: middle;">
|
741 |
+
<?php if (user_can_richedit()) {
|
742 |
+
wp_editor($row->header_description, 'header_description', array('teeny' => FALSE, 'textarea_name' => 'header_description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
743 |
+
}
|
744 |
+
else { ?>
|
745 |
+
<textarea name="header_description" id="header_description" cols="40" rows="5" style="width: 440px; height: 350px;" class="mce_editable" aria-hidden="true"></textarea>
|
746 |
+
<?php
|
747 |
+
}
|
748 |
+
?>
|
749 |
+
</div>
|
750 |
+
</div>
|
751 |
+
</div>
|
752 |
+
<div class="col-md-6 col-xs-12">
|
753 |
+
<div class="fm-row">
|
754 |
+
<label>Image: </label>
|
755 |
+
<input type="text" id="header_image_url" name="header_image_url" value="<?php echo $row->header_image_url; ?>"/>
|
756 |
+
<button class="fm-button add-button medium" onclick="fmOpenMediaUploader(event); return false;">Add Image</button>
|
757 |
+
<?php $header_bg = $row->header_image_url ? 'background-image: url('.$row->header_image_url.'); background-position: center;' : ''; ?>
|
758 |
+
<div id="header_image" class="header_img<?php if (!$row->header_image_url) echo ' fm-hide'; ?>" style="<?php echo $header_bg; ?>">
|
759 |
+
<button type="button" id="remove_header_img" onclick="fmRemoveHeaderImage(event); return false;">
|
760 |
+
<i class="mce-ico mce-i-dashicon dashicons-no"></i>
|
761 |
+
</button>
|
762 |
+
</div>
|
763 |
+
</div>
|
764 |
+
<div class="fm-row">
|
765 |
+
<label>Image Animation: </label>
|
766 |
+
<select name="header_image_animation">
|
767 |
+
<?php
|
768 |
+
foreach($animation_effects as $anim_key => $animation_effect){
|
769 |
+
$selected = $row->header_image_animation == $anim_key ? 'selected="selected"' : '';
|
770 |
+
echo '<option value="'.$anim_key.'" '.$selected.'>'.$animation_effect.'</option>';
|
771 |
+
}
|
772 |
+
?>
|
773 |
+
</select>
|
774 |
+
</div>
|
775 |
+
<div class="fm-row">
|
776 |
+
<label for="header_hide_image">Hide Image on Mobile: </label>
|
777 |
+
<input type="checkbox" id="header_hide_image" name="header_hide_image" value="1" <?php echo $row->header_hide_image == '1' ? 'checked="checked"' : '' ?> />
|
778 |
+
</div>
|
779 |
+
</div>
|
780 |
+
<div class="fm-clear"></div>
|
781 |
+
</div>
|
782 |
+
</div>
|
783 |
+
|
784 |
+
<div class="fm-edit-content">
|
785 |
+
<div class="fm-drag-and-drop">
|
786 |
+
<div>
|
787 |
+
<label for="enable_sortable">Enable Drag & Drop</label>
|
788 |
+
<button name="sortable" id="enable_sortable" class="fm-checkbox-radio-button <?php echo $row->sortable == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="enable_drag(this); return false;" value="<?php echo $row->sortable; ?>">
|
789 |
+
<span></span>
|
790 |
+
</button>
|
791 |
+
<input type="hidden" name="sortable" id="sortable_hidden" value="<?php echo $row->sortable; ?>"/>
|
792 |
+
</div>
|
793 |
+
<div>
|
794 |
+
You can use drag and drop to move the fields up/down for the change of the order and left/right for creating columns within the form.
|
795 |
+
</div>
|
796 |
+
</div>
|
797 |
+
<fieldset>
|
798 |
+
<legend></legend>
|
799 |
+
<?php if ($id) { ?>
|
800 |
+
<div style="margin: 8px; display: table; width: 100%;" id="page_bar">
|
801 |
+
<div id="page_navigation" style="display: table-row;">
|
802 |
+
<div align="center" id="pages" show_title="<?php echo $row->show_title; ?>" show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>" style="display: table-cell; width:90%;"></div>
|
803 |
+
<div align="left" id="edit_page_navigation" style="display: table-cell; vertical-align: middle;"></div>
|
804 |
+
</div>
|
805 |
+
</div>
|
806 |
+
<div id="take" class="main">
|
807 |
+
<?php echo $row->form_front; ?>
|
808 |
+
</div>
|
809 |
+
<?php } else { ?>
|
810 |
+
<div style="margin:8px; display:table; width:100%" id="page_bar">
|
811 |
+
<div id="page_navigation" style="display:table-row">
|
812 |
+
<div align="center" id="pages" show_title="false" show_numbers="true" type="none" style="display:table-cell; width:90%"></div>
|
813 |
+
<div align="left" id="edit_page_navigation" style="display:table-cell; vertical-align: middle;"></div>
|
814 |
+
</div>
|
815 |
+
</div>
|
816 |
+
<div id="take" class="main">
|
817 |
+
<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;">
|
818 |
+
<div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false">
|
819 |
+
<div class="wdform_section">
|
820 |
+
<div class="wdform_column"></div>
|
821 |
+
</div>
|
822 |
+
<div valign="top" class="wdform_footer" style="width: 100%;">
|
823 |
+
<div style="width: 100%;">
|
824 |
+
<div style="width: 100%; display: table; padding-top:10px;">
|
825 |
+
<div style="display: table-row-group;">
|
826 |
+
<div id="form_id_temppage_nav1" style="display: table-row;"></div>
|
827 |
+
</div>
|
828 |
+
</div>
|
829 |
+
</div>
|
830 |
+
</div>
|
831 |
+
</div>
|
832 |
+
<div id="form_id_tempform_view_img1" style="float: right;">
|
833 |
+
<div>
|
834 |
+
<img src="<?php echo WD_FM_URL . '/images/minus.png?ver='. WD_FM_VERSION; ?>" title="Show or hide the page" class="page_toolbar" onClick="show_or_hide('1')" onMouseOver="chnage_icons_src(this,'minus')" onmouseout="chnage_icons_src(this,'minus')" id="show_page_img_1"/>
|
835 |
+
<img src="<?php echo WD_FM_URL . '/images/page_delete.png?ver='. WD_FM_VERSION; ?>" title="Delete the page" class="page_toolbar" onClick="remove_page('1')" onMouseOver="chnage_icons_src(this,'page_delete')" onmouseout="chnage_icons_src(this,'page_delete')"/>
|
836 |
+
<img src="<?php echo WD_FM_URL . '/images/page_delete_all.png?ver='. WD_FM_VERSION; ?>" title="Delete the page with fields" class="page_toolbar" onClick="remove_page_all('1')" onMouseOver="chnage_icons_src(this,'page_delete_all')" onmouseout="chnage_icons_src(this,'page_delete_all')"/>
|
837 |
+
<img src="<?php echo WD_FM_URL . '/images/page_edit.png?ver='. WD_FM_VERSION; ?>" title="Edit the page" class="page_toolbar" onClick="edit_page_break('1')" onMouseOver="chnage_icons_src(this,'page_edit')" onmouseout="chnage_icons_src(this,'page_edit')"/>
|
838 |
+
</div>
|
839 |
+
</div>
|
840 |
+
</div>
|
841 |
+
</div>
|
842 |
+
<?php } ?>
|
843 |
+
</fieldset>
|
844 |
+
</div>
|
845 |
+
<input type="hidden" name="form_front" id="form_front" />
|
846 |
+
<input type="hidden" name="form_fields" id="form_fields" />
|
847 |
+
<input type="hidden" name="pagination" id="pagination" />
|
848 |
+
<input type="hidden" name="show_title" id="show_title" />
|
849 |
+
<input type="hidden" name="show_numbers" id="show_numbers" />
|
850 |
+
<input type="hidden" name="public_key" id="public_key" />
|
851 |
+
<input type="hidden" name="private_key" id="private_key" />
|
852 |
+
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
|
853 |
+
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order; ?>" />
|
854 |
+
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
|
855 |
+
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
|
856 |
+
<input type="hidden" id="araqel" value="0" />
|
857 |
+
<input type="hidden" name="backup_id" id="backup_id" value="<?php echo $row->backup_id;?>">
|
858 |
+
|
859 |
+
<script type="text/javascript">
|
860 |
+
default_theme = "<?php echo $default_theme; ?>";
|
861 |
+
function set_preview() {
|
862 |
+
theme_id = jQuery('#theme').val() == '0' ? default_theme : jQuery('#theme').val();
|
863 |
+
jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'form_preview' => 1), admin_url('admin-ajax.php')); ?>&test_theme=" + theme_id + "&width=1000&height=500&TB_iframe=1'); return false;");
|
864 |
+
jQuery("#edit_css").attr("onclick", "window.open('<?php echo add_query_arg(array('nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>¤t_id=" + theme_id + "'); return false;");
|
865 |
+
if (jQuery('#theme option:selected').attr('data-version') == 1) {
|
866 |
+
jQuery("#old_theme_notice").show();
|
867 |
+
}
|
868 |
+
else {
|
869 |
+
jQuery("#old_theme_notice").hide();
|
870 |
+
}
|
871 |
+
}
|
872 |
+
jQuery(document).ready(function () {
|
873 |
+
set_preview();
|
874 |
+
});
|
875 |
+
<?php if ($id) { ?>
|
876 |
+
function formOnload() {
|
877 |
+
for (t = 0; t < <?php echo $row->counter; ?>; t++) {
|
878 |
+
if (document.getElementById(t + "_typeform_id_temp")) {
|
879 |
+
if (document.getElementById(t + "_typeform_id_temp").value == "type_map" || document.getElementById(t + "_typeform_id_temp").value == "type_mark_map") {
|
880 |
+
if_gmap_init(t);
|
881 |
+
for (q = 0; q < 20; q++) {
|
882 |
+
if (document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q)) {
|
883 |
+
w_long = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q));
|
884 |
+
w_lat = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("lat" + q));
|
885 |
+
w_info = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("info" + q));
|
886 |
+
add_marker_on_map(t, q, w_long, w_lat, w_info, false);
|
887 |
+
}
|
888 |
+
}
|
889 |
+
}
|
890 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date") {
|
891 |
+
// Calendar.setup({
|
892 |
+
// inputField:t + "_elementform_id_temp",
|
893 |
+
// ifFormat:document.getElementById(t + "_buttonform_id_temp").getAttribute('format'),
|
894 |
+
// button:t + "_buttonform_id_temp",
|
895 |
+
// align:"Tl",
|
896 |
+
// singleClick:true,
|
897 |
+
// firstDay:0
|
898 |
+
// });
|
899 |
+
}
|
900 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_name") {
|
901 |
+
var myu = t;
|
902 |
+
jQuery(document).ready(function () {
|
903 |
+
jQuery("#" + myu + "_mini_label_first").click(function () {
|
904 |
+
if (jQuery(this).children('input').length == 0) {
|
905 |
+
var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
906 |
+
jQuery(this).html(first);
|
907 |
+
jQuery("input.first").focus();
|
908 |
+
jQuery("input.first").blur(function () {
|
909 |
+
var id_for_blur = document.getElementById('first').parentNode.id.split('_');
|
910 |
+
var value = jQuery(this).val();
|
911 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_first").text(value);
|
912 |
+
});
|
913 |
+
}
|
914 |
+
});
|
915 |
+
jQuery("label#" + myu + "_mini_label_last").click(function () {
|
916 |
+
if (jQuery(this).children('input').length == 0) {
|
917 |
+
var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
918 |
+
jQuery(this).html(last);
|
919 |
+
jQuery("input.last").focus();
|
920 |
+
jQuery("input.last").blur(function () {
|
921 |
+
var id_for_blur = document.getElementById('last').parentNode.id.split('_');
|
922 |
+
var value = jQuery(this).val();
|
923 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_last").text(value);
|
924 |
+
});
|
925 |
+
}
|
926 |
+
});
|
927 |
+
jQuery("label#" + myu + "_mini_label_title").click(function () {
|
928 |
+
if (jQuery(this).children('input').length == 0) {
|
929 |
+
var title_ = "<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\"" + jQuery(this).text() + "\">";
|
930 |
+
jQuery(this).html(title_);
|
931 |
+
jQuery("input.title_").focus();
|
932 |
+
jQuery("input.title_").blur(function () {
|
933 |
+
var id_for_blur = document.getElementById('title_').parentNode.id.split('_');
|
934 |
+
var value = jQuery(this).val();
|
935 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_title").text(value);
|
936 |
+
});
|
937 |
+
}
|
938 |
+
});
|
939 |
+
jQuery("label#" + myu + "_mini_label_middle").click(function () {
|
940 |
+
if (jQuery(this).children('input').length == 0) {
|
941 |
+
var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
942 |
+
jQuery(this).html(middle);
|
943 |
+
jQuery("input.middle").focus();
|
944 |
+
jQuery("input.middle").blur(function () {
|
945 |
+
var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
|
946 |
+
var value = jQuery(this).val();
|
947 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_middle").text(value);
|
948 |
+
});
|
949 |
+
}
|
950 |
+
});
|
951 |
+
});
|
952 |
+
}
|
953 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone") {
|
954 |
+
var myu = t;
|
955 |
+
jQuery(document).ready(function () {
|
956 |
+
jQuery("label#" + myu + "_mini_label_area_code").click(function () {
|
957 |
+
if (jQuery(this).children('input').length == 0) {
|
958 |
+
var area_code = "<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
959 |
+
jQuery(this).html(area_code);
|
960 |
+
jQuery("input.area_code").focus();
|
961 |
+
jQuery("input.area_code").blur(function () {
|
962 |
+
var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
|
963 |
+
var value = jQuery(this).val();
|
964 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_area_code").text(value);
|
965 |
+
});
|
966 |
+
}
|
967 |
+
});
|
968 |
+
jQuery("label#" + myu + "_mini_label_phone_number").click(function () {
|
969 |
+
if (jQuery(this).children('input').length == 0) {
|
970 |
+
var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
971 |
+
jQuery(this).html(phone_number);
|
972 |
+
jQuery("input.phone_number").focus();
|
973 |
+
jQuery("input.phone_number").blur(function () {
|
974 |
+
var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
|
975 |
+
var value = jQuery(this).val();
|
976 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_phone_number").text(value);
|
977 |
+
});
|
978 |
+
}
|
979 |
+
});
|
980 |
+
});
|
981 |
+
}
|
982 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_fields") {
|
983 |
+
var myu = t;
|
984 |
+
jQuery(document).ready(function () {
|
985 |
+
jQuery("label#" + myu + "_day_label").click(function () {
|
986 |
+
if (jQuery(this).children('input').length == 0) {
|
987 |
+
var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
988 |
+
jQuery(this).html(day);
|
989 |
+
jQuery("input.day").focus();
|
990 |
+
jQuery("input.day").blur(function () {
|
991 |
+
var id_for_blur = document.getElementById('day').parentNode.id.split('_');
|
992 |
+
var value = jQuery(this).val();
|
993 |
+
jQuery("#" + id_for_blur[0] + "_day_label").text(value);
|
994 |
+
});
|
995 |
+
}
|
996 |
+
});
|
997 |
+
jQuery("label#" + myu + "_month_label").click(function () {
|
998 |
+
if (jQuery(this).children('input').length == 0) {
|
999 |
+
var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1000 |
+
jQuery(this).html(month);
|
1001 |
+
jQuery("input.month").focus();
|
1002 |
+
jQuery("input.month").blur(function () {
|
1003 |
+
var id_for_blur = document.getElementById('month').parentNode.id.split('_');
|
1004 |
+
var value = jQuery(this).val();
|
1005 |
+
jQuery("#" + id_for_blur[0] + "_month_label").text(value);
|
1006 |
+
});
|
1007 |
+
}
|
1008 |
+
});
|
1009 |
+
jQuery("label#" + myu + "_year_label").click(function () {
|
1010 |
+
if (jQuery(this).children('input').length == 0) {
|
1011 |
+
var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1012 |
+
jQuery(this).html(year);
|
1013 |
+
jQuery("input.year").focus();
|
1014 |
+
jQuery("input.year").blur(function () {
|
1015 |
+
var id_for_blur = document.getElementById('year').parentNode.id.split('_');
|
1016 |
+
var value = jQuery(this).val();
|
1017 |
+
jQuery("#" + id_for_blur[0] + "_year_label").text(value);
|
1018 |
+
});
|
1019 |
+
}
|
1020 |
+
});
|
1021 |
+
});
|
1022 |
+
}
|
1023 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_time") {
|
1024 |
+
var myu = t;
|
1025 |
+
jQuery(document).ready(function () {
|
1026 |
+
jQuery("label#" + myu + "_mini_label_hh").click(function () {
|
1027 |
+
if (jQuery(this).children('input').length == 0) {
|
1028 |
+
var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1029 |
+
jQuery(this).html(hh);
|
1030 |
+
jQuery("input.hh").focus();
|
1031 |
+
jQuery("input.hh").blur(function () {
|
1032 |
+
var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
|
1033 |
+
var value = jQuery(this).val();
|
1034 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_hh").text(value);
|
1035 |
+
});
|
1036 |
+
}
|
1037 |
+
});
|
1038 |
+
jQuery("label#" + myu + "_mini_label_mm").click(function () {
|
1039 |
+
if (jQuery(this).children('input').length == 0) {
|
1040 |
+
var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1041 |
+
jQuery(this).html(mm);
|
1042 |
+
jQuery("input.mm").focus();
|
1043 |
+
jQuery("input.mm").blur(function () {
|
1044 |
+
var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
|
1045 |
+
var value = jQuery(this).val();
|
1046 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_mm").text(value);
|
1047 |
+
});
|
1048 |
+
}
|
1049 |
+
});
|
1050 |
+
jQuery("label#" + myu + "_mini_label_ss").click(function () {
|
1051 |
+
if (jQuery(this).children('input').length == 0) {
|
1052 |
+
var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1053 |
+
jQuery(this).html(ss);
|
1054 |
+
jQuery("input.ss").focus();
|
1055 |
+
jQuery("input.ss").blur(function () {
|
1056 |
+
var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
|
1057 |
+
var value = jQuery(this).val();
|
1058 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_ss").text(value);
|
1059 |
+
});
|
1060 |
+
}
|
1061 |
+
});
|
1062 |
+
jQuery("label#" + myu + "_mini_label_am_pm").click(function () {
|
1063 |
+
if (jQuery(this).children('input').length == 0) {
|
1064 |
+
var am_pm = "<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1065 |
+
jQuery(this).html(am_pm);
|
1066 |
+
jQuery("input.am_pm").focus();
|
1067 |
+
jQuery("input.am_pm").blur(function () {
|
1068 |
+
var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
|
1069 |
+
var value = jQuery(this).val();
|
1070 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_am_pm").text(value);
|
1071 |
+
});
|
1072 |
+
}
|
1073 |
+
});
|
1074 |
+
});
|
1075 |
+
}
|
1076 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_paypal_price") {
|
1077 |
+
var myu = t;
|
1078 |
+
jQuery(document).ready(function () {
|
1079 |
+
jQuery("#" + myu + "_mini_label_dollars").click(function () {
|
1080 |
+
if (jQuery(this).children('input').length == 0) {
|
1081 |
+
var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1082 |
+
jQuery(this).html(dollars);
|
1083 |
+
jQuery("input.dollars").focus();
|
1084 |
+
jQuery("input.dollars").blur(function () {
|
1085 |
+
var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
|
1086 |
+
var value = jQuery(this).val();
|
1087 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_dollars").text(value);
|
1088 |
+
});
|
1089 |
+
}
|
1090 |
+
});
|
1091 |
+
jQuery("label#" + myu + "_mini_label_cents").click(function () {
|
1092 |
+
if (jQuery(this).children('input').length == 0) {
|
1093 |
+
var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1094 |
+
jQuery(this).html(cents);
|
1095 |
+
jQuery("input.cents").focus();
|
1096 |
+
jQuery("input.cents").blur(function () {
|
1097 |
+
var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
|
1098 |
+
var value = jQuery(this).val();
|
1099 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_cents").text(value);
|
1100 |
+
});
|
1101 |
+
}
|
1102 |
+
});
|
1103 |
+
});
|
1104 |
+
}
|
1105 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_address") {
|
1106 |
+
var myu = t;
|
1107 |
+
jQuery(document).ready(function () {
|
1108 |
+
jQuery("label#" + myu + "_mini_label_street1").click(function () {
|
1109 |
+
if (jQuery(this).children('input').length == 0) {
|
1110 |
+
var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1111 |
+
jQuery(this).html(street1);
|
1112 |
+
jQuery("input.street1").focus();
|
1113 |
+
jQuery("input.street1").blur(function () {
|
1114 |
+
var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
|
1115 |
+
var value = jQuery(this).val();
|
1116 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_street1").text(value);
|
1117 |
+
});
|
1118 |
+
}
|
1119 |
+
});
|
1120 |
+
jQuery("label#" + myu + "_mini_label_street2").click(function () {
|
1121 |
+
if (jQuery(this).children('input').length == 0) {
|
1122 |
+
var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1123 |
+
jQuery(this).html(street2);
|
1124 |
+
jQuery("input.street2").focus();
|
1125 |
+
jQuery("input.street2").blur(function () {
|
1126 |
+
var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
|
1127 |
+
var value = jQuery(this).val();
|
1128 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_street2").text(value);
|
1129 |
+
});
|
1130 |
+
}
|
1131 |
+
});
|
1132 |
+
jQuery("label#" + myu + "_mini_label_city").click(function () {
|
1133 |
+
if (jQuery(this).children('input').length == 0) {
|
1134 |
+
var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1135 |
+
jQuery(this).html(city);
|
1136 |
+
jQuery("input.city").focus();
|
1137 |
+
jQuery("input.city").blur(function () {
|
1138 |
+
var id_for_blur = document.getElementById('city').parentNode.id.split('_');
|
1139 |
+
var value = jQuery(this).val();
|
1140 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_city").text(value);
|
1141 |
+
});
|
1142 |
+
}
|
1143 |
+
});
|
1144 |
+
jQuery("label#" + myu + "_mini_label_state").click(function () {
|
1145 |
+
if (jQuery(this).children('input').length == 0) {
|
1146 |
+
var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1147 |
+
jQuery(this).html(state);
|
1148 |
+
jQuery("input.state").focus();
|
1149 |
+
jQuery("input.state").blur(function () {
|
1150 |
+
var id_for_blur = document.getElementById('state').parentNode.id.split('_');
|
1151 |
+
var value = jQuery(this).val();
|
1152 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_state").text(value);
|
1153 |
+
});
|
1154 |
+
}
|
1155 |
+
});
|
1156 |
+
jQuery("label#" + myu + "_mini_label_postal").click(function () {
|
1157 |
+
if (jQuery(this).children('input').length == 0) {
|
1158 |
+
var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1159 |
+
jQuery(this).html(postal);
|
1160 |
+
jQuery("input.postal").focus();
|
1161 |
+
jQuery("input.postal").blur(function () {
|
1162 |
+
var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
|
1163 |
+
var value = jQuery(this).val();
|
1164 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_postal").text(value);
|
1165 |
+
});
|
1166 |
+
}
|
1167 |
+
});
|
1168 |
+
jQuery("label#" + myu + "_mini_label_country").click(function () {
|
1169 |
+
if (jQuery(this).children('input').length == 0) {
|
1170 |
+
var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1171 |
+
jQuery(this).html(country);
|
1172 |
+
jQuery("input.country").focus();
|
1173 |
+
jQuery("input.country").blur(function () {
|
1174 |
+
var id_for_blur = document.getElementById('country').parentNode.id.split('_');
|
1175 |
+
var value = jQuery(this).val();
|
1176 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_country").text(value);
|
1177 |
+
});
|
1178 |
+
}
|
1179 |
+
});
|
1180 |
+
});
|
1181 |
+
}
|
1182 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_scale_rating") {
|
1183 |
+
var myu = t;
|
1184 |
+
jQuery(document).ready(function () {
|
1185 |
+
jQuery("#" + myu + "_mini_label_worst").click(function () {
|
1186 |
+
if (jQuery(this).children('input').length == 0) {
|
1187 |
+
var worst = "<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
|
1188 |
+
jQuery(this).html(worst);
|
1189 |
+
jQuery("input.worst").focus();
|
1190 |
+
jQuery("input.worst").blur(function () {
|
1191 |
+
var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
|
1192 |
+
var value = jQuery(this).val();
|
1193 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_worst").text(value);
|
1194 |
+
});
|
1195 |
+
}
|
1196 |
+
});
|
1197 |
+
jQuery("label#" + myu + "_mini_label_best").click(function () {
|
1198 |
+
if (jQuery(this).children('input').length == 0) {
|
1199 |
+
var best = "<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
|
1200 |
+
jQuery(this).html(best);
|
1201 |
+
jQuery("input.best").focus();
|
1202 |
+
jQuery("input.best").blur(function () {
|
1203 |
+
var id_for_blur = document.getElementById('best').parentNode.id.split('_');
|
1204 |
+
var value = jQuery(this).val();
|
1205 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_best").text(value);
|
1206 |
+
});
|
1207 |
+
}
|
1208 |
+
});
|
1209 |
+
});
|
1210 |
+
}
|
1211 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_spinner") {
|
1212 |
+
var spinner_value = document.getElementById(t + "_elementform_id_temp").value;
|
1213 |
+
var spinner_min_value = document.getElementById(t + "_min_valueform_id_temp").value;
|
1214 |
+
var spinner_max_value = document.getElementById(t + "_max_valueform_id_temp").value;
|
1215 |
+
var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
|
1216 |
+
jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
|
1217 |
+
spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
|
1218 |
+
spinner.spinner("value", spinner_value);
|
1219 |
+
jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
|
1220 |
+
jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
|
1221 |
+
jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
|
1222 |
+
}
|
1223 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_slider") {
|
1224 |
+
var slider_value = document.getElementById(t + "_slider_valueform_id_temp").value;
|
1225 |
+
var slider_min_value = document.getElementById(t + "_slider_min_valueform_id_temp").value;
|
1226 |
+
var slider_max_value = document.getElementById(t + "_slider_max_valueform_id_temp").value;
|
1227 |
+
var slider_element_value = document.getElementById(t + "_element_valueform_id_temp");
|
1228 |
+
var slider_value_save = document.getElementById(t + "_slider_valueform_id_temp");
|
1229 |
+
jQuery("#" + t + "_elementform_id_temp")[0].slide = null;
|
1230 |
+
jQuery(function () {
|
1231 |
+
jQuery("#" + t + "_elementform_id_temp").slider({
|
1232 |
+
range:"min",
|
1233 |
+
value:eval(slider_value),
|
1234 |
+
min:eval(slider_min_value),
|
1235 |
+
max:eval(slider_max_value),
|
1236 |
+
slide:function (event, ui) {
|
1237 |
+
slider_element_value.innerHTML = "" + ui.value;
|
1238 |
+
slider_value_save.value = "" + ui.value;
|
1239 |
+
}
|
1240 |
+
});
|
1241 |
+
});
|
1242 |
+
}
|
1243 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_range") {
|
1244 |
+
var spinner_value0 = document.getElementById(t + "_elementform_id_temp0").value;
|
1245 |
+
var spinner_step = document.getElementById(t + "_range_stepform_id_temp").value;
|
1246 |
+
jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
|
1247 |
+
jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
|
1248 |
+
spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
|
1249 |
+
spinner0.spinner("value", spinner_value0);
|
1250 |
+
jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
|
1251 |
+
var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
|
1252 |
+
spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
|
1253 |
+
spinner1.spinner("value", spinner_value1);
|
1254 |
+
jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
|
1255 |
+
var myu = t;
|
1256 |
+
jQuery(document).ready(function () {
|
1257 |
+
jQuery("#" + myu + "_mini_label_from").click(function () {
|
1258 |
+
if (jQuery(this).children('input').length == 0) {
|
1259 |
+
var from = "<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
|
1260 |
+
jQuery(this).html(from);
|
1261 |
+
jQuery("input.from").focus();
|
1262 |
+
jQuery("input.from").blur(function () {
|
1263 |
+
var id_for_blur = document.getElementById('from').parentNode.id.split('_');
|
1264 |
+
var value = jQuery(this).val();
|
1265 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_from").text(value);
|
1266 |
+
});
|
1267 |
+
}
|
1268 |
+
});
|
1269 |
+
jQuery("label#" + myu + "_mini_label_to").click(function () {
|
1270 |
+
if (jQuery(this).children('input').length == 0) {
|
1271 |
+
var to = "<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
|
1272 |
+
jQuery(this).html(to);
|
1273 |
+
jQuery("input.to").focus();
|
1274 |
+
jQuery("input.to").blur(function () {
|
1275 |
+
var id_for_blur = document.getElementById('to').parentNode.id.split('_');
|
1276 |
+
var value = jQuery(this).val();
|
1277 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_to").text(value);
|
1278 |
+
});
|
1279 |
+
}
|
1280 |
+
});
|
1281 |
+
});
|
1282 |
+
}
|
1283 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_range") {
|
1284 |
+
var default_date_start = jQuery("#"+t+"_default_date_id_temp_start").val();
|
1285 |
+
var default_date_end = jQuery("#"+t+"_default_date_id_temp_end").val();
|
1286 |
+
var date_format = jQuery("#"+t+"_buttonform_id_temp").attr('format');
|
1287 |
+
|
1288 |
+
|
1289 |
+
|
1290 |
+
jQuery("#"+t+"_elementform_id_temp0").datepicker();
|
1291 |
+
jQuery("#"+t+"_elementform_id_temp1").datepicker();
|
1292 |
+
jQuery("#"+t+"_elementform_id_temp0").datepicker("option", "dateFormat", date_format);
|
1293 |
+
jQuery("#"+t+"_elementform_id_temp1").datepicker("option", "dateFormat", date_format);
|
1294 |
+
|
1295 |
+
|
1296 |
+
if(default_date_start =="today")
|
1297 |
+
jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", new Date());
|
1298 |
+
else if(default_date_start.indexOf("d") == -1 && default_date_start.indexOf("m") == -1 && default_date_start.indexOf("y") == -1 && default_date_start.indexOf("w") == -1){
|
1299 |
+
if(default_date_start !== "")
|
1300 |
+
default_date_start = jQuery.datepicker.formatDate(date_format, new Date(default_date_start));
|
1301 |
+
jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", default_date_start);
|
1302 |
+
}
|
1303 |
+
else
|
1304 |
+
jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", default_date_start);
|
1305 |
+
|
1306 |
+
|
1307 |
+
if(default_date_end =="today")
|
1308 |
+
jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", new Date());
|
1309 |
+
else if(default_date_end.indexOf("d") == -1 && default_date_end.indexOf("m") == -1 && default_date_end.indexOf("y") == -1 && default_date_end.indexOf("w") == -1){
|
1310 |
+
if(default_date_end !== "")
|
1311 |
+
default_date_end = jQuery.datepicker.formatDate(date_format, new Date(default_date_end));
|
1312 |
+
jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", default_date_end);
|
1313 |
+
}
|
1314 |
+
else
|
1315 |
+
jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", default_date_end);
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_new") {
|
1319 |
+
var default_date = jQuery("#"+t+"_default_date_id_temp").val();
|
1320 |
+
var date_format = jQuery("#"+t+"_buttonform_id_temp").attr('format');
|
1321 |
+
jQuery("#"+t+"_elementform_id_temp").datepicker();
|
1322 |
+
jQuery("#"+t+"_elementform_id_temp").datepicker("option", "dateFormat", date_format);
|
1323 |
+
|
1324 |
+
|
1325 |
+
if(default_date =="today")
|
1326 |
+
jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", new Date());
|
1327 |
+
else if(default_date.indexOf("d") == -1 && default_date.indexOf("m") == -1 && default_date.indexOf("y") == -1 && default_date.indexOf("w") == -1){
|
1328 |
+
if(default_date !== "")
|
1329 |
+
default_date = jQuery.datepicker.formatDate(date_format, new Date(default_date));
|
1330 |
+
jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", default_date);
|
1331 |
+
}
|
1332 |
+
else
|
1333 |
+
jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", default_date);
|
1334 |
+
|
1335 |
+
|
1336 |
+
|
1337 |
+
}
|
1338 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone_new") {
|
1339 |
+
|
1340 |
+
|
1341 |
+
jQuery("#"+t+"_elementform_id_temp").intlTelInput({
|
1342 |
+
nationalMode: false,
|
1343 |
+
preferredCountries: [ jQuery("#"+t+"_elementform_id_temp").attr("top-country") ],
|
1344 |
+
});
|
1345 |
+
jQuery("#"+t+"_elementform_id_temp").intlTelInput("setNumber", jQuery("#"+t+"_elementform_id_temp").val());
|
1346 |
+
|
1347 |
+
}
|
1348 |
+
}
|
1349 |
+
}
|
1350 |
+
|
1351 |
+
remove_whitespace(document.getElementById('take'));
|
1352 |
+
form_view = 1;
|
1353 |
+
form_view_count = 0;
|
1354 |
+
|
1355 |
+
for (i = 1; i <= 30; i++) {
|
1356 |
+
if (document.getElementById('form_id_tempform_view' + i)) {
|
1357 |
+
form_view_count++;
|
1358 |
+
form_view_max = i;
|
1359 |
+
tbody_img = document.createElement('div');
|
1360 |
+
tbody_img.setAttribute('id', 'form_id_tempform_view_img' + i);
|
1361 |
+
tbody_img.style.cssText = "float:right";
|
1362 |
+
tr_img = document.createElement('div');
|
1363 |
+
var img = document.createElement('img');
|
1364 |
+
img.setAttribute('src', '<?php echo WD_FM_URL; ?>/images/minus.png?ver=<?php echo WD_FM_VERSION; ?>');
|
1365 |
+
img.setAttribute('title', 'Show or hide the page');
|
1366 |
+
img.setAttribute("class", "page_toolbar");
|
1367 |
+
img.setAttribute('id', 'show_page_img_' + i);
|
1368 |
+
img.setAttribute('onClick', 'show_or_hide("' + i + '")');
|
1369 |
+
img.setAttribute("onmouseover", 'chnage_icons_src(this,"minus")');
|
1370 |
+
img.setAttribute("onmouseout", 'chnage_icons_src(this,"minus")');
|
1371 |
+
var img_X = document.createElement("img");
|
1372 |
+
img_X.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_delete.png?ver=<?php echo WD_FM_VERSION; ?>");
|
1373 |
+
img_X.setAttribute('title', 'Delete the page');
|
1374 |
+
img_X.setAttribute("class", "page_toolbar");
|
1375 |
+
img_X.setAttribute("onclick", 'remove_page("' + i + '")');
|
1376 |
+
img_X.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete")');
|
1377 |
+
img_X.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete")');
|
1378 |
+
var img_X_all = document.createElement("img");
|
1379 |
+
img_X_all.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_delete_all.png?ver=<?php echo WD_FM_VERSION; ?>");
|
1380 |
+
img_X_all.setAttribute('title', 'Delete the page with fields');
|
1381 |
+
img_X_all.setAttribute("class", "page_toolbar");
|
1382 |
+
img_X_all.setAttribute("onclick", 'remove_page_all("' + i + '")');
|
1383 |
+
img_X_all.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete_all")');
|
1384 |
+
img_X_all.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete_all")');
|
1385 |
+
var img_EDIT = document.createElement("img");
|
1386 |
+
img_EDIT.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_edit.png?ver=<?php echo WD_FM_VERSION; ?>");
|
1387 |
+
img_EDIT.setAttribute('title', 'Edit the page');
|
1388 |
+
img_EDIT.setAttribute("class", "page_toolbar");
|
1389 |
+
img_EDIT.setAttribute("onclick", 'edit_page_break("' + i + '")');
|
1390 |
+
img_EDIT.setAttribute("onmouseover", 'chnage_icons_src(this,"page_edit")');
|
1391 |
+
img_EDIT.setAttribute("onmouseout", 'chnage_icons_src(this,"page_edit")');
|
1392 |
+
tr_img.appendChild(img);
|
1393 |
+
tr_img.appendChild(img_X);
|
1394 |
+
tr_img.appendChild(img_X_all);
|
1395 |
+
tr_img.appendChild(img_EDIT);
|
1396 |
+
tbody_img.appendChild(tr_img);
|
1397 |
+
document.getElementById('form_id_tempform_view' + i).parentNode.appendChild(tbody_img);
|
1398 |
+
}
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
if (form_view_count > 1) {
|
1402 |
+
for (i = 1; i <= form_view_max; i++) {
|
1403 |
+
if (document.getElementById('form_id_tempform_view' + i)) {
|
1404 |
+
first_form_view = i;
|
1405 |
+
break;
|
1406 |
+
}
|
1407 |
+
}
|
1408 |
+
form_view = form_view_max;
|
1409 |
+
need_enable = false;
|
1410 |
+
generate_page_nav(first_form_view);
|
1411 |
+
var img_EDIT = document.createElement("img");
|
1412 |
+
img_EDIT.setAttribute("src", "<?php echo WD_FM_URL . '/images/edit.png?ver='.WD_FM_VERSION; ?>");
|
1413 |
+
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
1414 |
+
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
1415 |
+
var td_EDIT = document.getElementById("edit_page_navigation");
|
1416 |
+
td_EDIT.appendChild(img_EDIT);
|
1417 |
+
document.getElementById('page_navigation').appendChild(td_EDIT);
|
1418 |
+
}
|
1419 |
+
document.getElementById('araqel').value = 1;
|
1420 |
+
}
|
1421 |
+
jQuery(window).load(function () {
|
1422 |
+
formOnload();
|
1423 |
+
});
|
1424 |
+
jQuery(function() {
|
1425 |
+
jQuery('.wdform_section .wdform_column:last-child').each(function() {
|
1426 |
+
jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
|
1427 |
+
});
|
1428 |
+
|
1429 |
+
sortable_columns();
|
1430 |
+
if(<?php echo $row->sortable ?>==1) {
|
1431 |
+
jQuery( ".wdform_arrows" ).hide();
|
1432 |
+
all_sortable_events();
|
1433 |
+
}
|
1434 |
+
else
|
1435 |
+
jQuery('.wdform_column').sortable( "disable" );
|
1436 |
+
|
1437 |
+
});
|
1438 |
+
<?php
|
1439 |
+
} else { ?>
|
1440 |
+
jQuery(function() {
|
1441 |
+
jQuery('.wdform_section .wdform_column:last-child').each(function() {
|
1442 |
+
jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
|
1443 |
+
});
|
1444 |
+
sortable_columns();
|
1445 |
+
all_sortable_events();
|
1446 |
+
});
|
1447 |
+
<?php } ?>
|
1448 |
+
</script>
|
1449 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
1450 |
+
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
|
1451 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
1452 |
+
<input type="hidden" id="task" name="task" value=""/>
|
1453 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
1454 |
+
</form>
|
1455 |
+
<?php
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
public function form_options($id) {
|
1459 |
+
$addons = array('WD_FM_MAILCHIMP' => 'MailChimp', 'WD_FM_REG' => 'Registration', 'WD_FM_POST_GEN' => 'Post Generation', 'WD_FM_EMAIL_COND' => 'Conditional Emails', 'WD_FM_DBOX_INT' => 'Dropbox Integration', 'WD_FM_GDRIVE_INT' => 'Google Drive Integration','WD_FM_PDF' => 'PDF Integration', 'WD_FM_PUSHOVER' => 'Pushover', 'WD_FM_SAVE_PROG' => 'Save Form Progress', 'WD_FM_CALCULATOR' => 'Calculator');
|
1460 |
+
|
1461 |
+
$row = $this->model->get_row_data($id);
|
1462 |
+
$themes = $this->model->get_theme_rows_data();
|
1463 |
+
global $wpdb;
|
1464 |
+
$default_theme = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes where `default`=1');
|
1465 |
+
$queries = $this->model->get_queries_rows_data($id);
|
1466 |
+
$userGroups = get_editable_roles();
|
1467 |
+
$page_title = $row->title . ' form options';
|
1468 |
+
$label_id = array();
|
1469 |
+
$label_label = array();
|
1470 |
+
$label_type = array();
|
1471 |
+
$label_all = explode('#****#', $row->label_order_current);
|
1472 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
1473 |
+
foreach ($label_all as $key => $label_each) {
|
1474 |
+
$label_id_each = explode('#**id**#', $label_each);
|
1475 |
+
array_push($label_id, $label_id_each[0]);
|
1476 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
1477 |
+
array_push($label_label, $label_order_each[0]);
|
1478 |
+
array_push($label_type, $label_order_each[1]);
|
1479 |
+
}
|
1480 |
+
$fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
|
1481 |
+
$fields_count = count($fields);
|
1482 |
+
$is_addon_stripe_active = (defined('WD_FM_STRIPE') && is_plugin_active(constant('WD_FM_STRIPE')));
|
1483 |
+
$payment_method = $row->paypal_mode ? 'paypal' : 'none';
|
1484 |
+
if ($is_addon_stripe_active) {
|
1485 |
+
require_once (WD_FM_STRIPE_DIR . '/controller.php');
|
1486 |
+
$stripe_enable = (int) WD_FM_STRIPE_controller::stripe_enable($id);
|
1487 |
+
$payment_method = $stripe_enable ? 'stripe' : $payment_method;
|
1488 |
+
}
|
1489 |
+
?>
|
1490 |
+
<script>
|
1491 |
+
gen = "<?php echo $row->counter; ?>";
|
1492 |
+
default_theme = "<?php echo $default_theme; ?>";
|
1493 |
+
form_view_max = 20;
|
1494 |
+
function set_preview() {
|
1495 |
+
theme_id = jQuery('#theme').val() == '0' ? default_theme : jQuery('#theme').val();
|
1496 |
+
jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'form_preview' => 1), admin_url('admin-ajax.php')); ?>&test_theme=" + theme_id + "&width=1000&height=500&TB_iframe=1'); return false;");
|
1497 |
+
jQuery("#edit_css").attr("onclick", "window.open('<?php echo add_query_arg(array('nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>¤t_id=" + theme_id + "'); return false;");
|
1498 |
+
if (jQuery('#theme option:selected').attr('data-version') == 1) {
|
1499 |
+
jQuery("#old_theme_notice").show();
|
1500 |
+
}
|
1501 |
+
else {
|
1502 |
+
jQuery("#old_theme_notice").hide();
|
1503 |
+
}
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
function set_condition() {
|
1507 |
+
field_condition = '';
|
1508 |
+
for(i=0;i<500;i++) {
|
1509 |
+
conditions = '';
|
1510 |
+
if(document.getElementById("condition"+i)) {
|
1511 |
+
field_condition+=document.getElementById("show_hide"+i).value+"*:*show_hide*:*";
|
1512 |
+
field_condition+=document.getElementById("fields"+i).value+"*:*field_label*:*";
|
1513 |
+
field_condition+=document.getElementById("all_any"+i).value+"*:*all_any*:*";
|
1514 |
+
for(k=0;k<500;k++) {
|
1515 |
+
if(document.getElementById("condition_div"+i+"_"+k)) {
|
1516 |
+
conditions+=document.getElementById("field_labels"+i+"_"+k).value+"***";
|
1517 |
+
conditions+=document.getElementById("is_select"+i+"_"+k).value+"***";
|
1518 |
+
if(document.getElementById("field_value"+i+"_"+k).tagName=="SELECT" ) {
|
1519 |
+
if(document.getElementById("field_value"+i+"_"+k).getAttribute('multiple')) {
|
1520 |
+
var sel = document.getElementById("field_value"+i+"_"+k);
|
1521 |
+
var selValues = '';
|
1522 |
+
for(m=0; m < sel.length; m++) {
|
1523 |
+
if(sel.options[m].selected)
|
1524 |
+
|
1525 |
+
selValues += sel.options[m].value+"@@@";
|
1526 |
+
}
|
1527 |
+
conditions+=selValues;
|
1528 |
+
} else {
|
1529 |
+
conditions+=document.getElementById("field_value"+i+"_"+k).value;
|
1530 |
+
}
|
1531 |
+
}
|
1532 |
+
else
|
1533 |
+
conditions+=document.getElementById("field_value"+i+"_"+k).value;
|
1534 |
+
conditions+="*:*next_condition*:*";
|
1535 |
+
}
|
1536 |
+
}
|
1537 |
+
field_condition+=conditions;
|
1538 |
+
field_condition+="*:*new_condition*:*";
|
1539 |
+
}
|
1540 |
+
}
|
1541 |
+
document.getElementById('condition').value = field_condition;
|
1542 |
+
}
|
1543 |
+
|
1544 |
+
function show_verify_options(s){
|
1545 |
+
if(s){
|
1546 |
+
jQuery(".verification_div").removeAttr( "style" );
|
1547 |
+
jQuery(".expire_link").removeAttr( "style" );
|
1548 |
+
|
1549 |
+
} else{
|
1550 |
+
jQuery(".verification_div").css( 'display', 'none' );
|
1551 |
+
jQuery(".expire_link").css( 'display', 'none' );
|
1552 |
+
}
|
1553 |
+
}
|
1554 |
+
</script>
|
1555 |
+
<style>
|
1556 |
+
.CodeMirror {
|
1557 |
+
border: 1px solid #ccc;
|
1558 |
+
font-size: 12px;
|
1559 |
+
margin-bottom: 6px;
|
1560 |
+
background: white;
|
1561 |
+
}
|
1562 |
+
</style>
|
1563 |
+
<form class="wrap" method="post" action="admin.php?page=manage_fm" name="adminForm" id="adminForm">
|
1564 |
+
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
1565 |
+
<div class="fm-page-header">
|
1566 |
+
<div class="fm-page-title" style="width: inherit;">
|
1567 |
+
<?php echo $page_title; ?>
|
1568 |
+
</div>
|
1569 |
+
<div class="fm-page-actions">
|
1570 |
+
<button class="fm-button save-button medium" onclick="if (fm_check_email('mailToAdd') ||fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_user') || fm_check_email('reply_to_user') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email') || check_stripe_required_fields() || check_calculator_required_fields()) {return false;}; wd_fm_apply_options('save_options');">
|
1571 |
+
<span></span>
|
1572 |
+
Save
|
1573 |
+
</button>
|
1574 |
+
<button class="fm-button apply-button medium" onclick="if (fm_check_email('mailToAdd') || fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_user') || fm_check_email('reply_to_user') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email') || check_stripe_required_fields() || check_calculator_required_fields()) {return false;}; wd_fm_apply_options('apply_options');">
|
1575 |
+
<span></span>
|
1576 |
+
Apply
|
1577 |
+
</button>
|
1578 |
+
<button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel_options');">
|
1579 |
+
<span></span>
|
1580 |
+
Cancel
|
1581 |
+
</button>
|
1582 |
+
</div>
|
1583 |
+
<div class="fm-clear"></div>
|
1584 |
+
</div>
|
1585 |
+
<div class="fm-form-options">
|
1586 |
+
<div class="submenu-box">
|
1587 |
+
<div class="submenu-pad">
|
1588 |
+
<ul id="submenu" class="configuration">
|
1589 |
+
<li>
|
1590 |
+
<a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#">General Options</a>
|
1591 |
+
</li>
|
1592 |
+
<li>
|
1593 |
+
<a id="email" class="fm_fieldset_tab" onclick="form_maker_options_tabs('email')" href="#">Email Options</a>
|
1594 |
+
</li>
|
1595 |
+
<li>
|
1596 |
+
<a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#">Actions after Submission</a>
|
1597 |
+
</li>
|
1598 |
+
<li>
|
1599 |
+
<a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#">Payment Options</a>
|
1600 |
+
</li>
|
1601 |
+
<li>
|
1602 |
+
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript'); codemirror_for_javascript();" href="#">JavaScript</a>
|
1603 |
+
</li>
|
1604 |
+
<li>
|
1605 |
+
<a id="conditions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('conditions')" href="#">Conditional Fields</a>
|
1606 |
+
</li>
|
1607 |
+
<li>
|
1608 |
+
<a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#" >MySQL Mapping</a>
|
1609 |
+
</li>
|
1610 |
+
<?php
|
1611 |
+
foreach($addons as $addon => $addon_name) {
|
1612 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
1613 |
+
?>
|
1614 |
+
<li>
|
1615 |
+
<a id="<?php echo $addon;?>" class="fm_fieldset_tab" onclick="form_maker_options_tabs('<?php echo $addon;?>')" href="#" ><?php echo $addon_name;?></a>
|
1616 |
+
</li>
|
1617 |
+
<?php
|
1618 |
+
}
|
1619 |
+
}
|
1620 |
+
?>
|
1621 |
+
</ul>
|
1622 |
+
</div>
|
1623 |
+
</div>
|
1624 |
+
<fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
|
1625 |
+
<legend>General Options</legend>
|
1626 |
+
<table class="admintable" style="float: left;">
|
1627 |
+
<tr valign="top">
|
1628 |
+
<td class="fm_options_label">
|
1629 |
+
<label>Published</label>
|
1630 |
+
</td>
|
1631 |
+
<td class="fm_options_value">
|
1632 |
+
<button class="fm-checkbox-radio-button <?php echo $row->published == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->published; ?>">
|
1633 |
+
<span></span>
|
1634 |
+
</button>
|
1635 |
+
<input type="hidden" name="published" value="<?php echo $row->published; ?>"/>
|
1636 |
+
</td>
|
1637 |
+
</tr>
|
1638 |
+
<tr valign="top">
|
1639 |
+
<td class="fm_options_label">
|
1640 |
+
<label>Save data(to database)</label>
|
1641 |
+
</td>
|
1642 |
+
<td class="fm_options_value">
|
1643 |
+
<button class="fm-checkbox-radio-button <?php echo $row->savedb == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->savedb; ?>">
|
1644 |
+
<span></span>
|
1645 |
+
</button>
|
1646 |
+
<input type="hidden" name="savedb" value="<?php echo $row->savedb; ?>"/>
|
1647 |
+
</td>
|
1648 |
+
</tr>
|
1649 |
+
<tr valign="top">
|
1650 |
+
<td class="fm_options_label">
|
1651 |
+
<label for="theme">Theme</label>
|
1652 |
+
</td>
|
1653 |
+
<td class="fm_options_value">
|
1654 |
+
<select id="theme" name="theme" onChange="set_preview()">
|
1655 |
+
<optgroup label="New Themes">
|
1656 |
+
<option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2">Inherit From Website Theme</option>
|
1657 |
+
<?php
|
1658 |
+
$optiongroup = true;
|
1659 |
+
foreach ($themes as $theme) {
|
1660 |
+
if ($optiongroup && $theme->version == 1) {
|
1661 |
+
$optiongroup = false;
|
1662 |
+
?>
|
1663 |
+
</optgroup>
|
1664 |
+
<optgroup label="Outdated Themes">
|
1665 |
+
<?php
|
1666 |
+
}
|
1667 |
+
?>
|
1668 |
+
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
|
1669 |
+
<?php
|
1670 |
+
}
|
1671 |
+
?>
|
1672 |
+
</optgroup>
|
1673 |
+
</select>
|
1674 |
+
<button id="preview_form" class="fm-button preview-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'form_preview' => 1, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
1675 |
+
<span></span>
|
1676 |
+
Preview
|
1677 |
+
</button>
|
1678 |
+
<button id="edit_css" class="fm-button options-edit-button medium" onclick="window.open('<?php echo add_query_arg(array('current_id' => ($row->theme && $row->theme != '0' ? $row->theme : $default_theme), 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>'); return false;">
|
1679 |
+
<span></span>
|
1680 |
+
Edit
|
1681 |
+
</button>
|
1682 |
+
<div id="old_theme_notice" class="wd_error" style="display: none;">The theme you have selected is outdated. Please choose one from New Themes section.</div>
|
1683 |
+
</td>
|
1684 |
+
</tr>
|
1685 |
+
<tr valign="top">
|
1686 |
+
<td class="fm_options_label">
|
1687 |
+
<label for="requiredmark">Required fields mark</label>
|
1688 |
+
</td>
|
1689 |
+
<td class="fm_options_value">
|
1690 |
+
<input type="text" id="requiredmark" name="requiredmark" value="<?php echo $row->requiredmark; ?>" style="width:250px;" />
|
1691 |
+
</td>
|
1692 |
+
</tr>
|
1693 |
+
<tr valign="top">
|
1694 |
+
<td class="fm_options_label">
|
1695 |
+
<label>Save Uploads</label>
|
1696 |
+
</td>
|
1697 |
+
<td class="fm_options_value">
|
1698 |
+
<button class="fm-checkbox-radio-button <?php echo $row->save_uploads == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->save_uploads; ?>">
|
1699 |
+
<span></span>
|
1700 |
+
</button>
|
1701 |
+
<input type="hidden" name="save_uploads" value="<?php echo $row->save_uploads; ?>"/>
|
1702 |
+
</td>
|
1703 |
+
</tr>
|
1704 |
+
</table>
|
1705 |
+
<br/>
|
1706 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">Front end submissions are disabled in free version.</div>
|
1707 |
+
<fieldset class="adminform">
|
1708 |
+
<legend>Front end submissions access level</legend>
|
1709 |
+
<table>
|
1710 |
+
<tr>
|
1711 |
+
<td class="key">
|
1712 |
+
<label for="name">Allow User to see submissions:</label>
|
1713 |
+
</td>
|
1714 |
+
<td>
|
1715 |
+
<?php
|
1716 |
+
$checked_UserGroup=explode(',',$row->user_id_wd);
|
1717 |
+
$i = 0;
|
1718 |
+
foreach($userGroups as $val => $uG) {
|
1719 |
+
echo '<input type="checkbox" value="'.$val .'" id="user_'.$i.'"';
|
1720 |
+
if(in_array($val ,$checked_UserGroup))
|
1721 |
+
echo 'checked="checked"';
|
1722 |
+
echo 'onchange="acces_level('.count($userGroups).')" disabled/><label for="user_'.$i.'">'.$uG["name"].'</label><br>';
|
1723 |
+
$i++;
|
1724 |
+
}
|
1725 |
+
?>
|
1726 |
+
<input type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo (in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?> disabled/><label for="user_<?php echo $i; ?>">Guest</label>
|
1727 |
+
<input type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
|
1728 |
+
</td>
|
1729 |
+
</tr>
|
1730 |
+
</table>
|
1731 |
+
</fieldset>
|
1732 |
+
<?php
|
1733 |
+
$labels_for_submissions = $this->model->get_labels($id);
|
1734 |
+
$payment_info = $this->model->is_paypal($id);
|
1735 |
+
$labels_id_for_submissions= array();
|
1736 |
+
$label_titles_for_submissions=array();
|
1737 |
+
$labels_type_for_submissions= array();
|
1738 |
+
if($labels_for_submissions) {
|
1739 |
+
$label_id_for_submissions= array();
|
1740 |
+
$label_order_original_for_submissions= array();
|
1741 |
+
$label_type_for_submissions= array();
|
1742 |
+
|
1743 |
+
if(strpos($row->label_order, 'type_paypal_')) {
|
1744 |
+
$row->label_order=$row->label_order."item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
$label_all_for_submissions = explode('#****#',$row->label_order);
|
1748 |
+
$label_all_for_submissions = array_slice($label_all_for_submissions,0, count($label_all_for_submissions)-1);
|
1749 |
+
foreach($label_all_for_submissions as $key => $label_each) {
|
1750 |
+
$label_id_each=explode('#**id**#',$label_each);
|
1751 |
+
array_push($label_id_for_submissions, $label_id_each[0]);
|
1752 |
+
$label_order_each=explode('#**label**#', $label_id_each[1]);
|
1753 |
+
array_push($label_order_original_for_submissions, $label_order_each[0]);
|
1754 |
+
array_push($label_type_for_submissions, $label_order_each[1]);
|
1755 |
+
}
|
1756 |
+
|
1757 |
+
foreach($label_id_for_submissions as $key => $label) {
|
1758 |
+
if(in_array($label, $labels_for_submissions)) {
|
1759 |
+
array_push($labels_type_for_submissions, $label_type_for_submissions[$key]);
|
1760 |
+
array_push($labels_id_for_submissions, $label);
|
1761 |
+
array_push($label_titles_for_submissions, $label_order_original_for_submissions[$key]);
|
1762 |
+
}
|
1763 |
+
}
|
1764 |
+
}
|
1765 |
+
|
1766 |
+
$stats_labels = array();
|
1767 |
+
$stats_labels_ids = array();
|
1768 |
+
foreach($labels_type_for_submissions as $key => $label_type_cur) {
|
1769 |
+
if($label_type_cur=="type_checkbox" || $label_type_cur=="type_radio" || $label_type_cur=="type_own_select" || $label_type_cur=="type_country" || $label_type_cur=="type_paypal_select" || $label_type_cur=="type_paypal_radio" || $label_type_cur=="type_paypal_checkbox" || $label_type_cur=="type_paypal_shipping") {
|
1770 |
+
$stats_labels_ids[] = $labels_id_for_submissions[$key];
|
1771 |
+
$stats_labels[] = $label_titles_for_submissions[$key];
|
1772 |
+
}
|
1773 |
+
}
|
1774 |
+
?>
|
1775 |
+
<script type="text/javascript">
|
1776 |
+
function inArray(needle, myarray) {
|
1777 |
+
var length = myarray.length;
|
1778 |
+
for(var i = 0; i < length; i++) {
|
1779 |
+
if(myarray[i] == needle) return true;
|
1780 |
+
}
|
1781 |
+
return false;
|
1782 |
+
}
|
1783 |
+
|
1784 |
+
function checked_labels(class_name) {
|
1785 |
+
var checked_ids ='';
|
1786 |
+
jQuery('.'+class_name).each(function() {
|
1787 |
+
if(this.checked) {
|
1788 |
+
checked_ids += this.value+',';
|
1789 |
+
}
|
1790 |
+
});
|
1791 |
+
|
1792 |
+
if(class_name == 'filed_label') {
|
1793 |
+
document.getElementById("frontend_submit_fields").value = checked_ids ;
|
1794 |
+
if(checked_ids == document.getElementById("all_fields").value)
|
1795 |
+
document.getElementById("all_fields").checked = true;
|
1796 |
+
else
|
1797 |
+
document.getElementById("all_fields").checked = false;
|
1798 |
+
}
|
1799 |
+
else {
|
1800 |
+
document.getElementById("frontend_submit_stat_fields").value = checked_ids ;
|
1801 |
+
if(checked_ids == document.getElementById("all_stats_fields").value)
|
1802 |
+
document.getElementById("all_stats_fields").checked = true;
|
1803 |
+
else
|
1804 |
+
document.getElementById("all_stats_fields").checked = false;
|
1805 |
+
}
|
1806 |
+
}
|
1807 |
+
|
1808 |
+
jQuery(document).ready(function () {
|
1809 |
+
jQuery('.filed_label').each(function() {
|
1810 |
+
if(document.getElementById("frontend_submit_fields").value == document.getElementById("all_fields").value)
|
1811 |
+
document.getElementById("all_fields").checked = true;
|
1812 |
+
if(inArray(this.value, document.getElementById("frontend_submit_fields").value.split(","))) {
|
1813 |
+
this.checked = true;
|
1814 |
+
}
|
1815 |
+
});
|
1816 |
+
|
1817 |
+
jQuery('.stats_filed_label').each(function() {
|
1818 |
+
if(document.getElementById("frontend_submit_stat_fields").value == document.getElementById("all_stats_fields").value)
|
1819 |
+
document.getElementById("all_stats_fields").checked = true;
|
1820 |
+
if(inArray(this.value, document.getElementById("frontend_submit_stat_fields").value.split(","))) {
|
1821 |
+
this.checked = true;
|
1822 |
+
}
|
1823 |
+
});
|
1824 |
+
|
1825 |
+
jQuery(document).on('change','input[name="all_fields"]',function() {
|
1826 |
+
jQuery('.filed_label').prop("checked" , this.checked);
|
1827 |
+
});
|
1828 |
+
|
1829 |
+
jQuery(document).on('change','input[name="all_stats_fields"]',function() {
|
1830 |
+
jQuery('.stats_filed_label').prop("checked" , this.checked);
|
1831 |
+
});
|
1832 |
+
set_preview();
|
1833 |
+
});
|
1834 |
+
</script>
|
1835 |
+
<style>
|
1836 |
+
li{
|
1837 |
+
list-style-type: none;
|
1838 |
+
}
|
1839 |
+
|
1840 |
+
.simple_table {
|
1841 |
+
padding-left: 0px !important;
|
1842 |
+
}
|
1843 |
+
|
1844 |
+
.simple_table input, .simple_table label, .simple_table img {
|
1845 |
+
display:inline-block !important;
|
1846 |
+
float:none !important;
|
1847 |
+
}
|
1848 |
+
</style>
|
1849 |
+
<fieldset class="adminform">
|
1850 |
+
<legend>Fields to hide in frontend submissions</legend>
|
1851 |
+
<?php if(count($label_titles_for_submissions)): ?>
|
1852 |
+
<table style="margin-left:-3px;">
|
1853 |
+
<tr>
|
1854 |
+
<td>
|
1855 |
+
<label>Select fields:</label>
|
1856 |
+
</td>
|
1857 |
+
<td class="simple_table">
|
1858 |
+
<ul id="form_fields">
|
1859 |
+
<li>
|
1860 |
+
<input type="checkbox" name="all_fields" id="all_fields" value="submit_id,<?php echo implode(',',$labels_id_for_submissions)."," . ($payment_info ? "payment_info" : ""); ?>" onclick="checked_labels('filed_label')"/>
|
1861 |
+
<label for="all_fields">Select All</label>
|
1862 |
+
</li>
|
1863 |
+
<?php
|
1864 |
+
echo "<li><input type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"submit_id\">ID</label></li>";
|
1865 |
+
|
1866 |
+
for($i=0, $n=count($label_titles_for_submissions); $i < $n ; $i++)
|
1867 |
+
{
|
1868 |
+
$field_label = $label_titles_for_submissions[$i];
|
1869 |
+
|
1870 |
+
echo "<li><input type=\"checkbox\" id=\"filed_label".$i."\" name=\"filed_label".$i."\" value=\"".$labels_id_for_submissions[$i]."\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"filed_label".$i."\">".(strlen($field_label) > 80 ? substr ($field_label ,0, 80).'...' : $field_label)."</label></li>";
|
1871 |
+
|
1872 |
+
}
|
1873 |
+
if($payment_info)
|
1874 |
+
echo "<li><input type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"payment_info\">Payment Info</label></li>";
|
1875 |
+
?>
|
1876 |
+
</ul>
|
1877 |
+
<input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
|
1878 |
+
</td>
|
1879 |
+
</tr>
|
1880 |
+
<?php if($stats_labels): ?>
|
1881 |
+
<tr id="stats">
|
1882 |
+
<td>
|
1883 |
+
<label>Stats fields:</label>
|
1884 |
+
</td>
|
1885 |
+
<td class="simple_table">
|
1886 |
+
<ul id="stats_fields">
|
1887 |
+
<li>
|
1888 |
+
<input type="checkbox" name="all_stats_fields" id="all_stats_fields" value="<?php echo implode(',',$stats_labels_ids).","; ?>" onclick="checked_labels('stats_filed_label')">
|
1889 |
+
<label for="all_stats_fields">Select All</label>
|
1890 |
+
</li>
|
1891 |
+
<?php
|
1892 |
+
for($i=0, $n=count($stats_labels); $i < $n ; $i++)
|
1893 |
+
{
|
1894 |
+
$field_label = $stats_labels[$i];
|
1895 |
+
echo "<li><input type=\"checkbox\" id=\"stats_filed_label".$i."\" name=\"stats_filed_label".$i."\" value=\"".$stats_labels_ids[$i]."\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\" ><label for=\"stats_filed_label".$i."\">".(strlen($field_label) > 80 ? substr ($field_label ,0, 80).'...' : $field_label)."</label></li>";
|
1896 |
+
}
|
1897 |
+
?>
|
1898 |
+
</ul>
|
1899 |
+
<input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
|
1900 |
+
</td>
|
1901 |
+
</tr>
|
1902 |
+
<?php endif; ?>
|
1903 |
+
</table>
|
1904 |
+
<?php endif; ?>
|
1905 |
+
</fieldset>
|
1906 |
+
</fieldset>
|
1907 |
+
<fieldset id="email_fieldset" class="adminform fm_fieldset_deactive">
|
1908 |
+
<legend>Email Options</legend>
|
1909 |
+
<table class="admintable">
|
1910 |
+
<tr valign="top">
|
1911 |
+
<td style="width: 75px; vertical-align: middle;">
|
1912 |
+
<label>Send E-mail</label>
|
1913 |
+
</td>
|
1914 |
+
<td style="padding: 15px;">
|
1915 |
+
<button class="fm-checkbox-radio-button <?php echo $row->sendemail == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->sendemail; ?>">
|
1916 |
+
<span></span>
|
1917 |
+
</button>
|
1918 |
+
<input type="hidden" name="sendemail" value="<?php echo $row->sendemail; ?>"/>
|
1919 |
+
</td>
|
1920 |
+
</tr>
|
1921 |
+
</table>
|
1922 |
+
<fieldset class="adminform fm_mail_options">
|
1923 |
+
<legend>Email to Administrator</legend>
|
1924 |
+
<table class="admintable">
|
1925 |
+
<tr valign="top">
|
1926 |
+
<td class="fm_options_label">
|
1927 |
+
<label for="mailToAdd">Email to send submissions to</label>
|
1928 |
+
</td>
|
1929 |
+
<td class="fm_options_value">
|
1930 |
+
<input type="text" id="mailToAdd" name="mailToAdd" style="width: 250px;" />
|
1931 |
+
<input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
|
1932 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png?ver='. WD_FM_VERSION; ?>" style="vertical-align: middle; cursor: pointer;" title="Add more emails" onclick="if (fm_check_email('mailToAdd')) {return false;};cfm_create_input('mail', 'mailToAdd', 'cfm_mail_div', '<?php echo WD_FM_URL; ?>')" />
|
1933 |
+
<div id="cfm_mail_div">
|
1934 |
+
<?php
|
1935 |
+
$mail_array = explode(',', $row->mail);
|
1936 |
+
foreach ($mail_array as $mail) {
|
1937 |
+
if ($mail && $mail != ',') {
|
1938 |
+
?>
|
1939 |
+
<div class="fm_mail_input">
|
1940 |
+
<?php echo $mail; ?>
|
1941 |
+
<img src="<?php echo WD_FM_URL; ?>/images/delete.png?ver=<?php echo WD_FM_VERSION; ?>" class="fm_delete_img" onclick="fm_delete_mail(this, '<?php echo $mail; ?>')" title="Delete Email" />
|
1942 |
+
</div>
|
1943 |
+
<?php
|
1944 |
+
}
|
1945 |
+
}
|
1946 |
+
?>
|
1947 |
+
</div>
|
1948 |
+
</td>
|
1949 |
+
</tr>
|
1950 |
+
<tr valign="top">
|
1951 |
+
<td class="fm_options_label">
|
1952 |
+
<label for="from_mail">Email From</label>
|
1953 |
+
</td>
|
1954 |
+
<td class="fm_options_value">
|
1955 |
+
<?php
|
1956 |
+
$is_other = TRUE;
|
1957 |
+
for ($i = 0; $i < $fields_count - 1; $i++) {
|
1958 |
+
?>
|
1959 |
+
<div>
|
1960 |
+
<input type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->from_mail ? 'checked="checked"' : '' ); ?> onclick="wdhide('mail_from_other')" />
|
1961 |
+
<label for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
1962 |
+
</div>
|
1963 |
+
<?php
|
1964 |
+
if(!is_numeric($fields[$i])) {
|
1965 |
+
if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail) {
|
1966 |
+
$is_other = FALSE;
|
1967 |
+
}
|
1968 |
+
}
|
1969 |
+
else {
|
1970 |
+
if($fields[$i] == $row->from_mail)
|
1971 |
+
$is_other=false;
|
1972 |
+
}
|
1973 |
+
}
|
1974 |
+
?>
|
1975 |
+
<div style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>">
|
1976 |
+
<input type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other')" />
|
1977 |
+
<label for="other">Other</label>
|
1978 |
+
</div>
|
1979 |
+
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px' ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other" name="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
|
1980 |
+
</td>
|
1981 |
+
</tr>
|
1982 |
+
<tr valign="top">
|
1983 |
+
<td class="fm_options_label">
|
1984 |
+
<label for="from_name">From Name</label>
|
1985 |
+
</td>
|
1986 |
+
<td class="fm_options_value">
|
1987 |
+
<input type="text" id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width: 250px;" />
|
1988 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png?ver='. WD_FM_VERSION.''; ?>" onclick="document.getElementById('mail_from_labels').style.display='block';" style="vertical-align: middle; cursor: pointer;display:inline-block; margin:0px; float:none;">
|
1989 |
+
<?php
|
1990 |
+
$choise = "document.getElementById('from_name')";
|
1991 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_from_labels" class="email_labels" style="display:none;">';
|
1992 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
1993 |
+
for($i=0; $i<count($label_label); $i++) {
|
1994 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
1995 |
+
continue;
|
1996 |
+
|
1997 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
1998 |
+
$fld_label = $param;
|
1999 |
+
if(strlen($fld_label)>30) {
|
2000 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2001 |
+
$fld_label = explode("\n", $fld_label);
|
2002 |
+
$fld_label = $fld_label[0] . ' ...';
|
2003 |
+
}
|
2004 |
+
|
2005 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
2006 |
+
}
|
2007 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
2008 |
+
|
2009 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
2010 |
+
echo '</div></div>';
|
2011 |
+
?>
|
2012 |
+
</td>
|
2013 |
+
</tr>
|
2014 |
+
<tr valign="top">
|
2015 |
+
<td class="fm_options_label">
|
2016 |
+
<label for="reply_to">Reply to<br/>(if different from "Email From") </label>
|
2017 |
+
</td>
|
2018 |
+
<td class="fm_options_value">
|
2019 |
+
<?php
|
2020 |
+
$is_other = TRUE;
|
2021 |
+
for ($i = 0; $i < $fields_count - 1; $i++) {
|
2022 |
+
?>
|
2023 |
+
<div>
|
2024 |
+
<input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->reply_to ? 'checked="checked"' : '' ); ?> onclick="wdhide('reply_to_other')" />
|
2025 |
+
<label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
2026 |
+
</div>
|
2027 |
+
<?php
|
2028 |
+
if(!is_numeric($fields[$i])) {
|
2029 |
+
if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->reply_to) {
|
2030 |
+
$is_other = FALSE;
|
2031 |
+
}
|
2032 |
+
}
|
2033 |
+
else {
|
2034 |
+
if($fields[$i] == $row->reply_to)
|
2035 |
+
$is_other=false;
|
2036 |
+
}
|
2037 |
+
}
|
2038 |
+
?>
|
2039 |
+
<div style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>">
|
2040 |
+
<input type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other')" />
|
2041 |
+
<label for="other1">Other</label>
|
2042 |
+
</div>
|
2043 |
+
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px'; ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" />
|
2044 |
+
</td>
|
2045 |
+
</tr>
|
2046 |
+
<tr valign="top">
|
2047 |
+
<td class="fm_options_label">
|
2048 |
+
<label> CC: </label>
|
2049 |
+
</td>
|
2050 |
+
<td class="fm_options_value">
|
2051 |
+
<input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" style="width:250px;" />
|
2052 |
+
</td>
|
2053 |
+
</tr>
|
2054 |
+
<tr valign="top">
|
2055 |
+
<td class="fm_options_label">
|
2056 |
+
<label> BCC: </label>
|
2057 |
+
</td>
|
2058 |
+
<td class="fm_options_value">
|
2059 |
+
<input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" style="width:250px;" />
|
2060 |
+
</td>
|
2061 |
+
</tr>
|
2062 |
+
<tr valign="top">
|
2063 |
+
<td class="fm_options_label">
|
2064 |
+
<label> Subject: </label>
|
2065 |
+
</td>
|
2066 |
+
<td class="fm_options_value">
|
2067 |
+
<input type="text" id="mail_subject" name="mail_subject" value="<?php echo $row->mail_subject ?>" style="width:250px;" />
|
2068 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png?ver='. WD_FM_VERSION.''; ?>" onclick="document.getElementById('mail_subject_labels').style.display='block';" style="vertical-align: middle;cursor: pointer; display:inline-block; margin:0px; float:none;">
|
2069 |
+
<?php
|
2070 |
+
$choise = "document.getElementById('mail_subject')";
|
2071 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_labels" class="email_labels" style="display:none;">';
|
2072 |
+
for($i=0; $i<count($label_label); $i++) {
|
2073 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
2074 |
+
continue;
|
2075 |
+
|
2076 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2077 |
+
|
2078 |
+
$fld_label = $param;
|
2079 |
+
if(strlen($fld_label)>30)
|
2080 |
+
{
|
2081 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2082 |
+
$fld_label = explode("\n", $fld_label);
|
2083 |
+
$fld_label = $fld_label[0] . ' ...';
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
2087 |
+
|
2088 |
+
}
|
2089 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
2090 |
+
|
2091 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
2092 |
+
echo '</div></div>';
|
2093 |
+
?>
|
2094 |
+
</td>
|
2095 |
+
</tr>
|
2096 |
+
<tr valign="top">
|
2097 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2098 |
+
<label> Mode: </label>
|
2099 |
+
</td>
|
2100 |
+
<td class="fm_options_value">
|
2101 |
+
<button name="mail_mode"class="fm-checkbox-radio-button <?php echo $row->mail_mode == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->mail_mode ?>">
|
2102 |
+
<label><?php echo $row->mail_mode == 1 ? 'HTML' : 'Text' ?></label>
|
2103 |
+
<span></span>
|
2104 |
+
</button>
|
2105 |
+
<input type="hidden" name="mail_mode" value="<?php echo $row->mail_mode; ?>"/>
|
2106 |
+
</td>
|
2107 |
+
</tr>
|
2108 |
+
<tr valign="top">
|
2109 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2110 |
+
<label> Attach File: </label>
|
2111 |
+
</td>
|
2112 |
+
<td class="fm_options_value">
|
2113 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
|
2114 |
+
<input type="hidden" name="mail_attachment" value="<?php echo $row->mail_attachment; ?>"/>
|
2115 |
+
</td>
|
2116 |
+
</tr>
|
2117 |
+
<tr valign="top">
|
2118 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2119 |
+
<label> Email empty fields: </label>
|
2120 |
+
</td>
|
2121 |
+
<td class="fm_options_value">
|
2122 |
+
<button class="fm-checkbox-radio-button <?php echo $row->mail_emptyfields == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->mail_emptyfields; ?>">
|
2123 |
+
<span></span>
|
2124 |
+
</button>
|
2125 |
+
<input type="hidden" name="mail_emptyfields" value="<?php echo $row->mail_emptyfields; ?>"/>
|
2126 |
+
</td>
|
2127 |
+
</tr>
|
2128 |
+
<tr>
|
2129 |
+
<td class="fm_options_label" valign="top">
|
2130 |
+
<label>Custom Text in Email For Administrator</label>
|
2131 |
+
</td>
|
2132 |
+
<td class="fm_options_value">
|
2133 |
+
<div style="margin-bottom:5px">
|
2134 |
+
<?php
|
2135 |
+
$choise = "document.getElementById('script_mail')";
|
2136 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
2137 |
+
if ($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_send_copy")
|
2138 |
+
continue;
|
2139 |
+
|
2140 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2141 |
+
$fld_label = $param;
|
2142 |
+
if(strlen($fld_label)>30) {
|
2143 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2144 |
+
$fld_label = explode("\n", $fld_label);
|
2145 |
+
$fld_label = $fld_label[0] . ' ...';
|
2146 |
+
}
|
2147 |
+
|
2148 |
+
if($label_type[$i]=="type_file_upload") {
|
2149 |
+
?>
|
2150 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as image)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
2151 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as link)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param.'(link)'; ?>')" />
|
2152 |
+
<?php
|
2153 |
+
}
|
2154 |
+
else{
|
2155 |
+
?>
|
2156 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
2157 |
+
<?php
|
2158 |
+
}
|
2159 |
+
}
|
2160 |
+
?>
|
2161 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
|
2162 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
2163 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
2164 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
2165 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
2166 |
+
</div>
|
2167 |
+
<?php
|
2168 |
+
if (user_can_richedit()) {
|
2169 |
+
wp_editor($row->script_mail, 'script_mail', array('teeny' => FALSE, 'textarea_name' => 'script_mail', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2170 |
+
}
|
2171 |
+
else {
|
2172 |
+
?>
|
2173 |
+
<textarea name="script_mail" id="script_mail" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail; ?></textarea>
|
2174 |
+
<?php
|
2175 |
+
}
|
2176 |
+
?>
|
2177 |
+
</td>
|
2178 |
+
</tr>
|
2179 |
+
</table>
|
2180 |
+
</fieldset>
|
2181 |
+
<fieldset class="fm_mail_options">
|
2182 |
+
<legend>Email to User</legend>
|
2183 |
+
<table class="admintable">
|
2184 |
+
<tr valign="top">
|
2185 |
+
<td class="fm_options_label">
|
2186 |
+
<label for="mail">Send to</label>
|
2187 |
+
</td>
|
2188 |
+
<td class="fm_options_value">
|
2189 |
+
<?php
|
2190 |
+
|
2191 |
+
$fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
|
2192 |
+
$fields_count = count($fields);
|
2193 |
+
if ($fields_count == 1) { ?>
|
2194 |
+
There is no email field
|
2195 |
+
<?php
|
2196 |
+
}
|
2197 |
+
else {
|
2198 |
+
for ($i = 0; $i < $fields_count - 1; $i++) {
|
2199 |
+
?>
|
2200 |
+
<div>
|
2201 |
+
<input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo (is_numeric(strpos($row->send_to, '*'.(!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]).'*')) ? 'checked="checked"' : '' ); ?> style="margin: 0px 5px 0px 0px;" />
|
2202 |
+
<label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
2203 |
+
</div>
|
2204 |
+
<?php
|
2205 |
+
}
|
2206 |
+
}
|
2207 |
+
?>
|
2208 |
+
</td>
|
2209 |
+
</tr>
|
2210 |
+
<tr valign="top">
|
2211 |
+
<td class="fm_options_label">
|
2212 |
+
<label for="mail_from_user">Email From</label>
|
2213 |
+
</td>
|
2214 |
+
<td class="fm_options_value">
|
2215 |
+
<input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" style="width: 250px;" />
|
2216 |
+
</td>
|
2217 |
+
</tr>
|
2218 |
+
<tr valign="top">
|
2219 |
+
<td class="fm_options_label">
|
2220 |
+
<label for="mail_from_name_user">From Name</label>
|
2221 |
+
</td>
|
2222 |
+
<td class="fm_options_value">
|
2223 |
+
<input type="text" id="mail_from_name_user" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" style="width: 250px;"/>
|
2224 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png?ver='. WD_FM_VERSION.''; ?>" onclick="document.getElementById('mail_from_name_user_labels').style.display='block';" style="vertical-align: middle;cursor: pointer; display:inline-block; margin:0px; float:none;">
|
2225 |
+
<?php
|
2226 |
+
$choise = "document.getElementById('mail_from_name_user')";
|
2227 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_from_name_user_labels" class="email_labels" style="display:none;">';
|
2228 |
+
for($i=0; $i<count($label_label); $i++) {
|
2229 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
2230 |
+
continue;
|
2231 |
+
|
2232 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2233 |
+
$fld_label = $param;
|
2234 |
+
if(strlen($fld_label)>30) {
|
2235 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2236 |
+
$fld_label = explode("\n", $fld_label);
|
2237 |
+
$fld_label = $fld_label[0] . ' ...';
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
2241 |
+
}
|
2242 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
2243 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
2244 |
+
echo '</div></div>';
|
2245 |
+
?>
|
2246 |
+
</td>
|
2247 |
+
</tr>
|
2248 |
+
<tr valign="top">
|
2249 |
+
<td class="fm_options_label">
|
2250 |
+
<label for="reply_to_user">Reply to<br />(if different from "Email Form")</label>
|
2251 |
+
</td>
|
2252 |
+
<td class="fm_options_value">
|
2253 |
+
<input type="text" id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width:250px;"/>
|
2254 |
+
</td>
|
2255 |
+
</tr>
|
2256 |
+
<tr valign="top">
|
2257 |
+
<td class="fm_options_label">
|
2258 |
+
<label> CC: </label>
|
2259 |
+
</td>
|
2260 |
+
<td class="fm_options_value">
|
2261 |
+
<input type="text" id="mail_cc_user" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" style="width:250px;" />
|
2262 |
+
</td>
|
2263 |
+
</tr>
|
2264 |
+
<tr valign="top">
|
2265 |
+
<td class="fm_options_label">
|
2266 |
+
<label> BCC: </label>
|
2267 |
+
</td>
|
2268 |
+
<td class="fm_options_value">
|
2269 |
+
<input type="text" id="mail_bcc_user" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" style="width:250px;" />
|
2270 |
+
</td>
|
2271 |
+
</tr>
|
2272 |
+
<tr valign="top">
|
2273 |
+
<td class="fm_options_label">
|
2274 |
+
<label> Subject: </label>
|
2275 |
+
</td>
|
2276 |
+
<td class="fm_options_value">
|
2277 |
+
<input type="text" id="mail_subject_user" name="mail_subject_user" value="<?php echo $row->mail_subject_user ?>" style="width:250px;" />
|
2278 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png?ver='. WD_FM_VERSION.''; ?>" onclick="document.getElementById('mail_subject_user_labels').style.display='block';" style="vertical-align: middle; cursor: pointer; display:inline-block; margin:0px; float:none;">
|
2279 |
+
<?php
|
2280 |
+
$choise = "document.getElementById('mail_subject_user')";
|
2281 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_user_labels" class="email_labels" style="display:none;">';
|
2282 |
+
for($i=0; $i<count($label_label); $i++)
|
2283 |
+
{
|
2284 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
2285 |
+
continue;
|
2286 |
+
|
2287 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2288 |
+
|
2289 |
+
$fld_label = $param;
|
2290 |
+
if(strlen($fld_label)>30)
|
2291 |
+
{
|
2292 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2293 |
+
$fld_label = explode("\n", $fld_label);
|
2294 |
+
$fld_label = $fld_label[0] . ' ...';
|
2295 |
+
}
|
2296 |
+
|
2297 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
2298 |
+
|
2299 |
+
}
|
2300 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
2301 |
+
|
2302 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
2303 |
+
echo '</div></div>';
|
2304 |
+
?>
|
2305 |
+
</td>
|
2306 |
+
</tr>
|
2307 |
+
<tr valign="top">
|
2308 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2309 |
+
<label> Mode: </label>
|
2310 |
+
</td>
|
2311 |
+
<td class="fm_options_value">
|
2312 |
+
<button name="mail_mode_user"class="fm-checkbox-radio-button <?php echo $row->mail_mode_user == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->mail_mode_user ?>">
|
2313 |
+
<label><?php echo $row->mail_mode_user == 1 ? 'HTML' : 'Text' ?></label>
|
2314 |
+
<span></span>
|
2315 |
+
</button>
|
2316 |
+
<input type="hidden" name="mail_mode_user" value="<?php echo $row->mail_mode_user; ?>"/>
|
2317 |
+
</td>
|
2318 |
+
</tr>
|
2319 |
+
<tr valign="top">
|
2320 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2321 |
+
<label> Attach File: </label>
|
2322 |
+
</td>
|
2323 |
+
<td class="fm_options_value">
|
2324 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
|
2325 |
+
<input type="hidden" name="mail_attachment_user" value="<?php echo $row->mail_attachment_user; ?>"/>
|
2326 |
+
</td>
|
2327 |
+
</tr>
|
2328 |
+
<tr valign="top">
|
2329 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2330 |
+
<label> Email verification: </label>
|
2331 |
+
</td>
|
2332 |
+
<td class="fm_options_value">
|
2333 |
+
<button name="mail_verify" class="fm-checkbox-radio-button <?php echo $row->mail_verify == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->mail_verify; ?>">
|
2334 |
+
<span></span>
|
2335 |
+
</button>
|
2336 |
+
<input type="hidden" name="mail_verify" value="<?php echo $row->mail_verify; ?>"/>
|
2337 |
+
</td>
|
2338 |
+
</tr>
|
2339 |
+
<tr valign="top" class="expire_link" <?php echo ($row->mail_verify==0 ? 'style="display:none;"' : '')?>>
|
2340 |
+
<td class="fm_options_label" valign="top">
|
2341 |
+
<label> Verification link expires in: </label>
|
2342 |
+
</td>
|
2343 |
+
<td class="fm_options_value">
|
2344 |
+
<input class="inputbox" type="text" name="mail_verify_expiretime" maxlength="10" value = "<?php echo ($row->mail_verify_expiretime ? $row->mail_verify_expiretime : 0); ?>" style="width:95px;" onkeypress="return check_isnum_point(event)"/><small> -- hours (0 - never expires).</small>
|
2345 |
+
</td>
|
2346 |
+
</tr>
|
2347 |
+
<tr>
|
2348 |
+
<td class="fm_options_label" valign="top">
|
2349 |
+
<label>Custom Text in Email For User</label>
|
2350 |
+
</td>
|
2351 |
+
<td class="fm_options_value">
|
2352 |
+
<div style="margin-bottom:5px">
|
2353 |
+
<?php
|
2354 |
+
$choise = "document.getElementById('script_mail_user')";
|
2355 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
2356 |
+
if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_send_copy")
|
2357 |
+
continue;
|
2358 |
+
|
2359 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2360 |
+
$fld_label = $param;
|
2361 |
+
if(strlen($fld_label)>30) {
|
2362 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2363 |
+
$fld_label = explode("\n", $fld_label);
|
2364 |
+
$fld_label = $fld_label[0] . ' ...';
|
2365 |
+
}
|
2366 |
+
if($label_type[$i]=="type_file_upload") {
|
2367 |
+
?>
|
2368 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as image)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
2369 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as link)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param.'(link)'; ?>')" />
|
2370 |
+
<?php
|
2371 |
+
}
|
2372 |
+
else{
|
2373 |
+
?>
|
2374 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
2375 |
+
<?php
|
2376 |
+
}
|
2377 |
+
}
|
2378 |
+
?>
|
2379 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
|
2380 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
2381 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
2382 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
2383 |
+
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
2384 |
+
<div class="verification_div" <?php echo ($row->mail_verify==0 ? 'style="display:none;"' : '')?>><input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="Verification link" onClick="insertAtCursor(<?php echo $choise; ?>,'Verification link')" /> </div>
|
2385 |
+
</div>
|
2386 |
+
<?php
|
2387 |
+
if (user_can_richedit()) {
|
2388 |
+
wp_editor($row->script_mail_user, 'script_mail_user', array('teeny' => FALSE, 'textarea_name' => 'script_mail_user', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2389 |
+
}
|
2390 |
+
else {
|
2391 |
+
?>
|
2392 |
+
<textarea name="script_mail_user" id="script_mail_user" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail_user; ?></textarea>
|
2393 |
+
<?php
|
2394 |
+
}
|
2395 |
+
?>
|
2396 |
+
</td>
|
2397 |
+
</tr>
|
2398 |
+
</table>
|
2399 |
+
</fieldset>
|
2400 |
+
</fieldset>
|
2401 |
+
<fieldset id="actions_fieldset" class="adminform fm_fieldset_deactive">
|
2402 |
+
<legend>Actions after submission</legend>
|
2403 |
+
<table class="admintable">
|
2404 |
+
<tr valign="top">
|
2405 |
+
<td class="fm_options_label">
|
2406 |
+
<label>Action type</label>
|
2407 |
+
</td>
|
2408 |
+
<td class="fm_options_value">
|
2409 |
+
<div>
|
2410 |
+
<input type="radio" name="submit_text_type" id="text_type_none" onclick="set_type('none')" value="1" <?php echo ($row->submit_text_type != 2 && $row->submit_text_type != 3 && $row->submit_text_type != 4 && $row->submit_text_type != 5) ? "checked" : ""; ?> />
|
2411 |
+
<label for="text_type_none">Stay on Form</label>
|
2412 |
+
</div>
|
2413 |
+
<div>
|
2414 |
+
<input type="radio" name="submit_text_type" id="text_type_post" onclick="set_type('post')" value="2" <?php echo ($row->submit_text_type == 2) ? "checked" : ""; ?> />
|
2415 |
+
<label for="text_type_post">Post</label>
|
2416 |
+
</div>
|
2417 |
+
<div>
|
2418 |
+
<input type="radio" name="submit_text_type" id="text_type_page" onclick="set_type('page')" value="5" <?php echo ($row->submit_text_type == 5) ? "checked" : ""; ?> />
|
2419 |
+
<label for="text_type_page">Page</label>
|
2420 |
+
</div>
|
2421 |
+
<div>
|
2422 |
+
<input type="radio" name="submit_text_type" id="text_type_custom_text" onclick="set_type('custom_text')" value="3" <?php echo ($row->submit_text_type == 3 ) ? "checked" : ""; ?> />
|
2423 |
+
<label for="text_type_custom_text">Custom Text</label>
|
2424 |
+
</div>
|
2425 |
+
<div>
|
2426 |
+
<input type="radio" name="submit_text_type" id="text_type_url" onclick="set_type('url')" value="4" <?php echo ($row->submit_text_type == 4) ? "checked" : ""; ?> />
|
2427 |
+
<label for="text_type_url">URL</label>
|
2428 |
+
</div>
|
2429 |
+
</td>
|
2430 |
+
</tr>
|
2431 |
+
<tr id="none" <?php echo (($row->submit_text_type == 2 || $row->submit_text_type == 3 || $row->submit_text_type == 4 || $row->submit_text_type == 5) ? 'style="display:none"' : ''); ?>>
|
2432 |
+
<td class="fm_options_label">
|
2433 |
+
<label>Stay on Form</label>
|
2434 |
+
</td>
|
2435 |
+
<td class="fm_options_value">
|
2436 |
+
<img src="<?php echo WD_FM_URL . '/images/verified.png'; ?>" border="0">
|
2437 |
+
</td>
|
2438 |
+
</tr>
|
2439 |
+
<tr id="post" <?php echo (($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
|
2440 |
+
<td class="fm_options_label">
|
2441 |
+
<label for="post_name">Post</label>
|
2442 |
+
</td>
|
2443 |
+
<td class="fm_options_value">
|
2444 |
+
<select id="post_name" name="post_name">
|
2445 |
+
<option value="0">- Select Post -</option>
|
2446 |
+
<?php
|
2447 |
+
$args = array('posts_per_page' => 10000);
|
2448 |
+
query_posts($args);
|
2449 |
+
while (have_posts()) : the_post(); ?>
|
2450 |
+
<option value="<?php $x = get_permalink(get_the_ID()); echo $x; ?>" <?php echo (($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
|
2451 |
+
<?php
|
2452 |
+
endwhile;
|
2453 |
+
wp_reset_query();
|
2454 |
+
?>
|
2455 |
+
</select>
|
2456 |
+
</td>
|
2457 |
+
</tr>
|
2458 |
+
<tr id="page" <?php echo (($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
|
2459 |
+
<td class="fm_options_label">
|
2460 |
+
<label for="page_name">Page</label>
|
2461 |
+
</td>
|
2462 |
+
<td class="fm_options_value">
|
2463 |
+
<select id="page_name" name="page_name">
|
2464 |
+
<option value="0">- Select Page -</option>
|
2465 |
+
<?php
|
2466 |
+
$pages = get_pages();
|
2467 |
+
foreach ($pages as $page) {
|
2468 |
+
$page_id = get_page_link($page->ID);
|
2469 |
+
?>
|
2470 |
+
<option value="<?php echo $page_id; ?>" <?php echo (($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
|
2471 |
+
<?php
|
2472 |
+
}
|
2473 |
+
wp_reset_query();
|
2474 |
+
?>
|
2475 |
+
</select>
|
2476 |
+
</td>
|
2477 |
+
</tr>
|
2478 |
+
<tr id="custom_text" <?php echo (($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
|
2479 |
+
<td class="fm_options_label">
|
2480 |
+
<label for="submit_text">Text</label>
|
2481 |
+
</td>
|
2482 |
+
<td class="fm_options_value">
|
2483 |
+
<?php $choise = "document.getElementById('submit_text')";
|
2484 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
2485 |
+
if ($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_file_upload")
|
2486 |
+
continue;
|
2487 |
+
|
2488 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2489 |
+
$fld_label = $param;
|
2490 |
+
if(strlen($fld_label)>30) {
|
2491 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2492 |
+
$fld_label = explode("\n", $fld_label);
|
2493 |
+
$fld_label = $fld_label[0] . ' ...';
|
2494 |
+
}
|
2495 |
+
|
2496 |
+
?>
|
2497 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
2498 |
+
<?php
|
2499 |
+
}
|
2500 |
+
?>
|
2501 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
|
2502 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
2503 |
+
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="User Id" onClick="insertAtCursor(<?php echo $choise; ?>, 'userid')" />
|
2504 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
2505 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
2506 |
+
<?php
|
2507 |
+
if (user_can_richedit()) {
|
2508 |
+
wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2509 |
+
}
|
2510 |
+
else {
|
2511 |
+
?>
|
2512 |
+
<textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical;">
|
2513 |
+
<?php echo $row->submit_text; ?>
|
2514 |
+
</textarea>
|
2515 |
+
<?php
|
2516 |
+
}
|
2517 |
+
?>
|
2518 |
+
</td>
|
2519 |
+
</tr>
|
2520 |
+
<tr id="url" <?php echo (($row->submit_text_type != 4 ) ? 'style="display:none"' : ''); ?>>
|
2521 |
+
<td class="fm_options_label">
|
2522 |
+
<label for="url">URL</label>
|
2523 |
+
</td>
|
2524 |
+
<td class="fm_options_value">
|
2525 |
+
<input type="text" id="url" name="url" style="width:300px" value="<?php echo $row->url; ?>" />
|
2526 |
+
</td>
|
2527 |
+
</tr>
|
2528 |
+
</table>
|
2529 |
+
</fieldset>
|
2530 |
+
<fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
|
2531 |
+
<legend>Payment Options</legend>
|
2532 |
+
<table class="admintable">
|
2533 |
+
<tr>
|
2534 |
+
<td colspan="2">
|
2535 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">Paypal Options are disabled in free version.</div>
|
2536 |
+
</td>
|
2537 |
+
</tr>
|
2538 |
+
<tr valign="top">
|
2539 |
+
<td class="fm_options_label">
|
2540 |
+
<label>Payment Method</label>
|
2541 |
+
</td>
|
2542 |
+
<td class="fm_options_value">
|
2543 |
+
<div><input type="radio" name="paypal_mode" id="paypal_mode0" value="none" checked="checked" onchange="fm_change_payment_method('none');" disabled="disabled" /><label for="paypal_mode0">None</label></div>
|
2544 |
+
<div><input type="radio" name="paypal_mode" id="paypal_mode1" value="paypal" onchange="fm_change_payment_method('paypal');" disabled="disabled" /><label for="paypal_mode1">Paypal</label></div>
|
2545 |
+
</td>
|
2546 |
+
</tr>
|
2547 |
+
</table>
|
2548 |
+
</fieldset>
|
2549 |
+
<fieldset id="javascript_fieldset" class="adminform fm_fieldset_deactive">
|
2550 |
+
<legend>JavaScript</legend>
|
2551 |
+
<table class="admintable">
|
2552 |
+
<tr valign="top">
|
2553 |
+
<td class="fm_options_label">
|
2554 |
+
<label for="javascript">Javascript</label>
|
2555 |
+
</td>
|
2556 |
+
<td class="fm_options_value" style="width:650px;">
|
2557 |
+
<textarea style="margin: 0px; height: 400px; width: 600px;" cols="60" rows="30" name="javascript" id="form_javascript"><?php echo $row->javascript; ?></textarea>
|
2558 |
+
</td>
|
2559 |
+
</tr>
|
2560 |
+
</table>
|
2561 |
+
</fieldset>
|
2562 |
+
<fieldset id="conditions_fieldset" class="adminform fm_fieldset_deactive">
|
2563 |
+
<?php
|
2564 |
+
$ids = array();
|
2565 |
+
$types = array();
|
2566 |
+
$labels = array();
|
2567 |
+
$paramss = array();
|
2568 |
+
$all_ids = array();
|
2569 |
+
$all_labels = array();
|
2570 |
+
|
2571 |
+
$select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "type_phone_new", "type_submitter_mail", "type_address", "type_spinner", "type_checkbox", "type_radio", "type_own_select", "type_paypal_price", "type_paypal_price_new", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping", "type_date_new");
|
2572 |
+
|
2573 |
+
$select_type_fields = array("type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
|
2574 |
+
|
2575 |
+
|
2576 |
+
$fields=explode('*:*new_field*:*',$row->form_fields);
|
2577 |
+
$fields = array_slice($fields,0, count($fields)-1);
|
2578 |
+
|
2579 |
+
foreach($fields as $field) {
|
2580 |
+
$temp=explode('*:*id*:*',$field);
|
2581 |
+
array_push($ids, $temp[0]);
|
2582 |
+
array_push($all_ids, $temp[0]);
|
2583 |
+
$temp=explode('*:*type*:*',$temp[1]);
|
2584 |
+
array_push($types, $temp[0]);
|
2585 |
+
$temp=explode('*:*w_field_label*:*',$temp[1]);
|
2586 |
+
array_push($labels, $temp[0]);
|
2587 |
+
array_push($all_labels, $temp[0]);
|
2588 |
+
array_push($paramss, $temp[1]);
|
2589 |
+
|
2590 |
+
}
|
2591 |
+
|
2592 |
+
foreach($types as $key=>$value){
|
2593 |
+
if(!in_array($types[$key],$select_and_input)){
|
2594 |
+
unset($ids[$key]);
|
2595 |
+
unset($labels[$key]);
|
2596 |
+
unset($types[$key]);
|
2597 |
+
unset($paramss[$key]);
|
2598 |
+
}
|
2599 |
+
}
|
2600 |
+
|
2601 |
+
$ids = array_values($ids);
|
2602 |
+
$labels = array_values($labels);
|
2603 |
+
$types = array_values($types);
|
2604 |
+
$paramss = array_values($paramss);
|
2605 |
+
|
2606 |
+
$chose_ids = implode('@@**@@',$ids);
|
2607 |
+
$chose_labels = implode('@@**@@',$labels);
|
2608 |
+
$chose_types = implode('@@**@@',$types);
|
2609 |
+
$chose_paramss = implode('@@**@@',$paramss);
|
2610 |
+
|
2611 |
+
$all_ids_cond = implode('@@**@@',$all_ids);
|
2612 |
+
$all_labels_cond = implode('@@**@@',$all_labels);
|
2613 |
+
|
2614 |
+
$show_hide = array();
|
2615 |
+
$field_label = array();
|
2616 |
+
$all_any = array();
|
2617 |
+
$condition_params = array();
|
2618 |
+
|
2619 |
+
|
2620 |
+
$count_of_conditions=0;
|
2621 |
+
if($row->condition!="") {
|
2622 |
+
$conditions=explode('*:*new_condition*:*',$row->condition);
|
2623 |
+
$conditions = array_slice($conditions,0, count($conditions)-1);
|
2624 |
+
$count_of_conditions = count($conditions);
|
2625 |
+
|
2626 |
+
foreach($conditions as $condition) {
|
2627 |
+
$temp=explode('*:*show_hide*:*',$condition);
|
2628 |
+
array_push($show_hide, $temp[0]);
|
2629 |
+
$temp=explode('*:*field_label*:*',$temp[1]);
|
2630 |
+
array_push($field_label, $temp[0]);
|
2631 |
+
$temp=explode('*:*all_any*:*',$temp[1]);
|
2632 |
+
array_push($all_any, $temp[0]);
|
2633 |
+
array_push($condition_params, $temp[1]);
|
2634 |
+
}
|
2635 |
+
}
|
2636 |
+
else {
|
2637 |
+
$show_hide[0]=1;
|
2638 |
+
$all_any[0]='and';
|
2639 |
+
$condition_params[0]='';
|
2640 |
+
if($all_ids)
|
2641 |
+
$field_label[0] = $all_ids[0];
|
2642 |
+
}
|
2643 |
+
?>
|
2644 |
+
<div>
|
2645 |
+
<button class="fm-button add-button large" onclick="add_condition('<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>', '<?php echo $all_ids_cond; ?>', '<?php echo htmlspecialchars(addslashes($all_labels_cond)); ?>'); return false;">
|
2646 |
+
Add Condition
|
2647 |
+
<span></span>
|
2648 |
+
</button>
|
2649 |
+
</div>
|
2650 |
+
<?php
|
2651 |
+
for($k=0; $k<$count_of_conditions; $k++) {
|
2652 |
+
if(in_array($field_label[$k],$all_ids)) : ?>
|
2653 |
+
<div id="condition<?php echo $k; ?>" class="fm-condition">
|
2654 |
+
<div id="conditional_fileds<?php echo $k; ?>">
|
2655 |
+
<select id="show_hide<?php echo $k; ?>" name="show_hide<?php echo $k; ?>" style="width:80px; ">
|
2656 |
+
<option value="1" <?php if($show_hide[$k]==1) echo 'selected="selected"'; ?>>show</option>
|
2657 |
+
<option value="0" <?php if($show_hide[$k]==0) echo 'selected="selected"'; ?>>hide</option>
|
2658 |
+
</select>
|
2659 |
+
<select id="fields<?php echo $k; ?>" name="fields<?php echo $k; ?>" style="width:300px; " onChange="" >
|
2660 |
+
<?php
|
2661 |
+
foreach($all_labels as $key => $value) {
|
2662 |
+
if($field_label[$k]==$all_ids[$key])
|
2663 |
+
$selected = 'selected="selected"';
|
2664 |
+
else
|
2665 |
+
$selected ='';
|
2666 |
+
echo '<option value="'.$all_ids[$key].'" '.$selected.'>'.$value.'</option>';
|
2667 |
+
}
|
2668 |
+
?>
|
2669 |
+
</select>
|
2670 |
+
<span>if</span>
|
2671 |
+
<select id="all_any<?php echo $k; ?>" name="all_any<?php echo $k; ?>" style="width:60px; ">
|
2672 |
+
<option value="and" <?php if($all_any[$k]=="and") echo 'selected="selected"'; ?>>all</option>
|
2673 |
+
<option value="or" <?php if($all_any[$k]=="or") echo 'selected="selected"'; ?>>any</option>
|
2674 |
+
</select>
|
2675 |
+
<span>of the following match:</span>
|
2676 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png?ver='. WD_FM_VERSION.''; ?>" title="add" onclick="add_condition_fields(<?php echo $k; ?>,'<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')" style="cursor: pointer; vertical-align: middle;">
|
2677 |
+
<img src="<?php echo WD_FM_URL . '/images/page_delete.png?ver='. WD_FM_VERSION.''; ?>" onclick="delete_condition('<?php echo $k; ?>')" style="cursor: pointer; vertical-align: middle;">
|
2678 |
+
</div>
|
2679 |
+
<?php
|
2680 |
+
if($condition_params[$k]) {
|
2681 |
+
$_params = explode('*:*next_condition*:*',$condition_params[$k]);
|
2682 |
+
$_params = array_slice($_params,0, count($_params)-1);
|
2683 |
+
|
2684 |
+
foreach($_params as $key=>$_param) {
|
2685 |
+
$key_select_or_input ='';
|
2686 |
+
$param_values = explode('***',$_param);
|
2687 |
+
$multiselect = explode('@@@',$param_values[2]);
|
2688 |
+
|
2689 |
+
if(in_array($param_values[0],$ids)): ?>
|
2690 |
+
<div id="condition_div<?php echo $k; ?>_<?php echo $key; ?>">
|
2691 |
+
<select id="field_labels<?php echo $k; ?>_<?php echo $key; ?>" onchange="change_choices(this.options[this.selectedIndex].id+'_<?php echo $key; ?>','<?php echo $chose_ids; ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')" style="width:300px;"/>
|
2692 |
+
<?php
|
2693 |
+
foreach($labels as $key1 => $value)
|
2694 |
+
{
|
2695 |
+
if($param_values[0]==$ids[$key1])
|
2696 |
+
{
|
2697 |
+
$selected = 'selected="selected"';
|
2698 |
+
if ($types[$key1]=="type_checkbox" || $types[$key1]=="type_paypal_checkbox")
|
2699 |
+
$multiple = 'multiple="multiple" class="multiple_select"';
|
2700 |
+
else
|
2701 |
+
$multiple ='';
|
2702 |
+
|
2703 |
+
$key_select_or_input = $key1;
|
2704 |
+
}
|
2705 |
+
else
|
2706 |
+
$selected ='';
|
2707 |
+
if($field_label[$k]!=$ids[$key1])
|
2708 |
+
echo '<option id="'.$k.'_'.$key1.'" value="'.$ids[$key1].'" '.$selected.'>'.$value.'</option>';
|
2709 |
+
|
2710 |
+
}
|
2711 |
+
|
2712 |
+
?>
|
2713 |
+
</select>
|
2714 |
+
|
2715 |
+
<select id="is_select<?php echo $k; ?>_<?php echo $key; ?>" style="vertical-align: top; width:94px;">
|
2716 |
+
<option value="==" <?php if($param_values[1]=="==") echo 'selected="selected"'; ?>>is</option>
|
2717 |
+
<option value="!=" <?php if($param_values[1]=="!=") echo 'selected="selected"'; ?>>is not</option>
|
2718 |
+
<option value="%" <?php if($param_values[1]=="%") echo 'selected="selected"'; ?>>like</option>
|
2719 |
+
|
2720 |
+
<option value="!%" <?php if($param_values[1]=="!%") echo 'selected="selected"'; ?>>not like</option>
|
2721 |
+
|
2722 |
+
<option value="=" <?php if($param_values[1]=="=") echo 'selected="selected"'; ?>>empty</option>
|
2723 |
+
|
2724 |
+
<option value="!" <?php if($param_values[1]=="!") echo 'selected="selected"'; ?>>not empty</option>
|
2725 |
+
|
2726 |
+
</select>
|
2727 |
+
|
2728 |
+
<?php if ($key_select_or_input !== '' && in_array($types[$key_select_or_input],$select_type_fields)) : ?>
|
2729 |
+
<select id="field_value<?php echo $k; ?>_<?php echo $key; ?>" <?php echo $multiple; ?> style="width: 200px;">
|
2730 |
+
<?php
|
2731 |
+
switch($types[$key_select_or_input])
|
2732 |
+
{
|
2733 |
+
case "type_own_select":
|
2734 |
+
case "type_paypal_select":
|
2735 |
+
$w_size = explode('*:*w_size*:*',$paramss[$key_select_or_input]);
|
2736 |
+
break;
|
2737 |
+
|
2738 |
+
case "type_radio":
|
2739 |
+
case "type_checkbox":
|
2740 |
+
case "type_paypal_radio":
|
2741 |
+
case "type_paypal_checkbox":
|
2742 |
+
case "type_paypal_shipping":
|
2743 |
+
$w_size = explode('*:*w_flow*:*',$paramss[$key_select_or_input]);
|
2744 |
+
break;
|
2745 |
+
}
|
2746 |
+
|
2747 |
+
$w_choices = explode('*:*w_choices*:*',$w_size[1]);
|
2748 |
+
$w_choices_array = explode('***',$w_choices[0]);
|
2749 |
+
|
2750 |
+
if($types[$key_select_or_input] == 'type_radio' || $types[$key_select_or_input] == 'type_checkbox' || $types[$key_select_or_input] == 'type_own_select')
|
2751 |
+
{
|
2752 |
+
|
2753 |
+
if(strpos($w_choices[1], 'w_value_disabled') > -1)
|
2754 |
+
{
|
2755 |
+
$w_value_disabled= explode('*:*w_value_disabled*:*',$w_choices[1]);
|
2756 |
+
$w_choices_value = explode('*:*w_choices_value*:*',$w_value_disabled[1]);
|
2757 |
+
$w_choices_value = $w_choices_value[0];
|
2758 |
+
}
|
2759 |
+
|
2760 |
+
if(isset($w_choices_value))
|
2761 |
+
$w_choices_value_array = explode('***',$w_choices_value);
|
2762 |
+
else
|
2763 |
+
$w_choices_value_array = $w_choices_array;
|
2764 |
+
}
|
2765 |
+
else
|
2766 |
+
{
|
2767 |
+
$w_choices_price= explode('*:*w_choices_price*:*',$w_choices[1]);
|
2768 |
+
$w_choices_value = $w_choices_price[0];
|
2769 |
+
$w_choices_value_array = explode('***', $w_choices_value);
|
2770 |
+
}
|
2771 |
+
|
2772 |
+
|
2773 |
+
for($m=0; $m<count($w_choices_array); $m++)
|
2774 |
+
{
|
2775 |
+
if($types[$key_select_or_input]=="type_paypal_checkbox" || $types[$key_select_or_input]=="type_paypal_radio" || $types[$key_select_or_input]=="type_paypal_shipping" || $types[$key_select_or_input]=="type_paypal_select")
|
2776 |
+
$w_choice = $w_choices_array[$m].'*:*value*:*'.$w_choices_value_array[$m];
|
2777 |
+
else
|
2778 |
+
$w_choice = $w_choices_value_array[$m];
|
2779 |
+
|
2780 |
+
if(in_array(esc_html($w_choice),$multiselect))
|
2781 |
+
{
|
2782 |
+
$selected = 'selected="selected"';
|
2783 |
+
}
|
2784 |
+
else
|
2785 |
+
$selected ='';
|
2786 |
+
|
2787 |
+
if(strpos($w_choices_array[$m], '[') === false && strpos($w_choices_array[$m], ']') === false ) {
|
2788 |
+
echo '<option id="choise_'.$k.'_'.$m.'" value="'.$w_choice.'" '.$selected.'>'.$w_choices_array[$m].'</option>';
|
2789 |
+
}
|
2790 |
+
}
|
2791 |
+
|
2792 |
+
if($types[$key_select_or_input]=="type_address")
|
2793 |
+
{
|
2794 |
+
$w_countries = array("","Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe");
|
2795 |
+
$w_options = '';
|
2796 |
+
foreach($w_countries as $w_country)
|
2797 |
+
{
|
2798 |
+
if(in_array($w_country,$multiselect))
|
2799 |
+
{
|
2800 |
+
$selected = 'selected="selected"';
|
2801 |
+
}
|
2802 |
+
else
|
2803 |
+
$selected ='';
|
2804 |
+
|
2805 |
+
echo '<option value="'.$w_country.'" '.$selected.'>'.$w_country.'</option>';
|
2806 |
+
}
|
2807 |
+
}
|
2808 |
+
|
2809 |
+
?>
|
2810 |
+
</select>
|
2811 |
+
<?php else :
|
2812 |
+
if($key_select_or_input != '' && ($types[$key_select_or_input]=="type_number" || $types[$key_select_or_input]=="type_phone"))
|
2813 |
+
$onkeypress_function = "onkeypress='return check_isnum_space(event)'";
|
2814 |
+
else
|
2815 |
+
if($key_select_or_input != '' && ($types[$key_select_or_input]=="type_paypal_price" || $types[$key_select_or_input]=="type_paypal_price_new"))
|
2816 |
+
$onkeypress_function = "onkeypress='return check_isnum_point(event)'";
|
2817 |
+
else
|
2818 |
+
$onkeypress_function = "";
|
2819 |
+
?>
|
2820 |
+
<input id="field_value<?php echo $k; ?>_<?php echo $key; ?>" type="text" value="<?php echo $param_values[2];?>" <?php echo $onkeypress_function; ?> style=" width: 200px;"><?php endif; ?>
|
2821 |
+
|
2822 |
+
<img src="<?php echo WD_FM_URL . '/images/delete.png?ver='. WD_FM_VERSION.''; ?>" id="delete_condition<?php echo $k; ?>_<?php echo $key; ?>" onclick="delete_field_condition('<?php echo $k; ?>_<?php echo $key; ?>')" style="vertical-align: middle;">
|
2823 |
+
</div>
|
2824 |
+
<?php endif;
|
2825 |
+
}
|
2826 |
+
}
|
2827 |
+
|
2828 |
+
?>
|
2829 |
+
</div>
|
2830 |
+
<?php endif;
|
2831 |
+
}
|
2832 |
+
?>
|
2833 |
+
<input type="hidden" id="condition" name="condition" value="<?php echo $row->condition; ?>" />
|
2834 |
+
</fieldset>
|
2835 |
+
<fieldset id="mapping_fieldset" class="adminform fm_fieldset_deactive">
|
2836 |
+
<div style="padding-bottom:15px;">
|
2837 |
+
<button id="add_query" class="fm-button add-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
2838 |
+
<span></span>
|
2839 |
+
Add Query
|
2840 |
+
</button>
|
2841 |
+
<button class="fm-button delete-button medium" onclick="if (fm_check_email('mailToAdd') || fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email')) {return false;}; wd_fm_apply_options('remove_query'); return false;">
|
2842 |
+
<span></span>
|
2843 |
+
Delete
|
2844 |
+
</button>
|
2845 |
+
</div>
|
2846 |
+
<?php
|
2847 |
+
if ($queries) {
|
2848 |
+
?>
|
2849 |
+
<table class="wp-list-table widefat fixed posts table_content">
|
2850 |
+
<thead>
|
2851 |
+
<tr>
|
2852 |
+
<th style="width:4%;" class="table_small_col count_col sub-align">#</th>
|
2853 |
+
<th style="width:4%;" class="table_small_col count_col sub-align">ID</th>
|
2854 |
+
<th style="width:6%;" class="manage-column column-cb check-column table_small_col sub-align form_check">
|
2855 |
+
<input id="check_all" type="checkbox" style="margin:0;">
|
2856 |
+
</th>
|
2857 |
+
<th style="width:86%;" class="table_large_col">Query</th>
|
2858 |
+
</tr>
|
2859 |
+
</thead>
|
2860 |
+
<?php
|
2861 |
+
$k = 0;
|
2862 |
+
for($i=0, $n=count($queries); $i < $n ; $i++) {
|
2863 |
+
$query = $queries[$i];
|
2864 |
+
$checked = '<input type="checkbox" id="' . $i . '" name="cid[]" value="' . $query->id . '" />';
|
2865 |
+
$link = add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => $query->id, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
2866 |
+
?>
|
2867 |
+
<tr <?php if (!$k) echo "class=\"alternate\""; ?>>
|
2868 |
+
<td align="center" class="table_small_col"><?php echo $i+1; ?></td>
|
2869 |
+
<td align="center" class="table_small_col"><?php echo $query->id; ?></td>
|
2870 |
+
<td align="center" class="table_small_col check-column"><?php echo $checked; ?></td>
|
2871 |
+
<td align="center">
|
2872 |
+
<a rel="{handler: 'iframe', size: {x: 530, y: 370}}" onclick="tb_show('', '<?php echo $link; ?>'); return false;" style="cursor:pointer;">
|
2873 |
+
<?php echo $query->query; ?>
|
2874 |
+
</a>
|
2875 |
+
</td>
|
2876 |
+
</tr>
|
2877 |
+
<?php
|
2878 |
+
$k = 1 - $k;
|
2879 |
+
}
|
2880 |
+
?>
|
2881 |
+
</table>
|
2882 |
+
<?php
|
2883 |
+
}
|
2884 |
+
?>
|
2885 |
+
</fieldset>
|
2886 |
+
<?php
|
2887 |
+
foreach($addons as $addon => $addon_name) {
|
2888 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
2889 |
+
$_GET['addon_view']='admin';
|
2890 |
+
$_GET['form_id']=$row->id;
|
2891 |
+
do_action($addon.'_init');
|
2892 |
+
}
|
2893 |
+
}
|
2894 |
+
?>
|
2895 |
+
</div>
|
2896 |
+
<input type="hidden" name="boxchecked" value="0">
|
2897 |
+
<input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FM_Library::get('fieldset_id', 'general'); ?>" />
|
2898 |
+
<input type="hidden" id="task" name="task" value=""/>
|
2899 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
2900 |
+
</form>
|
2901 |
+
<script>
|
2902 |
+
jQuery(window).load(function () {
|
2903 |
+
form_maker_options_tabs(jQuery("#fieldset_id").val());
|
2904 |
+
fm_popup();
|
2905 |
+
function hide_email_labels(event) {
|
2906 |
+
var e = event.toElement || event.relatedTarget;
|
2907 |
+
if (e.parentNode == this || e == this) {
|
2908 |
+
return;
|
2909 |
+
}
|
2910 |
+
this.style.display="none";
|
2911 |
+
}
|
2912 |
+
if(document.getElementById('mail_from_labels')) {
|
2913 |
+
document.getElementById('mail_from_labels').addEventListener('mouseout',hide_email_labels,true);
|
2914 |
+
}
|
2915 |
+
if(document.getElementById('mail_subject_labels')) {
|
2916 |
+
document.getElementById('mail_subject_labels').addEventListener('mouseout',hide_email_labels,true);
|
2917 |
+
}
|
2918 |
+
if(document.getElementById('mail_from_name_user_labels')) {
|
2919 |
+
document.getElementById('mail_from_name_user_labels').addEventListener('mouseout',hide_email_labels,true);
|
2920 |
+
}
|
2921 |
+
if(document.getElementById('mail_subject_user_labels')) {
|
2922 |
+
document.getElementById('mail_subject_user_labels').addEventListener('mouseout',hide_email_labels,true);
|
2923 |
+
}
|
2924 |
+
if(document.getElementById('post_title_labels')) {
|
2925 |
+
document.getElementById('post_title_labels').addEventListener('mouseout',hide_email_labels,true);
|
2926 |
+
}
|
2927 |
+
if(document.getElementById('post_tags_labels')) {
|
2928 |
+
document.getElementById('post_tags_labels').addEventListener('mouseout',hide_email_labels,true);
|
2929 |
+
}
|
2930 |
+
if(document.getElementById('post_featured_image_labels')) {
|
2931 |
+
document.getElementById('post_featured_image_labels').addEventListener('mouseout',hide_email_labels,true);
|
2932 |
+
}
|
2933 |
+
if(document.getElementById('dbox_upload_dir_labels')) {
|
2934 |
+
document.getElementById('dbox_upload_dir_labels').addEventListener('mouseout',hide_email_labels,true);
|
2935 |
+
}
|
2936 |
+
});
|
2937 |
+
function wd_fm_apply_options(task) {
|
2938 |
+
set_condition();
|
2939 |
+
fm_set_input_value('task', task);
|
2940 |
+
document.getElementById('adminForm').submit();
|
2941 |
+
|
2942 |
+
}
|
2943 |
+
</script>
|
2944 |
+
<?php
|
2945 |
+
}
|
2946 |
+
|
2947 |
+
public function form_layout($id) {
|
2948 |
+
$row = $this->model->get_row_data($id);
|
2949 |
+
$ids = array();
|
2950 |
+
$types = array();
|
2951 |
+
$labels = array();
|
2952 |
+
$fields = explode('*:*new_field*:*', $row->form_fields);
|
2953 |
+
$fields = array_slice($fields, 0, count($fields) - 1);
|
2954 |
+
foreach ($fields as $field) {
|
2955 |
+
$temp = explode('*:*id*:*', $field);
|
2956 |
+
array_push($ids, $temp[0]);
|
2957 |
+
$temp = explode('*:*type*:*', $temp[1]);
|
2958 |
+
array_push($types, $temp[0]);
|
2959 |
+
$temp = explode('*:*w_field_label*:*', $temp[1]);
|
2960 |
+
array_push($labels, $temp[0]);
|
2961 |
+
}
|
2962 |
+
?>
|
2963 |
+
<script>
|
2964 |
+
var form_front = '<?php echo addslashes($row->form_front);?>';
|
2965 |
+
var custom_front = '<?php echo addslashes($row->custom_front);?>';
|
2966 |
+
if (custom_front == '') {
|
2967 |
+
custom_front = form_front;
|
2968 |
+
}
|
2969 |
+
function submitbutton() {
|
2970 |
+
if (jQuery('#autogen_layout').is(':checked')) {
|
2971 |
+
jQuery('#custom_front').val(custom_front.replace(/\s+/g, ' ').replace(/> </g, '><'));
|
2972 |
+
}
|
2973 |
+
else {
|
2974 |
+
jQuery('#custom_front').val(editor.getValue().replace(/\s+/g, ' ').replace(/> </g, '><'));
|
2975 |
+
}
|
2976 |
+
}
|
2977 |
+
function insertAtCursor_form(myId, myLabel) {
|
2978 |
+
if (jQuery('#autogen_layout').is(':checked')) {
|
2979 |
+
alert("Uncheck the Auto-Generate Layout box.");
|
2980 |
+
return;
|
2981 |
+
}
|
2982 |
+
myValue = '<div wdid="' + myId + '" class="wdform_row">%' + myId + ' - ' + myLabel + '%</div>';
|
2983 |
+
line = editor.getCursor().line;
|
2984 |
+
ch = editor.getCursor().ch;
|
2985 |
+
text = editor.getLine(line);
|
2986 |
+
text1 = text.substr(0, ch);
|
2987 |
+
text2 = text.substr(ch);
|
2988 |
+
text = text1 + myValue + text2;
|
2989 |
+
editor.setLine(line, text);
|
2990 |
+
editor.focus();
|
2991 |
+
}
|
2992 |
+
function autogen(status) {
|
2993 |
+
if (status) {
|
2994 |
+
custom_front = editor.getValue();
|
2995 |
+
editor.setValue(form_front);
|
2996 |
+
editor.setOption('readOnly', true);
|
2997 |
+
autoFormat();
|
2998 |
+
}
|
2999 |
+
else {
|
3000 |
+
editor.setValue(custom_front);
|
3001 |
+
editor.setOption('readOnly', false);
|
3002 |
+
autoFormat();
|
3003 |
+
}
|
3004 |
+
}
|
3005 |
+
function autoFormat() {
|
3006 |
+
CodeMirror.commands["selectAll"](editor);
|
3007 |
+
editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));
|
3008 |
+
editor.scrollTo(0,0);
|
3009 |
+
}
|
3010 |
+
</script>
|
3011 |
+
|
3012 |
+
<div class="fm_layout">
|
3013 |
+
<form action="admin.php?page=manage_fm" method="post" name="adminForm" enctype="multipart/form-data">
|
3014 |
+
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
3015 |
+
<div class="fm-layout-actions">
|
3016 |
+
<div class="fm-page-actions">
|
3017 |
+
<button class="fm-button save-button medium" onclick="submitbutton(); fm_set_input_value('task', 'save_layout');">
|
3018 |
+
Save
|
3019 |
+
<span></span>
|
3020 |
+
</button>
|
3021 |
+
<button class="fm-button apply-button medium" onclick="submitbutton(); fm_set_input_value('task', 'apply_layout');">
|
3022 |
+
Apply
|
3023 |
+
<span></span>
|
3024 |
+
</button>
|
3025 |
+
<button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel_options');">
|
3026 |
+
Cancel
|
3027 |
+
<span></span>
|
3028 |
+
</button>
|
3029 |
+
</div>
|
3030 |
+
</div>
|
3031 |
+
<div class="fm-layout-content">
|
3032 |
+
<h2 style="clear: both;">Description</h2>
|
3033 |
+
<p>To customize the layout of the form fields uncheck the Auto-Generate Layout box and edit the HTML.</p>
|
3034 |
+
<p>You can change positioning, add in-line styles and etc. Click on the provided buttons to add the corresponding field.<br /> This will add the following line:
|
3035 |
+
<b><span class="cm-tag"><div</span> <span class="cm-attribute">wdid</span>=<span class="cm-string">"example_id"</span> <span class="cm-attribute">class</span>=<span class="cm-string">"wdform_row"</span><span class="cm-tag">></span>%example_id - Example%<span class="cm-tag"></div></span></b>
|
3036 |
+
, where <b><span class="cm-tag"><div></span></b> is used to set a row.</p>
|
3037 |
+
<p>To return to the default settings you should check Auto-Generate Layout box.</p>
|
3038 |
+
<h3 style="color:red">Notice</h3>
|
3039 |
+
<p>Make sure not to publish the same field twice. This will cause malfunctioning of the form.</p>
|
3040 |
+
<hr/>
|
3041 |
+
<label for="autogen_layout" style="font-size: 20px; line-height: 45px; margin-left: 10px;">Auto Generate Layout? </label>
|
3042 |
+
<input type="checkbox" value="1" name="autogen_layout" id="autogen_layout" <?php echo (($row->autogen_layout) ? 'checked="checked"' : ''); ?> />
|
3043 |
+
<input type="hidden" name="custom_front" id="custom_front" value="" />
|
3044 |
+
<input type="hidden" id="task" name="task" value=""/>
|
3045 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
3046 |
+
<br/>
|
3047 |
+
<?php
|
3048 |
+
foreach($ids as $key => $id) {
|
3049 |
+
if ($types[$key] != "type_section_break") {
|
3050 |
+
?>
|
3051 |
+
<button type="button" onClick="insertAtCursor_form('<?php echo $ids[$key]; ?>','<?php echo $labels[$key]; ?>')" class="fm_label_buttons" title="<?php echo $labels[$key]; ?>"><?php echo $labels[$key]; ?></button>
|
3052 |
+
<?php
|
3053 |
+
}
|
3054 |
+
}
|
3055 |
+
?>
|
3056 |
+
</form>
|
3057 |
+
</div>
|
3058 |
+
<br /><br />
|
3059 |
+
<button class="fm_submit_layout button button-secondary button-hero" onclick="autoFormat()"><strong>Apply Source Formatting</strong> <em>(ctrl-enter)</em></button>
|
3060 |
+
<textarea id="source" name="source" style="display: none;"></textarea>
|
3061 |
+
</div>
|
3062 |
+
<script>
|
3063 |
+
var editor = CodeMirror.fromTextArea(document.getElementById("source"), {
|
3064 |
+
lineNumbers: true,
|
3065 |
+
lineWrapping: true,
|
3066 |
+
mode: "htmlmixed",
|
3067 |
+
value: form_front
|
3068 |
+
});
|
3069 |
+
if (jQuery('#autogen_layout').is(':checked')) {
|
3070 |
+
editor.setOption('readOnly', true);
|
3071 |
+
editor.setValue(form_front);
|
3072 |
+
}
|
3073 |
+
else {
|
3074 |
+
editor.setOption('readOnly', false);
|
3075 |
+
editor.setValue(custom_front);
|
3076 |
+
}
|
3077 |
+
jQuery('#autogen_layout').click(function() {
|
3078 |
+
autogen(jQuery(this).is(':checked'));
|
3079 |
+
});
|
3080 |
+
autoFormat();
|
3081 |
+
</script>
|
3082 |
+
<?php
|
3083 |
+
}
|
3084 |
+
|
3085 |
+
public function display_options($id) {
|
3086 |
+
$row_form = $this->model->get_row_data($id);
|
3087 |
+
$row = $this->model->get_display_options($id);
|
3088 |
+
$page_title = 'Display Options: '.$row_form->title;
|
3089 |
+
$animation_effects = array(
|
3090 |
+
'none' => 'None',
|
3091 |
+
'bounce' => 'Bounce',
|
3092 |
+
'tada' => 'Tada',
|
3093 |
+
'bounceInDown' => 'BounceInDown',
|
3094 |
+
'fadeInLeft' => 'FadeInLeft',
|
3095 |
+
'flash' => 'Flash',
|
3096 |
+
'pulse' => 'Pulse',
|
3097 |
+
'rubberBand' => 'RubberBand',
|
3098 |
+
'shake' => 'Shake',
|
3099 |
+
'swing' => 'Swing',
|
3100 |
+
'wobble' => 'Wobble',
|
3101 |
+
'hinge' => 'Hinge',
|
3102 |
+
'lightSpeedIn' => 'LightSpeedIn',
|
3103 |
+
'rollIn' => 'RollIn',
|
3104 |
+
'bounceIn' => 'BounceIn',
|
3105 |
+
'bounceInLeft' => 'BounceInLeft',
|
3106 |
+
'bounceInRight' => 'BounceInRight',
|
3107 |
+
'bounceInUp' => 'BounceInUp',
|
3108 |
+
'fadeIn' => 'FadeIn',
|
3109 |
+
'fadeInDown' => 'FadeInDown',
|
3110 |
+
'fadeInDownBig' => 'FadeInDownBig',
|
3111 |
+
'fadeInLeftBig' => 'FadeInLeftBig',
|
3112 |
+
'fadeInRight' => 'FadeInRight',
|
3113 |
+
'fadeInRightBig' => 'FadeInRightBig',
|
3114 |
+
'fadeInUp' => 'FadeInUp',
|
3115 |
+
'fadeInUpBig' => 'FadeInUpBig',
|
3116 |
+
'flip' => 'Flip',
|
3117 |
+
'flipInX' => 'FlipInX',
|
3118 |
+
'flipInY' => 'FlipInY',
|
3119 |
+
'rotateIn' => 'RotateIn',
|
3120 |
+
'rotateInDownLeft' => 'RotateInDownLeft',
|
3121 |
+
'rotateInDownRight' => 'RotateInDownRight',
|
3122 |
+
'rotateInUpLeft' => 'RotateInUpLeft',
|
3123 |
+
'rotateInUpRight' => 'RotateInUpRight',
|
3124 |
+
'zoomIn' => 'ZoomIn',
|
3125 |
+
'zoomInDown' => 'ZoomInDown',
|
3126 |
+
'zoomInLeft' => 'ZoomInLeft',
|
3127 |
+
'zoomInRight' => 'ZoomInRight',
|
3128 |
+
'zoomInUp' => 'ZoomInUp',
|
3129 |
+
);
|
3130 |
+
|
3131 |
+
?>
|
3132 |
+
<form class="wrap" method="post" action="admin.php?page=manage_fm" name="adminForm" id="adminForm">
|
3133 |
+
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
3134 |
+
<input type="hidden" id="task" name="task" value=""/>
|
3135 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->form_id; ?>" />
|
3136 |
+
<div class="fm-page-header">
|
3137 |
+
<div class="fm-logo">
|
3138 |
+
</div>
|
3139 |
+
<div class="fm-page-title"><?php echo $page_title; ?></div>
|
3140 |
+
<div class="fm-page-actions">
|
3141 |
+
<button class="fm-button save-button medium" onclick="fm_apply_options('save_display_options');">
|
3142 |
+
<span></span>
|
3143 |
+
Save
|
3144 |
+
</button>
|
3145 |
+
<button class="fm-button apply-button medium" onclick="fm_apply_options('apply_display_options');">
|
3146 |
+
<span></span>
|
3147 |
+
Apply
|
3148 |
+
</button>
|
3149 |
+
<button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel_options');">
|
3150 |
+
<span></span>
|
3151 |
+
Cancel
|
3152 |
+
</button>
|
3153 |
+
</div>
|
3154 |
+
<div class="fm-clear"></div>
|
3155 |
+
</div>
|
3156 |
+
<div class="fm-form-options">
|
3157 |
+
<fieldset id="type_settings_fieldset" class="adminform">
|
3158 |
+
<div class="fm-row fm-form-types">
|
3159 |
+
<label style="font-size:18px; width: 170px !important; ">Form Type</label>
|
3160 |
+
<label>
|
3161 |
+
<input type="radio" name="form_type" value="embedded" onclick="change_form_type('embedded'); change_hide_show('fm-embedded');"
|
3162 |
+
<?php echo $row->type == 'embedded' ? 'checked="checked"' : '' ?>>
|
3163 |
+
<span class="fm-embedded <?php echo $row->type == 'embedded' ? ' active' : '' ?>"></span>
|
3164 |
+
<p>Embedded</p>
|
3165 |
+
</label>
|
3166 |
+
<label>
|
3167 |
+
<input type="radio" name="form_type" value="popover" onclick="change_form_type('popover'); change_hide_show('fm-popover');"
|
3168 |
+
<?php echo $row->type == 'popover' ? 'checked="checked"' : '' ?>>
|
3169 |
+
<span class="fm-popover <?php echo $row->type == 'popover' ? ' active' : '' ?>"></span>
|
3170 |
+
<p>Popup</p>
|
3171 |
+
</label>
|
3172 |
+
<label>
|
3173 |
+
<input type="radio" name="form_type" value="topbar" onclick="change_form_type('topbar'); change_hide_show('fm-topbar');"
|
3174 |
+
<?php echo $row->type == 'topbar' ? 'checked="checked"' : '' ?>>
|
3175 |
+
<span class="fm-topbar <?php echo $row->type == 'topbar' ? ' active' : '' ?>"></span>
|
3176 |
+
<p>Topbar</p>
|
3177 |
+
</label>
|
3178 |
+
<label>
|
3179 |
+
<input type="radio" name="form_type" value="scrollbox" onclick="change_form_type('scrollbox'); change_hide_show('fm-scrollbox');"<?php echo $row->type == 'scrollbox' ? 'checked="checked"' : '' ?>>
|
3180 |
+
<span class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? ' active' : '' ?>"></span>
|
3181 |
+
<p>Scrollbox</p>
|
3182 |
+
</label>
|
3183 |
+
</div>
|
3184 |
+
<br /><br />
|
3185 |
+
<table class="admintable">
|
3186 |
+
<tr class="fm-embedded <?php echo $row->type == 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
3187 |
+
<td class="fm_options_label">
|
3188 |
+
<label>Form Placement</label>
|
3189 |
+
</td>
|
3190 |
+
<td class="fm_options_value">
|
3191 |
+
Use <input type="text" value='[Form id="<?php echo $row->form_id; ?>"]' onclick="fm_select_value(this)" readonly="readonly" style="width:155px !important;"/> shortcode to display the form.
|
3192 |
+
</td>
|
3193 |
+
</tr>
|
3194 |
+
<tr class="fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
|
3195 |
+
<td class="fm_options_label">
|
3196 |
+
<label>Animation Effect</label>
|
3197 |
+
</td>
|
3198 |
+
<td class="fm_options_value">
|
3199 |
+
<select id="popover_animate_effect" name="popover_animate_effect">
|
3200 |
+
<?php
|
3201 |
+
foreach($animation_effects as $anim_key => $animation_effect){
|
3202 |
+
$selected = $row->popover_animate_effect == $anim_key ? 'selected="selected"' : '';
|
3203 |
+
echo '<option value="'.$anim_key.'" '.$selected.'>'.$animation_effect.'</option>';
|
3204 |
+
}
|
3205 |
+
?>
|
3206 |
+
</select>
|
3207 |
+
</td>
|
3208 |
+
</tr>
|
3209 |
+
|
3210 |
+
<tr class="fm-popover <?php echo $row->type != 'popover' ? 'fm-hide' : 'fm-show'; ?>">
|
3211 |
+
<td class="fm_options_label">
|
3212 |
+
<label>Loading Delay</label>
|
3213 |
+
</td>
|
3214 |
+
<td class="fm_options_value">
|
3215 |
+
<input type="number" name="popover_loading_delay" value="<?php echo $row->popover_loading_delay; ?>" /> seconds
|
3216 |
+
<div>Define the amount of time before the form popup appears after the page loads. Set 0 for no delay.
|
3217 |
+
</div>
|
3218 |
+
</td>
|
3219 |
+
</tr>
|
3220 |
+
<tr class="fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
|
3221 |
+
<td class="fm_options_label">
|
3222 |
+
<label>Frequency</label>
|
3223 |
+
</td>
|
3224 |
+
<td class="fm_options_value">
|
3225 |
+
<input type="number" name="popover_frequency" value="<?php echo $row->popover_frequency; ?>" /> days
|
3226 |
+
<div>Display the popup to the same visitor (who has closed the popup/submitted the form) after this period. Set the value to 0 to always show.
|
3227 |
+
</div>
|
3228 |
+
</td>
|
3229 |
+
</tr>
|
3230 |
+
<tr class="fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
|
3231 |
+
<td class="fm_options_label">
|
3232 |
+
<label>Position</label>
|
3233 |
+
</td>
|
3234 |
+
<td class="fm_options_value">
|
3235 |
+
<button name="topbar_position" class="fm-checkbox-radio-button <?php echo $row->topbar_position == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); fm_show_hide('topbar_remain_top'); return false;" value="<?php echo $row->topbar_position == 1 ? '1' : '0' ?>">
|
3236 |
+
<label><?php echo $row->topbar_position == 1 ? 'Top' : 'Bottom' ?></label>
|
3237 |
+
<span></span>
|
3238 |
+
</button>
|
3239 |
+
<input type="hidden" name="topbar_position" value="<?php echo $row->topbar_position; ?>"/>
|
3240 |
+
</td>
|
3241 |
+
</tr>
|
3242 |
+
<tr class="fm-topbar topbar_remain_top <?php echo $row->type != 'topbar' ? 'fm-hide' : ($row->topbar_position == 1 ? 'fm-show' : 'fm-hide') ?>">
|
3243 |
+
<td class="fm_options_label">
|
3244 |
+
<label>Remain at top when scrolling</label>
|
3245 |
+
</td>
|
3246 |
+
<td class="fm_options_value">
|
3247 |
+
<button class="fm-checkbox-radio-button <?php echo $row->topbar_remain_top == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->topbar_remain_top; ?>">
|
3248 |
+
<span></span>
|
3249 |
+
</button>
|
3250 |
+
<input type="hidden" name="topbar_remain_top" value="<?php echo $row->topbar_remain_top; ?>"/>
|
3251 |
+
</td>
|
3252 |
+
</tr>
|
3253 |
+
<tr class="fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
|
3254 |
+
<td class="fm_options_label">
|
3255 |
+
<label>Allow Closing the bar</label>
|
3256 |
+
</td>
|
3257 |
+
<td class="fm_options_value">
|
3258 |
+
<button class="fm-checkbox-radio-button <?php echo $row->topbar_closing == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->topbar_closing; ?>">
|
3259 |
+
<span></span>
|
3260 |
+
</button>
|
3261 |
+
<input type="hidden" name="topbar_closing" value="<?php echo $row->topbar_closing; ?>"/>
|
3262 |
+
</td>
|
3263 |
+
</tr>
|
3264 |
+
<tr class="fm-topbar topbar_hide_duration <?php echo $row->type != 'topbar' ? 'fm-hide' : 'fm-show' ?>">
|
3265 |
+
<td class="fm_options_label">
|
3266 |
+
<label>Frequency</label>
|
3267 |
+
</td>
|
3268 |
+
<td class="fm_options_value">
|
3269 |
+
<input type="number" name="topbar_hide_duration" value="<?php echo $row->topbar_hide_duration; ?>"/>days
|
3270 |
+
<div>Display the topbar to the same visitor (who has closed the popup/submitted the form) after this period. Set the value to 0 to always show.
|
3271 |
+
</div>
|
3272 |
+
</td>
|
3273 |
+
</tr>
|
3274 |
+
|
3275 |
+
<tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
|
3276 |
+
<td class="fm_options_label">
|
3277 |
+
<label>Position</label>
|
3278 |
+
</td>
|
3279 |
+
<td class="fm_options_value">
|
3280 |
+
<button name="scrollbox_position" class="fm-checkbox-radio-button <?php echo $row->scrollbox_position == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->scrollbox_position == 1 ? '1' : '0' ?>">
|
3281 |
+
<label><?php echo $row->scrollbox_position == 1 ? 'Right' : 'Left' ?></label>
|
3282 |
+
<span></span>
|
3283 |
+
</button>
|
3284 |
+
<input type="hidden" name="scrollbox_position" value="<?php echo $row->scrollbox_position; ?>"/>
|
3285 |
+
</td>
|
3286 |
+
</tr>
|
3287 |
+
<tr class="fm-scrollbox <?php echo $row->type != 'scrollbox' ? 'fm-hide' : 'fm-show'; ?>">
|
3288 |
+
<td class="fm_options_label">
|
3289 |
+
<label>Loading Delay</label>
|
3290 |
+
</td>
|
3291 |
+
<td class="fm_options_value">
|
3292 |
+
<input type="number" name="scrollbox_loading_delay" value="<?php echo $row->scrollbox_loading_delay; ?>" /> seconds
|
3293 |
+
<div>Define the amount of time before the form scrollbox appears after the page loads. Set 0 for no delay.
|
3294 |
+
</div>
|
3295 |
+
</td>
|
3296 |
+
</tr>
|
3297 |
+
<tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
|
3298 |
+
<td class="fm_options_label">
|
3299 |
+
<label>Frequency</label>
|
3300 |
+
</td>
|
3301 |
+
<td class="fm_options_value">
|
3302 |
+
<input type="number" name="scrollbox_hide_duration" value="<?php echo $row->scrollbox_hide_duration; ?>"/>days
|
3303 |
+
<div>Display the scrollbox to the same visitor (who has closed the popup/submitted the form) after this period. Set the value to 0 to always show.
|
3304 |
+
</div>
|
3305 |
+
</td>
|
3306 |
+
</tr>
|
3307 |
+
|
3308 |
+
<tr class="fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
3309 |
+
<td class="fm_options_label">
|
3310 |
+
<label>Always show for administrator</label>
|
3311 |
+
</td>
|
3312 |
+
<td class="fm_options_value">
|
3313 |
+
<button class="fm-checkbox-radio-button <?php echo $row->show_for_admin == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->show_for_admin; ?>">
|
3314 |
+
<span></span>
|
3315 |
+
</button>
|
3316 |
+
<input type="hidden" name="show_for_admin" value="<?php echo $row->show_for_admin; ?>"/>
|
3317 |
+
<div>If this option is enabled, website admins will always see the form.</div>
|
3318 |
+
</td>
|
3319 |
+
</tr>
|
3320 |
+
|
3321 |
+
<tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
|
3322 |
+
<td class="fm_options_label">
|
3323 |
+
<label>Trigger Point</label>
|
3324 |
+
</td>
|
3325 |
+
<td class="fm_options_value">
|
3326 |
+
<input type="number" name="scrollbox_trigger_point" value="<?php echo $row->scrollbox_trigger_point; ?>"/>%
|
3327 |
+
<div>Set the percentage of the page height, where the scrollbox form will appear after scrolling down.</div>
|
3328 |
+
</td>
|
3329 |
+
</tr>
|
3330 |
+
<tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
|
3331 |
+
<td class="fm_options_label">
|
3332 |
+
<label>Allow Closing the bar</label>
|
3333 |
+
</td>
|
3334 |
+
<td class="fm_options_value">
|
3335 |
+
<button class="fm-checkbox-radio-button <?php echo $row->scrollbox_closing == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->scrollbox_closing; ?>">
|
3336 |
+
<span></span>
|
3337 |
+
</button>
|
3338 |
+
<input type="hidden" name="scrollbox_closing" value="<?php echo $row->scrollbox_closing; ?>"/>
|
3339 |
+
</td>
|
3340 |
+
</tr>
|
3341 |
+
<tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
|
3342 |
+
<td class="fm_options_label">
|
3343 |
+
<label>Allow Minimize</label>
|
3344 |
+
</td>
|
3345 |
+
<td class="fm_options_value">
|
3346 |
+
<button class="fm-checkbox-radio-button <?php echo $row->scrollbox_minimize == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); fm_show_hide('minimize_text'); return false;" value="<?php echo $row->scrollbox_minimize; ?>">
|
3347 |
+
<span></span>
|
3348 |
+
</button>
|
3349 |
+
<input type="hidden" name="scrollbox_minimize" value="<?php echo $row->scrollbox_minimize; ?>"/>
|
3350 |
+
</td>
|
3351 |
+
</tr>
|
3352 |
+
<tr class="fm-scrollbox minimize_text <?php echo $row->type == 'scrollbox' && $row->scrollbox_minimize == 1 ? 'fm-show' : 'fm-hide' ?>">
|
3353 |
+
<td class="fm_options_label">
|
3354 |
+
<label>Minimize Text</label>
|
3355 |
+
</td>
|
3356 |
+
<td class="fm_options_value">
|
3357 |
+
<input type="text" name="scrollbox_minimize_text" value="<?php echo $row->scrollbox_minimize_text; ?>"/>
|
3358 |
+
</td>
|
3359 |
+
</tr>
|
3360 |
+
|
3361 |
+
<tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
|
3362 |
+
<td class="fm_options_label">
|
3363 |
+
<label>Auto Hide</label>
|
3364 |
+
</td>
|
3365 |
+
<td class="fm_options_value">
|
3366 |
+
<button class="fm-checkbox-radio-button <?php echo $row->scrollbox_auto_hide == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->scrollbox_auto_hide; ?>">
|
3367 |
+
<span></span>
|
3368 |
+
</button>
|
3369 |
+
<input type="hidden" name="scrollbox_auto_hide" value="<?php echo $row->scrollbox_auto_hide; ?>"/>
|
3370 |
+
<div>Hide the scrollbox form again when visitor scrolls back up.</div>
|
3371 |
+
</td>
|
3372 |
+
</tr>
|
3373 |
+
<tr class="fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
3374 |
+
<td class="fm_options_label">
|
3375 |
+
<label>Display on</label>
|
3376 |
+
</td>
|
3377 |
+
<td class="fm_options_value">
|
3378 |
+
<ul class="pp_display pp_display_on"><?php
|
3379 |
+
$posts_and_pages = $this->model->fm_posts_query();
|
3380 |
+
$stat_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives');
|
3381 |
+
|
3382 |
+
$def_post_types = array('post' => 'Post', 'page' => 'Page');
|
3383 |
+
$custom_post_types = get_post_types( array(
|
3384 |
+
'public' => true,
|
3385 |
+
'_builtin' => false,
|
3386 |
+
) );
|
3387 |
+
|
3388 |
+
$post_types = array_merge($def_post_types, $custom_post_types);
|
3389 |
+
$all_types = $stat_types + $post_types;
|
3390 |
+
$selected_types = explode(',', $row->display_on);
|
3391 |
+
$show_cats = in_array('post', $selected_types);
|
3392 |
+
$m = 0;
|
3393 |
+
foreach($all_types as $post_key => $post_type){
|
3394 |
+
$checked = in_array('everything', $selected_types) || in_array($post_key, $selected_types) ? 'checked="checked"' : '';
|
3395 |
+
$postclass = $post_key != 'page' && in_array($post_key, array_keys($def_post_types)) ? 'class="catpost"' : '';
|
3396 |
+
echo '<li><input id="pt'.$m.'" type="checkbox" name="display_on[]" value="'.$post_key.'" '.$checked.' '.$postclass.'/><label for="pt'.$m.'">'.$post_type.'</label></li>';
|
3397 |
+
$m++;
|
3398 |
+
}
|
3399 |
+
?>
|
3400 |
+
</ul>
|
3401 |
+
</td>
|
3402 |
+
</tr>
|
3403 |
+
<tr class="fm-popover fm-topbar fm-scrollbox fm-cat-show <?php echo $row->type != 'embedded' && $show_cats ? 'fm-show' : 'fm-hide' ?>">
|
3404 |
+
<td class="fm_options_label">
|
3405 |
+
<label>Display on these category's posts</label>
|
3406 |
+
</td>
|
3407 |
+
<td class="fm_options_value">
|
3408 |
+
<ul class="pp_display pp_display_on_categories"><?php
|
3409 |
+
$categories = $this->model->fm_categories_query();
|
3410 |
+
$selected_categories = explode(',', $row->display_on_categories);
|
3411 |
+
$current_categories_array = explode(',', $row->current_categories);
|
3412 |
+
$m = 0;
|
3413 |
+
foreach($categories as $cat_key => $category){
|
3414 |
+
$checked = ((!$row->current_categories && !$row->display_on_categories) || in_array($cat_key, $selected_categories) || (in_array('auto_check_new', $selected_categories) && !in_array($cat_key, $current_categories_array))) ? 'checked="checked"' : '';
|
3415 |
+
|
3416 |
+
echo '<li><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/><label for="cat'.$m.'">'.$category.'</label></li>';
|
3417 |
+
$m++;
|
3418 |
+
}
|
3419 |
+
$auto_check = (!$row->current_categories && !$row->display_on_categories) || in_array('auto_check_new', $selected_categories) ? 'checked="checked"' : '';
|
3420 |
+
echo '<li><br/><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="auto_check_new" '.$auto_check.'/><label for="cat'.$m.'">Automatically check new categories</label></li>';
|
3421 |
+
$current_categories = !$row->current_categories && !$row->display_on_categories ? implode(',', array_keys($categories)) : $row->current_categories;
|
3422 |
+
?>
|
3423 |
+
</ul>
|
3424 |
+
<input type="hidden" name="current_categories" value="<?php echo $current_categories; ?>"/>
|
3425 |
+
</td>
|
3426 |
+
</tr>
|
3427 |
+
<tr class="fm-popover fm-topbar fm-scrollbox fm-posts-show <?php echo (in_array('everything', $selected_types) || in_array('post', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
3428 |
+
<td class="fm_options_label">
|
3429 |
+
<label>Display on these posts</label>
|
3430 |
+
</td>
|
3431 |
+
<td class="fm_options_value">
|
3432 |
+
<div class="fm-mini-heading">Click on input area to view the list of posts. If left empty the form will appear on all posts.</div>
|
3433 |
+
<p>Posts defined below will override all settings above.</p>
|
3434 |
+
<ul class="fm-pp">
|
3435 |
+
<li class="pp_selected"><?php if($row->posts_include){
|
3436 |
+
$posts_include = explode(',', $row->posts_include);
|
3437 |
+
foreach($posts_include as $post_exclude){
|
3438 |
+
if(isset($posts_and_pages[$post_exclude])){
|
3439 |
+
$ptitle = $posts_and_pages[$post_exclude]['title'];
|
3440 |
+
$ptype = $posts_and_pages[$post_exclude]['post_type'];
|
3441 |
+
echo '<span data-post_id="'.$post_exclude.'">['.$ptype.'] - '.$ptitle.'<span class="pp_selected_remove">x</span></span>';
|
3442 |
+
}
|
3443 |
+
}
|
3444 |
+
} ?></li>
|
3445 |
+
<li>
|
3446 |
+
<input type="text" class="pp_search_posts" value="" data-post_type="only_posts" style="width: 100% !important;" />
|
3447 |
+
<input type="hidden" class="pp_exclude" name="posts_include" value="<?php echo $row->posts_include; ?>" />
|
3448 |
+
<span class="fm-loading"></span>
|
3449 |
+
</li>
|
3450 |
+
<li class="pp_live_search fm-hide">
|
3451 |
+
<ul class="pp_search_results">
|
3452 |
+
|
3453 |
+
</ul>
|
3454 |
+
</li>
|
3455 |
+
</ul>
|
3456 |
+
</td>
|
3457 |
+
</tr>
|
3458 |
+
<tr class="fm-popover fm-topbar fm-scrollbox fm-pages-show <?php echo (in_array('everything', $selected_types) || in_array('page', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
3459 |
+
<td class="fm_options_label">
|
3460 |
+
<label>Display on these pages</label>
|
3461 |
+
</td>
|
3462 |
+
<td class="fm_options_value">
|
3463 |
+
<div class="fm-mini-heading">Click on input area to view the list of pages. If left empty the form will appear on all pages.</div>
|
3464 |
+
<p>Pages defined below will override all settings above.</p>
|
3465 |
+
<ul class="fm-pp">
|
3466 |
+
<li class="pp_selected"><?php if($row->pages_include){
|
3467 |
+
$pages_include = explode(',', $row->pages_include);
|
3468 |
+
foreach($pages_include as $page_exclude){
|
3469 |
+
if(isset($posts_and_pages[$page_exclude])){
|
3470 |
+
$ptitle = $posts_and_pages[$page_exclude]['title'];
|
3471 |
+
$ptype = $posts_and_pages[$page_exclude]['post_type'];
|
3472 |
+
echo '<span data-post_id="'.$page_exclude.'">['.$ptype.'] - '.$ptitle.'<span class="pp_selected_remove">x</span></span>';
|
3473 |
+
}
|
3474 |
+
}
|
3475 |
+
} ?></li>
|
3476 |
+
<li>
|
3477 |
+
<input type="text" class="pp_search_posts" value="" data-post_type="only_pages" style="width: 100% !important;" />
|
3478 |
+
<input type="hidden" class="pp_exclude" name="pages_include" value="<?php echo $row->pages_include; ?>" />
|
3479 |
+
<span class="fm-loading"></span>
|
3480 |
+
</li>
|
3481 |
+
<li class="pp_live_search fm-hide">
|
3482 |
+
<ul class="pp_search_results">
|
3483 |
+
</ul>
|
3484 |
+
</li>
|
3485 |
+
</ul>
|
3486 |
+
</td>
|
3487 |
+
</tr>
|
3488 |
+
<tr class="fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
3489 |
+
<td class="fm_options_label">
|
3490 |
+
<label>Hide on Mobile</label>
|
3491 |
+
</td>
|
3492 |
+
<td class="fm_options_value">
|
3493 |
+
<button class="fm-checkbox-radio-button <?php echo $row->hide_mobile == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->hide_mobile; ?>">
|
3494 |
+
<span></span>
|
3495 |
+
</button>
|
3496 |
+
<input type="hidden" name="hide_mobile" value="<?php echo $row->hide_mobile; ?>"/>
|
3497 |
+
</td>
|
3498 |
+
</tr>
|
3499 |
+
|
3500 |
+
</table>
|
3501 |
+
</fieldset>
|
3502 |
+
</div>
|
3503 |
+
</form>
|
3504 |
+
<?php
|
3505 |
+
}
|
3506 |
+
|
3507 |
+
}
|
|
css/jquery-ui-1.12.1.css
ADDED
@@ -0,0 +1,1311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.12.1 - 2016-09-14
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
|
4 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px
|
5 |
+
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
6 |
+
|
7 |
+
/* Layout helpers
|
8 |
+
----------------------------------*/
|
9 |
+
.ui-helper-hidden {
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
.ui-helper-hidden-accessible {
|
13 |
+
border: 0;
|
14 |
+
clip: rect(0 0 0 0);
|
15 |
+
height: 1px;
|
16 |
+
margin: -1px;
|
17 |
+
overflow: hidden;
|
18 |
+
padding: 0;
|
19 |
+
position: absolute;
|
20 |
+
width: 1px;
|
21 |
+
}
|
22 |
+
.ui-helper-reset {
|
23 |
+
margin: 0;
|
24 |
+
padding: 0;
|
25 |
+
border: 0;
|
26 |
+
outline: 0;
|
27 |
+
line-height: 1.3;
|
28 |
+
text-decoration: none;
|
29 |
+
font-size: 100%;
|
30 |
+
list-style: none;
|
31 |
+
}
|
32 |
+
.ui-helper-clearfix:before,
|
33 |
+
.ui-helper-clearfix:after {
|
34 |
+
content: "";
|
35 |
+
display: table;
|
36 |
+
border-collapse: collapse;
|
37 |
+
}
|
38 |
+
.ui-helper-clearfix:after {
|
39 |
+
clear: both;
|
40 |
+
}
|
41 |
+
.ui-helper-zfix {
|
42 |
+
width: 100%;
|
43 |
+
height: 100%;
|
44 |
+
top: 0;
|
45 |
+
left: 0;
|
46 |
+
position: absolute;
|
47 |
+
opacity: 0;
|
48 |
+
filter:Alpha(Opacity=0); /* support: IE8 */
|
49 |
+
}
|
50 |
+
|
51 |
+
.ui-front {
|
52 |
+
z-index: 100;
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
/* Interaction Cues
|
57 |
+
----------------------------------*/
|
58 |
+
.ui-state-disabled {
|
59 |
+
cursor: default !important;
|
60 |
+
pointer-events: none;
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/* Icons
|
65 |
+
----------------------------------*/
|
66 |
+
.ui-icon {
|
67 |
+
display: inline-block;
|
68 |
+
vertical-align: middle;
|
69 |
+
margin-top: -.25em;
|
70 |
+
position: relative;
|
71 |
+
text-indent: -99999px;
|
72 |
+
overflow: hidden;
|
73 |
+
background-repeat: no-repeat;
|
74 |
+
}
|
75 |
+
|
76 |
+
.ui-widget-icon-block {
|
77 |
+
left: 50%;
|
78 |
+
margin-left: -8px;
|
79 |
+
display: block;
|
80 |
+
}
|
81 |
+
|
82 |
+
/* Misc visuals
|
83 |
+
----------------------------------*/
|
84 |
+
|
85 |
+
/* Overlays */
|
86 |
+
.ui-widget-overlay {
|
87 |
+
position: fixed;
|
88 |
+
top: 0;
|
89 |
+
left: 0;
|
90 |
+
width: 100%;
|
91 |
+
height: 100%;
|
92 |
+
}
|
93 |
+
.ui-accordion .ui-accordion-header {
|
94 |
+
display: block;
|
95 |
+
cursor: pointer;
|
96 |
+
position: relative;
|
97 |
+
margin: 2px 0 0 0;
|
98 |
+
padding: .5em .5em .5em .7em;
|
99 |
+
font-size: 100%;
|
100 |
+
}
|
101 |
+
.ui-accordion .ui-accordion-content {
|
102 |
+
padding: 1em 2.2em;
|
103 |
+
border-top: 0;
|
104 |
+
overflow: auto;
|
105 |
+
}
|
106 |
+
.ui-autocomplete {
|
107 |
+
position: absolute;
|
108 |
+
top: 0;
|
109 |
+
left: 0;
|
110 |
+
cursor: default;
|
111 |
+
}
|
112 |
+
.ui-menu {
|
113 |
+
list-style: none;
|
114 |
+
padding: 0;
|
115 |
+
margin: 0;
|
116 |
+
display: block;
|
117 |
+
outline: 0;
|
118 |
+
}
|
119 |
+
.ui-menu .ui-menu {
|
120 |
+
position: absolute;
|
121 |
+
}
|
122 |
+
.ui-menu .ui-menu-item {
|
123 |
+
margin: 0;
|
124 |
+
cursor: pointer;
|
125 |
+
/* support: IE10, see #8844 */
|
126 |
+
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
127 |
+
}
|
128 |
+
.ui-menu .ui-menu-item-wrapper {
|
129 |
+
position: relative;
|
130 |
+
padding: 3px 1em 3px .4em;
|
131 |
+
}
|
132 |
+
.ui-menu .ui-menu-divider {
|
133 |
+
margin: 5px 0;
|
134 |
+
height: 0;
|
135 |
+
font-size: 0;
|
136 |
+
line-height: 0;
|
137 |
+
border-width: 1px 0 0 0;
|
138 |
+
}
|
139 |
+
.ui-menu .ui-state-focus,
|
140 |
+
.ui-menu .ui-state-active {
|
141 |
+
margin: -1px;
|
142 |
+
}
|
143 |
+
|
144 |
+
/* icon support */
|
145 |
+
.ui-menu-icons {
|
146 |
+
position: relative;
|
147 |
+
}
|
148 |
+
.ui-menu-icons .ui-menu-item-wrapper {
|
149 |
+
padding-left: 2em;
|
150 |
+
}
|
151 |
+
|
152 |
+
/* left-aligned */
|
153 |
+
.ui-menu .ui-icon {
|
154 |
+
position: absolute;
|
155 |
+
top: 0;
|
156 |
+
bottom: 0;
|
157 |
+
left: .2em;
|
158 |
+
margin: auto 0;
|
159 |
+
}
|
160 |
+
|
161 |
+
/* right-aligned */
|
162 |
+
.ui-menu .ui-menu-icon {
|
163 |
+
left: auto;
|
164 |
+
right: 0;
|
165 |
+
}
|
166 |
+
.ui-button {
|
167 |
+
padding: .4em 1em;
|
168 |
+
display: inline-block;
|
169 |
+
position: relative;
|
170 |
+
line-height: normal;
|
171 |
+
margin-right: .1em;
|
172 |
+
cursor: pointer;
|
173 |
+
vertical-align: middle;
|
174 |
+
text-align: center;
|
175 |
+
-webkit-user-select: none;
|
176 |
+
-moz-user-select: none;
|
177 |
+
-ms-user-select: none;
|
178 |
+
user-select: none;
|
179 |
+
|
180 |
+
/* Support: IE <= 11 */
|
181 |
+
overflow: visible;
|
182 |
+
}
|
183 |
+
|
184 |
+
.ui-button,
|
185 |
+
.ui-button:link,
|
186 |
+
.ui-button:visited,
|
187 |
+
.ui-button:hover,
|
188 |
+
.ui-button:active {
|
189 |
+
text-decoration: none;
|
190 |
+
}
|
191 |
+
|
192 |
+
/* to make room for the icon, a width needs to be set here */
|
193 |
+
.ui-button-icon-only {
|
194 |
+
width: 2em;
|
195 |
+
box-sizing: border-box;
|
196 |
+
text-indent: -9999px;
|
197 |
+
white-space: nowrap;
|
198 |
+
}
|
199 |
+
|
200 |
+
/* no icon support for input elements */
|
201 |
+
input.ui-button.ui-button-icon-only {
|
202 |
+
text-indent: 0;
|
203 |
+
}
|
204 |
+
|
205 |
+
/* button icon element(s) */
|
206 |
+
.ui-button-icon-only .ui-icon {
|
207 |
+
position: absolute;
|
208 |
+
top: 50%;
|
209 |
+
left: 50%;
|
210 |
+
margin-top: -8px;
|
211 |
+
margin-left: -8px;
|
212 |
+
}
|
213 |
+
|
214 |
+
.ui-button.ui-icon-notext .ui-icon {
|
215 |
+
padding: 0;
|
216 |
+
width: 2.1em;
|
217 |
+
height: 2.1em;
|
218 |
+
text-indent: -9999px;
|
219 |
+
white-space: nowrap;
|
220 |
+
|
221 |
+
}
|
222 |
+
|
223 |
+
input.ui-button.ui-icon-notext .ui-icon {
|
224 |
+
width: auto;
|
225 |
+
height: auto;
|
226 |
+
text-indent: 0;
|
227 |
+
white-space: normal;
|
228 |
+
padding: .4em 1em;
|
229 |
+
}
|
230 |
+
|
231 |
+
/* workarounds */
|
232 |
+
/* Support: Firefox 5 - 40 */
|
233 |
+
input.ui-button::-moz-focus-inner,
|
234 |
+
button.ui-button::-moz-focus-inner {
|
235 |
+
border: 0;
|
236 |
+
padding: 0;
|
237 |
+
}
|
238 |
+
.ui-controlgroup {
|
239 |
+
vertical-align: middle;
|
240 |
+
display: inline-block;
|
241 |
+
}
|
242 |
+
.ui-controlgroup > .ui-controlgroup-item {
|
243 |
+
float: left;
|
244 |
+
margin-left: 0;
|
245 |
+
margin-right: 0;
|
246 |
+
}
|
247 |
+
.ui-controlgroup > .ui-controlgroup-item:focus,
|
248 |
+
.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
|
249 |
+
z-index: 9999;
|
250 |
+
}
|
251 |
+
.ui-controlgroup-vertical > .ui-controlgroup-item {
|
252 |
+
display: block;
|
253 |
+
float: none;
|
254 |
+
width: 100%;
|
255 |
+
margin-top: 0;
|
256 |
+
margin-bottom: 0;
|
257 |
+
text-align: left;
|
258 |
+
}
|
259 |
+
.ui-controlgroup-vertical .ui-controlgroup-item {
|
260 |
+
box-sizing: border-box;
|
261 |
+
}
|
262 |
+
.ui-controlgroup .ui-controlgroup-label {
|
263 |
+
padding: .4em 1em;
|
264 |
+
}
|
265 |
+
.ui-controlgroup .ui-controlgroup-label span {
|
266 |
+
font-size: 80%;
|
267 |
+
}
|
268 |
+
.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
|
269 |
+
border-left: none;
|
270 |
+
}
|
271 |
+
.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
|
272 |
+
border-top: none;
|
273 |
+
}
|
274 |
+
.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
|
275 |
+
border-right: none;
|
276 |
+
}
|
277 |
+
.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
|
278 |
+
border-bottom: none;
|
279 |
+
}
|
280 |
+
|
281 |
+
/* Spinner specific style fixes */
|
282 |
+
.ui-controlgroup-vertical .ui-spinner-input {
|
283 |
+
|
284 |
+
/* Support: IE8 only, Android < 4.4 only */
|
285 |
+
width: 75%;
|
286 |
+
width: calc( 100% - 2.4em );
|
287 |
+
}
|
288 |
+
.ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
|
289 |
+
border-top-style: solid;
|
290 |
+
}
|
291 |
+
|
292 |
+
.ui-checkboxradio-label .ui-icon-background {
|
293 |
+
box-shadow: inset 1px 1px 1px #ccc;
|
294 |
+
border-radius: .12em;
|
295 |
+
border: none;
|
296 |
+
}
|
297 |
+
.ui-checkboxradio-radio-label .ui-icon-background {
|
298 |
+
width: 16px;
|
299 |
+
height: 16px;
|
300 |
+
border-radius: 1em;
|
301 |
+
overflow: visible;
|
302 |
+
border: none;
|
303 |
+
}
|
304 |
+
.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
|
305 |
+
.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
|
306 |
+
background-image: none;
|
307 |
+
width: 8px;
|
308 |
+
height: 8px;
|
309 |
+
border-width: 4px;
|
310 |
+
border-style: solid;
|
311 |
+
}
|
312 |
+
.ui-checkboxradio-disabled {
|
313 |
+
pointer-events: none;
|
314 |
+
}
|
315 |
+
.ui-datepicker {
|
316 |
+
width: 17em;
|
317 |
+
padding: .2em .2em 0;
|
318 |
+
display: none;
|
319 |
+
}
|
320 |
+
.ui-datepicker .ui-datepicker-header {
|
321 |
+
position: relative;
|
322 |
+
padding: .2em 0;
|
323 |
+
}
|
324 |
+
.ui-datepicker .ui-datepicker-prev,
|
325 |
+
.ui-datepicker .ui-datepicker-next {
|
326 |
+
position: absolute;
|
327 |
+
top: 2px;
|
328 |
+
width: 1.8em;
|
329 |
+
height: 1.8em;
|
330 |
+
}
|
331 |
+
.ui-datepicker .ui-datepicker-prev-hover,
|
332 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
333 |
+
top: 1px;
|
334 |
+
}
|
335 |
+
.ui-datepicker .ui-datepicker-prev {
|
336 |
+
left: 2px;
|
337 |
+
}
|
338 |
+
.ui-datepicker .ui-datepicker-next {
|
339 |
+
right: 2px;
|
340 |
+
}
|
341 |
+
.ui-datepicker .ui-datepicker-prev-hover {
|
342 |
+
left: 1px;
|
343 |
+
}
|
344 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
345 |
+
right: 1px;
|
346 |
+
}
|
347 |
+
.ui-datepicker .ui-datepicker-prev span,
|
348 |
+
.ui-datepicker .ui-datepicker-next span {
|
349 |
+
display: block;
|
350 |
+
position: absolute;
|
351 |
+
left: 50%;
|
352 |
+
margin-left: -8px;
|
353 |
+
top: 50%;
|
354 |
+
margin-top: -8px;
|
355 |
+
}
|
356 |
+
.ui-datepicker .ui-datepicker-title {
|
357 |
+
margin: 0 2.3em;
|
358 |
+
line-height: 1.8em;
|
359 |
+
text-align: center;
|
360 |
+
}
|
361 |
+
.ui-datepicker .ui-datepicker-title select {
|
362 |
+
font-size: 1em;
|
363 |
+
margin: 1px 0;
|
364 |
+
}
|
365 |
+
.ui-datepicker select.ui-datepicker-month,
|
366 |
+
.ui-datepicker select.ui-datepicker-year {
|
367 |
+
width: 45%;
|
368 |
+
}
|
369 |
+
.ui-datepicker table {
|
370 |
+
width: 100%;
|
371 |
+
font-size: .9em;
|
372 |
+
border-collapse: collapse;
|
373 |
+
margin: 0 0 .4em;
|
374 |
+
}
|
375 |
+
.ui-datepicker th {
|
376 |
+
padding: .7em .3em;
|
377 |
+
text-align: center;
|
378 |
+
font-weight: bold;
|
379 |
+
border: 0;
|
380 |
+
}
|
381 |
+
.ui-datepicker td {
|
382 |
+
border: 0;
|
383 |
+
padding: 1px;
|
384 |
+
}
|
385 |
+
.ui-datepicker td span,
|
386 |
+
.ui-datepicker td a {
|
387 |
+
display: block;
|
388 |
+
padding: .2em;
|
389 |
+
text-align: right;
|
390 |
+
text-decoration: none;
|
391 |
+
}
|
392 |
+
.ui-datepicker .ui-datepicker-buttonpane {
|
393 |
+
background-image: none;
|
394 |
+
margin: .7em 0 0 0;
|
395 |
+
padding: 0 .2em;
|
396 |
+
border-left: 0;
|
397 |
+
border-right: 0;
|
398 |
+
border-bottom: 0;
|
399 |
+
}
|
400 |
+
.ui-datepicker .ui-datepicker-buttonpane button {
|
401 |
+
float: right;
|
402 |
+
margin: .5em .2em .4em;
|
403 |
+
cursor: pointer;
|
404 |
+
padding: .2em .6em .3em .6em;
|
405 |
+
width: auto;
|
406 |
+
overflow: visible;
|
407 |
+
}
|
408 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
409 |
+
float: left;
|
410 |
+
}
|
411 |
+
|
412 |
+
/* with multiple calendars */
|
413 |
+
.ui-datepicker.ui-datepicker-multi {
|
414 |
+
width: auto;
|
415 |
+
}
|
416 |
+
.ui-datepicker-multi .ui-datepicker-group {
|
417 |
+
float: left;
|
418 |
+
}
|
419 |
+
.ui-datepicker-multi .ui-datepicker-group table {
|
420 |
+
width: 95%;
|
421 |
+
margin: 0 auto .4em;
|
422 |
+
}
|
423 |
+
.ui-datepicker-multi-2 .ui-datepicker-group {
|
424 |
+
width: 50%;
|
425 |
+
}
|
426 |
+
.ui-datepicker-multi-3 .ui-datepicker-group {
|
427 |
+
width: 33.3%;
|
428 |
+
}
|
429 |
+
.ui-datepicker-multi-4 .ui-datepicker-group {
|
430 |
+
width: 25%;
|
431 |
+
}
|
432 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
433 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
434 |
+
border-left-width: 0;
|
435 |
+
}
|
436 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
437 |
+
clear: left;
|
438 |
+
}
|
439 |
+
.ui-datepicker-row-break {
|
440 |
+
clear: both;
|
441 |
+
width: 100%;
|
442 |
+
font-size: 0;
|
443 |
+
}
|
444 |
+
|
445 |
+
/* RTL support */
|
446 |
+
.ui-datepicker-rtl {
|
447 |
+
direction: rtl;
|
448 |
+
}
|
449 |
+
.ui-datepicker-rtl .ui-datepicker-prev {
|
450 |
+
right: 2px;
|
451 |
+
left: auto;
|
452 |
+
}
|
453 |
+
.ui-datepicker-rtl .ui-datepicker-next {
|
454 |
+
left: 2px;
|
455 |
+
right: auto;
|
456 |
+
}
|
457 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
458 |
+
right: 1px;
|
459 |
+
left: auto;
|
460 |
+
}
|
461 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
462 |
+
left: 1px;
|
463 |
+
right: auto;
|
464 |
+
}
|
465 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
466 |
+
clear: right;
|
467 |
+
}
|
468 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
469 |
+
float: left;
|
470 |
+
}
|
471 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
472 |
+
.ui-datepicker-rtl .ui-datepicker-group {
|
473 |
+
float: right;
|
474 |
+
}
|
475 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
476 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
477 |
+
border-right-width: 0;
|
478 |
+
border-left-width: 1px;
|
479 |
+
}
|
480 |
+
|
481 |
+
/* Icons */
|
482 |
+
.ui-datepicker .ui-icon {
|
483 |
+
display: block;
|
484 |
+
text-indent: -99999px;
|
485 |
+
overflow: hidden;
|
486 |
+
background-repeat: no-repeat;
|
487 |
+
left: .5em;
|
488 |
+
top: .3em;
|
489 |
+
}
|
490 |
+
.ui-dialog {
|
491 |
+
position: absolute;
|
492 |
+
top: 0;
|
493 |
+
left: 0;
|
494 |
+
padding: .2em;
|
495 |
+
outline: 0;
|
496 |
+
}
|
497 |
+
.ui-dialog .ui-dialog-titlebar {
|
498 |
+
padding: .4em 1em;
|
499 |
+
position: relative;
|
500 |
+
}
|
501 |
+
.ui-dialog .ui-dialog-title {
|
502 |
+
float: left;
|
503 |
+
margin: .1em 0;
|
504 |
+
white-space: nowrap;
|
505 |
+
width: 90%;
|
506 |
+
overflow: hidden;
|
507 |
+
text-overflow: ellipsis;
|
508 |
+
}
|
509 |
+
.ui-dialog .ui-dialog-titlebar-close {
|
510 |
+
position: absolute;
|
511 |
+
right: .3em;
|
512 |
+
top: 50%;
|
513 |
+
width: 20px;
|
514 |
+
margin: -10px 0 0 0;
|
515 |
+
padding: 1px;
|
516 |
+
height: 20px;
|
517 |
+
}
|
518 |
+
.ui-dialog .ui-dialog-content {
|
519 |
+
position: relative;
|
520 |
+
border: 0;
|
521 |
+
padding: .5em 1em;
|
522 |
+
background: none;
|
523 |
+
overflow: auto;
|
524 |
+
}
|
525 |
+
.ui-dialog .ui-dialog-buttonpane {
|
526 |
+
text-align: left;
|
527 |
+
border-width: 1px 0 0 0;
|
528 |
+
background-image: none;
|
529 |
+
margin-top: .5em;
|
530 |
+
padding: .3em 1em .5em .4em;
|
531 |
+
}
|
532 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
533 |
+
float: right;
|
534 |
+
}
|
535 |
+
.ui-dialog .ui-dialog-buttonpane button {
|
536 |
+
margin: .5em .4em .5em 0;
|
537 |
+
cursor: pointer;
|
538 |
+
}
|
539 |
+
.ui-dialog .ui-resizable-n {
|
540 |
+
height: 2px;
|
541 |
+
top: 0;
|
542 |
+
}
|
543 |
+
.ui-dialog .ui-resizable-e {
|
544 |
+
width: 2px;
|
545 |
+
right: 0;
|
546 |
+
}
|
547 |
+
.ui-dialog .ui-resizable-s {
|
548 |
+
height: 2px;
|
549 |
+
bottom: 0;
|
550 |
+
}
|
551 |
+
.ui-dialog .ui-resizable-w {
|
552 |
+
width: 2px;
|
553 |
+
left: 0;
|
554 |
+
}
|
555 |
+
.ui-dialog .ui-resizable-se,
|
556 |
+
.ui-dialog .ui-resizable-sw,
|
557 |
+
.ui-dialog .ui-resizable-ne,
|
558 |
+
.ui-dialog .ui-resizable-nw {
|
559 |
+
width: 7px;
|
560 |
+
height: 7px;
|
561 |
+
}
|
562 |
+
.ui-dialog .ui-resizable-se {
|
563 |
+
right: 0;
|
564 |
+
bottom: 0;
|
565 |
+
}
|
566 |
+
.ui-dialog .ui-resizable-sw {
|
567 |
+
left: 0;
|
568 |
+
bottom: 0;
|
569 |
+
}
|
570 |
+
.ui-dialog .ui-resizable-ne {
|
571 |
+
right: 0;
|
572 |
+
top: 0;
|
573 |
+
}
|
574 |
+
.ui-dialog .ui-resizable-nw {
|
575 |
+
left: 0;
|
576 |
+
top: 0;
|
577 |
+
}
|
578 |
+
.ui-draggable .ui-dialog-titlebar {
|
579 |
+
cursor: move;
|
580 |
+
}
|
581 |
+
.ui-draggable-handle {
|
582 |
+
-ms-touch-action: none;
|
583 |
+
touch-action: none;
|
584 |
+
}
|
585 |
+
.ui-resizable {
|
586 |
+
position: relative;
|
587 |
+
}
|
588 |
+
.ui-resizable-handle {
|
589 |
+
position: absolute;
|
590 |
+
font-size: 0.1px;
|
591 |
+
display: block;
|
592 |
+
-ms-touch-action: none;
|
593 |
+
touch-action: none;
|
594 |
+
}
|
595 |
+
.ui-resizable-disabled .ui-resizable-handle,
|
596 |
+
.ui-resizable-autohide .ui-resizable-handle {
|
597 |
+
display: none;
|
598 |
+
}
|
599 |
+
.ui-resizable-n {
|
600 |
+
cursor: n-resize;
|
601 |
+
height: 7px;
|
602 |
+
width: 100%;
|
603 |
+
top: -5px;
|
604 |
+
left: 0;
|
605 |
+
}
|
606 |
+
.ui-resizable-s {
|
607 |
+
cursor: s-resize;
|
608 |
+
height: 7px;
|
609 |
+
width: 100%;
|
610 |
+
bottom: -5px;
|
611 |
+
left: 0;
|
612 |
+
}
|
613 |
+
.ui-resizable-e {
|
614 |
+
cursor: e-resize;
|
615 |
+
width: 7px;
|
616 |
+
right: -5px;
|
617 |
+
top: 0;
|
618 |
+
height: 100%;
|
619 |
+
}
|
620 |
+
.ui-resizable-w {
|
621 |
+
cursor: w-resize;
|
622 |
+
width: 7px;
|
623 |
+
left: -5px;
|
624 |
+
top: 0;
|
625 |
+
height: 100%;
|
626 |
+
}
|
627 |
+
.ui-resizable-se {
|
628 |
+
cursor: se-resize;
|
629 |
+
width: 12px;
|
630 |
+
height: 12px;
|
631 |
+
right: 1px;
|
632 |
+
bottom: 1px;
|
633 |
+
}
|
634 |
+
.ui-resizable-sw {
|
635 |
+
cursor: sw-resize;
|
636 |
+
width: 9px;
|
637 |
+
height: 9px;
|
638 |
+
left: -5px;
|
639 |
+
bottom: -5px;
|
640 |
+
}
|
641 |
+
.ui-resizable-nw {
|
642 |
+
cursor: nw-resize;
|
643 |
+
width: 9px;
|
644 |
+
height: 9px;
|
645 |
+
left: -5px;
|
646 |
+
top: -5px;
|
647 |
+
}
|
648 |
+
.ui-resizable-ne {
|
649 |
+
cursor: ne-resize;
|
650 |
+
width: 9px;
|
651 |
+
height: 9px;
|
652 |
+
right: -5px;
|
653 |
+
top: -5px;
|
654 |
+
}
|
655 |
+
.ui-progressbar {
|
656 |
+
height: 2em;
|
657 |
+
text-align: left;
|
658 |
+
overflow: hidden;
|
659 |
+
}
|
660 |
+
.ui-progressbar .ui-progressbar-value {
|
661 |
+
margin: -1px;
|
662 |
+
height: 100%;
|
663 |
+
}
|
664 |
+
.ui-progressbar .ui-progressbar-overlay {
|
665 |
+
background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
|
666 |
+
height: 100%;
|
667 |
+
filter: alpha(opacity=25); /* support: IE8 */
|
668 |
+
opacity: 0.25;
|
669 |
+
}
|
670 |
+
.ui-progressbar-indeterminate .ui-progressbar-value {
|
671 |
+
background-image: none;
|
672 |
+
}
|
673 |
+
.ui-selectable {
|
674 |
+
-ms-touch-action: none;
|
675 |
+
touch-action: none;
|
676 |
+
}
|
677 |
+
.ui-selectable-helper {
|
678 |
+
position: absolute;
|
679 |
+
z-index: 100;
|
680 |
+
border: 1px dotted black;
|
681 |
+
}
|
682 |
+
.ui-selectmenu-menu {
|
683 |
+
padding: 0;
|
684 |
+
margin: 0;
|
685 |
+
position: absolute;
|
686 |
+
top: 0;
|
687 |
+
left: 0;
|
688 |
+
display: none;
|
689 |
+
}
|
690 |
+
.ui-selectmenu-menu .ui-menu {
|
691 |
+
overflow: auto;
|
692 |
+
overflow-x: hidden;
|
693 |
+
padding-bottom: 1px;
|
694 |
+
}
|
695 |
+
.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
|
696 |
+
font-size: 1em;
|
697 |
+
font-weight: bold;
|
698 |
+
line-height: 1.5;
|
699 |
+
padding: 2px 0.4em;
|
700 |
+
margin: 0.5em 0 0 0;
|
701 |
+
height: auto;
|
702 |
+
border: 0;
|
703 |
+
}
|
704 |
+
.ui-selectmenu-open {
|
705 |
+
display: block;
|
706 |
+
}
|
707 |
+
.ui-selectmenu-text {
|
708 |
+
display: block;
|
709 |
+
margin-right: 20px;
|
710 |
+
overflow: hidden;
|
711 |
+
text-overflow: ellipsis;
|
712 |
+
}
|
713 |
+
.ui-selectmenu-button.ui-button {
|
714 |
+
text-align: left;
|
715 |
+
white-space: nowrap;
|
716 |
+
width: 14em;
|
717 |
+
}
|
718 |
+
.ui-selectmenu-icon.ui-icon {
|
719 |
+
float: right;
|
720 |
+
margin-top: 0;
|
721 |
+
}
|
722 |
+
.ui-slider {
|
723 |
+
position: relative;
|
724 |
+
text-align: left;
|
725 |
+
}
|
726 |
+
.ui-slider .ui-slider-handle {
|
727 |
+
position: absolute;
|
728 |
+
z-index: 2;
|
729 |
+
width: 1.2em;
|
730 |
+
height: 1.2em;
|
731 |
+
cursor: default;
|
732 |
+
-ms-touch-action: none;
|
733 |
+
touch-action: none;
|
734 |
+
}
|
735 |
+
.ui-slider .ui-slider-range {
|
736 |
+
position: absolute;
|
737 |
+
z-index: 1;
|
738 |
+
font-size: .7em;
|
739 |
+
display: block;
|
740 |
+
border: 0;
|
741 |
+
background-position: 0 0;
|
742 |
+
}
|
743 |
+
|
744 |
+
/* support: IE8 - See #6727 */
|
745 |
+
.ui-slider.ui-state-disabled .ui-slider-handle,
|
746 |
+
.ui-slider.ui-state-disabled .ui-slider-range {
|
747 |
+
filter: inherit;
|
748 |
+
}
|
749 |
+
|
750 |
+
.ui-slider-horizontal {
|
751 |
+
height: .8em;
|
752 |
+
}
|
753 |
+
.ui-slider-horizontal .ui-slider-handle {
|
754 |
+
top: -.3em;
|
755 |
+
margin-left: -.6em;
|
756 |
+
}
|
757 |
+
.ui-slider-horizontal .ui-slider-range {
|
758 |
+
top: 0;
|
759 |
+
height: 100%;
|
760 |
+
}
|
761 |
+
.ui-slider-horizontal .ui-slider-range-min {
|
762 |
+
left: 0;
|
763 |
+
}
|
764 |
+
.ui-slider-horizontal .ui-slider-range-max {
|
765 |
+
right: 0;
|
766 |
+
}
|
767 |
+
|
768 |
+
.ui-slider-vertical {
|
769 |
+
width: .8em;
|
770 |
+
height: 100px;
|
771 |
+
}
|
772 |
+
.ui-slider-vertical .ui-slider-handle {
|
773 |
+
left: -.3em;
|
774 |
+
margin-left: 0;
|
775 |
+
margin-bottom: -.6em;
|
776 |
+
}
|
777 |
+
.ui-slider-vertical .ui-slider-range {
|
778 |
+
left: 0;
|
779 |
+
width: 100%;
|
780 |
+
}
|
781 |
+
.ui-slider-vertical .ui-slider-range-min {
|
782 |
+
bottom: 0;
|
783 |
+
}
|
784 |
+
.ui-slider-vertical .ui-slider-range-max {
|
785 |
+
top: 0;
|
786 |
+
}
|
787 |
+
.ui-sortable-handle {
|
788 |
+
-ms-touch-action: none;
|
789 |
+
touch-action: none;
|
790 |
+
}
|
791 |
+
.ui-spinner {
|
792 |
+
position: relative;
|
793 |
+
display: inline-block;
|
794 |
+
overflow: hidden;
|
795 |
+
padding: 0;
|
796 |
+
vertical-align: middle;
|
797 |
+
}
|
798 |
+
.ui-spinner-input {
|
799 |
+
border: none;
|
800 |
+
background: none;
|
801 |
+
color: inherit;
|
802 |
+
padding: .222em 0;
|
803 |
+
margin: .2em 0;
|
804 |
+
vertical-align: middle;
|
805 |
+
margin-left: .4em;
|
806 |
+
margin-right: 2em;
|
807 |
+
}
|
808 |
+
.ui-spinner-button {
|
809 |
+
width: 1.6em;
|
810 |
+
height: 50%;
|
811 |
+
font-size: .5em;
|
812 |
+
padding: 0;
|
813 |
+
margin: 0;
|
814 |
+
text-align: center;
|
815 |
+
position: absolute;
|
816 |
+
cursor: default;
|
817 |
+
display: block;
|
818 |
+
overflow: hidden;
|
819 |
+
right: 0;
|
820 |
+
}
|
821 |
+
/* more specificity required here to override default borders */
|
822 |
+
.ui-spinner a.ui-spinner-button {
|
823 |
+
border-top-style: none;
|
824 |
+
border-bottom-style: none;
|
825 |
+
border-right-style: none;
|
826 |
+
}
|
827 |
+
.ui-spinner-up {
|
828 |
+
top: 0;
|
829 |
+
}
|
830 |
+
.ui-spinner-down {
|
831 |
+
bottom: 0;
|
832 |
+
}
|
833 |
+
.ui-tabs {
|
834 |
+
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
835 |
+
padding: .2em;
|
836 |
+
}
|
837 |
+
.ui-tabs .ui-tabs-nav {
|
838 |
+
margin: 0;
|
839 |
+
padding: .2em .2em 0;
|
840 |
+
}
|
841 |
+
.ui-tabs .ui-tabs-nav li {
|
842 |
+
list-style: none;
|
843 |
+
float: left;
|
844 |
+
position: relative;
|
845 |
+
top: 0;
|
846 |
+
margin: 1px .2em 0 0;
|
847 |
+
border-bottom-width: 0;
|
848 |
+
padding: 0;
|
849 |
+
white-space: nowrap;
|
850 |
+
}
|
851 |
+
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
|
852 |
+
float: left;
|
853 |
+
padding: .5em 1em;
|
854 |
+
text-decoration: none;
|
855 |
+
}
|
856 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
857 |
+
margin-bottom: -1px;
|
858 |
+
padding-bottom: 1px;
|
859 |
+
}
|
860 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
|
861 |
+
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
|
862 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
|
863 |
+
cursor: text;
|
864 |
+
}
|
865 |
+
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
|
866 |
+
cursor: pointer;
|
867 |
+
}
|
868 |
+
.ui-tabs .ui-tabs-panel {
|
869 |
+
display: block;
|
870 |
+
border-width: 0;
|
871 |
+
padding: 1em 1.4em;
|
872 |
+
background: none;
|
873 |
+
}
|
874 |
+
.ui-tooltip {
|
875 |
+
padding: 8px;
|
876 |
+
position: absolute;
|
877 |
+
z-index: 9999;
|
878 |
+
max-width: 300px;
|
879 |
+
}
|
880 |
+
body .ui-tooltip {
|
881 |
+
border-width: 2px;
|
882 |
+
}
|
883 |
+
/* Component containers
|
884 |
+
----------------------------------*/
|
885 |
+
.ui-widget {
|
886 |
+
font-family: Arial,Helvetica,sans-serif;
|
887 |
+
font-size: 1em;
|
888 |
+
}
|
889 |
+
.ui-widget .ui-widget {
|
890 |
+
font-size: 1em;
|
891 |
+
}
|
892 |
+
.ui-widget input,
|
893 |
+
.ui-widget select,
|
894 |
+
.ui-widget textarea,
|
895 |
+
.ui-widget button {
|
896 |
+
font-family: Arial,Helvetica,sans-serif;
|
897 |
+
font-size: 1em;
|
898 |
+
}
|
899 |
+
.ui-widget.ui-widget-content {
|
900 |
+
border: 1px solid #c5c5c5;
|
901 |
+
}
|
902 |
+
.ui-widget-content {
|
903 |
+
border: 1px solid #dddddd;
|
904 |
+
background: #ffffff;
|
905 |
+
color: #333333;
|
906 |
+
}
|
907 |
+
.ui-widget-content a {
|
908 |
+
color: #333333;
|
909 |
+
}
|
910 |
+
.ui-widget-header {
|
911 |
+
border: 1px solid #dddddd;
|
912 |
+
background: #e9e9e9;
|
913 |
+
color: #333333;
|
914 |
+
font-weight: bold;
|
915 |
+
}
|
916 |
+
.ui-widget-header a {
|
917 |
+
color: #333333;
|
918 |
+
}
|
919 |
+
|
920 |
+
/* Interaction states
|
921 |
+
----------------------------------*/
|
922 |
+
.ui-state-default,
|
923 |
+
.ui-widget-content .ui-state-default,
|
924 |
+
.ui-widget-header .ui-state-default,
|
925 |
+
.ui-button,
|
926 |
+
|
927 |
+
/* We use html here because we need a greater specificity to make sure disabled
|
928 |
+
works properly when clicked or hovered */
|
929 |
+
html .ui-button.ui-state-disabled:hover,
|
930 |
+
html .ui-button.ui-state-disabled:active {
|
931 |
+
border: 1px solid #c5c5c5;
|
932 |
+
background: #f6f6f6;
|
933 |
+
font-weight: normal;
|
934 |
+
color: #454545;
|
935 |
+
}
|
936 |
+
.ui-state-default a,
|
937 |
+
.ui-state-default a:link,
|
938 |
+
.ui-state-default a:visited,
|
939 |
+
a.ui-button,
|
940 |
+
a:link.ui-button,
|
941 |
+
a:visited.ui-button,
|
942 |
+
.ui-button {
|
943 |
+
color: #454545;
|
944 |
+
text-decoration: none;
|
945 |
+
}
|
946 |
+
.ui-state-hover,
|
947 |
+
.ui-widget-content .ui-state-hover,
|
948 |
+
.ui-widget-header .ui-state-hover,
|
949 |
+
.ui-state-focus,
|
950 |
+
.ui-widget-content .ui-state-focus,
|
951 |
+
.ui-widget-header .ui-state-focus,
|
952 |
+
.ui-button:hover,
|
953 |
+
.ui-button:focus {
|
954 |
+
border: 1px solid #cccccc;
|
955 |
+
background: #ededed;
|
956 |
+
font-weight: normal;
|
957 |
+
color: #2b2b2b;
|
958 |
+
}
|
959 |
+
.ui-state-hover a,
|
960 |
+
.ui-state-hover a:hover,
|
961 |
+
.ui-state-hover a:link,
|
962 |
+
.ui-state-hover a:visited,
|
963 |
+
.ui-state-focus a,
|
964 |
+
.ui-state-focus a:hover,
|
965 |
+
.ui-state-focus a:link,
|
966 |
+
.ui-state-focus a:visited,
|
967 |
+
a.ui-button:hover,
|
968 |
+
a.ui-button:focus {
|
969 |
+
color: #2b2b2b;
|
970 |
+
text-decoration: none;
|
971 |
+
}
|
972 |
+
|
973 |
+
.ui-visual-focus {
|
974 |
+
box-shadow: 0 0 3px 1px rgb(94, 158, 214);
|
975 |
+
}
|
976 |
+
.ui-state-active,
|
977 |
+
.ui-widget-content .ui-state-active,
|
978 |
+
.ui-widget-header .ui-state-active,
|
979 |
+
a.ui-button:active,
|
980 |
+
.ui-button:active,
|
981 |
+
.ui-button.ui-state-active:hover {
|
982 |
+
border: 1px solid #003eff;
|
983 |
+
background: #007fff;
|
984 |
+
font-weight: normal;
|
985 |
+
color: #ffffff;
|
986 |
+
}
|
987 |
+
.ui-icon-background,
|
988 |
+
.ui-state-active .ui-icon-background {
|
989 |
+
border: #003eff;
|
990 |
+
background-color: #ffffff;
|
991 |
+
}
|
992 |
+
.ui-state-active a,
|
993 |
+
.ui-state-active a:link,
|
994 |
+
.ui-state-active a:visited {
|
995 |
+
color: #ffffff;
|
996 |
+
text-decoration: none;
|
997 |
+
}
|
998 |
+
|
999 |
+
/* Interaction Cues
|
1000 |
+
----------------------------------*/
|
1001 |
+
.ui-state-highlight,
|
1002 |
+
.ui-widget-content .ui-state-highlight,
|
1003 |
+
.ui-widget-header .ui-state-highlight {
|
1004 |
+
border: 1px solid #dad55e;
|
1005 |
+
background: #fffa90;
|
1006 |
+
color: #777620;
|
1007 |
+
}
|
1008 |
+
.ui-state-checked {
|
1009 |
+
border: 1px solid #dad55e;
|
1010 |
+
background: #fffa90;
|
1011 |
+
}
|
1012 |
+
.ui-state-highlight a,
|
1013 |
+
.ui-widget-content .ui-state-highlight a,
|
1014 |
+
.ui-widget-header .ui-state-highlight a {
|
1015 |
+
color: #777620;
|
1016 |
+
}
|
1017 |
+
.ui-state-error,
|
1018 |
+
.ui-widget-content .ui-state-error,
|
1019 |
+
.ui-widget-header .ui-state-error {
|
1020 |
+
border: 1px solid #f1a899;
|
1021 |
+
background: #fddfdf;
|
1022 |
+
color: #5f3f3f;
|
1023 |
+
}
|
1024 |
+
.ui-state-error a,
|
1025 |
+
.ui-widget-content .ui-state-error a,
|
1026 |
+
.ui-widget-header .ui-state-error a {
|
1027 |
+
color: #5f3f3f;
|
1028 |
+
}
|
1029 |
+
.ui-state-error-text,
|
1030 |
+
.ui-widget-content .ui-state-error-text,
|
1031 |
+
.ui-widget-header .ui-state-error-text {
|
1032 |
+
color: #5f3f3f;
|
1033 |
+
}
|
1034 |
+
.ui-priority-primary,
|
1035 |
+
.ui-widget-content .ui-priority-primary,
|
1036 |
+
.ui-widget-header .ui-priority-primary {
|
1037 |
+
font-weight: bold;
|
1038 |
+
}
|
1039 |
+
.ui-priority-secondary,
|
1040 |
+
.ui-widget-content .ui-priority-secondary,
|
1041 |
+
.ui-widget-header .ui-priority-secondary {
|
1042 |
+
opacity: .7;
|
1043 |
+
filter:Alpha(Opacity=70); /* support: IE8 */
|
1044 |
+
font-weight: normal;
|
1045 |
+
}
|
1046 |
+
.ui-state-disabled,
|
1047 |
+
.ui-widget-content .ui-state-disabled,
|
1048 |
+
.ui-widget-header .ui-state-disabled {
|
1049 |
+
opacity: .35;
|
1050 |
+
filter:Alpha(Opacity=35); /* support: IE8 */
|
1051 |
+
background-image: none;
|
1052 |
+
}
|
1053 |
+
.ui-state-disabled .ui-icon {
|
1054 |
+
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
/* Icons
|
1058 |
+
----------------------------------*/
|
1059 |
+
|
1060 |
+
/* states and images */
|
1061 |
+
.ui-icon {
|
1062 |
+
width: 16px;
|
1063 |
+
height: 16px;
|
1064 |
+
}
|
1065 |
+
.ui-icon,
|
1066 |
+
.ui-widget-content .ui-icon {
|
1067 |
+
background-image: url("images/ui-icons_444444_256x240.png");
|
1068 |
+
}
|
1069 |
+
.ui-widget-header .ui-icon {
|
1070 |
+
background-image: url("images/ui-icons_444444_256x240.png");
|
1071 |
+
}
|
1072 |
+
.ui-state-hover .ui-icon,
|
1073 |
+
.ui-state-focus .ui-icon,
|
1074 |
+
.ui-button:hover .ui-icon,
|
1075 |
+
.ui-button:focus .ui-icon {
|
1076 |
+
background-image: url("images/ui-icons_555555_256x240.png");
|
1077 |
+
}
|
1078 |
+
.ui-state-active .ui-icon,
|
1079 |
+
.ui-button:active .ui-icon {
|
1080 |
+
background-image: url("images/ui-icons_ffffff_256x240.png");
|
1081 |
+
}
|
1082 |
+
.ui-state-highlight .ui-icon,
|
1083 |
+
.ui-button .ui-state-highlight.ui-icon {
|
1084 |
+
background-image: url("images/ui-icons_777620_256x240.png");
|
1085 |
+
}
|
1086 |
+
.ui-state-error .ui-icon,
|
1087 |
+
.ui-state-error-text .ui-icon {
|
1088 |
+
background-image: url("images/ui-icons_cc0000_256x240.png");
|
1089 |
+
}
|
1090 |
+
.ui-button .ui-icon {
|
1091 |
+
background-image: url("images/ui-icons_777777_256x240.png");
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
/* positioning */
|
1095 |
+
.ui-icon-blank { background-position: 16px 16px; }
|
1096 |
+
.ui-icon-caret-1-n { background-position: 0 0; }
|
1097 |
+
.ui-icon-caret-1-ne { background-position: -16px 0; }
|
1098 |
+
.ui-icon-caret-1-e { background-position: -32px 0; }
|
1099 |
+
.ui-icon-caret-1-se { background-position: -48px 0; }
|
1100 |
+
.ui-icon-caret-1-s { background-position: -65px 0; }
|
1101 |
+
.ui-icon-caret-1-sw { background-position: -80px 0; }
|
1102 |
+
.ui-icon-caret-1-w { background-position: -96px 0; }
|
1103 |
+
.ui-icon-caret-1-nw { background-position: -112px 0; }
|
1104 |
+
.ui-icon-caret-2-n-s { background-position: -128px 0; }
|
1105 |
+
.ui-icon-caret-2-e-w { background-position: -144px 0; }
|
1106 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
1107 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
1108 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
1109 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
1110 |
+
.ui-icon-triangle-1-s { background-position: -65px -16px; }
|
1111 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
1112 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
1113 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
1114 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
1115 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
1116 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
1117 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
1118 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
1119 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
1120 |
+
.ui-icon-arrow-1-s { background-position: -65px -32px; }
|
1121 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
1122 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
1123 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
1124 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
1125 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
1126 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
1127 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
1128 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
1129 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
1130 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
1131 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
1132 |
+
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
|
1133 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
1134 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
1135 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
1136 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
1137 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
1138 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
1139 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
1140 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
1141 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
1142 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
1143 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
1144 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
1145 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
1146 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
1147 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
1148 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
1149 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
1150 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
1151 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
1152 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
1153 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
1154 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
1155 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
1156 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
1157 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
1158 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
1159 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
1160 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
1161 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
1162 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
1163 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
1164 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
1165 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
1166 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
1167 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
1168 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
1169 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
1170 |
+
.ui-icon-document { background-position: -32px -96px; }
|
1171 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
1172 |
+
.ui-icon-note { background-position: -64px -96px; }
|
1173 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
1174 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
1175 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
1176 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
1177 |
+
.ui-icon-person { background-position: -144px -96px; }
|
1178 |
+
.ui-icon-print { background-position: -160px -96px; }
|
1179 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
1180 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
1181 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
1182 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
1183 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
1184 |
+
.ui-icon-home { background-position: 0 -112px; }
|
1185 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
1186 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
1187 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
1188 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
1189 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
1190 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
1191 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
1192 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
1193 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
1194 |
+
.ui-icon-search { background-position: -160px -112px; }
|
1195 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
1196 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
1197 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
1198 |
+
.ui-icon-star { background-position: -224px -112px; }
|
1199 |
+
.ui-icon-link { background-position: -240px -112px; }
|
1200 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
1201 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
1202 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
1203 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
1204 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
1205 |
+
.ui-icon-close { background-position: -80px -128px; }
|
1206 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
1207 |
+
.ui-icon-key { background-position: -112px -128px; }
|
1208 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
1209 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
1210 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
1211 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
1212 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
1213 |
+
.ui-icon-image { background-position: -208px -128px; }
|
1214 |
+
.ui-icon-video { background-position: -224px -128px; }
|
1215 |
+
.ui-icon-script { background-position: -240px -128px; }
|
1216 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
1217 |
+
.ui-icon-info { background-position: -16px -144px; }
|
1218 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
1219 |
+
.ui-icon-help { background-position: -48px -144px; }
|
1220 |
+
.ui-icon-check { background-position: -64px -144px; }
|
1221 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
1222 |
+
.ui-icon-radio-on { background-position: -96px -144px; }
|
1223 |
+
.ui-icon-radio-off { background-position: -112px -144px; }
|
1224 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
1225 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
1226 |
+
.ui-icon-play { background-position: 0 -160px; }
|
1227 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
1228 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
1229 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
1230 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
1231 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
1232 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
1233 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
1234 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
1235 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
1236 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
1237 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
1238 |
+
.ui-icon-power { background-position: 0 -176px; }
|
1239 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
1240 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
1241 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
1242 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
1243 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
1244 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
1245 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
1246 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
1247 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
1248 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
1249 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
1250 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
1251 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
1252 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
1253 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
1254 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
1255 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
1256 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
1257 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
1258 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
1259 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
1260 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
1261 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
1262 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
1263 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
1264 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
1265 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
1266 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
1267 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
1268 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
1269 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
1270 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
1271 |
+
|
1272 |
+
|
1273 |
+
/* Misc visuals
|
1274 |
+
----------------------------------*/
|
1275 |
+
|
1276 |
+
/* Corner radius */
|
1277 |
+
.ui-corner-all,
|
1278 |
+
.ui-corner-top,
|
1279 |
+
.ui-corner-left,
|
1280 |
+
.ui-corner-tl {
|
1281 |
+
border-top-left-radius: 3px;
|
1282 |
+
}
|
1283 |
+
.ui-corner-all,
|
1284 |
+
.ui-corner-top,
|
1285 |
+
.ui-corner-right,
|
1286 |
+
.ui-corner-tr {
|
1287 |
+
border-top-right-radius: 3px;
|
1288 |
+
}
|
1289 |
+
.ui-corner-all,
|
1290 |
+
.ui-corner-bottom,
|
1291 |
+
.ui-corner-left,
|
1292 |
+
.ui-corner-bl {
|
1293 |
+
border-bottom-left-radius: 3px;
|
1294 |
+
}
|
1295 |
+
.ui-corner-all,
|
1296 |
+
.ui-corner-bottom,
|
1297 |
+
.ui-corner-right,
|
1298 |
+
.ui-corner-br {
|
1299 |
+
border-bottom-right-radius: 3px;
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
/* Overlays */
|
1303 |
+
.ui-widget-overlay {
|
1304 |
+
background: #aaaaaa;
|
1305 |
+
opacity: .3;
|
1306 |
+
filter: Alpha(Opacity=30); /* support: IE8 */
|
1307 |
+
}
|
1308 |
+
.ui-widget-shadow {
|
1309 |
+
-webkit-box-shadow: 0px 0px 5px #666666;
|
1310 |
+
box-shadow: 0px 0px 5px #666666;
|
1311 |
+
}
|
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.11.
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -11,7 +11,7 @@
|
|
11 |
define('WD_FM_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
12 |
define('WD_FM_URL', plugins_url(plugin_basename(dirname(__FILE__))));
|
13 |
define('WD_MAIN_FILE', plugin_basename(__FILE__));
|
14 |
-
define('WD_FM_VERSION', '1.11.
|
15 |
// Plugin menu.
|
16 |
function form_maker_options_panel() {
|
17 |
$parent_slug = null;
|
@@ -373,6 +373,7 @@ function form_maker_manage_scripts() {
|
|
373 |
|
374 |
wp_enqueue_script('form_maker_admin', WD_FM_URL . '/js/form_maker_admin.js', array(), WD_FM_VERSION);
|
375 |
wp_enqueue_script('form_maker_manage', WD_FM_URL . '/js/form_maker_manage.js', array(), WD_FM_VERSION);
|
|
|
376 |
|
377 |
wp_enqueue_script('form_maker_codemirror', WD_FM_URL . '/js/layout/codemirror.js', array(), '2.3');
|
378 |
wp_enqueue_script('form_maker_clike', WD_FM_URL . '/js/layout/clike.js', array(), '1.0.0');
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.11.6
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
define('WD_FM_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
12 |
define('WD_FM_URL', plugins_url(plugin_basename(dirname(__FILE__))));
|
13 |
define('WD_MAIN_FILE', plugin_basename(__FILE__));
|
14 |
+
define('WD_FM_VERSION', '1.11.6');
|
15 |
// Plugin menu.
|
16 |
function form_maker_options_panel() {
|
17 |
$parent_slug = null;
|
373 |
|
374 |
wp_enqueue_script('form_maker_admin', WD_FM_URL . '/js/form_maker_admin.js', array(), WD_FM_VERSION);
|
375 |
wp_enqueue_script('form_maker_manage', WD_FM_URL . '/js/form_maker_manage.js', array(), WD_FM_VERSION);
|
376 |
+
wp_enqueue_script('formmaker_div', WD_FM_URL . '/js/formmaker_div.js', array(), WD_FM_VERSION);
|
377 |
|
378 |
wp_enqueue_script('form_maker_codemirror', WD_FM_URL . '/js/layout/codemirror.js', array(), '2.3');
|
379 |
wp_enqueue_script('form_maker_clike', WD_FM_URL . '/js/layout/clike.js', array(), '1.0.0');
|
js/form_maker_editor_button.js
CHANGED
@@ -1,22 +1,23 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.Form_Maker_mce', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addCommand('mceForm_Maker_mce', function() {
|
5 |
-
ed.windowManager.open({
|
6 |
-
file : form_maker_admin_ajax,
|
7 |
-
width :
|
8 |
-
height :
|
9 |
-
inline : 1
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
22 |
})();
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.Form_Maker_mce', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addCommand('mceForm_Maker_mce', function() {
|
5 |
+
ed.windowManager.open({
|
6 |
+
file : form_maker_admin_ajax,
|
7 |
+
width : 640 + ed.getLang('Form_Maker_mce.delta_width', 0),
|
8 |
+
height : 385 + ed.getLang('Form_Maker_mce.delta_height', 0),
|
9 |
+
inline : 1,
|
10 |
+
title : 'Form'
|
11 |
+
}, {
|
12 |
+
plugin_url : url // Plugin absolute URL
|
13 |
+
});
|
14 |
+
});
|
15 |
+
ed.addButton('Form_Maker_mce', {
|
16 |
+
title : 'Insert Form Maker',
|
17 |
+
cmd : 'mceForm_Maker_mce',
|
18 |
+
image: url + '/images/form_maker_edit_but.png'
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
tinymce.PluginManager.add('Form_Maker_mce', tinymce.plugins.Form_Maker_mce);
|
23 |
})();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-form.html
|
|
4 |
Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 1.11.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -290,6 +290,11 @@ MailChimp form add-on of Form Maker lets you build up a customer database on you
|
|
290 |
|
291 |
== Changelog ==
|
292 |
|
|
|
|
|
|
|
|
|
|
|
293 |
= 1.11.5 =
|
294 |
* Fixed: Bug on CSV/XML export.
|
295 |
* Fixed: Google maps api conflict with other plugins.
|
4 |
Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 1.11.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
290 |
|
291 |
== Changelog ==
|
292 |
|
293 |
+
= 1.11.6 =
|
294 |
+
* Fixed: Shortcode editor pop-up styles.
|
295 |
+
* Fixed: Scripts enqueue in Manage Forms page.
|
296 |
+
* Fixed: MySQL Mapping fields list scrolling.
|
297 |
+
|
298 |
= 1.11.5 =
|
299 |
* Fixed: Bug on CSV/XML export.
|
300 |
* Fixed: Google maps api conflict with other plugins.
|