Custom Contact Forms - Version 4.5.3.0

Version Description

  • custom-contact-forms-admin.php - Dashboard widget security bug fixed. Now you can limit which users can see the dashboard widget. Also a quick start guide has been added.
  • custom-contact-forms.php - Dashboard widget security bug fixed.
  • modules/widgets/custom-contact-forms-dashboard.php - Dashboard widget security bug fixed. Now you can limit which users can see the dashboard widget.
  • modules/usage_popover/custom-contact-forms-usage-popover.php - Minor display changes made
  • modules/usage_popover/custom-contact-forms-quick-start-popover.php - Minor display changes made
  • js/custom-contact-forms-admin.js - Quick start guide added
  • css/custom-contact-forms-admin.css - Quick start guide added
Download this release

Release Info

Developer tlovett1
Plugin Icon 128x128 Custom Contact Forms
Version 4.5.3.0
Comparing to
See all releases

Code changes from version 4.5.2.3 to 4.5.3.0

css/custom-contact-forms-admin.css CHANGED
@@ -1,599 +1,602 @@
1
- #customcontactforms-admin {
2
- vertical-align:top;
3
- margin:1em 0 30px 25px;
4
- overflow:visible;
5
- min-width:1020px;
6
- }
7
- #customcontactforms-admin .plugin-header {
8
- clear:both;
9
- padding:0;
10
- margin:0;
11
- width:100%;
12
- display:block;
13
- height:60px;
14
- background:url(../images/admin-icon.png) no-repeat 0px 10px;
15
- }
16
- #customcontactforms-admin .plugin-header h2 {
17
- float:left;
18
- clear:none;
19
- margin-left:46px;
20
- width:30%;
21
- display:block; padding:0;
22
- }
23
- #customcontactforms-admin .plugin-header input {
24
- float:right;
25
- display:block;
26
- margin:0.83em 0;
27
- margin-right:65px;
28
- clear:none;
29
- }
30
- #customcontactforms-admin input[type=button] {
31
- -moz-background-clip:border;
32
- -moz-background-inline-policy:continuous;
33
- -moz-background-origin:padding;
34
- background:#F2F2F2 url(../images/white-grad.png) repeat-x scroll left top;
35
- text-shadow:0 1px 0 #FFFFFF;
36
- }
37
- #customcontactforms-admin .loading-img {
38
- display:none;
39
- }
40
- #customcontactforms-admin input[type=submit], #ccf-usage-popover input[type=submit] {
41
- -moz-background-clip:border;
42
- -moz-background-inline-policy:continuous;
43
- -moz-background-origin:padding;
44
- background:#21759B url(../images/button-grad.png) repeat-x scroll left top;
45
- border-color:#298CBA;
46
- color:#FFFFFF;
47
- font-weight:bold;
48
- text-shadow:0 -1px 0 rgba(0, 0, 0, 0.3);
49
- }
50
- #customcontactforms-admin label { font-weight:bold; }
51
- #customcontactforms-admin input, textarea, select {
52
- font-size:1em;
53
- }
54
- #customcontactforms-admin .inside {
55
- padding:5px 10px 10px 10px;
56
- }
57
- #customcontactforms-admin h3 {
58
- margin:0 0 7px 0;
59
- height:25px;
60
- padding: 7px 0 0 9px;
61
- }
62
- #customcontactforms-admin #instructions {
63
- float:left;
64
- clear:none;
65
- width:436px;
66
- margin:20px 1em 1em 1em;
67
- }
68
- #customcontactforms-admin #contact-author {
69
- float:left;
70
- width:380px;
71
- margin:5px 1em 1em 6px;
72
- }
73
-
74
- #customcontactforms-admin #custom-html {
75
- float:left;
76
- width:520px;
77
- margin:5px 1em 1em 6px;
78
- }
79
- #customcontactforms-admin #custom-html p { margin: 0; padding:0; }
80
- #customcontactforms-admin #custom-html #custom_html_textarea {
81
- width:495px;
82
- height:250px;
83
- }
84
- #customcontactforms-admin #contact-author form label {
85
- display:block; font-weight:bold;
86
- }
87
- #customcontactforms-admin #instructions p:first-child {
88
- padding-top:0;
89
- margin-top:0;
90
- }
91
-
92
- #customcontactforms-admin .rate-me {
93
- background-color:#FFFEEB;
94
- width:920px;
95
- border:1px solid #cccccc;
96
- padding:7px;
97
- display:block;
98
- height:30px;
99
- clear:both;
100
- text-align:center;
101
- margin:.5em 0 .8em 5px;
102
- -moz-border-radius:11px;
103
- -webkit-border-radius:11px;
104
- border-radius:11px;
105
- }
106
-
107
- #customcontactforms-admin .rate-me a { font-weight:bold; width:auto; margin-left:20px; display:block; float:left; text-decoration:none; margin:6px 0 10px 0; }
108
- #customcontactforms-admin .rate-me input[type=image] { float:right; }
109
-
110
- #customcontactforms-admin .action-complete {
111
- background-color:#2bd604;
112
- width:920px;
113
- border:1px solid #333;
114
- padding:7px 7px 1px 7px;
115
- display:block;
116
- height:30px;
117
- clear:both;
118
- color:#000;
119
- font-weight:bold;
120
- text-align:center;
121
- margin:.5em 0 .8em 5px;
122
- -moz-border-radius:11px;
123
- -webkit-border-radius:11px;
124
- border-radius:11px;
125
- }
126
-
127
- .ccf-tooltip {
128
- background-color:#FFFEEB;
129
- border:2px solid #666666;
130
- padding:10px 15px;
131
- width:200px;
132
- -moz-border-radius:9px;
133
- -khtml-border-radius:9px;
134
- -webkit-border-radius:9px;
135
- border-radius:9px;
136
- display:none;
137
- color:#333333;/*#D54E21;*/
138
- font-weight:bold;
139
- font-family:Verdana, Arial, Helvetica, sans-serif;
140
- text-align:left;
141
- font-size:10px;
142
- -moz-box-shadow:0 0 6px #123;
143
- -webkit-box-shadow: 0 0 6px #123;
144
- box-shadow:0 0 6px #123;
145
- }
146
- #customcontactforms-admin .toollink {
147
- text-decoration:none;
148
- }
149
- #customcontactforms-admin a.rate-me span { font-weight:bold }
150
- #customcontactforms-admin .rate-me a span { text-decoration:underline }
151
-
152
- #customcontactforms-admin #form-submissions-table {
153
- clear:both;
154
- width:1000px;
155
- }
156
- #customcontactforms-admin .genesis {
157
- text-align:center;
158
- background-color:#FFFEEB;
159
- width:920px;
160
- border:1px solid #cccccc;
161
- display:block;
162
- height:30px;
163
- font-weight:bold;
164
- text-decoration:none;
165
- padding:7px 7px 7px 7px;
166
- margin:.5em 0 .8em 5px;
167
- -moz-border-radius:11px;
168
- -webkit-border-radius:11px;
169
- border-radius:11px;
170
- font-size:11px;
171
- line-height:normal;
172
- }
173
- #customcontactforms-admin .genesis span { color:red; font-weight:bold; }
174
-
175
- #customcontactforms-admin form.blog-horizontal-form {
176
- background-color:#FFFEEB;
177
- width:920px;
178
- border:1px solid #cccccc;
179
- padding:7px;
180
- display:block;
181
- height:30px;
182
- text-align:center;
183
- margin:.5em 0 .8em 5px;
184
- -moz-border-radius:11px;
185
- -webkit-border-radius:11px;
186
- border-radius:11px;
187
- font-size:11px;
188
- line-height:normal;
189
- }
190
-
191
- #customcontactforms-admin form.blog-horizontal-form input[type=text] { width:100px; }
192
-
193
- #customcontactforms-admin form.blog-horizontal-form span { font-weight:bold; padding-right:4px; }
194
- #customcontactforms-admin #form-submissions-hidden { display:none; }
195
- #customcontactforms-admin #form-submissions-table .submission-content { }
196
- #customcontactforms-admin #form-submissions-table tr { border-top:1px solid #666; }
197
- #customcontactforms-admin #form-submissions-table td { border:0; }
198
- #customcontactforms-admin #form-submissions-table ul { min-height:30px; width:95%; margin:3px auto 2px auto; }
199
- #customcontactforms-admin #form-submissions-table ul li { float:left; margin-right:9px; }
200
- #customcontactforms-admin #form-submissions-table ul li p { display:block; }
201
- #customcontactforms-admin #form-submissions-table ul li div { font-weight:bold; border-bottom:1px solid #666; padding:2px; text-align:left; }
202
-
203
- #customcontactforms-admin #form-submissions-table table.first { float:left; width:48%; border-collapse:collapse; margin-right:10px; }
204
- #customcontactforms-admin #form-submissions table.second { margin-left:48%; border-collapse:collapse; width:48%; }
205
-
206
-
207
- #customcontactforms-admin #import, #customcontactforms-admin #export {
208
- clear:both;
209
- width:1000px;
210
- margin:20px 1em 1em 5px;
211
- }
212
- #customcontactforms-admin #export input { margin:7px; }
213
- #customcontactforms-admin #export p { padding:0; margin:0; }
214
- #customcontactforms-admin #import .choose_import { font-size:1.1em; clear:both; font-weight:bold; }
215
- #customcontactforms-admin #import input[type=file] { margin:6px; }
216
- #customcontactforms-admin #import ul { margin:6px; }
217
- #customcontactforms-admin #import ul li { width:130px; float:left; }
218
- #customcontactforms-admin #import ul li label { font-size:.9em; }
219
- #customcontactforms-admin #import input[type=checkbox] { margin-left:9px; }
220
- #customcontactforms-admin #import p { padding:0 0 5px 0; margin:0; }
221
-
222
- #customcontactforms-admin #manage-field-options table {
223
- font-size:1em;
224
- margin: 0 0 5px 14px;
225
- width:95%;
226
- }
227
- #customcontactforms-admin #manage-field-options table td { padding-left:8px; padding-top:3px; padding-bottom:3px; }
228
- #customcontactforms-admin #manage-field-options table thead,
229
- #customcontactforms-admin #manage-field-options table tfoot {
230
- background-color:#f4f4f4;
231
- }
232
- #customcontactforms-admin #manage-field-options table thead th,
233
- #customcontactforms-admin #manage-field-options table tfoot th { padding:8px; text-align:left; }
234
- #customcontactforms-admin #manage-field-options {
235
- float:left;
236
- clear:left;
237
- width:530px;
238
- margin:20px 1em 1em 1em;
239
- }
240
- #customcontactforms-admin #create-field-options {
241
- float:left;
242
- clear:none;
243
- width:420px;
244
- margin:20px 1em 1em 5px;
245
- }
246
-
247
- #customcontactforms-admin #field-options .evenrow-field-options div { background-color:#f9f9f9; }
248
- #customcontactforms-admin #field-options .evenrow-field-options { background-color:#f9f9f9; }
249
-
250
- .ccf-style-example {
251
- background:url(../images/style-example.gif) no-repeat top left;
252
- width:405px;
253
- height:135px;
254
- padding-left:20px;
255
- margin:10px 0 0 10px;
256
- border:0;
257
- }
258
- .ccf-success-popover-example {
259
- background:url(../images/success-popover-example.gif) no-repeat top left;
260
- width:405px;
261
- height:135px;
262
- padding-left:20px;
263
- margin:10px 0 0 10px;
264
- border:0;
265
- }
266
- #customcontactforms-admin #configure-mail {
267
- clear:both;
268
- width:1000px;
269
- margin:20px 1em 1em 5px;
270
- }
271
- #customcontactforms-admin #configure-mail p { padding:0; margin:0; }
272
- #customcontactforms-admin #configure-mail form div { margin:10px 0 0 0; padding-top:10px; border-top:1px solid #ccc;}
273
- #customcontactforms-admin #configure-mail ul.left { float:left; width:48%; }
274
- #customcontactforms-admin #configure-mail ul.right { margin-left:48%; width:48%; }
275
- #customcontactforms-admin #create-styles {
276
- clear:both;
277
- width:1000px;
278
- margin:20px 1em 1em 5px;
279
- }
280
- #customcontactforms-admin #create-styles .inside,
281
- #customcontactforms-admin #create-styles form { margin-top:0px; padding-top:0 }
282
- #customcontactforms-admin #create-styles .style_left { float:left; width:48% }
283
- #customcontactforms-admin #create-styles .style_right { width:48%; margin-left:51%; clear:none }
284
- #customcontactforms-admin #plugin-news {
285
- clear:both;
286
- width:1000px;
287
- margin:20px 1em 1em 5px;
288
- }
289
- #customcontactforms-admin #plugin-news ul li.first { border-bottom:1px dashed #666; }
290
- #customcontactforms-admin #manage-styles {
291
- width:1000px;
292
- }
293
- #customcontactforms-admin #manage-styles td { border:0; }
294
- #customcontactforms-admin #manage-styles label {
295
- display:block;
296
- }
297
- #customcontactforms-admin #manage-styles input[type=text], #customcontactforms-admin #manage-styles select, #customcontactforms-admin #manage-styles textarea {
298
- width:80px;
299
- }
300
- #customcontactforms-admin #general-settings {
301
- clear:both;
302
- width:1000px;
303
- margin:20px 1em 1em 5px;
304
- }
305
- #customcontactforms-admin #general-settings .gleft { float:left; width:48%; clear:none; }
306
- #customcontactforms-admin #general-settings .gright { clear:none; float:none; width:48%; margin-left:49%; }
307
- #customcontactforms-admin #general-settings label { font-weight:bold; }
308
- #customcontactforms-admin #general-settings form div p.descrip {
309
- font-style:italic;
310
- padding-left:20px;
311
- }
312
- #customcontactforms-admin #general-settings form div p.show-widget {
313
- margin-top:1em;
314
- padding-top:.4em;
315
- border-top:1px solid #ccc;
316
- }
317
- #customcontactforms-admin #create-fields {
318
- float:left;
319
- clear:left;
320
- width:450px;
321
- margin:0 1em 1em 5px;
322
- }
323
- #customcontactforms-admin #create-forms {
324
- float:left;
325
- width:500px;
326
- border-left:1px solid #ccc;
327
- margin:0 1em 1em 1em;
328
- }
329
- #customcontactforms-admin #create-forms .inside div p {
330
- font-size:.8em;
331
- }
332
- #customcontactforms-admin #create-forms .role{ display:inline; padding-left:5px; }
333
- #customcontactforms-admin #create-fields .attach, #customcontactforms-admin #create-forms .attach { margin-top:6px; }
334
- #customcontactforms-admin .manage-h3 {
335
- clear:both;
336
- margin-top:20px;
337
- }
338
- #customcontactforms-admin #manage-fields {
339
- width:1000px;
340
- }
341
- #customcontactforms-admin #manage-fields td { border:0; }
342
- #customcontactforms-admin #manage-fields .row-one {
343
- margin-bottom:15px;
344
- }
345
- #customcontactforms-admin #manage-fields .row-one label { margin-right:4px; }
346
- #customcontactforms-admin #manage-fields .attach-field-options {
347
- float:left;
348
- padding: 0 0 0 9px;
349
- width:470px;
350
- clear:none;
351
- }
352
- #customcontactforms-admin #manage-fields .detach-field-options {
353
- clear:left;
354
- float:left;
355
- padding: 0 0 0 20px;
356
- width:470px;
357
- }
358
- #customcontactforms-admin #manage-forms {
359
- width:1000px;
360
- margin-right:10px;
361
- }
362
- #customcontactforms-admin .fattach {
363
- margin:6px;
364
- clear:both;
365
- -moz-border-radius:6px;
366
- padding:6px 6px 6px 15px;
367
- -webkit-border-radius:6px;
368
- border-radius:6px;
369
- -moz-box-shadow:0 0 2px #123;
370
- -webkit-box-shadow: 0 0 2px #123;
371
- box-shadow:0 0 2px #123;
372
- background-color:#FFFEEB;
373
- display:block;
374
- height:56px;
375
- width:90%;
376
- }
377
- #customcontactforms-admin .form-attach, #customcontactforms-admin .field-attach {
378
- width:49%; float:left; text-align:left; clear:none;
379
- }
380
- #customcontactforms-admin .form-detach, #customcontactforms-admin .field-detach {
381
- width:49%; float:left; text-align:left; clear:none;
382
- }
383
- #customcontactforms-admin #manage-forms td { border:0; }
384
- #customcontactforms-admin #manage-fixed-fields {
385
- width:1000px;
386
- }
387
- #customcontactforms-admin #manage-fixed-fields td { border:0; }
388
- #customcontactforms-admin #manage-fixed-fields .field_descrip { padding-bottom:5px; }
389
- #customcontactforms-admin .nobordertop {
390
- border-top:none;
391
- }
392
- #customcontactforms-admin .borderbottom {
393
- border-bottom:2px solid black;
394
- }
395
- #customcontactforms-admin .attached_fields {
396
- float:left;
397
- width:400px;
398
- }
399
- #customcontactforms-admin .attach_field {
400
- float:left;
401
- width:300px;
402
- }
403
- #customcontactforms-admin .actions {
404
- float:right;
405
- width: 80px; padding:0 18px 0 8px;
406
- }
407
- #customcontactforms-admin .bulk-dropdown { margin:8px 1px 8px 8px; font-size:1.1em; padding:4px; }
408
- #customcontactforms-admin .bulk-apply { margin:8px 8px 8px 8px; }
409
- #customcontactforms-admin .attach_styles {
410
- float:left;
411
- width:300px;
412
- }
413
- #customcontactforms-admin label span {
414
- font-weight:bold;
415
- }
416
-
417
- #customcontactforms-admin #plugin-nav {
418
- clear:both;
419
- max-width:1000px;
420
- }
421
- #customcontactforms-admin #plugin-nav { text-align:center; border-bottom:1px #ccc dashed; margin:0 0 10px 0; padding:0 0 6px 0; }
422
- #customcontactforms-admin #plugin-nav li {
423
- border-right:1px solid #666; display:inline; padding:0 8px 0 8px;
424
- }
425
- #customcontactforms-admin #plugin-nav li.last {
426
- border-right:none;
427
- }
428
- /* CCF Install Popover -------------------------------- */
429
- #ccf-usage-popover {
430
- display:none;
431
- }
432
- #ccf-usage-popover #popover-tof { text-align:center; border-bottom:1px #ccc dashed; margin:5px 0 10px 0; padding:0 0 6px 0; }
433
- #ccf-usage-popover #popover-tof li { display:inline; padding:0 2px 0 3px;
434
- }
435
-
436
- #ccf-usage-popover div.popover-body span { font-weight:bold; }
437
- #ccf-usage-popover div.popover-body {
438
- text-align:left;
439
- padding:3px;
440
- }
441
- #ccf-usage-popover div.popover-body ul { margin:5px 0px 5px 8px; padding:0; border-top:1px solid #efefef; }
442
- #ccf-usage-popover div.popover-body ul ul { margin:0px 0px 2px 30px; padding:0; list-style-type:disc; border-top:none; }
443
- #ccf-usage-popover div.popover-body ul li { margin-left:20px; }
444
- #ccf-usage-popover div.popover-body p { padding:8px; font-size:1em; text-align:left; }
445
- #ccf-usage-popover div.popover-body form { width:100%; text-align:center; }
446
- #ccf-usage-popover div.popover-body .insert-default-content-button {
447
- margin:5px auto 5px auto;
448
- }
449
-
450
- .modal-overlay {
451
- position:fixed;
452
- top:0;
453
- left:0;
454
- bottom:0;
455
- width:100%;
456
- height:100%;
457
- background-color:rgba(0,0,0.5);
458
- z-index:20;
459
- }
460
-
461
- .modal-window {
462
- position:fixed;
463
- top:140px;
464
- left:50%;
465
- width:300px;
466
- height:auto;
467
- text-align:center;
468
- /*max-height:200px;
469
- text-align:left;
470
- overflow:scroll;*/
471
- margin-left:-150px;
472
- padding:20px;
473
- border:10px solid #efefef;
474
- background-color:#fff;
475
- -moz-border-radius:6px;
476
- -webkit-border-radius:6px;
477
- border-radius:6px;
478
- -moz-box-shadow:0 0 14px #123;
479
- -webkit-box-shadow: 0 0 14px #123;
480
- box-shadow:0 0 14px #123;
481
- z-index:10000;
482
- }
483
-
484
- .debug-window {
485
- position:fixed;
486
- top:20px;
487
- left:50%;
488
- bottom:20px;
489
- width:500px;
490
- text-align:center;
491
- text-align:left;
492
- overflow:scroll;
493
- margin-left:-250px;
494
- padding:20px;
495
- border:10px solid #efefef;
496
- background-color:#fff;
497
- -moz-border-radius:6px;
498
- -webkit-border-radius:6px;
499
- border-radius:6px;
500
- -moz-box-shadow:0 0 14px #123;
501
- -webkit-box-shadow: 0 0 14px #123;
502
- box-shadow:0 0 14px #123;
503
- z-index:500;
504
- }
505
-
506
- .modal-close-btn {
507
- position:absolute;
508
- top:0;
509
- right:4px;
510
- margin:0;
511
- padding:0;
512
- text-decoration:none;
513
- color:#000;
514
- font-size:16px;
515
- }
516
-
517
- .modal-close-btn:before {
518
- position:relative;
519
- top:-1px;
520
- }
521
-
522
- .save-box {
523
- width:150px;
524
- height:auto;
525
- padding:0px;
526
- margin:0 0 0 -75px;
527
- border:12px solid #efefef;
528
- background-color:#fff;
529
- -moz-border-radius:12px;
530
- -webkit-border-radius:12px;
531
- border-radius:12px;
532
- -moz-box-shadow:0 0 14px #123;
533
- -webkit-box-shadow: 0 0 14px #123;
534
- box-shadow:0 0 14px #123;
535
- z-index:5000;
536
- position:fixed;
537
- left:50%;
538
- top:40%;
539
- }
540
- .save-box p { text-align:center; width:100%; font-weight:bold; font-size:16px; }
541
- .save-box-close-btn {
542
- position:absolute;
543
- top:0;
544
- right:4px;
545
- margin:0;
546
- padding:0;
547
- text-decoration:none;
548
- color:#000;
549
- font-size:16px;
550
- }
551
- .modal-wpspin { margin-left:5px; }
552
- #customcontactforms-admin .pagination {
553
- font-size: 80%;
554
- }
555
-
556
- #customcontactforms-admin .pagination a {
557
- text-decoration: none;
558
- border: solid 1px #AAE;
559
- color: #15B;
560
- }
561
-
562
- #customcontactforms-admin .pagination a, .pagination span {
563
- display: block;
564
- float: left;
565
- padding: 0.3em 0.5em;
566
- margin-right: 5px;
567
- margin-bottom: 5px;
568
- min-width:1em;
569
- text-align:center;
570
- }
571
-
572
- #customcontactforms-admin .pagination .current {
573
- background: #26B;
574
- color: #fff;
575
- border: solid 1px #AAE;
576
- }
577
-
578
- #customcontactforms-admin .pagination .current.prev, #customcontactforms-admin .pagination .current.next{
579
- color:#999;
580
- border-color:#999;
581
- background:#fff;
582
- }
583
-
584
- #customcontactforms-admin form.blog-horizontal-form {
585
- background-color:#FFFEEB;
586
- width:920px;
587
- border:1px solid #cccccc;
588
- padding:7px;
589
- display:block;
590
- height:30px;
591
- text-align:center;
592
- margin:.5em 0 .8em 5px;
593
- -moz-border-radius:11px;
594
- -webkit-border-radius:11px;
595
- border-radius:11px;
596
- }
597
-
598
- #customcontactforms-admin form.blog-horizontal-form span { font-weight:bold; padding-right:4px; }
599
-
 
 
 
1
+ #customcontactforms-admin {
2
+ vertical-align:top;
3
+ margin:1em 0 30px 25px;
4
+ overflow:visible;
5
+ min-width:1020px;
6
+ }
7
+ #customcontactforms-admin .plugin-header {
8
+ clear:both;
9
+ padding:0;
10
+ margin:0;
11
+ width:100%;
12
+ display:block;
13
+ height:60px;
14
+ background:url(../images/admin-icon.png) no-repeat 0px 10px;
15
+ }
16
+ #customcontactforms-admin .plugin-header h2 {
17
+ float:left;
18
+ clear:none;
19
+ margin-left:46px;
20
+ width:30%;
21
+ display:block; padding:0;
22
+ }
23
+ #customcontactforms-admin .plugin-header input {
24
+ float:right;
25
+ display:block;
26
+ clear:none;
27
+ margin-top:.9em;
28
+ }
29
+ #customcontactforms-admin .plugin-header input.quick-start-button { color:red; margin-right:65px; }
30
+ #customcontactforms-admin .plugin-header input.usage-popover-button {
31
+ margin-right:10px;
32
+ }
33
+ #customcontactforms-admin input[type=button] {
34
+ -moz-background-clip:border;
35
+ -moz-background-inline-policy:continuous;
36
+ -moz-background-origin:padding;
37
+ background:#F2F2F2 url(../images/white-grad.png) repeat-x scroll left top;
38
+ text-shadow:0 1px 0 #FFFFFF;
39
+ }
40
+ #customcontactforms-admin .loading-img {
41
+ display:none;
42
+ }
43
+ #customcontactforms-admin input[type=submit], .ccf-popover input[type=submit] {
44
+ -moz-background-clip:border;
45
+ -moz-background-inline-policy:continuous;
46
+ -moz-background-origin:padding;
47
+ background:#21759B url(../images/button-grad.png) repeat-x scroll left top;
48
+ border-color:#298CBA;
49
+ color:#FFFFFF;
50
+ font-weight:bold;
51
+ text-shadow:0 -1px 0 rgba(0, 0, 0, 0.3);
52
+ }
53
+ #customcontactforms-admin label { font-weight:bold; }
54
+ #customcontactforms-admin input, textarea, select {
55
+ font-size:1em;
56
+ }
57
+ #customcontactforms-admin .inside {
58
+ padding:5px 10px 10px 10px;
59
+ }
60
+ #customcontactforms-admin h3 {
61
+ margin:0 0 7px 0;
62
+ height:25px;
63
+ padding: 7px 0 0 9px;
64
+ }
65
+ #customcontactforms-admin #instructions {
66
+ float:left;
67
+ clear:none;
68
+ width:436px;
69
+ margin:20px 1em 1em 1em;
70
+ }
71
+ #customcontactforms-admin #contact-author {
72
+ float:left;
73
+ width:380px;
74
+ margin:5px 1em 1em 6px;
75
+ }
76
+
77
+ #customcontactforms-admin #custom-html {
78
+ float:left;
79
+ width:520px;
80
+ margin:5px 1em 1em 6px;
81
+ }
82
+ #customcontactforms-admin #custom-html p { margin: 0; padding:0; }
83
+ #customcontactforms-admin #custom-html #custom_html_textarea {
84
+ width:495px;
85
+ height:250px;
86
+ }
87
+ #customcontactforms-admin #contact-author form label {
88
+ display:block; font-weight:bold;
89
+ }
90
+ #customcontactforms-admin #instructions p:first-child {
91
+ padding-top:0;
92
+ margin-top:0;
93
+ }
94
+
95
+ #customcontactforms-admin .rate-me {
96
+ background-color:#FFFEEB;
97
+ width:920px;
98
+ border:1px solid #cccccc;
99
+ padding:7px;
100
+ display:block;
101
+ height:30px;
102
+ clear:both;
103
+ text-align:center;
104
+ margin:.5em 0 .8em 5px;
105
+ -moz-border-radius:11px;
106
+ -webkit-border-radius:11px;
107
+ border-radius:11px;
108
+ }
109
+
110
+ #customcontactforms-admin .rate-me a { font-weight:bold; width:auto; margin-left:20px; display:block; float:left; text-decoration:none; margin:6px 0 10px 0; }
111
+ #customcontactforms-admin .rate-me input[type=image] { float:right; }
112
+
113
+ #customcontactforms-admin .action-complete {
114
+ background-color:#2bd604;
115
+ width:920px;
116
+ border:1px solid #333;
117
+ padding:7px 7px 1px 7px;
118
+ display:block;
119
+ height:30px;
120
+ clear:both;
121
+ color:#000;
122
+ font-weight:bold;
123
+ text-align:center;
124
+ margin:.5em 0 .8em 5px;
125
+ -moz-border-radius:11px;
126
+ -webkit-border-radius:11px;
127
+ border-radius:11px;
128
+ }
129
+
130
+ .ccf-tooltip {
131
+ background-color:#FFFEEB;
132
+ border:2px solid #666666;
133
+ padding:10px 15px;
134
+ width:200px;
135
+ -moz-border-radius:9px;
136
+ -khtml-border-radius:9px;
137
+ -webkit-border-radius:9px;
138
+ border-radius:9px;
139
+ display:none;
140
+ color:#333333;/*#D54E21;*/
141
+ font-weight:bold;
142
+ font-family:Verdana, Arial, Helvetica, sans-serif;
143
+ text-align:left;
144
+ font-size:10px;
145
+ -moz-box-shadow:0 0 6px #123;
146
+ -webkit-box-shadow: 0 0 6px #123;
147
+ box-shadow:0 0 6px #123;
148
+ }
149
+ #customcontactforms-admin .toollink {
150
+ text-decoration:none;
151
+ }
152
+ #customcontactforms-admin a.rate-me span { font-weight:bold }
153
+ #customcontactforms-admin .rate-me a span { text-decoration:underline }
154
+
155
+ #customcontactforms-admin #form-submissions-table {
156
+ clear:both;
157
+ width:1000px;
158
+ }
159
+ #customcontactforms-admin .genesis {
160
+ text-align:center;
161
+ background-color:#FFFEEB;
162
+ width:920px;
163
+ border:1px solid #cccccc;
164
+ display:block;
165
+ height:30px;
166
+ font-weight:bold;
167
+ text-decoration:none;
168
+ padding:7px 7px 7px 7px;
169
+ margin:.5em 0 .8em 5px;
170
+ -moz-border-radius:11px;
171
+ -webkit-border-radius:11px;
172
+ border-radius:11px;
173
+ font-size:11px;
174
+ line-height:normal;
175
+ }
176
+ #customcontactforms-admin .genesis span { color:red; font-weight:bold; }
177
+
178
+ #customcontactforms-admin form.blog-horizontal-form {
179
+ background-color:#FFFEEB;
180
+ width:920px;
181
+ border:1px solid #cccccc;
182
+ padding:7px;
183
+ display:block;
184
+ height:30px;
185
+ text-align:center;
186
+ margin:.5em 0 .8em 5px;
187
+ -moz-border-radius:11px;
188
+ -webkit-border-radius:11px;
189
+ border-radius:11px;
190
+ font-size:11px;
191
+ line-height:normal;
192
+ }
193
+
194
+ #customcontactforms-admin form.blog-horizontal-form input[type=text] { width:100px; }
195
+
196
+ #customcontactforms-admin form.blog-horizontal-form span { font-weight:bold; padding-right:4px; }
197
+ #customcontactforms-admin #form-submissions-hidden { display:none; }
198
+ #customcontactforms-admin #form-submissions-table .submission-content { }
199
+ #customcontactforms-admin #form-submissions-table tr { border-top:1px solid #666; }
200
+ #customcontactforms-admin #form-submissions-table td { border:0; }
201
+ #customcontactforms-admin #form-submissions-table ul { min-height:30px; width:95%; margin:3px auto 2px auto; }
202
+ #customcontactforms-admin #form-submissions-table ul li { float:left; margin-right:9px; }
203
+ #customcontactforms-admin #form-submissions-table ul li p { display:block; }
204
+ #customcontactforms-admin #form-submissions-table ul li div { font-weight:bold; border-bottom:1px solid #666; padding:2px; text-align:left; }
205
+
206
+ #customcontactforms-admin #form-submissions-table table.first { float:left; width:48%; border-collapse:collapse; margin-right:10px; }
207
+ #customcontactforms-admin #form-submissions table.second { margin-left:48%; border-collapse:collapse; width:48%; }
208
+
209
+
210
+ #customcontactforms-admin #import, #customcontactforms-admin #export {
211
+ clear:both;
212
+ width:1000px;
213
+ margin:20px 1em 1em 5px;
214
+ }
215
+ #customcontactforms-admin #export input { margin:7px; }
216
+ #customcontactforms-admin #export p { padding:0; margin:0; }
217
+ #customcontactforms-admin #import .choose_import { font-size:1.1em; clear:both; font-weight:bold; }
218
+ #customcontactforms-admin #import input[type=file] { margin:6px; }
219
+ #customcontactforms-admin #import ul { margin:6px; }
220
+ #customcontactforms-admin #import ul li { width:130px; float:left; }
221
+ #customcontactforms-admin #import ul li label { font-size:.9em; }
222
+ #customcontactforms-admin #import input[type=checkbox] { margin-left:9px; }
223
+ #customcontactforms-admin #import p { padding:0 0 5px 0; margin:0; }
224
+
225
+ #customcontactforms-admin #manage-field-options table {
226
+ font-size:1em;
227
+ margin: 0 0 5px 14px;
228
+ width:95%;
229
+ }
230
+ #customcontactforms-admin #manage-field-options table td { padding-left:8px; padding-top:3px; padding-bottom:3px; }
231
+ #customcontactforms-admin #manage-field-options table thead,
232
+ #customcontactforms-admin #manage-field-options table tfoot {
233
+ background-color:#f4f4f4;
234
+ }
235
+ #customcontactforms-admin #manage-field-options table thead th,
236
+ #customcontactforms-admin #manage-field-options table tfoot th { padding:8px; text-align:left; }
237
+ #customcontactforms-admin #manage-field-options {
238
+ float:left;
239
+ clear:left;
240
+ width:530px;
241
+ margin:20px 1em 1em 1em;
242
+ }
243
+ #customcontactforms-admin #create-field-options {
244
+ float:left;
245
+ clear:none;
246
+ width:420px;
247
+ margin:20px 1em 1em 5px;
248
+ }
249
+
250
+ #customcontactforms-admin #field-options .evenrow-field-options div { background-color:#f9f9f9; }
251
+ #customcontactforms-admin #field-options .evenrow-field-options { background-color:#f9f9f9; }
252
+
253
+ .ccf-style-example {
254
+ background:url(../images/style-example.gif) no-repeat top left;
255
+ width:405px;
256
+ height:135px;
257
+ padding-left:20px;
258
+ margin:10px 0 0 10px;
259
+ border:0;
260
+ }
261
+ .ccf-success-popover-example {
262
+ background:url(../images/success-popover-example.gif) no-repeat top left;
263
+ width:405px;
264
+ height:135px;
265
+ padding-left:20px;
266
+ margin:10px 0 0 10px;
267
+ border:0;
268
+ }
269
+ #customcontactforms-admin #configure-mail {
270
+ clear:both;
271
+ width:1000px;
272
+ margin:20px 1em 1em 5px;
273
+ }
274
+ #customcontactforms-admin #configure-mail p { padding:0; margin:0; }
275
+ #customcontactforms-admin #configure-mail form div { margin:10px 0 0 0; padding-top:10px; border-top:1px solid #ccc;}
276
+ #customcontactforms-admin #configure-mail ul.left { float:left; width:48%; }
277
+ #customcontactforms-admin #configure-mail ul.right { margin-left:48%; width:48%; }
278
+ #customcontactforms-admin #create-styles {
279
+ clear:both;
280
+ width:1000px;
281
+ margin:20px 1em 1em 5px;
282
+ }
283
+ #customcontactforms-admin #create-styles .inside,
284
+ #customcontactforms-admin #create-styles form { margin-top:0px; padding-top:0 }
285
+ #customcontactforms-admin #create-styles .style_left { float:left; width:48% }
286
+ #customcontactforms-admin #create-styles .style_right { width:48%; margin-left:51%; clear:none }
287
+ #customcontactforms-admin #plugin-news {
288
+ clear:both;
289
+ width:1000px;
290
+ margin:20px 1em 1em 5px;
291
+ }
292
+ #customcontactforms-admin #plugin-news ul li.first { border-bottom:1px dashed #666; }
293
+ #customcontactforms-admin #manage-styles {
294
+ width:1000px;
295
+ }
296
+ #customcontactforms-admin #manage-styles td { border:0; }
297
+ #customcontactforms-admin #manage-styles label {
298
+ display:block;
299
+ }
300
+ #customcontactforms-admin #manage-styles input[type=text], #customcontactforms-admin #manage-styles select, #customcontactforms-admin #manage-styles textarea {
301
+ width:80px;
302
+ }
303
+ #customcontactforms-admin #general-settings {
304
+ clear:both;
305
+ width:1000px;
306
+ margin:20px 1em 1em 5px;
307
+ }
308
+ #customcontactforms-admin #general-settings .gleft { float:left; width:48%; clear:none; }
309
+ #customcontactforms-admin #general-settings .gright { clear:none; float:none; width:48%; margin-left:49%; }
310
+ #customcontactforms-admin #general-settings label { font-weight:bold; }
311
+ #customcontactforms-admin #general-settings form div p.descrip {
312
+ font-style:italic;
313
+ padding-left:20px;
314
+ }
315
+ #customcontactforms-admin #general-settings form div p.show-widget {
316
+ margin-top:1em;
317
+ padding-top:.4em;
318
+ border-top:1px solid #ccc;
319
+ }
320
+ #customcontactforms-admin #create-fields {
321
+ float:left;
322
+ clear:left;
323
+ width:450px;
324
+ margin:0 1em 1em 5px;
325
+ }
326
+ #customcontactforms-admin #create-forms {
327
+ float:left;
328
+ width:500px;
329
+ border-left:1px solid #ccc;
330
+ margin:0 1em 1em 1em;
331
+ }
332
+ #customcontactforms-admin #create-forms .inside div p {
333
+ font-size:.8em;
334
+ }
335
+ #customcontactforms-admin #create-forms .role{ display:inline; padding-left:5px; }
336
+ #customcontactforms-admin #create-fields .attach, #customcontactforms-admin #create-forms .attach { margin-top:6px; }
337
+ #customcontactforms-admin .manage-h3 {
338
+ clear:both;
339
+ margin-top:20px;
340
+ }
341
+ #customcontactforms-admin #manage-fields {
342
+ width:1000px;
343
+ }
344
+ #customcontactforms-admin #manage-fields td { border:0; }
345
+ #customcontactforms-admin #manage-fields .row-one {
346
+ margin-bottom:15px;
347
+ }
348
+ #customcontactforms-admin #manage-fields .row-one label { margin-right:4px; }
349
+ #customcontactforms-admin #manage-fields .attach-field-options {
350
+ float:left;
351
+ padding: 0 0 0 9px;
352
+ width:470px;
353
+ clear:none;
354
+ }
355
+ #customcontactforms-admin #manage-fields .detach-field-options {
356
+ clear:left;
357
+ float:left;
358
+ padding: 0 0 0 20px;
359
+ width:470px;
360
+ }
361
+ #customcontactforms-admin #manage-forms {
362
+ width:1000px;
363
+ margin-right:10px;
364
+ }
365
+ #customcontactforms-admin .fattach {
366
+ margin:6px;
367
+ clear:both;
368
+ -moz-border-radius:6px;
369
+ padding:6px 6px 6px 15px;
370
+ -webkit-border-radius:6px;
371
+ border-radius:6px;
372
+ -moz-box-shadow:0 0 2px #123;
373
+ -webkit-box-shadow: 0 0 2px #123;
374
+ box-shadow:0 0 2px #123;
375
+ background-color:#FFFEEB;
376
+ display:block;
377
+ height:56px;
378
+ width:90%;
379
+ }
380
+ #customcontactforms-admin .form-attach, #customcontactforms-admin .field-attach {
381
+ width:49%; float:left; text-align:left; clear:none;
382
+ }
383
+ #customcontactforms-admin .form-detach, #customcontactforms-admin .field-detach {
384
+ width:49%; float:left; text-align:left; clear:none;
385
+ }
386
+ #customcontactforms-admin #manage-forms td { border:0; }
387
+ #customcontactforms-admin #manage-fixed-fields {
388
+ width:1000px;
389
+ }
390
+ #customcontactforms-admin #manage-fixed-fields td { border:0; }
391
+ #customcontactforms-admin #manage-fixed-fields .field_descrip { padding-bottom:5px; }
392
+ #customcontactforms-admin .nobordertop {
393
+ border-top:none;
394
+ }
395
+ #customcontactforms-admin .borderbottom {
396
+ border-bottom:2px solid black;
397
+ }
398
+ #customcontactforms-admin .attached_fields {
399
+ float:left;
400
+ width:400px;
401
+ }
402
+ #customcontactforms-admin .attach_field {
403
+ float:left;
404
+ width:300px;
405
+ }
406
+ #customcontactforms-admin .actions {
407
+ float:right;
408
+ width: 80px; padding:0 18px 0 8px;
409
+ }
410
+ #customcontactforms-admin .bulk-dropdown { margin:8px 1px 8px 8px; font-size:1.1em; padding:4px; }
411
+ #customcontactforms-admin .bulk-apply { margin:8px 8px 8px 8px; }
412
+ #customcontactforms-admin .attach_styles {
413
+ float:left;
414
+ width:300px;
415
+ }
416
+ #customcontactforms-admin label span {
417
+ font-weight:bold;
418
+ }
419
+
420
+ #customcontactforms-admin #plugin-nav {
421
+ clear:both;
422
+ max-width:1000px;
423
+ }
424
+ #customcontactforms-admin #plugin-nav { text-align:center; border-bottom:1px #ccc dashed; margin:0 0 10px 0; padding:0 0 6px 0; }
425
+ #customcontactforms-admin #plugin-nav li {
426
+ border-right:1px solid #666; display:inline; padding:0 8px 0 8px;
427
+ }
428
+ #customcontactforms-admin #plugin-nav li.last {
429
+ border-right:none;
430
+ }
431
+ /* CCF Install Popover -------------------------------- */
432
+ .ccf-popover {
433
+ display:none;
434
+ }
435
+ .ccf-popover #popover-tof { text-align:center; border-bottom:1px #ccc dashed; margin:5px 0 10px 0; padding:0 0 6px 0; }
436
+ .ccf-popover #popover-tof li { display:inline; padding:0 2px 0 3px;
437
+ }
438
+
439
+ .ccf-popover div.popover-body span { font-weight:bold; }
440
+ .ccf-popover div.popover-body {
441
+ text-align:left;
442
+ padding:3px;
443
+ }
444
+ .ccf-popover div.popover-body ul { margin:5px 0px 5px 8px; padding:0; border-top:1px solid #efefef; }
445
+ .ccf-popover div.popover-body ul ul { margin:0px 0px 2px 30px; padding:0; list-style-type:disc; border-top:none; }
446
+ .ccf-popover div.popover-body ul li { margin-left:20px; }
447
+ .ccf-popover div.popover-body p { padding:8px; font-size:1em; text-align:left; }
448
+ .ccf-popover div.popover-body form { width:100%; text-align:center; }
449
+ .ccf-popover div.popover-body .insert-default-content-button {
450
+ margin:5px auto 5px auto;
451
+ }
452
+
453
+ .modal-overlay {
454
+ position:fixed;
455
+ top:0;
456
+ left:0;
457
+ bottom:0;
458
+ width:100%;
459
+ height:100%;
460
+ background-color:rgba(0,0,0.5);
461
+ z-index:20;
462
+ }
463
+
464
+ .modal-window {
465
+ position:fixed;
466
+ top:140px;
467
+ left:50%;
468
+ width:300px;
469
+ height:auto;
470
+ text-align:center;
471
+ /*max-height:200px;
472
+ text-align:left;
473
+ overflow:scroll;*/
474
+ margin-left:-150px;
475
+ padding:20px;
476
+ border:10px solid #efefef;
477
+ background-color:#fff;
478
+ -moz-border-radius:6px;
479
+ -webkit-border-radius:6px;
480
+ border-radius:6px;
481
+ -moz-box-shadow:0 0 14px #123;
482
+ -webkit-box-shadow: 0 0 14px #123;
483
+ box-shadow:0 0 14px #123;
484
+ z-index:10000;
485
+ }
486
+
487
+ .debug-window {
488
+ position:fixed;
489
+ top:20px;
490
+ left:50%;
491
+ bottom:20px;
492
+ width:500px;
493
+ text-align:center;
494
+ text-align:left;
495
+ overflow:scroll;
496
+ margin-left:-250px;
497
+ padding:20px;
498
+ border:10px solid #efefef;
499
+ background-color:#fff;
500
+ -moz-border-radius:6px;
501
+ -webkit-border-radius:6px;
502
+ border-radius:6px;
503
+ -moz-box-shadow:0 0 14px #123;
504
+ -webkit-box-shadow: 0 0 14px #123;
505
+ box-shadow:0 0 14px #123;
506
+ z-index:500;
507
+ }
508
+
509
+ .modal-close-btn {
510
+ position:absolute;
511
+ top:0;
512
+ right:4px;
513
+ margin:0;
514
+ padding:0;
515
+ text-decoration:none;
516
+ color:#000;
517
+ font-size:16px;
518
+ }
519
+
520
+ .modal-close-btn:before {
521
+ position:relative;
522
+ top:-1px;
523
+ }
524
+
525
+ .save-box {
526
+ width:150px;
527
+ height:auto;
528
+ padding:0px;
529
+ margin:0 0 0 -75px;
530
+ border:12px solid #efefef;
531
+ background-color:#fff;
532
+ -moz-border-radius:12px;
533
+ -webkit-border-radius:12px;
534
+ border-radius:12px;
535
+ -moz-box-shadow:0 0 14px #123;
536
+ -webkit-box-shadow: 0 0 14px #123;
537
+ box-shadow:0 0 14px #123;
538
+ z-index:5000;
539
+ position:fixed;
540
+ left:50%;
541
+ top:40%;
542
+ }
543
+ .save-box p { text-align:center; width:100%; font-weight:bold; font-size:16px; }
544
+ .save-box-close-btn {
545
+ position:absolute;
546
+ top:0;
547
+ right:4px;
548
+ margin:0;
549
+ padding:0;
550
+ text-decoration:none;
551
+ color:#000;
552
+ font-size:16px;
553
+ }
554
+ .modal-wpspin { margin-left:5px; }
555
+ #customcontactforms-admin .pagination {
556
+ font-size: 80%;
557
+ }
558
+
559
+ #customcontactforms-admin .pagination a {
560
+ text-decoration: none;
561
+ border: solid 1px #AAE;
562
+ color: #15B;
563
+ }
564
+
565
+ #customcontactforms-admin .pagination a, .pagination span {
566
+ display: block;
567
+ float: left;
568
+ padding: 0.3em 0.5em;
569
+ margin-right: 5px;
570
+ margin-bottom: 5px;
571
+ min-width:1em;
572
+ text-align:center;
573
+ }
574
+
575
+ #customcontactforms-admin .pagination .current {
576
+ background: #26B;
577
+ color: #fff;
578
+ border: solid 1px #AAE;
579
+ }
580
+
581
+ #customcontactforms-admin .pagination .current.prev, #customcontactforms-admin .pagination .current.next{
582
+ color:#999;
583
+ border-color:#999;
584
+ background:#fff;
585
+ }
586
+
587
+ #customcontactforms-admin form.blog-horizontal-form {
588
+ background-color:#FFFEEB;
589
+ width:920px;
590
+ border:1px solid #cccccc;
591
+ padding:7px;
592
+ display:block;
593
+ height:30px;
594
+ text-align:center;
595
+ margin:.5em 0 .8em 5px;
596
+ -moz-border-radius:11px;
597
+ -webkit-border-radius:11px;
598
+ border-radius:11px;
599
+ }
600
+
601
+ #customcontactforms-admin form.blog-horizontal-form span { font-weight:bold; padding-right:4px; }
602
+
custom-contact-forms-admin.php CHANGED
@@ -1,2392 +1,2420 @@
1
- <?php
2
- /*
3
- Custom Contact Forms Plugin
4
- By Taylor Lovett - http://www.taylorlovett.com
5
- Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
- */
7
- if (!class_exists('CustomContactFormsAdmin')) {
8
- class CustomContactFormsAdmin extends CustomContactForms {
9
- var $action_complete = '';
10
-
11
- function adminInit() {
12
- $this->downloadExportFile();
13
- $this->runImport();
14
- }
15
-
16
- function insertUsagePopover() {
17
- ccf_utils::load_module('usage_popover/custom-contact-forms-usage-popover.php');
18
- }
19
-
20
- function isPluginAdminPage() {
21
- $pages = array('custom-contact-forms', 'ccf-settings', 'ccf-saved-form-submissions');
22
- return (in_array($GLOBALS['ccf_current_page'], $pages));
23
- }
24
-
25
- function appendToActionLinks($action_links, $plugin_file) {
26
- static $link_added = false;
27
- if (!$link_added && basename($plugin_file) == 'custom-contact-forms.php') {
28
- $new_link = '<a style="font-weight:bold;" href="admin.php?page=custom-contact-forms" title="' . __('Manage Custom Contact Forms', 'custom-contact-forms') . '">' . __('Settings', 'custom-contact-forms') . '</a>';
29
- array_unshift($action_links, $new_link);
30
- $link_added = true;
31
- }
32
- return $action_links;
33
- }
34
-
35
- function downloadExportFile() {
36
- if ($_POST['ccf_export']) {
37
- //chmod('modules/export/', 0777);
38
- ccf_utils::load_module('export/custom-contact-forms-export.php');
39
- $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
40
- $transit->exportAll();
41
- $file = $transit->exportToFile();
42
- ccf_utils::redirect(plugins_url() . '/custom-contact-forms/download.php?location=export/' . $file);
43
- }
44
- }
45
-
46
- function runImport() {
47
- if ($_POST['ccf_clear_import'] || $_POST['ccf_merge_import']) {
48
- //chmod('modules/export/', 0777);
49
- ccf_utils::load_module('export/custom-contact-forms-export.php');
50
- $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
51
- $settings['import_general_settings'] = ($_POST['ccf_import_overwrite_settings'] == 1) ? true : false;
52
- $settings['import_forms'] = ($_POST['ccf_import_forms'] == 1) ? true : false;
53
- $settings['import_fields'] = ($_POST['ccf_import_fields'] == 1) ? true : false;
54
- $settings['import_field_options'] = ($_POST['ccf_import_field_options'] == 1) ? true : false;
55
- $settings['import_styles'] = ($_POST['ccf_import_styles'] == 1) ? true : false;
56
- $settings['import_saved_submissions'] = ($_POST['ccf_import_saved_submissions'] == 1) ? true : false;
57
- $settings['mode'] = ($_POST['ccf_clear_import']) ? 'clear_import' : 'merge_import';
58
- $transit->importFromFile($_FILES['import_file'], $settings);
59
- ccf_utils::redirect('options-general.php?page=custom-contact-forms');
60
- }
61
- }
62
-
63
- function contactAuthor($name, $email, $website, $message, $type, $host, $ccf_version, $wp_version) {
64
- if (empty($message)) return false;
65
- if (!class_exists('PHPMailer'))
66
- require_once(ABSPATH . "wp-includes/class-phpmailer.php");
67
- $mail = new PHPMailer();
68
- $body = "Name: $name<br />\n";
69
- $body .= "Email: $email<br />\n";
70
- $body .= "Website: $website<br />\n";
71
- $body .= "CCF Version: $ccf_version<br />\n";
72
- $body .= "WP Version: $wp_version<br />\n";
73
- $body .= "Host: $host<br />\n";
74
- $body .= "Message: $message<br />\n";
75
- $body .= "Message Type: $type<br />\n";
76
- $body .= 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "<br />\n";
77
- $admin_options = parent::getAdminOptions();
78
- if ($admin_options['mail_function'] == 'smtp') {
79
- $mail->IsSMTP();
80
- $mail->Host = $admin_options['smtp_host'];
81
- if ($admin_options['smtp_authentication'] == 1) {
82
- $mail->SMTPAuth = true;
83
- $mail->Username = $admin_options['smtp_username'];
84
- $mail->Password = $admin_options['smtp_password'];
85
- $mail->Port = $admin_options['smtp_port'];
86
- } else
87
- $mail->SMTPAuth = false;
88
- }
89
- $mail->From = $email;
90
- $mail->FromName = 'Custom Contact Forms';
91
- $mail->AddAddress('admin@taylorlovett.com');
92
- $mail->Subject = "CCF Message: $type";
93
- $mail->CharSet = "utf-8";
94
- $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
95
- $mail->MsgHTML($body);
96
- $mail->Send();
97
- return true;
98
- }
99
-
100
- function displayPluginNewsFeed() {
101
- include_once(ABSPATH . WPINC . '/feed.php');
102
- $rss = @fetch_feed('http://www.taylorlovett.com/category/custom-contact-forms/feed');
103
- if (!is_wp_error($rss) ) {
104
- $maxitems = $rss->get_item_quantity(5);
105
- $rss_items = $rss->get_items(0, 1);
106
- $rss_items2 = $rss->get_items(1, $maxitems);
107
- }
108
- ?>
109
- <ul>
110
- <?php if ($maxitems == 0) echo '<li>' . __('Nothing to show.', 'custom-contact-forms') . '</li>';
111
- else
112
- foreach ( $rss_items as $item ) : ?>
113
- <li class="first">
114
- <a href='<?php echo $item->get_permalink(); ?>'
115
- title='<?php echo __('Posted', 'custom-contact-forms'). ' '.$item->get_date('j F Y | g:i a'); ?>'>
116
- <?php echo $item->get_title(); ?></a><br />
117
- <?php echo $item->get_content(); ?>
118
- </li>
119
- <?php endforeach; ?>
120
- <?php if ($maxitems == 0) echo '';
121
- else
122
- foreach ( $rss_items2 as $item ) : ?>
123
- <li>
124
- <a href='<?php echo $item->get_permalink(); ?>'
125
- title='<?php echo __('Posted', 'custom-contact-forms') . ' '.$item->get_date('j F Y | g:i a'); ?>'>
126
- <?php echo $item->get_title(); ?></a><br />
127
- </li>
128
- <?php endforeach; ?>
129
- </ul>
130
- <?php
131
- }
132
-
133
- function getFieldsForm() {
134
- $fields = parent::selectAllFields();
135
- $out = '';
136
- foreach ($fields as $field) {
137
- $out .= '<option value="'.$field->id.'">'.$field->field_slug.'</option>' . "\n";
138
- }
139
- return $out;
140
- }
141
-
142
- function handleAJAX() {
143
-
144
- if (!wp_verify_nonce($_POST['nonce'], 'ccf_nonce')) exit(__('Invalid request.', 'custom-contact-forms'));
145
- $output = $this->handleAdminPostRequests();
146
- $response = json_encode( $output );
147
- header("Content-Type: application/json");
148
- exit($response);
149
- return true;
150
- }
151
-
152
-
153
- function getFieldOptionsForm() {
154
- $options = parent::selectAllFieldOptions();
155
- $out = '';
156
- foreach ($options as $option) {
157
- $out .= '<option value="'.$option->id.'">'.$option->option_slug.'</option>' . "\n";
158
- }
159
- return $out;
160
- }
161
-
162
- function insertBackEndStyles() {
163
- wp_register_style('ccf-standards', plugins_url() . '/custom-contact-forms/css/custom-contact-forms-standards.css');
164
- wp_register_style('ccf-jquery-ui', plugins_url() . '/custom-contact-forms/css/jquery-ui.css');
165
- wp_register_style('ccf-admin', plugins_url() . '/custom-contact-forms/css/custom-contact-forms-admin.css');
166
- wp_register_style('ccf-colorpicker', plugins_url() . '/custom-contact-forms/css/colorpicker.css');
167
- wp_enqueue_style('ccf-jquery-ui');
168
- wp_enqueue_style('ccf-standards');
169
- wp_enqueue_style('ccf-admin');
170
- wp_enqueue_style('ccf-colorpicker');
171
- }
172
-
173
- function insertAdminScripts() {
174
- $js_version = '1.0.19';
175
- $admin_options = parent::getAdminOptions();
176
- $js_lang = array(
177
- 'attaching' => __('Attaching', 'custom-contact-forms'),
178
- 'detaching' => __('Detaching', 'custom-contact-forms'),
179
- 'detach_button' => __('Detach', 'custom-contact-forms'),
180
- 'attach_button' => __('Attach', 'custom-contact-forms'),
181
- 'saving' => __('Saving', 'custom-contact-forms'),
182
- 'more_options' => __('More Options', 'custom-contact-forms'),
183
- 'expand' => __('Expand', 'custom-contact-forms'),
184
- 'click_to_confirm' => __('Click to Confirm', 'custom-contact-forms'),
185
- 'delete_confirm' => __('Are you sure you want to delete this', 'custom-contact-forms'),
186
- 'error' => __('An error has occured. Please try again later.', 'custom-contact-forms'),
187
- 'nothing_to_show' => __('Nothing to show.', 'custom-contact-forms'),
188
- 'nothing_attached' => __('Nothing Attached!', 'custom-contact-forms'),
189
- 'nonce' => wp_create_nonce('ccf_nonce')
190
- );
191
- $js_ajax = array('plugin_dir' => plugins_url() . '/custom-contact-forms',
192
- 'url' => admin_url('admin-ajax.php'),
193
- 'nonce' => wp_create_nonce('ccf-ajax-nonce'));
194
- wp_enqueue_script('jquery');
195
- wp_enqueue_script('jquery-form');
196
- wp_enqueue_script('jquery-ui-core');
197
- wp_enqueue_script('jquery-ui-tabs');
198
- wp_enqueue_script('jquery-ui-dialog');
199
-
200
- wp_enqueue_script('jquery-tools', plugins_url() . '/custom-contact-forms/js/jquery.tools.min.js');
201
- wp_enqueue_script('jquery-ui-widget', plugins_url() . '/custom-contact-forms/js/jquery.ui.widget.js');
202
- //wp_enqueue_script('jquery-ui-dialog', plugins_url() . '/custom-contact-forms/js/jquery.ui.dialog.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'));
203
- //wp_enqueue_script('ccf-pagination', plugins_url() . '/custom-contact-forms/js/jquery.pagination.js');
204
- wp_enqueue_script('ccf-admin-inc', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-admin-inc.js', $js_version);
205
- wp_enqueue_script('ccf-admin', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-admin.js', $js_version);
206
- if ($admin_options['admin_ajax'] == 1) {
207
- wp_enqueue_script('ccf-admin-ajax', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-admin-ajax.js', $js_version);
208
- wp_localize_script('ccf-admin-ajax', 'ccfLang', $js_lang);
209
- wp_localize_script('ccf-admin-ajax', 'ccfAjax', $js_ajax);
210
- }
211
- wp_enqueue_script('ccf-colorpicker', plugins_url() . '/custom-contact-forms/js/colorpicker.js');
212
- wp_enqueue_script('ccf-eye', plugins_url() . '/custom-contact-forms/js/eye.js');
213
- wp_enqueue_script('ccf-utils', plugins_url() . '/custom-contact-forms/js/utils.js');
214
- wp_enqueue_script('ccf-layout', plugins_url() . '/custom-contact-forms/js/layout.js?ver=1.0.2');
215
- wp_localize_script('ccf-admin-inc', 'ccfLang', $js_lang);
216
- wp_localize_script('ccf-admin-inc', 'ccfAjax', $js_ajax);
217
- wp_localize_script('ccf-admin', 'ccfLang', $js_lang);
218
- }
219
-
220
- function handleAdminPostRequests() {
221
- $out = array('success' => true);
222
- if ($_POST['object_create']) {
223
- if ($_POST['object_type'] == 'form') {
224
- if (parent::insertForm($_POST['object']) != false)
225
- $this->action_complete = __('A new form was successfully created!', 'custom-contact-forms');
226
- } elseif ($_POST['object_type'] == 'field') {
227
- if (parent::insertField($_POST['object']) != false)
228
- $this->action_complete = __('A new field was successful created!', 'custom-contact-forms');
229
- } elseif ($_POST['object_type'] == 'field_option') {
230
- if (parent::insertFieldOption($_POST['object']) != false)
231
- $this->action_complete = __('A new field option was successful created!', 'custom-contact-forms');
232
- } elseif ($_POST['object_type'] == 'style') {
233
- if (parent::insertStyle($_POST['object']) != false)
234
- $this->action_complete = __('A new style was successful created!', 'custom-contact-forms');
235
- }
236
- return $out;
237
- }
238
-
239
- if ($_POST['object_attach']) {
240
- if ($_POST['object_type'] == 'form') {
241
- if (parent::addFieldToForm($_POST['attach_object_id'], $_POST['object_id']) != false)
242
- $this->action_complete = __('A field was successful attached!', 'custom-contact-forms');
243
- } elseif ($_POST['object_type'] == 'field') {
244
- if (parent::addFieldOptionToField($_POST['attach_object_id'], $_POST['object_id']) != false)
245
- $this->action_complete = __('A field option was successful attached!', 'custom-contact-forms');
246
- }
247
- return $out;
248
- }
249
-
250
- if ($_POST['object_detach']) {
251
- if ($_POST['object_type'] == 'form') {
252
- if (parent::detachField($_POST['detach_object_id'], $_POST['object_id']) != false)
253
- $this->action_complete = __('A field was successful detached!', 'custom-contact-forms');
254
- } elseif ($_POST['object_type'] == 'field') {
255
- if (parent::detachFieldOption($_POST['detach_object_id'], $_POST['object_id']) != false)
256
- $this->action_complete = __('A field option was successful detached!', 'custom-contact-forms');
257
- }
258
- return $out;
259
- }
260
-
261
- if (isset($_POST['object_bulk_apply'])) {
262
- $out['object_bulk_action'] = $_POST['object_bulk_action'];
263
- if ($_POST['object_bulk_action'] == 'edit') {
264
- foreach ($_POST['objects'] as $obj) {
265
- if ($obj['object_do'] == 1) {
266
- if ($obj['object_type'] == 'form') {
267
- parent::updateForm($obj['values'], $obj['object_id']);
268
- if ($obj['detach_confirm'] == 1 && $obj['detach'] > 0) {
269
- parent::detachField($obj['detach'], $obj['object_id']);
270
- } if ($obj['attach_confirm'] == 1 && $obj['attach'] > 0) {
271
- parent::addFieldToForm($obj['attach'], $obj['object_id']);
272
- }
273
- } elseif ($obj['object_type'] == 'field') {
274
- parent::updateField($obj['values'], $obj['object_id']);
275
- if ($obj['detach_confirm'] == 1 && $obj['detach'] > 0) {
276
- parent::detachFieldOption($obj['detach'], $obj['object_id']);
277
- } if ($obj['attach_confirm'] == 1 && $obj['attach'] > 0) {
278
- parent::addFieldOptionToField($obj['attach'], $obj['object_id']);
279
- }
280
- } elseif ($obj['object_type'] == 'field_option') parent::updateFieldOption($obj['values'], $obj['object_id']);
281
- elseif ($obj['object_type'] == 'style') parent::updateStyle($obj['values'], $obj['object_id']);
282
- $out['objects'][] = $obj;
283
- }
284
- }
285
- $this->action_complete = __('Your bulk action has been completed!', 'custom-contact-forms');
286
- }
287
-
288
- elseif ($_POST['object_bulk_action'] == 'delete') {
289
- foreach ($_POST['objects'] as $obj) {
290
- if ($obj['object_do'] == 1) {
291
- if ($obj['object_type'] == 'form') parent::deleteForm($obj['object_id']);
292
- elseif ($obj['object_type'] == 'field') parent::deleteField($obj['object_id']);
293
- elseif ($obj['object_type'] == 'field_option') parent::deleteFieldOption($obj['object_id']);
294
- elseif ($obj['object_type'] == 'style') parent::deleteStyle($obj['object_id']);
295
- elseif ($obj['object_type'] == 'form_submission') {
296
- parent::deleteUserData($obj['object_id']);
297
- }
298
- $out['objects'][] = $obj;
299
- }
300
- }
301
- $this->action_complete = __('Your bulk action has been completed!', 'custom-contact-forms');
302
- }
303
- }
304
- return $out;
305
- }
306
-
307
- function printAdminPage() {
308
- $admin_options = parent::getAdminOptions();
309
- if ($admin_options['show_install_popover'] == 1) {
310
- $admin_options['show_install_popover'] = 0;
311
- ?>
312
- <script type="text/javascript" language="javascript">
313
- $j(document).ready(function() {
314
- $j("#ccf-usage-popover").dialog('open');
315
- });
316
- </script>
317
- <?php
318
- update_option(parent::getAdminOptionsName(), $admin_options);
319
- }
320
- $this->handleAdminPostRequests();
321
- //parent::serializeAllFormFields();
322
- //parent::serializeAllFieldOptions();
323
- if ($_POST['insert_default_content']) {
324
- ccf_utils::load_module('db/custom-contact-forms-default-db.php');
325
- $this->action_complete = __('Default content has been inserted!', 'custom-contact-forms');
326
- new CustomContactFormsDefaultDB();
327
- } elseif ($_POST['contact_author']) {
328
- $this->action_complete = __('Your message has been sent!', 'custom-contact-forms');
329
- $this_url = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : $_SERVER['SERVER_NAME'];
330
- $this->contactAuthor($_POST['name'], $_POST['email'], $this_url, $_POST['message'], $_POST['type'], $_POST['host'], $_POST['ccf-version'], $_POST['wp-version']);
331
- } elseif ($_GET['clear_tables'] == 1) {
332
- parent::emptyAllTables();
333
- }
334
- $styles = parent::selectAllStyles();
335
- $style_options = '<option value="0">Default</option>';
336
- foreach ($styles as $style)
337
- $style_options .= '<option value="'.$style->id.'">'.$style->style_slug.'</option>';
338
- ?>
339
- <div id="customcontactforms-admin">
340
- <div class="plugin-header">
341
- <h2>
342
- <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
343
- </h2>
344
- <input type="button" class="usage-popover-button" value="<?php _e("Plugin Usage Manual", 'custom-contact-forms'); ?>" />
345
- </div>
346
- <ul id="plugin-nav">
347
- <li><a href="#create-fields"><?php _e("Create Fields", 'custom-contact-forms'); ?></a></li>
348
- <li><a href="#create-forms"><?php _e("Create Forms", 'custom-contact-forms'); ?></a></li>
349
- <li><a href="#manage-fields"><?php _e("Manage Fields", 'custom-contact-forms'); ?></a></li>
350
- <li><a href="#manage-fixed-fields"><?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?></a></li>
351
- <li><a href="#manage-forms"><?php _e("Manage Forms", 'custom-contact-forms'); ?></a></li>
352
- <li><a href="#create-styles"><?php _e("Create Styles", 'custom-contact-forms'); ?></a></li>
353
- <li><a href="#manage-styles"><?php _e("Manage Styles", 'custom-contact-forms'); ?></a></li>
354
- <li><a href="#manage-field-options"><?php _e("Manage Field Options", 'custom-contact-forms'); ?></a></li>
355
- <li><a href="#contact-author"><?php _e("Suggest a Feature", 'custom-contact-forms'); ?></a></li>
356
- <li><a href="#contact-author"><?php _e("Bug Report", 'custom-contact-forms'); ?></a></li>
357
- <li><a href="#custom-html"><?php _e("Custom HTML Forms", 'custom-contact-forms'); ?></a></li>
358
- <li class="last"><a href="#plugin-news"><?php _e("Plugin News", 'custom-contact-forms'); ?></a></li>
359
- </ul>
360
- <div style="text-align:center"><a target="_blank" href="http://www.shareasale.com/r.cfm?b=256143&u=481196&m=25929&urllink=&afftrack="><img src="http://www.shareasale.com/image/25929/728x90.png" alt="Scribe. SEO Made Simple." border="0"></a>
361
- </div><a class="genesis" href="http://www.shareasale.com/r.cfm?b=241369&u=481196&m=28169&urllink=&afftrack="><?php _e('Custom Contact Forms works best with any of the 20+ ', 'custom-contact-forms'); ?><span><?php _e('Genesis', 'custom-contact-forms'); ?></span> <?php _e('Wordpress child themes. The', 'custom-contact-forms'); ?> <span><?php _e('Genesis Framework', 'custom-contact-forms'); ?></span> <?php _e('empowers you to quickly and easily build incredible websites with WordPress.', 'custom-contact-forms'); ?></a>
362
-
363
- <form class="blog-horizontal-form" method="post" action="http://www.aweber.com/scripts/addlead.pl">
364
- <input type="hidden" name="meta_web_form_id" value="1578604781" />
365
- <input type="hidden" name="meta_split_id" value="" />
366
- <input type="hidden" name="listname" value="ccf-plugin" />
367
- <input type="hidden" name="redirect" value="http://www.taylorlovett.com/wordpress-plugins/tutorials-offers-tips/" id="redirect_5832e41084448adb07da67a35dc83c27" />
368
- <input type="hidden" name="meta_adtracking" value="CCF_-_Wordpress_Plugins_Horizontal" />
369
- <input type="hidden" name="meta_message" value="1" />
370
- <input type="hidden" name="meta_required" value="name,email" />
371
- <span><?php _e('WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials', 'custom-contact-forms'); ?></span>
372
- <input type="text" name="name" value="Your Name" onclick="value=''" />
373
- <input type="text" name="email" value="Your Email" onclick="value=''" />
374
- <input type="submit" value="Sign Up for Free" />
375
- </form>
376
-
377
- <?php if (!empty($this->action_complete)) { ?>
378
- <div class="action-complete">
379
- <?php echo $this->action_complete; ?>
380
- </div>
381
- <?php } ?>
382
-
383
- <a name="create-fields"></a>
384
- <div id="create-fields" class="postbox">
385
- <h3 class="hndle"><span>
386
- <?php _e("Create A Form Field", 'custom-contact-forms'); ?>
387
- </span></h3>
388
- <div class="inside">
389
- <form id="ccf-create-field" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
390
- <ul>
391
- <li>
392
- <label for="field_slug">*
393
- <?php _e("Field Slug:", 'custom-contact-forms'); ?>
394
- </label>
395
- <input name="object[field_slug]" type="text" maxlength="40" />
396
- <br />
397
- <?php _e("This is just a unique way for CCF to refer to your field. Must be unique from other slugs and contain only underscores and alphanumeric characters.", 'custom-contact-forms'); ?>
398
- </li>
399
- <li>
400
- <label for="field_label">
401
- <?php _e("Field Label:", 'custom-contact-forms'); ?>
402
- </label>
403
- <input name="object[field_label]" type="text" maxlength="100" />
404
- <br />
405
- <?php _e("The field label is displayed next to the field and is visible to the user.", 'custom-contact-forms'); ?>
406
- </li>
407
- <li>
408
- <label for="field_type">*
409
- <?php _e("Field Type:", 'custom-contact-forms'); ?>
410
- </label>
411
- <select name="object[field_type]">
412
- <option>Text</option>
413
- <option>Textarea</option>
414
- <option>Hidden</option>
415
- <option>Checkbox</option>
416
- <option>Radio</option>
417
- <option>Dropdown</option>
418
- </select>
419
- </li>
420
- <li>
421
- <label for="field_value">
422
- <?php _e("Initial Value:", 'custom-contact-forms'); ?>
423
- </label>
424
- <input name="object[field_value]" type="text" maxlength="50" />
425
- <br />
426
- (
427
- <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox
428
- 'Are you human?', I would set the initial value to 'Yes'.", 'custom-contact-forms'); ?>
429
- <?php _e("If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the", 'custom-contact-forms'); ?>
430
- <a href="#manage-field-options" title="<?php _e("Create a Field Option", 'custom-contact-forms'); ?>"><?php _e("field option", 'custom-contact-forms'); ?></a>
431
- <?php _e("you would like initially selected.", 'custom-contact-forms'); ?>
432
- ) </li>
433
- <li>
434
- <label for="field_maxlength">
435
- <?php _e("Max Length:", 'custom-contact-forms'); ?>
436
- </label>
437
- <input class="ccf-width50" size="10" name="object[field_maxlength]" type="text" maxlength="4" />
438
- <br />
439
- <?php _e("0 for no limit; only applies to Text fields", 'custom-contact-forms'); ?>
440
- </li>
441
- <li>
442
- <label for="field_required">*
443
- <?php _e("Required Field:", 'custom-contact-forms'); ?>
444
- </label>
445
- <select name="object[field_required]">
446
- <option value="0">
447
- <?php _e("No", 'custom-contact-forms'); ?>
448
- </option>
449
- <option value="1">
450
- <?php _e("Yes", 'custom-contact-forms'); ?>
451
- </option>
452
- </select>
453
- <br />
454
- <?php _e("If a field is required and a user leaves it blank, the plugin will display an error message (which you can customize using 'Field Error') explaining the problem.", 'custom-contact-forms'); ?>
455
- </li>
456
- <li>
457
- <label for="field_instructions">
458
- <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
459
- </label>
460
- <input name="object[field_instructions]" type="text" />
461
- <br />
462
- <?php _e("If this is filled out, a tooltip popover displaying this text will show when the field is selected.", 'custom-contact-forms'); ?>
463
- </li>
464
- <li>
465
- <label for="field_class">
466
- <?php _e("Field Class:", 'custom-contact-forms'); ?>
467
- </label>
468
- <input name="object[field_class]" type="text" />
469
- <br />
470
- <?php _e("If you manage your own .css stylesheet, you can use this to attach a class to this field. Leaving this blank will do nothing.", 'custom-contact-forms'); ?>
471
- </li>
472
- <li>
473
- <label for="field_error">
474
- <?php _e("Field Error:", 'custom-contact-forms'); ?>
475
- </label>
476
- <input name="object[field_error]" type="text" />
477
- <br />
478
- <?php _e("If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank.", 'custom-contact-forms'); ?>
479
- </li>
480
- <li>
481
- <input type="hidden" name="object[user_field]" value="1" />
482
- <input type="hidden" name="object_type" value="field" />
483
- <input type="submit" value="<?php _e("Create Field", 'custom-contact-forms'); ?>" name="object_create" class="create-button" />
484
- </li>
485
- <li class="attach"><span class="ccf-red">*</span> <?php _e('If this is a dropdown or radio field, you should go to the field manager below to attach field options after you create it.', 'custom-contact-forms'); ?></li>
486
-
487
- </ul>
488
- </form>
489
- </div>
490
- </div>
491
- <a name="create-forms"></a>
492
- <div id="create-forms" class="postbox">
493
- <h3 class="hndle"><span>
494
- <?php _e("Create A Form", 'custom-contact-forms'); ?>
495
- </span></h3>
496
- <div class="inside">
497
- <form id="ccf-create-form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
498
- <ul>
499
- <li>
500
- <label for="object[form_slug]">*
501
- <?php _e("Form Slug:", 'custom-contact-forms'); ?>
502
- </label>
503
- <input type="text" maxlength="100" name="object[form_slug]" />
504
- <br />
505
- <?php _e("This is just a unique way for CCF to refer to your form. Must be unique from other slugs and contain only underscores and alphanumeric characters.", 'custom-contact-forms'); ?>
506
- </li>
507
- <li>
508
- <label for="object[form_title]">
509
- <?php _e("Form Title:", 'custom-contact-forms'); ?>
510
- </label>
511
- <input type="text" maxlength="200" name="object[form_title]" />
512
- <?php _e("This text is displayed above the form as the heading.", 'custom-contact-forms'); ?>
513
- </li>
514
- <li>
515
- <label for="object[form_action]">
516
- <?php _e("Form Style:", 'custom-contact-forms'); ?>
517
- </label>
518
- <select name="object[form_style]" class="form_style_input">
519
- <?php echo $style_options; ?>
520
- </select>
521
- (<a href="#create-styles"><?php _e("Click to create a style", 'custom-contact-forms'); ?></a>)</li>
522
- <li>
523
- <label for="object[submit_button_text]">
524
- <?php _e("Submit Button Text:", 'custom-contact-forms'); ?>
525
- </label>
526
- <input type="text" maxlength="200" name="object[submit_button_text]" />
527
- </li>
528
- <li>
529
- <label for="object[form_email]">
530
- <?php _e("Form Destination Email:", 'custom-contact-forms'); ?>
531
- </label>
532
- <input type="text" name="object[form_email]" />
533
- <br />
534
- <?php _e("Will receive all submissions from this form; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
535
- </li>
536
- <li>
537
- <label for="object[form_email_subject]">
538
- <?php _e("Form Email Subject:", 'custom-contact-forms'); ?>
539
- </label>
540
- <input type="text" name="object[form_email_subject]" />
541
- <br />
542
- <?php _e("When submitted and configured accordingly, the form will send an email with this subject.", 'custom-contact-forms'); ?>
543
- </li>
544
- <li>
545
- <label for="object[form_email_name]">
546
- <?php _e("Form Email Name:", 'custom-contact-forms'); ?>
547
- </label>
548
- <input type="text" name="object[form_email_name]" />
549
- <br />
550
- <?php _e("When submitted and configured accordingly, the form will send an email with this as the email 'from name'.", 'custom-contact-forms'); ?>
551
- </li>
552
- <li>
553
- <label for="object[form_success_message]">
554
- <?php _e("Form Success Message:", 'custom-contact-forms'); ?>
555
- </label>
556
- <input type="text" name="object[form_success_message]" />
557
- <br />
558
- <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
559
- </li>
560
- <li>
561
- <label for="object[form_success_title]">
562
- <?php _e("Form Success Message Title:", 'custom-contact-forms'); ?>
563
- </label>
564
- <input type="text" name="object[form_success_title]" />
565
- <br />
566
- <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
567
- </li>
568
- <li>
569
- <label for="object[form_thank_you_page]">
570
- <?php _e("Custom Success URL:", 'custom-contact-forms'); ?>
571
- </label>
572
- <input type="text" name="object[form_thank_you_page]" />
573
- <br />
574
- <?php _e("If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.", 'custom-contact-forms'); ?>
575
- </li>
576
- <li>
577
- <label for="form_access"><?php _e('Who Can View This Form:', ''); ?></label>
578
-
579
- <?php
580
- $roles = parent::getRolesArray();
581
- $i = 0;
582
- foreach ($roles as $role) {
583
- if ($i == 3) echo '<br />';
584
- ?>
585
- <div class="role">
586
- <input type="checkbox" checked="checked" name="object[form_access][]" value="<?php echo $role; ?>" />
587
- <?php echo $role; ?>
588
- </div>
589
- <?php
590
- $i++;
591
- }
592
- ?><br />
593
- <?php _e('Choose which types of users should be able to view this form.', 'custom-contact-forms'); ?>
594
- </li>
595
- <li>
596
- <input type="hidden" name="object_type" value="form" />
597
- <input type="submit" class="create-button" value="<?php _e("Create Form", 'custom-contact-forms'); ?>" name="object_create" />
598
- </li>
599
- <li class="attach"><span class="ccf-red">*</span> <?php _e('You should go to the form manager below to attach fields to this form after you create it.', 'custom-contact-forms'); ?></li>
600
- </ul>
601
- </form>
602
- </div>
603
- </div>
604
- <a name="manage-fields"></a>
605
- <h3 class="manage-h3">
606
- <?php _e("Manage User Fields", 'custom-contact-forms'); ?>
607
- </h3>
608
- <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
609
- <table class="widefat post" id="manage-fields" cellspacing="0">
610
- <thead>
611
- <tr>
612
- <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
613
- <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
614
- <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
615
- <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
616
- <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
617
- <th scope="col" class="manage-column field-required"><?php _e("Required", 'custom-contact-forms'); ?></th>
618
- <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
619
- <th scope="col" class="manage-column field-expand"></th>
620
- </tr>
621
- </thead>
622
- <tbody>
623
- <?php
624
- $fields = parent::selectAllFields();
625
- for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
626
- if ($fields[$i]->user_field == 0) { $z--; continue; }
627
- $attached_options = parent::getAttachedFieldOptionsArray($fields[$i]->id);
628
- $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option><option>Radio</option><option>Dropdown</option>';
629
- $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
630
-
631
- ?>
632
- <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 1) echo ' ccf-evenrow'; ?>">
633
- <td><input class="object-check" type="checkbox" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
634
- <td><input type="text" name="objects[<?php echo $i; ?>][values][field_slug]" class="ccf-width100" maxlength="50" value="<?php echo $fields[$i]->field_slug; ?>" /></td>
635
- <td><input type="text" name="objects[<?php echo $i; ?>][values][field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" /></td>
636
- <td><select name="objects[<?php echo $i; ?>][values][field_type]">
637
- <?php echo $field_types; ?>
638
- </select></td>
639
- <td><input type="text" name="objects[<?php echo $i; ?>][values][field_value]" maxlength="50" class="ccf-width75" value="<?php echo $fields[$i]->field_value; ?>" /></td>
640
- <td><select name="objects[<?php echo $i; ?>][values][field_required]">
641
- <option value="1">
642
- <?php _e("Yes", 'custom-contact-forms'); ?>
643
- </option>
644
- <option value="0" <?php if ($fields[$i]->field_required != 1) echo 'selected="selected"'; ?>>
645
- <?php _e("No", 'custom-contact-forms'); ?>
646
- </option>
647
- </select></td>
648
- <td><?php if ($fields[$i]->field_type == 'Dropdown' || $fields[$i]->field_type == 'Radio') { ?>
649
- <b>-</b>
650
- <?php } else { ?>
651
- <input type="text" class="ccf-width50" name="objects[<?php echo $i; ?>][values][field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
652
- <?php } ?>
653
- </td>
654
- <td><input type="hidden" class="object-type" name="objects[<?php echo $i; ?>][object_type]" value="field" />
655
- <input type="hidden" class="object-id" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $fields[$i]->id; ?>" />
656
- <span class="fields-options-expand"></span>
657
- </tr>
658
- <?php $show_field_options = ($fields[$i]->field_type == 'Radio' || $fields[$i]->field_type == 'Dropdown') ? true : false; ?>
659
- <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 1) echo 'ccf-evenrow'; ?>">
660
- <td class="fields-extra-options" colspan="8">
661
- <div class="row-one">
662
- <a href="javascript:void(0)" class="toollink" title="<?php _e('If this is filled out, a tooltip popover displaying this text will show when the field is selected.', 'custom-contact-forms'); ?>">(?)</a>
663
- <label for="field_instructions">
664
- <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
665
- </label>
666
- <input type="text" class="ccf-width150" name="objects[<?php echo $i; ?>][values][field_instructions]" value="<?php echo $fields[$i]->field_instructions; ?>" />
667
- <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
668
- <label for="field_class">
669
- <?php _e("Field Class:", 'custom-contact-forms'); ?>
670
- </label>
671
- <input type="text" class="ccf-width100" name="objects[<?php echo $i; ?>][values][field_class]" value="<?php echo $fields[$i]->field_class; ?>" />
672
- <a href="javascript:void(0)" class="toollink" title="<?php _e('This lets you customize the error message displayed when this field is required and left blank.', 'custom-contact-forms'); ?>">(?)</a>
673
- <label for="field_error">
674
- <?php _e("Field Error:", 'custom-contact-forms'); ?>
675
- </label>
676
- <input type="text" class="ccf-width200" name="objects[<?php echo $i; ?>][values][field_error]" value="<?php echo $fields[$i]->field_error; ?>" />
677
- </div>
678
- <?php
679
- if ($show_field_options) { ?>
680
- <div class="fattach">
681
- <div class="field-detach">
682
- <span class="ccf-bold">Detach Options:</span>
683
- <?php if (empty($attached_options)) { ?>
684
- <select class="onObject<?php echo $fields[$i]->id ?> detach-object detach-field-option objectTypeField" name="objects[<?php echo $i; ?>][detach]">
685
- <option value="-1">Nothing Attached!</option>
686
- </select>
687
- <?php } else { ?>
688
- <select name="objects[<?php echo $i; ?>][detach]" class="onObject<?php echo $fields[$i]->id ?> detach-object detach-field-option objectTypeField">
689
- <?php
690
- foreach ($attached_options as $option_id) {
691
- $option = parent::selectFieldOption($option_id);
692
- ?>
693
- <option value="<?php echo $option_id; ?>"><?php echo $option->option_slug; ?></option>
694
- <?php
695
- }
696
- ?>
697
- </select>
698
- <?php } ?>
699
- <span class="field-detach-check">
700
- <input class="detach-check" type="checkbox" name="objects[<?php echo $i; ?>][detach_confirm]" value="1" />
701
- <span class="detach-lang">(Check to detach option)</span>
702
- </span><br />
703
- <span class="ccf-red ccf-bold">*</span>
704
- <?php _e("Detach field options you", 'custom-contact-forms'); ?>
705
- <a href="#create-field-options">
706
- <?php _e("create", 'custom-contact-forms'); ?>
707
- </a>. </div>
708
- <?php $all_options = $this->getFieldOptionsForm(); ?>
709
- <div class="field-attach">
710
- <span class="ccf-bold">Attach Options:</span>
711
- <?php if (empty($all_options)) { ?>
712
- <b>No Field Options to Attach</b>
713
- <?php } else { ?>
714
- <select name="objects[<?php echo $i; ?>][attach]" class="onObject<?php echo $fields[$i]->id ?> attach-object attach-field-option objectTypeField">
715
- <?php echo $all_options; ?>
716
- </select>
717
- <span class="field-attach-check">
718
- <input type="checkbox" class="attach-check" name="objects[<?php echo $i; ?>][attach_confirm]" value="1" />
719
- <?php } ?>
720
- <span class="attach-lang">(Check to attach option)</span>
721
- </span><br />
722
- <span class="ccf-red ccf-bold">*</span>
723
- <?php _e("Attach field options in the order you want them to display.", 'custom-contact-forms'); ?>
724
- </div>
725
- </div>
726
- <?php } ?>
727
- </td>
728
- </tr>
729
- <?php
730
- }
731
- ?>
732
- </tbody>
733
-
734
- <tfoot>
735
- <tr>
736
- <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
737
- <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
738
- <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
739
- <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
740
- <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
741
- <th scope="col" class="manage-column field-required"><?php _e("Required", 'custom-contact-forms'); ?></th>
742
- <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
743
- <th scope="col" class="manage-column field-expand"></th>
744
- </tr>
745
- </tfoot>
746
- </table>
747
- <select class="bulk-dropdown" name="object_bulk_action">
748
- <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
749
- <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
750
- <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option>
751
- </select> <input type="submit" name="object_bulk_apply" class="bulk-apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
752
- </form>
753
- <a name="manage-fixed-fields"></a>
754
- <h3 class="manage-h3">
755
- <?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?>
756
- </h3>
757
- <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
758
- <table class="widefat post" id="manage-fixed-fields" cellspacing="0">
759
- <thead>
760
- <tr>
761
- <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
762
- <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
763
- <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
764
- <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
765
- <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
766
- <th scope="col" class="manage-column field-value"><?php _e("Required", 'custom-contact-forms'); ?></th>
767
- <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
768
- <th scope="col" class="manage-column field-expand"></th>
769
- </tr>
770
- </thead>
771
- <tbody>
772
- <?php
773
- $fields = parent::selectAllFields();
774
- for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
775
- if ($fields[$i]->user_field == 1) { $z--; continue;}
776
- $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option>';
777
- $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
778
-
779
- ?>
780
- <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 0) echo 'ccf-evenrow'; ?>">
781
- <td><input class="object-check" type="checkbox" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
782
- <td><?php echo $fields[$i]->field_slug; ?></td>
783
- <td><?php if ($fields[$i]->field_slug == 'resetButton') { _e('None', 'custom-contact-forms'); } else { ?>
784
- <input type="text" name="objects[<?php echo $i; ?>][values][field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" />
785
- <?php } ?></td>
786
- <td><?php echo $fields[$i]->field_type; ?>
787
- <td><?php if ($fields[$i]->field_type != 'Checkbox') { ?>
788
- <input type="text" name="objects[<?php echo $i; ?>][values][field_value]" class="ccf-width75" maxlength="50" value="<?php echo $fields[$i]->field_value; ?>" />
789
- <?php } else {
790
- echo $fields[$i]->field_value;
791
- ?>
792
- <?php } ?>
793
- </td>
794
- <td><?php if ($fields[$i]->field_slug == 'fixedEmail' || $fields[$i]->field_slug == 'emailSubject' || $fields[$i]->field_slug == 'fixedWebsite' || $fields[$i]->field_slug == 'usaStates' || $fields[$i]->field_slug == 'allCountries') { ?>
795
- <select name="objects[<?php echo $i; ?>][values][field_required]">
796
- <option value="1">
797
- <?php _e("Yes", 'custom-contact-forms'); ?>
798
- </option>
799
- <option <?php if($fields[$i]->field_required != 1) echo 'selected="selected"'; ?> value="0">
800
- <?php _e("No", 'custom-contact-forms'); ?>
801
- </option>
802
- </select>
803
- <?php } else {
804
- if ($fields[$i]->field_slug == 'resetButton') {
805
- echo '-';
806
- } else {
807
- _e("Yes", 'custom-contact-forms');
808
- }
809
- }
810
- ?>
811
- </td>
812
- <td><?php if ($fields[$i]->field_type != 'Checkbox' && $fields[$i]->field_slug != 'resetButton' && $fields[$i]->field_slug != 'allCountries' && $fields[$i]->field_slug != 'usaStates') { ?>
813
- <input type="text" class="ccf-width50" name="objects[<?php echo $i; ?>][values][field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
814
- <?php } else { _e('None', 'custom-contact-forms'); } ?>
815
- </td>
816
- <td><input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="field" />
817
- <input type="hidden" class="object-id" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $fields[$i]->id; ?>" />
818
- <span class="fixed-fields-options-expand"></span>
819
- </tr>
820
- <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 0) echo 'ccf-evenrow'; ?>">
821
- <td class="fixed-fields-extra-options" colspan="8"><label for="field_class">
822
- <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
823
- <?php _e('Field Class:', 'custom-contact-forms'); ?>
824
- </label>
825
- <input type="text" value="<?php echo $fields[$i]->field_class; ?>" name="objects[<?php echo $i; ?>][values][field_class]" />
826
- <?php if ($fields[$i]->field_slug != 'resetButton') { ?>
827
- <a href="javascript:void(0)" class="toollink" title="<?php _e('If this is filled out, a tooltip popover displaying this text will show when the field is selected.', 'custom-contact-forms'); ?>">(?)</a>
828
- <label for="field_instructions">
829
- <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
830
- </label>
831
- <input type="text" name="objects[<?php echo $i; ?>][values][field_instructions]" class="ccf-width200" value="<?php echo $fields[$i]->field_instructions; ?>" />
832
- <a href="javascript:void(0)" class="toollink" title="<?php _e('This lets you customize the error message displayed when this field is required and left blank.', 'custom-contact-forms'); ?>">(?)</a>
833
- <label for="field_error">
834
- <?php _e("Field Error:", 'custom-contact-forms'); ?>
835
- </label>
836
- <input type="text" class="ccf-width200" name="objects[<?php echo $i; ?>][values][field_error]" value="<?php echo $fields[$i]->field_error; ?>" />
837
- <br />
838
- <?php } ?>
839
- <div class="field_descrip"><?php echo $GLOBALS['ccf_fixed_fields'][$fields[$i]->field_slug]; ?></div></td>
840
- </tr>
841
- <?php
842
- }
843
- ?>
844
- </tbody>
845
-
846
- <tfoot>
847
- <tr>
848
- <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
849
- <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
850
- <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
851
- <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
852
- <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
853
- <th scope="col" class="manage-column field-value"><?php _e("Required", 'custom-contact-forms'); ?></th>
854
- <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
855
- <th scope="col" class="manage-column field-expand"></th>
856
- </tr>
857
- </tfoot>
858
- </table>
859
- <select class="bulk-dropdown" name="object_bulk_action">
860
- <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
861
- <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
862
- </select> <input type="submit" class="bulk-apply" name="object_bulk_apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
863
- </form>
864
- <a name="manage-field-options"></a>
865
- <div id="manage-field-options" class="postbox">
866
- <h3 class="hndle"><span>
867
- <?php _e("Manage Field Options", 'custom-contact-forms'); ?>
868
- </span></h3>
869
- <div class="inside">
870
- <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
871
-
872
- <table cellpadding="0" cellspacing="0">
873
- <thead>
874
- <tr>
875
- <th><input class="checkall" type="checkbox" /></th>
876
- <th><?php _e("Slug", 'custom-contact-forms'); ?></th>
877
- <th><?php _e("Label", 'custom-contact-forms'); ?></th>
878
- <th><?php _e("Value", 'custom-contact-forms'); ?></th>
879
- <th><?php _e("Is Dead", 'custom-contact-forms'); ?></th>
880
- </tr>
881
- </thead>
882
- <tfoot>
883
- <tr>
884
- <th><input class="checkall" type="checkbox" /></th>
885
- <th><?php _e("Slug", 'custom-contact-forms'); ?></th>
886
- <th><?php _e("Label", 'custom-contact-forms'); ?></th>
887
- <th><?php _e("Value", 'custom-contact-forms'); ?></th>
888
- <th><?php _e("Is Dead", 'custom-contact-forms'); ?></th>
889
- </tr>
890
- </tfoot>
891
- <tbody>
892
- <?php
893
- $options = parent::selectAllFieldOptions(1);
894
- $option_count = count($options);
895
- $i = 0;
896
- foreach ($options as $option) {
897
- ?>
898
- <tr class="row-field_option-<?php echo $option->id; ?> <?php if ($i % 2 == 1) echo 'evenrow-field-options'; ?>">
899
- <td><input type="checkbox" class="object-check" name="objects[<?php echo $i; ?>][object_do]" value="1" /> </td>
900
- <td><input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="field_option" />
901
-
902
- <input class="object-id" type="hidden" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $option->id; ?>" />
903
-
904
- <input type="text" maxlength="20" name="<?php ?>objects[<?php echo $i; ?>][values][option_slug]" value="<?php echo $option->option_slug; ?>" class="ccf-width50" /></td>
905
- <td><input type="text" name="objects[<?php echo $i; ?>][values][option_label]" value="<?php echo $option->option_label; ?>" class="ccf-width100" /></td>
906
- <td><input type="text" name="objects[<?php echo $i; ?>][values][option_value]" value="<?php echo $option->option_value; ?>" class="ccf-width100" /></td>
907
- <td><select name="objects[<?php echo $i; ?>][values][option_dead]"><option value="0"><?php _e('No', 'custom-contact-forms'); ?></option><option <?php if ($option->option_dead == 1) echo 'selected="selected"'; ?> value="1"><?php _e('Yes', 'custom-contact-forms'); ?></option></select></td>
908
-
909
- </tr>
910
- <?php
911
- $i++;
912
- } if (empty($options)) {
913
- ?>
914
- <tr>
915
- <td class="ccf-center"><?php _e("No field options have been created.", 'custom-contact-forms'); ?></td>
916
- </tr>
917
- <?php
918
- }
919
- ?>
920
- </tbody>
921
- </table>
922
- <select class="bulk-dropdown" name="object_bulk_action">
923
- <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
924
- <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
925
- <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option></select>
926
- <input type="submit" class="bulk-apply" name="object_bulk_apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
927
- </form>
928
- </div>
929
- </div>
930
-
931
- <div id="create-field-options" class="postbox">
932
- <h3 class="hndle"><span>
933
- <?php _e("Create A Field Option", 'custom-contact-forms'); ?>
934
- </span></h3>
935
- <div class="inside">
936
- <form id="ccf-create-field-option" method="post" action="<?php echo $_SERVER['REQUEST_URI']?>">
937
- <ul>
938
- <li>
939
- <label for="object[option_slug]">*
940
- <?php _e("Option Slug:", 'custom-contact-forms'); ?>
941
- </label>
942
- <input maxlength="20" type="text" name="object[option_slug]" />
943
- <br />
944
- <?php _e("Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'", 'custom-contact-forms'); ?>
945
- </li>
946
- <li>
947
- <label for="object[option_label]">*
948
- <?php _e("Option Label:", 'custom-contact-forms'); ?>
949
- </label>
950
- <input type="text" name="object[option_label]" />
951
- <br />
952
- <?php _e("This is what is shown to the user in the dropdown or radio field. Example: 'United States'", 'custom-contact-forms'); ?>
953
- </li>
954
- <li>
955
- <label for="object[option_value]">
956
- <?php _e("Option Value:", 'custom-contact-forms'); ?>
957
- </label>
958
- <input type="text" name="object[option_value]" /> <a href="javascript:void(0)" class="toollink" title="<?php _e("This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'.", 'custom-contact-forms'); ?>">(?)</a>
959
- <br />
960
- <?php _e('This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: "The color green" => "green" or "Yes" => "1".', 'custom-contact-forms'); ?>
961
- </li>
962
- <li>
963
- <label for="object[option_dead]"><?php _e("Is Dead Option:", 'custom-contact-forms'); ?></label>
964
- <select name="object[option_dead]"><option value="0"><?php _e('No', 'custom-contact-forms'); ?></option><option value="1"><?php _e('Yes', 'custom-contact-forms'); ?></option></select>
965
- <a href="javascript:void(0)" class="toollink" title="<?php _e("A dead option is something like 'Please Select One'. This is a useful tool for required dropdown fields. If a dead option is submitted by a user for a required dropdown field, then the user will have to go back and fill out the field again.", 'custom-contact-forms'); ?>">(?)</a>
966
- </li>
967
- <li>
968
- <input name="object_type" type="hidden" value="field_option" />
969
- <input type="submit" class="object-action" name="object_create" value="<?php _e("Create Field Option", 'custom-contact-forms'); ?>" />
970
-
971
- </li>
972
- </ul>
973
- </form>
974
- </div>
975
- </div>
976
- <form class="rate-me" action="https://www.paypal.com/cgi-bin/webscr" method="post">
977
- <input type="hidden" name="cmd" value="_s-xclick">
978
- <input type="hidden" name="hosted_button_id" value="TXYVDCH955V28">
979
- <a href="http://wordpress.org/extend/plugins/custom-contact-forms" title="<?php _e("Rate This Plugin", 'custom-contact-forms'); ?>">
980
- <?php _e("We need your help to continue development! Please <span>rate this plugin</span> to show your support.", 'custom-contact-forms'); ?></a>
981
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
982
- <img alt="Donate to Custom Contact Forms plugin" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
983
- </form>
984
-
985
- <a name="manage-forms"></a>
986
- <h3 class="manage-h3">
987
- <?php _e("Manage Forms", 'custom-contact-forms'); ?>
988
- </h3>
989
- <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
990
- <table class="widefat post" id="manage-forms" cellspacing="0">
991
- <thead>
992
- <tr>
993
- <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
994
- <th scope="col" class="manage-column form-code"><?php _e("Form Display Code", 'custom-contact-forms'); ?></th>
995
- <th scope="col" class="manage-column form-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
996
- <th scope="col" class="manage-column form-slug"><?php _e("Destination Email", 'custom-contact-forms'); ?></th>
997
- <th scope="col" class="manage-column form-title"><?php _e("Title", 'custom-contact-forms'); ?></th>
998
- <th scope="col" class="manage-column form-button"><?php _e("Button Text", 'custom-contact-forms'); ?></th>
999
- <th scope="col" class="manage-column form-style"><?php _e("Style", 'custom-contact-forms'); ?></th>
1000
- <th scope="col" class="manage-column form-expand"></th>
1001
- </tr>
1002
- </thead>
1003
- <tbody>
1004
- <?php
1005
- $forms = parent::selectAllForms();
1006
- for ($i = 0; $i < count($forms); $i++) {
1007
- $form_methods = '<option>Post</option><option>Get</option>';
1008
- $form_methods = str_replace('<option>'.$forms[$i]->form_method.'</option>', '<option selected="selected">'.$forms[$i]->form_method.'</option>', $form_methods);
1009
- $add_fields = $this->getFieldsForm();
1010
- $this_style = parent::selectStyle($forms[$i]->form_style, '');
1011
- $sty_opt = str_replace('<option value="'.$forms[$i]->form_style.'">'.$this_style->style_slug.'</option>', '<option value="'.$forms[$i]->form_style.'" selected="selected">'.$this_style->style_slug.'</option>', $style_options);
1012
- ?>
1013
- <tr class="row-form-<?php echo $forms[$i]->id; ?> <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1014
- <td><input type="checkbox" class="object-check" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
1015
- <td><span class="ccf-bold">[customcontact form=<?php echo $forms[$i]->id ?>]</span></td>
1016
- <td><input type="text" class="ccf-width75" name="objects[<?php echo $i; ?>][values][form_slug]" value="<?php echo $forms[$i]->form_slug; ?>" /></td>
1017
- <td><input type="text" name="objects[<?php echo $i; ?>][values][form_email]" value="<?php echo $forms[$i]->form_email; ?>" /></td>
1018
- <td><input type="text" class="ccf-width125" name="objects[<?php echo $i; ?>][values][form_title]" value="<?php echo $forms[$i]->form_title; ?>" /></td>
1019
- <td><input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][submit_button_text]" value="<?php echo $forms[$i]->submit_button_text; ?>" /></td>
1020
- <td><select name="objects[<?php echo $i; ?>][values][form_style]" class="form_style_input">
1021
- <?php echo $sty_opt; ?>
1022
- </select></td>
1023
- <td><input class="object-id" type="hidden" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $forms[$i]->id; ?>" />
1024
- <input type="hidden" class="object-type" name="objects[<?php echo $i; ?>][object_type]" value="form" />
1025
- <span class="form-options-expand"></span>
1026
- </td>
1027
- </tr>
1028
- <tr class="row-form-<?php echo $forms[$i]->id; ?> <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1029
- <td class="form-extra-options ccf-center" colspan="8"><table class="form-extra-options-table">
1030
- <tbody>
1031
- <tr>
1032
- <td class="ccf-bold"><?php _e("Method", 'custom-contact-forms'); ?></td>
1033
- <td class="ccf-bold"><?php _e("Form Action", 'custom-contact-forms'); ?></td>
1034
- <td class="ccf-bold"><?php _e("Email Subject", 'custom-contact-forms'); ?></td>
1035
- <td class="ccf-bold"><?php _e("Email From Name", 'custom-contact-forms'); ?></td>
1036
- <td class="ccf-bold"><?php _e("Success Message Title", 'custom-contact-forms'); ?></td>
1037
- <td class="ccf-bold"><?php _e("Success Message", 'custom-contact-forms'); ?></td>
1038
- <td class="ccf-bold"><?php _e("Custom Success URL", 'custom-contact-forms'); ?></td>
1039
- </tr>
1040
- <tr>
1041
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post.", 'custom-contact-forms'); ?>">(?)</a>
1042
- <select name="objects[<?php echo $i; ?>][values][form_method]">
1043
- <?php echo $form_methods; ?>
1044
- </select></td>
1045
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank.", 'custom-contact-forms'); ?>">(?)</a>
1046
- <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_action]" value="<?php echo $forms[$i]->form_action; ?>" /></td>
1047
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This is the form email subject sent to the destination email address. If left blank, the default from General Settings will be used.", 'custom-contact-forms'); ?>">(?)</a>
1048
- <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_email_subject]" maxlength="250" value="<?php echo $forms[$i]->form_email_subject; ?>" /></td>
1049
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This is the from name of the email sent on successful form submission. If left blank, the default from General Settings will be used.", 'custom-contact-forms'); ?>">(?)</a>
1050
- <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_email_name]" maxlength="100" value="<?php echo $forms[$i]->form_email_name; ?>" /></td>
1051
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>">(?)</a>
1052
- <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_success_title]" value="<?php echo $forms[$i]->form_success_title; ?>" /></td>
1053
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>">(?)</a>
1054
- <input type="text" name="objects[<?php echo $i; ?>][values][form_success_message]" class="ccf-width100" value="<?php echo $forms[$i]->form_success_message; ?>" /></td>
1055
- <td><a href="javascript:void(0)" class="toollink" title="<?php _e("If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.", 'custom-contact-forms'); ?>">(?)</a>
1056
- <input type="text" class="ccf-width100" name="objects[<?php echo $i; ?>][values][form_thank_you_page]" value="<?php echo $forms[$i]->form_thank_you_page; ?>" /></td>
1057
- </tr>
1058
- <tr>
1059
- <td colspan="7"><a href="javascript:void(0)" class="toollink" title="<?php _e("The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet.", 'custom-contact-forms'); ?>">(?)</a>
1060
- <label for="theme_code_<?php echo $forms[$i]->id; ?>"><span><?php _e("Code to Display Form in Theme Files:", 'custom-contact-forms'); ?>
1061
- </span></label>
1062
- <input type="text" class="ccf-width225" value="&lt;?php if (function_exists('serveCustomContactForm')) { serveCustomContactForm(<?php echo $forms[$i]->id; ?>); } ?&gt;" name="theme_code_<?php echo $forms[$i]->id; ?>" />
1063
- <a href="javascript:void(0)" class="toollink" title="<?php _e("This field allows you to insert HTML directly after the starting <form> tag.", 'custom-contact-forms'); ?>">(?)</a>
1064
- <label for="objects[<?php echo $i; ?>][values][custom_code]"><?php _e("Custom Code:", 'custom-contact-forms'); ?></label>
1065
- <input name="objects[<?php echo $i; ?>][values][custom_code]" type="text" value="<?php echo $forms[$i]->custom_code; ?>" /></td>
1066
- <input name="objects[<?php echo $i; ?>][values][form_access_update]" type="hidden" value="1" /></td>
1067
- <a href="javascript:void(0)" class="toollink" title="<?php _e("If you want to show this form to only certain types of users, you can uncheck boxes accordingly. To show this form to anyone, check all the boxes. This will only take effect if 'Form Access Capabilities' is enabled in general settings.", 'custom-contact-forms'); ?>">(?)</a>
1068
- <label for="form_access">Can View Form:</label>
1069
-
1070
- <?php
1071
- $roles = parent::getRolesArray();
1072
- $access_array = parent::getFormAccessArray($forms[$i]->form_access);
1073
- foreach ($roles as $role) {
1074
- ?>
1075
- <input type="checkbox" <?php if (parent::formHasRole($access_array, $role)) { echo 'checked="checked"'; } ?> name="objects[<?php echo $i; ?>][values][form_access][]" value="<?php echo $role; ?>" />
1076
- <?php
1077
- echo $role;
1078
- }
1079
- ?>
1080
- </tr>
1081
- <tr>
1082
- <td colspan="7">
1083
- <div class="fattach">
1084
- <div class="form-detach">
1085
- <label for="detach_object_id"><span>
1086
- <?php _e("Attached Fields:", 'custom-contact-forms'); ?>
1087
- </span></label>
1088
- <?php
1089
- $attached_fields = parent::getAttachedFieldsArray($forms[$i]->id);
1090
- if (empty($attached_fields)) echo '<select class="onObject' . $forms[$i]->id . ' objectTypeForm detach-field detach-object" name="objects['.$i.'][detach]"><option value="-1">Nothing Attached!</option></select> ';
1091
- else {
1092
- echo '<select name="objects['.$i.'][detach]" class="onObject' . $forms[$i]->id . ' detach-object detach-field objectTypeForm">';
1093
- foreach($attached_fields as $attached_field) {
1094
- $this_field = parent::selectField($attached_field, '');
1095
- echo $this_field->field_slug . ' <option value="'.$this_field->id.'">'.$this_field->field_slug.'</option>';
1096
- }
1097
- echo '</select>';
1098
- }
1099
- ?>
1100
- <span class="form-detach-check">
1101
- <input type="checkbox" class="detach-check" value="1" name="objects[<?php echo $i; ?>][detach_confirm]" />
1102
- <span class="detach-lang">(Check to detach field)</span>
1103
- </span>
1104
- <br />
1105
- <span class="ccf-red ccf-bold">*</span>
1106
- <?php _e("Attach fields in the order you want them displayed.", 'custom-contact-forms'); ?>
1107
- </div>
1108
- <div class="form-attach">
1109
- <label for="field_id"><span>
1110
- <?php _e("Attach Field:", 'custom-contact-forms'); ?>
1111
- </span></label>
1112
- <select class="onObject<?php echo $forms[$i]->id; ?> attach-object attach-field objectTypeForm" name="objects[<?php echo $i; ?>][attach]">
1113
- <?php echo $add_fields; ?>
1114
- </select>
1115
- <span class="form-attach-check">
1116
- <input class="attach-check" type="checkbox" name="objects[<?php echo $i; ?>][attach_confirm]" value="1" />
1117
- <span class="attach-lang">((Check to attach field)</span>
1118
- </span>
1119
- <br />
1120
- <span class="ccf-red ccf-bold">*</span>
1121
- <?php _e("Attach fixed fields or ones you", 'custom-contact-forms'); ?>
1122
- <a href="#create-fields">
1123
- <?php _e("create", 'custom-contact-forms'); ?>
1124
- </a>. </div></div></td>
1125
- </tr>
1126
- </tbody>
1127
- </table></td>
1128
- </tr>
1129
- <?php
1130
- }
1131
- $remember_check = ($admin_options['remember_field_values'] == 0) ? 'selected="selected"' : '';
1132
- $remember_fields = '<option value="1">'.__('Yes', 'custom-contact-forms').'</option><option '.$remember_check.' value="0">'.__('No', 'custom-contact-forms').'</option>';
1133
- $border_style_options = '<option>solid</option><option>dashed</option>
1134
- <option>grooved</option><option>double</option><option>dotted</option><option>ridged</option><option>none</option>
1135
- <option>inset</option><option>outset</option>';
1136
- ?>
1137
- </tbody>
1138
-
1139
- <tfoot>
1140
- <tr>
1141
- <tr>
1142
- <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
1143
- <th scope="col" class="manage-column form-code"><?php _e("Form Code", 'custom-contact-forms'); ?></th>
1144
- <th scope="col" class="manage-column form-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
1145
- <th scope="col" class="manage-column form-slug"><?php _e("Destination Email", 'custom-contact-forms'); ?></th>
1146
- <th scope="col" class="manage-column form-title"><?php _e("Title", 'custom-contact-forms'); ?></th>
1147
- <th scope="col" class="manage-column form-button"><?php _e("Button Text", 'custom-contact-forms'); ?></th>
1148
- <th scope="col" class="manage-column form-style"><?php _e("Style", 'custom-contact-forms'); ?></th>
1149
- <th scope="col" class="manage-column form-expand"></th>
1150
- </tr>
1151
- </tr>
1152
-
1153
- </tfoot>
1154
- </table>
1155
- <select class="bulk-dropdown" name="object_bulk_action">
1156
- <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
1157
- <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
1158
- <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option></select>
1159
- <input type="submit" name="object_bulk_apply" class="bulk-apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
1160
- </form>
1161
-
1162
- <a name="create-styles"></a>
1163
- <div id="create-styles" class="postbox">
1164
- <h3 class="hndle"><span>
1165
- <?php _e("Create A Style for Your Forms", 'custom-contact-forms'); ?>
1166
- </span></h3>
1167
- <div class="inside">
1168
- <p>
1169
- <?php _e("Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values.", 'custom-contact-forms'); ?>
1170
- </p>
1171
- <form id="ccf-create-style" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1172
- <ul class="style_left">
1173
- <li>
1174
- <label for="style_slug">*
1175
- <?php _e("Style Slug:", 'custom-contact-forms'); ?>
1176
- </label>
1177
- <input type="text" maxlength="30" class="ccf-width75" name="object[style_slug]" />
1178
- <?php _e("(Must be unique)", 'custom-contact-forms'); ?>
1179
- </li>
1180
- <li>
1181
- <label for="title_fontsize">
1182
- <?php _e("Title Font Size:", 'custom-contact-forms'); ?>
1183
- </label>
1184
- <input type="text" maxlength="20" value="1.2em" class="ccf-width75" name="object[title_fontsize]" />
1185
- <?php _e("(ex: 10pt, 10px, 1em)", 'custom-contact-forms'); ?>
1186
- </li>
1187
- <li>
1188
- <label for="title_fontcolor">
1189
- <?php _e("Title Font Color:", 'custom-contact-forms'); ?>
1190
- </label>
1191
- <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[title_fontcolor]" />
1192
- <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1193
- </li>
1194
- <li>
1195
- <label for="label_width">
1196
- <?php _e("Label Width:", 'custom-contact-forms'); ?>
1197
- </label>
1198
- <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[label_width]" />
1199
- <?php _e("(ex: 100px or 20%)", 'custom-contact-forms'); ?>
1200
- </li>
1201
- <li>
1202
- <label for="label_fontsize">
1203
- <?php _e("Label Font Size:", 'custom-contact-forms'); ?>
1204
- </label>
1205
- <input type="text" maxlength="20" value="1em" class="ccf-width75" name="object[label_fontsize]" />
1206
- <?php _e("(ex: 10px, 10pt, 1em)", 'custom-contact-forms'); ?>
1207
- </li>
1208
- <li>
1209
- <label for="label_fontcolor">
1210
- <?php _e("Label Font Color:", 'custom-contact-forms'); ?>
1211
- </label>
1212
- <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[label_fontcolor]" />
1213
- <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1214
- </li>
1215
- <li>
1216
- <label for="input_width">
1217
- <?php _e("Text Field Width:", 'custom-contact-forms'); ?>
1218
- </label>
1219
- <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[input_width]" />
1220
- <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1221
- </li>
1222
- <li>
1223
- <label for="textarea_width">
1224
- <?php _e("Textarea Field Width:", 'custom-contact-forms'); ?>
1225
- </label>
1226
- <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[textarea_width]" />
1227
- <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1228
- </li>
1229
- <li>
1230
- <label for="textarea_height">
1231
- <?php _e("Textarea Field Height:", 'custom-contact-forms'); ?>
1232
- </label>
1233
- <input type="text" maxlength="20" value="90px" class="ccf-width75" name="object[textarea_height]" />
1234
- <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1235
- </li>
1236
- <li>
1237
- <label for="field_fontsize">
1238
- <?php _e("Field Font Size:", 'custom-contact-forms'); ?>
1239
- </label>
1240
- <input type="text" maxlength="20" value="1.3em" class="ccf-width75" name="object[field_fontsize]" />
1241
- <?php _e("(ex: 10px, 10pt, 1em", 'custom-contact-forms'); ?>
1242
- </li>
1243
- <li>
1244
- <label for="field_fontcolor">
1245
- <?php _e("Field Font Color:", 'custom-contact-forms'); ?>
1246
- </label>
1247
- <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[field_fontcolor]" />
1248
- <?php _e("(ex: 333333)", 'custom-contact-forms'); ?>
1249
- </li>
1250
- <li>
1251
- <label for="field_borderstyle">
1252
- <?php _e("Field Border Style:", 'custom-contact-forms'); ?>
1253
- </label>
1254
- <select class="ccf-width75" name="object[field_borderstyle]">
1255
- <?php echo str_replace('<option>solid</option>', '<option selected="selected">solid</option>', $border_style_options); ?>
1256
- </select>
1257
- </li>
1258
- <li>
1259
- <label for="form_margin">
1260
- <?php _e("Form Margin:", 'custom-contact-forms'); ?>
1261
- </label>
1262
- <input type="text" maxlength="20" value="7px" class="ccf-width75" name="object[form_margin]" />
1263
- <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1264
- </li>
1265
- <li>
1266
- <label for="label_margin">
1267
- <?php _e("Label Margin:", 'custom-contact-forms'); ?>
1268
- </label>
1269
- <input type="text" maxlength="20" value="5px" class="ccf-width75" name="object[label_margin]" />
1270
- <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1271
- </li>
1272
- <li>
1273
- <label for="textarea_backgroundcolor">
1274
- <?php _e("Textarea Background Color:", 'custom-contact-forms'); ?>
1275
- </label>
1276
- <input type="text" maxlength="20" value="f5f5f5" class="ccf-width75 colorfield" name="object[textarea_backgroundcolor]" />
1277
- <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1278
- </li>
1279
- <li>
1280
- <label for="success_popover_fontcolor">
1281
- <?php _e("Success Popover Font Color:", 'custom-contact-forms'); ?>
1282
- </label>
1283
- <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[success_popover_fontcolor]" />
1284
- <?php _e("(ex: 333333)", 'custom-contact-forms'); ?>
1285
- </li>
1286
- <li>
1287
- <label for="success_popover_title_fontsize">
1288
- <?php _e("Success Popover Title Font Size:", 'custom-contact-forms'); ?>
1289
- </label>
1290
- <input type="text" maxlength="20" value="15px" class="ccf-width75" name="object[success_popover_title_fontsize]" />
1291
- <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1292
- </li>
1293
- <li>
1294
- <label for="form_backgroundcolor">
1295
- <?php _e("Form Background Color:", 'custom-contact-forms'); ?>
1296
- </label>
1297
- <input type="text" maxlength="20" value="ffffff" class="ccf-width75 colorfield" name="object[form_backgroundcolor]" />
1298
- <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1299
- </li>
1300
- <li>
1301
- <label for="tooltip_backgroundcolor">
1302
- <?php _e("Tooltip Background Color:", 'custom-contact-forms'); ?>
1303
- </label>
1304
- <input type="text" maxlength="20" value="000000" class="ccf-width75 colorfield" name="object[tooltip_backgroundcolor]" />
1305
- <?php _e("(ex: 000000 or black)", 'custom-contact-forms'); ?>
1306
- </li>
1307
- </ul>
1308
- <ul class="style_right">
1309
- <li>
1310
- <label for="input_width">
1311
- <?php _e("Field Border Color:", 'custom-contact-forms'); ?>
1312
- </label>
1313
- <input type="text" maxlength="20" value="999999" class="ccf-width75 colorfield" name="object[field_bordercolor]" />
1314
- <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1315
- </li>
1316
- <li>
1317
- <label for="form_borderstyle">
1318
- <?php _e("Form Border Style:", 'custom-contact-forms'); ?>
1319
- </label>
1320
- <select class="ccf-width75" name="object[form_borderstyle]">
1321
- <?php echo $border_style_options; ?>
1322
- </select>
1323
- </li>
1324
- <li>
1325
- <label for="form_bordercolor">
1326
- <?php _e("Form Border Color:", 'custom-contact-forms'); ?>
1327
- </label>
1328
- <input type="text" maxlength="20" value="ffffff" class="ccf-width75 colorfield" name="object[form_bordercolor]" />
1329
- <?php _e("(ex: 000000)", 'custom-contact-forms'); ?>
1330
- </li>
1331
- <li>
1332
- <label for="form_borderwidth">
1333
- <?php _e("Form Border Width:", 'custom-contact-forms'); ?>
1334
- </label>
1335
- <input type="text" maxlength="20" value="0px" class="ccf-width75" name="object[form_borderwidth]" />
1336
- <?php _e("(ex: 1px)", 'custom-contact-forms'); ?>
1337
- </li>
1338
- <li>
1339
- <label for="form_borderwidth">
1340
- <?php _e("Form Width:", 'custom-contact-forms'); ?>
1341
- </label>
1342
- <input type="text" maxlength="20" value="100%" class="ccf-width75" name="object[form_width]" />
1343
- <?php _e("(ex: 100px or 50%)", 'custom-contact-forms'); ?>
1344
- </li>
1345
- <li>
1346
- <label for="form_borderwidth">
1347
- <?php _e("Form Font Family:", 'custom-contact-forms'); ?>
1348
- </label>
1349
- <input type="text" maxlength="120" value="Verdana, tahoma, arial" class="ccf-width75" name="object[form_fontfamily]" />
1350
- <?php _e("(ex: Verdana, Tahoma, Arial)", 'custom-contact-forms'); ?>
1351
- </li>
1352
- <li>
1353
- <label for="submit_width">
1354
- <?php _e("Button Width:", 'custom-contact-forms'); ?>
1355
- </label>
1356
- <input type="text" maxlength="20" value="auto" class="ccf-width75" name="object[submit_width]" />
1357
- <?php _e("(ex: 100px, 30%, auto)", 'custom-contact-forms'); ?>
1358
- </li>
1359
- <li>
1360
- <label for="submit_height">
1361
- <?php _e("Button Height:", 'custom-contact-forms'); ?>
1362
- </label>
1363
- <input type="text" maxlength="20" value="30px" class="ccf-width75" name="object[submit_height]" />
1364
- <?php _e("(ex: 100px or 30%)", 'custom-contact-forms'); ?>
1365
- </li>
1366
- <li>
1367
- <label for="submit_fontsize">
1368
- <?php _e("Button Font Size:", 'custom-contact-forms'); ?>
1369
- </label>
1370
- <input type="text" maxlength="20" value="1.1em" class="ccf-width75" name="object[submit_fontsize]" />
1371
- <?php _e("(ex: 10px, 10pt, 1em)", 'custom-contact-forms'); ?>
1372
- </li>
1373
- <li>
1374
- <label for="submit_fontcolor">
1375
- <?php _e("Button Font Color:", 'custom-contact-forms'); ?>
1376
- </label>
1377
- <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[submit_fontcolor]" />
1378
- <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1379
- </li>
1380
- <li>
1381
- <label for="field_backgroundcolor">
1382
- <?php _e("Field Background Color:", 'custom-contact-forms'); ?>
1383
- </label>
1384
- <input type="text" maxlength="20" value="f5f5f5" class="ccf-width75 colorfield" name="object[field_backgroundcolor]" />
1385
- <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1386
- </li>
1387
- <li>
1388
- <label for="form_padding">
1389
- <?php _e("Form Padding:", 'custom-contact-forms'); ?>
1390
- </label>
1391
- <input type="text" maxlength="20" value="8px" class="ccf-width75" name="object[form_padding]" />
1392
- <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1393
- </li>
1394
- <li>
1395
- <label for="title_margin">
1396
- <?php _e("Title Margin:", 'custom-contact-forms'); ?>
1397
- </label>
1398
- <input type="text" maxlength="20" value="5px" class="ccf-width75" name="object[title_margin]" />
1399
- <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1400
- </li>
1401
- <li>
1402
- <label for="title_margin">
1403
- <?php _e("Dropdown Width:", 'custom-contact-forms'); ?>
1404
- </label>
1405
- <input type="text" maxlength="20" value="auto" class="ccf-width75" name="object[dropdown_width]" />
1406
- <?php _e("(ex: 30px, 20%, or auto)", 'custom-contact-forms'); ?>
1407
- </li>
1408
- <li>
1409
- <label for="success_popover_bordercolor">
1410
- <?php _e("Success Popover Border Color:", 'custom-contact-forms'); ?>
1411
- </label>
1412
- <input type="text" maxlength="20" value="efefef" class="ccf-width75 colorfield" name="object[success_popover_bordercolor]" />
1413
- <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1414
- </li>
1415
- <li>
1416
- <label for="success_popover_fontsize">
1417
- <?php _e("Success Popover Font Size:", 'custom-contact-forms'); ?>
1418
- </label>
1419
- <input type="text" maxlength="20" value="12px" class="ccf-width75" name="object[success_popover_fontsize]" />
1420
- <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1421
- </li>
1422
- <li>
1423
- <label for="success_popover_height">
1424
- <?php _e("Success Popover Height:", 'custom-contact-forms'); ?>
1425
- </label>
1426
- <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[success_popover_height]" />
1427
- <?php _e("(ex: 200px, 6em, 50%)", 'custom-contact-forms'); ?>
1428
- </li>
1429
- <li>
1430
- <label for="field_borderround">
1431
- <?php _e("Field Border Roundness:", 'custom-contact-forms'); ?>
1432
- </label>
1433
- <input type="text" maxlength="20" value="6px" class="ccf-width75" name="object[field_borderround]" />
1434
- <?php _e("(ex: 6px, or 0px)", 'custom-contact-forms'); ?>
1435
- </li>
1436
- <li>
1437
- <label for="tooltip_fontsize">
1438
- <?php _e("Tooltip", 'custom-contact-forms'); ?>
1439
- <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a>
1440
- <?php _e("Font Size:", 'custom-contact-forms'); ?>
1441
- </label>
1442
- <input type="text" maxlength="20" value="12px" class="ccf-width75" name="object[tooltip_fontsize]" />
1443
- <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1444
- </li>
1445
- <li>
1446
- <label for="tooltip_fontcolor">
1447
- <?php _e("Tooltip Font Color:", 'custom-contact-forms'); ?>
1448
- </label>
1449
- <input type="text" maxlength="20" value="ffffff" class="ccf-width75 colorfield" name="object[tooltip_fontcolor]" />
1450
- <?php _e("(ex: ffffff or white)", 'custom-contact-forms'); ?>
1451
- </li>
1452
- <li>
1453
- <input name="object_type" type="hidden" value="style" />
1454
- <input type="submit" value="<?php _e("Create Style", 'custom-contact-forms'); ?>" name="object_create" class="create-button" />
1455
- </li>
1456
- </ul>
1457
- </form>
1458
- </div>
1459
- </div>
1460
- <a name="manage-styles"></a>
1461
- <h3 class="manage-h3">
1462
- <?php _e("Manage Form Styles", 'custom-contact-forms'); ?>
1463
- </h3>
1464
- <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1465
- <table class="widefat post" id="manage-styles" cellspacing="0">
1466
- <thead>
1467
- <tr>
1468
- <th scope="col" class="manage-column"><input type="checkbox" class="checkall" /></th>
1469
- <th scope="col" class="manage-column"></th>
1470
- <th scope="col" class="manage-column"></th>
1471
- <th scope="col" class="manage-column"></th>
1472
- <th scope="col" class="manage-column"></th>
1473
- <th scope="col" class="manage-column"></th>
1474
- </tr>
1475
- </thead>
1476
- <tbody>
1477
- <?php
1478
- $styles = parent::selectAllStyles();
1479
- $i = 0;
1480
- foreach ($styles as $style) {
1481
- ?>
1482
- <tr class="row-style-<?php echo $style->id; ?> <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1483
- <td> <label><input type="checkbox" class="object-check" value="1" name="objects[<?php echo $i; ?>][object_do]" />
1484
- * <?php _e("Slug:", 'custom-contact-forms'); ?>
1485
- </label>
1486
- <input type="text" maxlength="30" value="<?php echo $style->style_slug; ?>" name="objects[<?php echo $i; ?>][values][style_slug]" />
1487
- <br />
1488
- <label>
1489
- <?php _e("Font Family:", 'custom-contact-forms'); ?>
1490
- </label>
1491
- <input type="text" maxlength="120" value="<?php echo $style->form_fontfamily; ?>" name="objects[<?php echo $i; ?>][values][form_fontfamily]" />
1492
- <br />
1493
- <label>
1494
- <?php _e("Textarea Background", 'custom-contact-forms'); ?>
1495
- <br />
1496
- <?php _e("Color:", 'custom-contact-forms'); ?>
1497
- </label>
1498
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->textarea_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][textarea_backgroundcolor]" />
1499
- <br />
1500
- <label>
1501
- <?php _e("Success Popover", 'custom-contact-forms'); ?>
1502
- <br />
1503
- <?php _e("Border Color:", 'custom-contact-forms'); ?>
1504
- </label>
1505
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_bordercolor; ?>" name="objects[<?php echo $i; ?>][values][success_popover_bordercolor]" />
1506
- <br />
1507
- <label>
1508
- <?php _e("Tooltip", 'custom-contact-forms'); ?>
1509
- <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a>
1510
- <?php _e("Font Color:", 'custom-contact-forms'); ?>
1511
- </label>
1512
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->tooltip_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][tooltip_fontcolor]" />
1513
- </td>
1514
- <td><label>
1515
- <?php _e("Form Width:", 'custom-contact-forms'); ?>
1516
- </label>
1517
- <input type="text" maxlength="20" value="<?php echo $style->form_width; ?>" name="objects[<?php echo $i; ?>][values][form_width]" />
1518
- <br />
1519
- <label>
1520
- <?php _e("Text Field Width:", 'custom-contact-forms'); ?>
1521
- </label>
1522
- <input type="text" maxlength="20" value="<?php echo $style->input_width; ?>" name="objects[<?php echo $i; ?>][values][input_width]" />
1523
- <br />
1524
- <label>
1525
- <?php _e("Textarea Width:", 'custom-contact-forms'); ?>
1526
- </label>
1527
- <input type="text" maxlength="20" value="<?php echo $style->textarea_width; ?>" name="objects[<?php echo $i; ?>][values][textarea_width]" />
1528
- <br />
1529
- <label>
1530
- <?php _e("Textarea Height:", 'custom-contact-forms'); ?>
1531
- </label>
1532
- <input type="text" maxlength="20" value="<?php echo $style->textarea_height; ?>" name="objects[<?php echo $i; ?>][values][textarea_height]" />
1533
- <br />
1534
- <label>
1535
- <?php _e("Dropdown Width:", 'custom-contact-forms'); ?>
1536
- </label>
1537
- <input type="text" maxlength="20" value="<?php echo $style->dropdown_width; ?>" name="objects[<?php echo $i; ?>][values][dropdown_width]" />
1538
- <br />
1539
- <label>
1540
- <?php _e("Label Margin:", 'custom-contact-forms'); ?>
1541
- </label>
1542
- <input type="text" maxlength="20" value="<?php echo $style->label_margin; ?>" name="objects[<?php echo $i; ?>][values][label_margin]" />
1543
- <br />
1544
- <label>
1545
- <?php _e("Success Popover", 'custom-contact-forms'); ?>
1546
- <br />
1547
- <?php _e("Height:", 'custom-contact-forms'); ?>
1548
- </label>
1549
- <input type="text" maxlength="20" value="<?php echo $style->success_popover_height; ?>" name="objects[<?php echo $i; ?>][values][success_popover_height]" />
1550
- <br />
1551
- </td>
1552
- <td><label>
1553
- <?php _e("Label Width:", 'custom-contact-forms'); ?>
1554
- </label>
1555
- <input type="text" maxlength="20" value="<?php echo $style->label_width; ?>" name="objects[<?php echo $i; ?>][values][label_width]" />
1556
- <br />
1557
- <label>
1558
- <?php _e("Button Width:", 'custom-contact-forms'); ?>
1559
- </label>
1560
- <input type="text" maxlength="20" value="<?php echo $style->submit_width; ?>" name="objects[<?php echo $i; ?>][values][submit_width]" />
1561
- <br />
1562
- <label>
1563
- <?php _e("Button Height:", 'custom-contact-forms'); ?>
1564
- </label>
1565
- <input type="text" maxlength="20" value="<?php echo $style->submit_height; ?>" name="objects[<?php echo $i; ?>][values][submit_height]" />
1566
- <br />
1567
- <label>
1568
- <?php _e("Field Background Color:", 'custom-contact-forms'); ?>
1569
- </label>
1570
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][field_backgroundcolor]" />
1571
- <br />
1572
- <label>
1573
- <?php _e("Title Margin:", 'custom-contact-forms'); ?>
1574
- </label>
1575
- <input type="text" maxlength="20" value="<?php echo $style->title_margin; ?>" name="objects[<?php echo $i; ?>][values][title_margin]" />
1576
- <br />
1577
- <label>
1578
- <?php _e("Success Popover", 'custom-contact-forms'); ?>
1579
- <br />
1580
- <?php _e("Title Font Size:", 'custom-contact-forms'); ?>
1581
- </label>
1582
- <input type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontsize; ?>" name="objects[<?php echo $i; ?>][values][success_popover_title_fontsize]" />
1583
- <label>
1584
- <?php _e("Form Background Color:", 'custom-contact-forms'); ?>
1585
- </label>
1586
- <input type="text" class="colorfield" maxlength="20" value="<?php echo $style->form_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][form_backgroundcolor]" />
1587
- </td>
1588
- <td><label>
1589
- <?php _e("Title Font Size:", 'custom-contact-forms'); ?>
1590
- </label>
1591
- <input type="text" maxlength="20" value="<?php echo $style->title_fontsize; ?>" name="objects[<?php echo $i; ?>][values][title_fontsize]" />
1592
- <br />
1593
- <label>
1594
- <?php _e("Label Font Size:", 'custom-contact-forms'); ?>
1595
- </label>
1596
- <input type="text" maxlength="20" value="<?php echo $style->label_fontsize; ?>" name="objects[<?php echo $i; ?>][values][label_fontsize]" />
1597
- <br />
1598
- <label>
1599
- <?php _e("Field Font Size:", 'custom-contact-forms'); ?>
1600
- </label>
1601
- <input type="text" maxlength="20" value="<?php echo $style->field_fontsize; ?>" name="objects[<?php echo $i; ?>][values][field_fontsize]" />
1602
- <br />
1603
- <label>
1604
- <?php _e("Button Font Size:", 'custom-contact-forms'); ?>
1605
- </label>
1606
- <input type="text" maxlength="20" value="<?php echo $style->submit_fontsize; ?>" name="objects[<?php echo $i; ?>][values][submit_fontsize]" />
1607
- <br />
1608
- <label>
1609
- <?php _e("Form Padding:", 'custom-contact-forms'); ?>
1610
- </label>
1611
- <input type="text" maxlength="20" value="<?php echo $style->form_padding; ?>" name="objects[<?php echo $i; ?>][values][form_padding]" />
1612
- <br />
1613
- <label>
1614
- <?php _e("Success Popover", 'custom-contact-forms'); ?>
1615
- <br />
1616
- <?php _e("Font Size:", 'custom-contact-forms'); ?>
1617
- </label>
1618
- <input type="text" maxlength="20" value="<?php echo $style->success_popover_fontsize; ?>" name="objects[<?php echo $i; ?>][values][success_popover_fontsize]" />
1619
- <br />
1620
- <label>
1621
- <?php _e("Tooltip", 'custom-contact-forms'); ?>
1622
- <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a>
1623
- <?php _e("Background Color:", 'custom-contact-forms'); ?>
1624
- </label>
1625
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->tooltip_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][tooltip_backgroundcolor]" />
1626
- </td>
1627
- <td><label>
1628
- <?php _e("Title Font Color:", 'custom-contact-forms'); ?>
1629
- </label>
1630
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->title_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][title_fontcolor]" />
1631
- <br />
1632
- <label>
1633
- <?php _e("Label Font Color:", 'custom-contact-forms'); ?>
1634
- </label>
1635
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->label_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][label_fontcolor]" />
1636
- <br />
1637
- <label>
1638
- <?php _e("Field Font Color:", 'custom-contact-forms'); ?>
1639
- </label>
1640
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][field_fontcolor]" />
1641
- <br />
1642
- <label>
1643
- <?php _e("Button Font Color:", 'custom-contact-forms'); ?>
1644
- </label>
1645
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->submit_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][submit_fontcolor]" />
1646
- <br />
1647
- <label>
1648
- <?php _e("Form Margin:", 'custom-contact-forms'); ?>
1649
- </label>
1650
- <input type="text" maxlength="20" value="<?php echo $style->form_margin; ?>" name="objects[<?php echo $i; ?>][values][form_margin]" />
1651
- <br />
1652
- <label>
1653
- <?php _e("Success Popover", 'custom-contact-forms'); ?>
1654
- <br />
1655
- <?php _e("Font Color:", 'custom-contact-forms'); ?>
1656
- </label>
1657
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][success_popover_fontcolor]" />
1658
- <br />
1659
- <label>
1660
- <?php _e("Tooltip Font Size:", 'custom-contact-forms'); ?>
1661
- </label>
1662
- <input type="text" maxlength="20" value="<?php echo $style->tooltip_fontsize; ?>" name="objects[<?php echo $i; ?>][values][tooltip_fontsize]" />
1663
- </td>
1664
- <td><label>
1665
- <?php _e("Form Border Style:", 'custom-contact-forms'); ?>
1666
- </label>
1667
- <select name="object[form_borderstyle]">
1668
- <?php echo str_replace('<option>'.$style->form_borderstyle.'</option>', '<option selected="selected">'.$style->form_borderstyle.'</option>', $border_style_options); ?>
1669
- </select>
1670
- <br />
1671
- <label>
1672
- <?php _e("Form Border Width:", 'custom-contact-forms'); ?>
1673
- </label>
1674
- <input type="text" maxlength="20" value="<?php echo $style->form_borderwidth; ?>" name="objects[<?php echo $i; ?>][values][form_borderwidth]" />
1675
- <br />
1676
- <label>
1677
- <?php _e("Form Border Color:", 'custom-contact-forms'); ?>
1678
- </label>
1679
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->form_bordercolor; ?>" name="objects[<?php echo $i; ?>][values][form_bordercolor]" />
1680
- <br />
1681
- <label>
1682
- <?php _e("Field Border Color:", 'custom-contact-forms'); ?>
1683
- </label>
1684
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_bordercolor; ?>" name="objects[<?php echo $i; ?>][values][field_bordercolor]" />
1685
- <br />
1686
- <label>
1687
- <?php _e("Field Border Style:", 'custom-contact-forms'); ?>
1688
- </label>
1689
- <select name="objects[<?php echo $i; ?>][values][field_borderstyle]">
1690
- <?php echo str_replace('<option>'.$style->field_borderstyle.'</option>', '<option selected="selected">'.$style->field_borderstyle.'</option>', $border_style_options); ?>
1691
- </select>
1692
- <br />
1693
- <label>
1694
- <?php _e("Success Popover", 'custom-contact-forms'); ?>
1695
- <br />
1696
- <?php _e("Title Font Color:", 'custom-contact-forms'); ?>
1697
- </label>
1698
- <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][success_popover_title_fontcolor]" />
1699
- <br />
1700
- <label>
1701
- <?php _e("Field Border Roundness:", 'custom-contact-forms'); ?>
1702
- </label>
1703
- <input name="objects[<?php echo $i; ?>][values][field_borderround]" value="<?php echo $style->field_borderround; ?>" type="text" maxlength="20" />
1704
- <br />
1705
- <input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="style" />
1706
- <input class="object-id" name="objects[<?php echo $i; ?>][object_id]" type="hidden" value="<?php echo $style->id; ?>" />
1707
- </td>
1708
- </tr>
1709
- <?php
1710
- $i++;
1711
- }
1712
- ?>
1713
- </tbody>
1714
- <tfoot>
1715
- <tr>
1716
- <th scope="col" class="manage-column"><input type="checkbox" class="checkall" /></th>
1717
- <th scope="col" class="manage-column"></th>
1718
- <th scope="col" class="manage-column"></th>
1719
- <th scope="col" class="manage-column"></th>
1720
- <th scope="col" class="manage-column"></th>
1721
- <th scope="col" class="manage-column"></th>
1722
- </tr>
1723
- </tfoot>
1724
- </table>
1725
- <select class="bulk-dropdown" name="object_bulk_action">
1726
- <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
1727
- <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
1728
- <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option></select>
1729
- <input type="submit" name="object_bulk_apply" class="bulk-apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
1730
- </form>
1731
- <a name="contact-author"></a>
1732
- <div id="contact-author" class="postbox">
1733
- <h3 class="hndle"><span>
1734
- <?php _e("Report a Bug/Suggest a Feature", 'custom-contact-forms'); ?>
1735
- </span></h3>
1736
- <div class="inside">
1737
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1738
- <ul>
1739
- <li>
1740
- <label for="name">
1741
- <?php _e("Your Name:", 'custom-contact-forms'); ?>
1742
- </label>
1743
- <input id="name" type="text" name="name" maxlength="100" />
1744
- </li>
1745
- <li>
1746
- <label for="email">
1747
- <?php _e("Your Email:", 'custom-contact-forms'); ?>
1748
- </label>
1749
- <input id="email" type="text" value="<?php echo get_option('admin_email'); ?>" name="email" maxlength="100" />
1750
- </li>
1751
- <li>
1752
- <label for="host">
1753
- <?php _e("Who Hosts Your Website?", 'custom-contact-forms'); ?>
1754
- </label>
1755
- <input id="host" type="text" name="host" maxlength="150" />
1756
- </li>
1757
- <li>
1758
- <label for="message">*
1759
- <?php _e("Your Message:", 'custom-contact-forms'); ?>
1760
- </label>
1761
- <textarea id="message" name="message"></textarea>
1762
- </li>
1763
- <li>
1764
- <label for="type">*
1765
- <?php _e("Purpose of this message:", 'custom-contact-forms'); ?>
1766
- </label>
1767
- <select id="type" name="type">
1768
- <option>
1769
- <?php _e("Bug Report", 'custom-contact-forms'); ?>
1770
- </option>
1771
- <option>
1772
- <?php _e("Suggest a Feature", 'custom-contact-forms'); ?>
1773
- </option>
1774
- <option>
1775
- <?php _e("Plugin Question", 'custom-contact-forms'); ?>
1776
- </option>
1777
- </select>
1778
- </li>
1779
- <li>
1780
- <label for="ccf-version">
1781
- <?php _e("Version of Custom Contact Forms?", 'custom-contact-forms'); ?>
1782
- </label>
1783
- <input id="ccf-version" type="text" name="ccf-version" maxlength="50" />
1784
- </li>
1785
- <li>
1786
- <label for="wp-version">
1787
- <?php _e("Version of WordPress?", 'custom-contact-forms'); ?>
1788
- </label>
1789
- <input id="wp-version" type="text" name="wp-version" maxlength="50" />
1790
- </li>
1791
- </ul>
1792
- <p>
1793
- <input type="submit" name="contact_author" value="<?php _e("Send Message", 'custom-contact-forms'); ?>" />
1794
- </p>
1795
- </form>
1796
- </div>
1797
- </div>
1798
- <a name="custom-html"></a>
1799
- <div id="custom-html" class="postbox">
1800
- <h3 class="hndle"><span>
1801
- <?php _e("Custom HTML Forms (Advanced)", 'custom-contact-forms'); ?>
1802
- </span></h3>
1803
- <div class="inside">
1804
- <p>
1805
- <?php _e("If you know HTML and simply want to use this plugin to process form requests, this feature is for you.
1806
- The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a
1807
- hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately.", 'custom-contact-forms'); ?>
1808
- </p>
1809
- <textarea id="custom_html_textarea">
1810
- &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
1811
- &lt;input type=&quot;hidden&quot; name=&quot;ccf_customhtml&quot; value=&quot;1&quot; /&gt;
1812
- &lt;input type=&quot;hidden&quot; name=&quot;success_message&quot; value=&quot;<?php _e("Thank you for filling out our form!", 'custom-contact-forms'); ?>&quot; /&gt;
1813
- &lt;input type=&quot;hidden&quot; name=&quot;thank_you_page&quot; value=&quot;http://www.google.com&quot; /&gt;
1814
- &lt;input type=&quot;hidden&quot; name=&quot;destination_email&quot; value=&quot;<?php echo $admin_options['default_to_email']; ?>&quot; /&gt;
1815
- &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;field_name1, field_name2&quot; /&gt;
1816
-
1817
- &lt;!-- <?php _e("Paste all this code into a page or post and edit it to your liking. It is recommended you only use this feature if you are experienced with HTML. The destination_email
1818
- field specifies where emails will be sent on successful submission; you can have the form send to multiple addresses by separating email's with semi-colons (i.e. email@google.com; email2@google.com).
1819
- The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force
1820
- the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate
1821
- the field names you want required by commas. Remember to use underscores instead of spaces in field names!", 'custom-contact-forms'); ?> --&gt;
1822
-
1823
- &lt;/form&gt;</textarea>
1824
- </div>
1825
- </div>
1826
- <?php $this->insertUsagePopover(); ?>
1827
- </div>
1828
- <?php
1829
- }
1830
-
1831
- function printFormSubmissionsPage() {
1832
- $this->handleAdminPostRequests();
1833
- if ($admin_options['show_install_popover'] == 1) {
1834
- $admin_options['show_install_popover'] = 0;
1835
- ?>
1836
- <script type="text/javascript" language="javascript">
1837
- $j(document).ready(function() {
1838
- showCCFUsagePopover();
1839
- });
1840
- </script>
1841
- <?php
1842
- update_option(parent::getAdminOptionsName(), $admin_options);
1843
- } /*if ($_POST['form_submission_delete']) {
1844
- if (parent::deleteUserData($_POST['uid']) != false)
1845
- $this->action_complete = __('A form submission has be successfully deleted!', 'custom-contact-forms');
1846
- }*/
1847
- ccf_utils::load_module('export/custom-contact-forms-user-data.php');
1848
- $user_data_array = parent::selectAllUserData();
1849
- ?>
1850
- <div id="customcontactforms-admin">
1851
- <div class="plugin-header">
1852
- <h2>
1853
- <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
1854
- </h2>
1855
- <input type="button" class="usage-popover-button" value="<?php _e("Plugin Usage Manual", 'custom-contact-forms'); ?>" />
1856
- </div>
1857
- <a class="genesis" href="http://www.shareasale.com/r.cfm?b=241369&u=481196&m=28169&urllink=&afftrack=">Custom Contact Forms works best with any of the 20+ <span>Genesis</span> Wordpress child themes. The <span>Genesis Framework</span> empowers you to quickly and easily build incredible websites with WordPress.</a>
1858
-
1859
- <form class="blog-horizontal-form" method="post" action="http://www.aweber.com/scripts/addlead.pl">
1860
- <input type="hidden" name="meta_web_form_id" value="1578604781" />
1861
- <input type="hidden" name="meta_split_id" value="" />
1862
- <input type="hidden" name="listname" value="ccf-plugin" />
1863
- <input type="hidden" name="redirect" value="http://www.taylorlovett.com/wordpress-plugins/tutorials-offers-tips/" id="redirect_5832e41084448adb07da67a35dc83c27" />
1864
- <input type="hidden" name="meta_adtracking" value="CCF_-_Wordpress_Plugins_Horizontal" />
1865
- <input type="hidden" name="meta_message" value="1" />
1866
- <input type="hidden" name="meta_required" value="name,email" />
1867
- <span>WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials</span>
1868
- <input type="text" name="name" value="Your Name" onclick="value=''" />
1869
- <input type="text" name="email" value="Your Email" onclick="value=''" />
1870
- <input type="submit" value="Sign Up for Free" />
1871
- </form>
1872
- <?php if (!empty($this->action_complete)) { ?>
1873
- <div class="action-complete">
1874
- <?php echo $this->action_complete; ?>
1875
- </div>
1876
- <?php } ?>
1877
- <h3 class="hndle"><span>
1878
- <?php _e("Saved Form Submissions", 'custom-contact-forms'); ?>
1879
- </span></h3>
1880
- <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1881
- <table class="widefat post" id="form-submissions-table" cellspacing="0">
1882
- <thead>
1883
- <tr>
1884
- <th scope="col" class="manage-column ccf-width25"><input type="checkbox" class="checkall" /></th>
1885
- <th scope="col" class="manage-column ccf-width250"><?php _e("Date Submitted", 'custom-contact-forms'); ?></th>
1886
- <th scope="col" class="manage-column ccf-width150"><?php _e("Form Submitted", 'custom-contact-forms'); ?></th>
1887
- <th scope="col" class="manage-column ccf-width250"><?php _e("Form Page", 'custom-contact-forms'); ?></th>
1888
- <th scope="col" class="manage-column "></th>
1889
- </tr>
1890
- </thead>
1891
- <tbody>
1892
- <?php
1893
- $i = 0;
1894
- foreach ($user_data_array as $data_object) {
1895
- $data = new CustomContactFormsUserData(array('form_id' => $data_object->data_formid, 'data_time' => $data_object->data_time, 'form_page' => $data_object->data_formpage, 'encoded_data' => $data_object->data_value));
1896
- ?>
1897
- <tr class="row-form_submission-<?php echo $data_object->id; ?> submission-top <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1898
- <td><input type="checkbox" class="object-check" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
1899
- <td><?php echo date('F d, Y h:i:s A', $data->getDataTime()); ?></td>
1900
- <td><?php
1901
- if ($data->getFormID() > 0) {
1902
- $data_form = parent::selectForm($data->getFormID());
1903
- $this_form = (!empty($data_form->form_slug)) ? $data_form->form_slug : '-';
1904
- echo $this_form;
1905
- } else
1906
- _e('Custom HTML Form', 'custom-contact-forms');
1907
- ?>
1908
- </td>
1909
- <td><?php echo $data->getFormPage(); ?> </td>
1910
- <td class="ccf-alignright">
1911
- <span class="submission-content-expand"></span>
1912
- <input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="form_submission" />
1913
- <input class="object-id" type="hidden" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $data_object->id; ?>" />
1914
- </td>
1915
- </tr>
1916
- <tr class="row-form_submission-<?php echo $data_object->id; ?> submission-content <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1917
- <td colspan="5"><ul>
1918
- <?php
1919
- $data_array = $data->getDataArray();
1920
- foreach ($data_array as $item_key => $item_value) {
1921
- ?>
1922
- <li>
1923
- <div><?php echo $item_key; ?></div>
1924
- <p><?php echo $item_value; ?></p>
1925
- </li>
1926
- <?php
1927
- }
1928
- ?>
1929
- </ul></td>
1930
- </tr>
1931
- <?php
1932
- $i++;
1933
- }
1934
- ?>
1935
- </tbody>
1936
- <tfoot>
1937
- <tr>
1938
- <th scope="col" class="manage-column25"><input type="checkbox" class="checkall" /></th>
1939
- <th scope="col" class="manage-column ccf-width250"><?php _e("Date Submitted", 'custom-contact-forms'); ?></th>
1940
- <th scope="col" class="manage-column ccf-width150"><?php _e("Form Submitted", 'custom-contact-forms'); ?></th>
1941
- <th scope="col" class="manage-column ccf-width250"><?php _e("Form Page", 'custom-contact-forms'); ?></th>
1942
- <th scope="col" class="manage-column"></th>
1943
- </tr>
1944
- </tfoot>
1945
- </table>
1946
-
1947
- <select class="bulk-dropdown" name="object_bulk_action">
1948
- <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
1949
- <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option>
1950
- </select> <input type="submit" class="bulk-apply" name="object_bulk_apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" class="loading-img" width="16" height="16" />
1951
-
1952
-
1953
-
1954
- </form>
1955
- <?php $this->insertUsagePopover(); ?>
1956
- </div>
1957
- <?php
1958
- }
1959
-
1960
- function printSettingsPage() {
1961
- $admin_options = parent::getAdminOptions();
1962
- if ($admin_options['show_install_popover'] == 1) {
1963
- $admin_options['show_install_popover'] = 0;
1964
- ?>
1965
- <script type="text/javascript" language="javascript">
1966
- $j(document).ready(function() {
1967
- showCCFUsagePopover();
1968
- });
1969
- </script>
1970
- <?php
1971
- update_option(parent::getAdminOptionsName(), $admin_options);
1972
- } if ($_POST['general_settings']) {
1973
- $_POST['settings'] = array_map(array('ccf_utils', 'encodeOption'), $_POST['settings']);
1974
- $admin_options = array_merge($admin_options, $_POST['settings']);
1975
- $admin_options[show_widget_categories] = $_POST['settings']['show_widget_categories'];
1976
- $admin_options[show_widget_singles] = $_POST['settings']['show_widget_singles'];
1977
- $admin_options[show_widget_pages] = $_POST['settings']['show_widget_pages'];
1978
- $admin_options[show_widget_archives] = $_POST['settings']['show_widget_archives'];
1979
- $admin_options[show_widget_home] = $_POST['settings']['show_widget_home'];
1980
- $this->action_complete = __('Your settings have been successfully saved!', 'custom-contact-forms');
1981
- update_option(parent::getAdminOptionsName(), $admin_options);
1982
- } elseif ($_POST['configure_mail']) {
1983
- $_POST['mail_config'] = array_map(array('ccf_utils', 'encodeOption'), $_POST['mail_config']);
1984
- $admin_options = array_merge($admin_options, $_POST['mail_config']);
1985
- $this->action_complete = __('Your mail settings have been successfully saved!', 'custom-contact-forms');
1986
- update_option(parent::getAdminOptionsName(), $admin_options);
1987
- }
1988
- ccf_utils::load_module('export/custom-contact-forms-export.php');
1989
- ?>
1990
- <div id="customcontactforms-admin">
1991
- <div class="plugin-header">
1992
- <h2>
1993
- <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
1994
- </h2>
1995
- <input type="button" class="usage-popover-button" value="<?php _e("Plugin Usage Manual", 'custom-contact-forms'); ?>" />
1996
- </div>
1997
- <a class="genesis" href="http://www.shareasale.com/r.cfm?b=241369&u=481196&m=28169&urllink=&afftrack=">Custom Contact Forms works best with any of the 20+ <span>Genesis</span> Wordpress child themes. The <span>Genesis Framework</span> empowers you to quickly and easily build incredible websites with WordPress.</a>
1998
-
1999
- <form class="blog-horizontal-form" method="post" action="http://www.aweber.com/scripts/addlead.pl">
2000
- <input type="hidden" name="meta_web_form_id" value="1578604781" />
2001
- <input type="hidden" name="meta_split_id" value="" />
2002
- <input type="hidden" name="listname" value="ccf-plugin" />
2003
- <input type="hidden" name="redirect" value="http://www.taylorlovett.com/wordpress-plugins/tutorials-offers-tips/" id="redirect_5832e41084448adb07da67a35dc83c27" />
2004
- <input type="hidden" name="meta_adtracking" value="CCF_-_Wordpress_Plugins_Horizontal" />
2005
- <input type="hidden" name="meta_message" value="1" />
2006
- <input type="hidden" name="meta_required" value="name,email" />
2007
- <span>WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials</span>
2008
- <input type="text" name="name" value="Your Name" onclick="value=''" />
2009
- <input type="text" name="email" value="Your Email" onclick="value=''" />
2010
- <input type="submit" value="Sign Up for Free" />
2011
- </form>
2012
-
2013
- <?php if (!empty($this->action_complete)) { ?>
2014
- <div class="action-complete">
2015
- <?php echo $this->action_complete; ?>
2016
- </div>
2017
- <?php } ?>
2018
-
2019
- <div id="general-settings" class="postbox">
2020
- <h3 class="hndle"><span>
2021
- <?php _e("General Settings", 'custom-contact-forms'); ?>
2022
- </span></h3>
2023
- <div class="inside">
2024
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2025
- <ul class="gleft">
2026
- <li>
2027
- <label for="email_form_submissions">
2028
- <?php _e("Email Form Submissions:", 'custom-contact-forms'); ?>
2029
- </label>
2030
- <select name="settings[email_form_submissions]">
2031
- <option value="1">
2032
- <?php _e("Yes", 'custom-contact-forms'); ?>
2033
- </option>
2034
- <option value="0" <?php if ($admin_options['email_form_submissions'] == 0) echo 'selected="selected"'; ?>>
2035
- <?php _e("No", 'custom-contact-forms'); ?>
2036
- </option>
2037
- </select>
2038
- </li>
2039
- <li class="descrip">
2040
- <?php _e("When a user fills out one of your forms, the info submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info.", 'custom-contact-forms'); ?>
2041
- </li>
2042
- <li>
2043
- <label for="default_to_email">
2044
- <?php _e("Default Email:", 'custom-contact-forms'); ?>
2045
- </label>
2046
- <input name="settings[default_to_email]" value="<?php echo $admin_options['default_to_email']; ?>" type="text" maxlength="100" />
2047
- </li>
2048
- <li class="descrip">
2049
- <?php _e("Form emails will be sent <span>to</span> this address, if no destination email is specified by the form.", 'custom-contact-forms'); ?>
2050
- </li>
2051
- <li>
2052
- <label for="enable_jquery">
2053
- <?php _e("Front End JQuery:", 'custom-contact-forms'); ?>
2054
- </label>
2055
- <select name="settings[enable_jquery]">
2056
- <option value="1">
2057
- <?php _e("Enabled", 'custom-contact-forms'); ?>
2058
- </option>
2059
- <option <?php if ($admin_options['enable_jquery'] != 1) echo 'selected="selected"'; ?> value="0">
2060
- <?php _e("Disabled", 'custom-contact-forms'); ?>
2061
- </option>
2062
- </select>
2063
- </li>
2064
- <li class="descrip">
2065
- <?php _e("Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips.", 'custom-contact-forms'); ?>
2066
- </li>
2067
- <li>
2068
- <label for="default_from_email">
2069
- <?php _e("Default From Email:", 'custom-contact-forms'); ?>
2070
- </label>
2071
- <input name="settings[default_from_email]" value="<?php echo $admin_options['default_from_email']; ?>" type="text" maxlength="100" />
2072
- </li>
2073
- <li class="descrip">
2074
- <?php _e("Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host.", 'custom-contact-forms'); ?>
2075
- </li>
2076
- <li>
2077
- <label for="default_from_name">
2078
- <?php _e("Default From Name:", 'custom-contact-forms'); ?>
2079
- </label>
2080
- <input name="settings[default_from_name]" value="<?php echo $admin_options['default_from_name']; ?>" type="text" maxlength="100" />
2081
- </li>
2082
- <li class="descrip">
2083
- <?php _e("This setting allows you to specify the name under which form emails are sent. The default is 'Custom Contact Forms'.", 'custom-contact-forms'); ?>
2084
- </li>
2085
- <li>
2086
- <label for="default_form_subject">
2087
- <?php _e("Default Email Subject:", 'custom-contact-forms'); ?>
2088
- </label>
2089
- <input name="settings[default_form_subject]" value="<?php echo $admin_options['default_form_subject']; ?>" type="text" />
2090
- </li>
2091
- <li class="descrip">
2092
- <?php _e("Default subject to be included in all form emails.", 'custom-contact-forms'); ?>
2093
- </li>
2094
- <li>
2095
- <label for="enable_dashboard_widget">
2096
- <?php _e("Enable Dashboard Widget:", 'custom-contact-forms'); ?>
2097
- </label>
2098
- <select name="settings[enable_dashboard_widget]">
2099
- <option value="1">
2100
- <?php _e("Enabled", 'custom-contact-forms'); ?>
2101
- </option>
2102
- <option value="0" <?php if ($admin_options['enable_dashboard_widget'] == 0) echo 'selected="selected"'; ?>>
2103
- <?php _e("Disabled", 'custom-contact-forms'); ?>
2104
- </option></select>
2105
- </li>
2106
- <li class="descrip">
2107
- <?php _e("Enabling this will display a widget on your dashboard that shows the latest form submissions.", 'custom-contact-forms'); ?>
2108
- </li>
2109
- <li>
2110
- <label for="default_form_error_header">
2111
- <?php _e("Default Form Error Header:", 'custom-contact-forms'); ?>
2112
- </label>
2113
- <input name="settings[default_form_error_header]" value="<?php echo $admin_options['default_form_error_header']; ?>" type="text" />
2114
- </li>
2115
- <li class="descrip">
2116
- <?php _e("When a form is filled out incorrectly, this message will be displayed followed by the individual field error messages.", 'custom-contact-forms'); ?>
2117
- </li>
2118
- <li>
2119
- <label for="code_type">
2120
- <?php _e("Use Code Type:", 'custom-contact-forms'); ?>
2121
- </label>
2122
- <select name="settings[code_type]">
2123
- <option>XHTML</option>
2124
- <option <?php if ($admin_options['code_type'] == 'HTML') echo 'selected="selected"'; ?>>HTML</option>
2125
- </select>
2126
- </li>
2127
- <li class="descrip">
2128
- <?php _e("This lets you switch the form code between HTML and XHTML.", 'custom-contact-forms'); ?>
2129
- </li>
2130
- </ul>
2131
- <ul class="gright">
2132
- <li>
2133
- <label for="form_success_message_title">
2134
- <?php _e("Default Form Success Message Title:", 'custom-contact-forms'); ?>
2135
- </label>
2136
- <input name="settings[form_success_message_title]" value="<?php echo $admin_options['form_success_message_title']; ?>" type="text"/>
2137
- </li>
2138
- <li class="descrip">
2139
- <?php _e("If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title.", 'custom-contact-forms'); ?>
2140
- </li>
2141
- <li>
2142
- <label for="form_success_message">
2143
- <?php _e("Default Form Success Message:", 'custom-contact-forms'); ?>
2144
- </label>
2145
- <input name="settings[form_success_message]" value="<?php echo $admin_options['form_success_message']; ?>" type="text"/>
2146
- </li>
2147
- <li class="descrip">
2148
- <?php _e("If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message.", 'custom-contact-forms'); ?>
2149
- </li>
2150
- <li>
2151
- <label for="remember_field_values">
2152
- <?php _e("Remember Field Values:", 'custom-contact-forms'); ?>
2153
- </label>
2154
- <select name="settings[remember_field_values]">
2155
- <option value="1">
2156
- <?php _e("Yes", 'custom-contact-forms'); ?>
2157
- </option>
2158
- <option <?php if ($admin_options['remember_field_values'] == 0) echo 'selected="selected"'; ?> value="0">
2159
- <?php _e("No", 'custom-contact-forms'); ?>
2160
- </option>
2161
- </select>
2162
- </li>
2163
- <li class="descrip">
2164
- <?php _e("Selecting yes will make form fields remember how they were last filled out.", 'custom-contact-forms'); ?>
2165
- </li>
2166
- <li>
2167
- <label for="enable_widget_tooltips">
2168
- <?php _e("Tooltips in Widget:", 'custom-contact-forms'); ?>
2169
- </label>
2170
- <select name="settings[enable_widget_tooltips]">
2171
- <option value="1">
2172
- <?php _e("Enabled", 'custom-contact-forms'); ?>
2173
- </option>
2174
- <option <?php if ($admin_options['enable_widget_tooltips'] == 0) echo 'selected="selected"'; ?> value="0">
2175
- <?php _e("Disabled", 'custom-contact-forms'); ?>
2176
- </option>
2177
- </select>
2178
- </li>
2179
- <li class="descrip">
2180
- <?php _e("Enabling this shows tooltips containing field instructions on forms in the widget.", 'custom-contact-forms'); ?>
2181
- </li>
2182
- <li>
2183
- <label for="author_link">
2184
- <?php _e("Hide Plugin Author Link in Code:", 'custom-contact-forms'); ?>
2185
- </label>
2186
- <select name="settings[author_link]">
2187
- <option value="1">
2188
- <?php _e("Yes", 'custom-contact-forms'); ?>
2189
- </option>
2190
- <option <?php if ($admin_options['author_link'] == 0) echo 'selected="selected"'; ?> value="0">
2191
- <?php _e("No", 'custom-contact-forms'); ?>
2192
- </option>
2193
- </select>
2194
- </li>
2195
- <li>
2196
- <label for="admin_ajax">
2197
- <?php _e("Fancy Admin AJAX Abilities:", 'custom-contact-forms'); ?>
2198
- </label>
2199
- <select name="settings[admin_ajax]">
2200
- <option value="1">
2201
- <?php _e("Enabled", 'custom-contact-forms'); ?>
2202
- </option>
2203
- <option value="0" <?php if ($admin_options['admin_ajax'] == 0) echo 'selected="selected"'; ?>>
2204
- <?php _e("Disabled", 'custom-contact-forms'); ?>
2205
- </option>
2206
- </select>
2207
- </li>
2208
- <li class="descrip">
2209
- <?php _e("If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below.", 'custom-contact-forms'); ?>
2210
- </li>
2211
- <li>
2212
- <label for="default_form_bad_permissions">
2213
- <?php _e("Default Permissions Error:", 'custom-contact-forms'); ?>
2214
- </label>
2215
- <input name="settings[default_form_bad_permissions]" value="<?php echo $admin_options['default_form_bad_permissions']; ?>" type="text" />
2216
- </li>
2217
- <li class="descrip">
2218
- <?php _e("When someone doesn't have the proper permissions to use a form, this message is displayed in place of the form. You control who can view each form with the form access manager which is located inside the form manager.", 'custom-contact-forms'); ?>
2219
- </li>
2220
- <li>
2221
- <label for="enable_form_access_manager">
2222
- <?php _e("Form Access Capabilities:", 'custom-contact-forms'); ?>
2223
- </label>
2224
- <select name="settings[enable_form_access_manager]">
2225
- <option value="0">
2226
- <?php _e("Disabled", 'custom-contact-forms'); ?>
2227
- </option>
2228
- <option value="1" <?php if ($admin_options['enable_form_access_manager'] == 1) echo 'selected="selected"'; ?>>
2229
- <?php _e("Enabled", 'custom-contact-forms'); ?>
2230
- </option>
2231
- </select>
2232
- </li>
2233
- <li class="descrip">
2234
- <?php _e("The form access manager within each form allows you to control who can view your form. However, that will take effect on any of your forms unless this is enabled.", 'custom-contact-forms'); ?>
2235
- </li>
2236
- <li class="show-widget"><b>
2237
- <?php _e("Show Sidebar Widget:", 'custom-contact-forms'); ?>
2238
- </b></li>
2239
- <li>
2240
- <label>
2241
- <input value="1" type="checkbox" name="settings[show_widget_home]" <?php if ($admin_options['show_widget_home'] == 1) echo 'checked="checked"'; ?> />
2242
- <?php _e("On Homepage", 'custom-contact-forms'); ?>
2243
- </label>
2244
- <label>
2245
- <input value="1" type="checkbox" name="settings[show_widget_pages]" <?php if ($admin_options['show_widget_pages'] == 1) echo 'checked="checked"'; ?> />
2246
- <?php _e("On Pages", 'custom-contact-forms'); ?>
2247
- </label>
2248
- <label>
2249
- <input value="1" type="checkbox" name="settings[show_widget_singles]" <?php if ($admin_options['show_widget_singles'] == 1) echo 'checked="checked"'; ?> />
2250
- <?php _e("On Single Posts", 'custom-contact-forms'); ?>
2251
- </label>
2252
- <br />
2253
- <label>
2254
- <input value="1" type="checkbox" name="settings[show_widget_categories]" <?php if ($admin_options['show_widget_categories'] == 1) echo 'checked="checked"'; ?> />
2255
- <?php _e("On Categories", 'custom-contact-forms'); ?>
2256
- </label>
2257
- <label>
2258
- <input value="1" type="checkbox" name="settings[show_widget_archives]" <?php if ($admin_options['show_widget_archives'] == 1) echo 'checked="checked"'; ?> />
2259
- <?php _e("On Archives", 'custom-contact-forms'); ?>
2260
- </label>
2261
- </li>
2262
- <li>
2263
- <input type="submit" value="<?php _e("Update", 'custom-contact-forms'); ?>" name="general_settings" />
2264
- </li>
2265
- </ul>
2266
- </form>
2267
- </div>
2268
- </div>
2269
- <div id="configure-mail" class="postbox">
2270
- <h3 class="hndle"><span>
2271
- <?php _e("Mail Settings", 'custom-contact-forms'); ?>
2272
- </span></h3>
2273
- <div class="inside">
2274
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2275
- <p><?php _e("There are two ways you can send emails: using the PHP mail() function or using SMTP (secure/insecure). If you choose to use the PHP mail() function you can ignore all the other options. For some people Wordpress's default way of sending mail does not work; if for some reason your mail is being sent you should try the SMTP option.", 'custom-contact-forms'); ?></p>
2276
- <label for="mail_function"><?php _e("* Send My Emails Using the Following:", 'custom-contact-forms'); ?></label>
2277
- <select name="mail_config[mail_function]">
2278
- <option value="default"><?php _e("Wordpress Default", 'custom-contact-forms'); ?></option>
2279
- <option <?php if ($admin_options['mail_function'] == 'smtp') echo 'selected="selected"'; ?> value="smtp"><?php _e("SMTP", 'custom-contact-forms'); ?></option>
2280
- </select> <?php _e("(If mail isn't sending, try toggling this option.)", 'custom-contact-forms'); ?>
2281
- <div>
2282
- <ul class="left">
2283
- <li><label for="smtp_host"><?php _e("SMTP Host:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_host]" value="<?php echo $admin_options['smtp_host']; ?>" /></li>
2284
- <li><label for="smtp_port"><?php _e("SMTP Port:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_port]" value="<?php echo $admin_options['smtp_port']; ?>" /></li>
2285
- <li><label for="smtp_encryption"><?php _e("Encryption:", 'custom-contact-forms'); ?></label> <select name="mail_config[smtp_encryption]">
2286
- <option value="none"><?php _e("None", 'custom-contact-forms'); ?></option>
2287
- <option <?php if ($admin_options['smtp_encryption'] == 'ssl') echo 'selected="selected"'; ?> value="ssl"><?php _e("SSL", 'custom-contact-forms'); ?></option>
2288
- <option <?php if ($admin_options['smtp_encryption'] == 'tls') echo 'selected="selected"'; ?> value="tls"><?php _e("TLS", 'custom-contact-forms'); ?></option>
2289
- </select></li>
2290
- </ul>
2291
- <ul class="right">
2292
- <li><label for="smtp_authentication"><?php _e("SMTP Authentication:", 'custom-contact-forms'); ?></label> <select name="mail_config[smtp_authentication]"><option value="0"><?php _e("None Needed", 'custom-contact-forms'); ?></option><option <?php if ($admin_options['smtp_authentication'] == 1) echo 'selected="selected"'; ?> value="1"><?php _e("Use SMTP Username/Password", 'custom-contact-forms'); ?></option></select></li>
2293
- <li><label for="smtp_username"><?php _e("SMTP Username:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_username]" value="<?php echo $admin_options['smtp_username']; ?>" /></li>
2294
- <li><label for="smtp_password"><?php _e("SMTP Password:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_password]" value="<?php echo $admin_options['smtp_password']; ?>" /></li>
2295
- </ul>
2296
- </div>
2297
- <input type="submit" name="configure_mail" value="<?php _e("Save Mail Sending Options", 'custom-contact-forms'); ?>" />
2298
- </form>
2299
- </div>
2300
- </div>
2301
- <a name="import-export"></a>
2302
- <div id="export" class="postbox">
2303
- <h3 class="hndle"><span>
2304
- <?php _e("Export", 'custom-contact-forms'); ?>
2305
- </span></h3>
2306
- <div class="inside">
2307
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2308
- <p>
2309
- <?php _e("Preforming a Custom Contact Forms export will create a file of the form
2310
- ccf-export-xxxx.sql on your web server. The file created contains SQL that
2311
- will recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined.", 'custom-contact-forms'); ?>
2312
- </p>
2313
- <input type="submit" name="ccf_export" value="<?php _e("Export All CCF Plugin Content", 'custom-contact-forms'); ?>" />
2314
- </form>
2315
- </div>
2316
- </div>
2317
- <div id="import" class="postbox">
2318
- <h3 class="hndle"><span>
2319
- <?php _e("Import", 'custom-contact-forms'); ?>
2320
- </span></h3>
2321
- <div class="inside">
2322
- <form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2323
- <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
2324
- <p>
2325
- <?php _e("Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one. Pressing the 'Clear and Import' button deletes all current data and then imports the selected file; this will not work for merging to data!. Clearing all CCF data before importing prevents any conflicts from occuring. Before you attempt an import, you should always download a backup, by clicking the 'Export All' button.", 'custom-contact-forms'); ?>
2326
- </p>
2327
- <p class="choose_import">
2328
- <?php _e("Choose What You Want to Use from the Import File:", 'custom-contact-forms'); ?>
2329
- </p>
2330
- <ul>
2331
- <li>
2332
- <input type="checkbox" checked="checked" name="ccf_import_overwrite_settings" value="1" />
2333
- <label for="ccf_import_overwrite_settings">
2334
- <?php _e("Use General Settings", 'custom-contact-forms'); ?>
2335
- </label>
2336
- </li>
2337
- <li>
2338
- <input type="checkbox" checked="checked" name="ccf_import_forms" value="1" />
2339
- <label for="ccf_import_forms">
2340
- <?php _e("Forms", 'custom-contact-forms'); ?>
2341
- </label>
2342
- </li>
2343
- <li>
2344
- <input type="checkbox" checked="checked" name="ccf_import_saved_submissions" value="1" />
2345
- <label for="ccf_import_saved_submissions">
2346
- <?php _e("Form Submissions", 'custom-contact-forms'); ?>
2347
- </label>
2348
- </li>
2349
- <li>
2350
- <input type="checkbox" checked="checked" name="ccf_import_fields" value="1" />
2351
- <label for="ccf_import_fields">
2352
- <?php _e("Fields", 'custom-contact-forms'); ?>
2353
- </label>
2354
- </li>
2355
- <li>
2356
- <input type="checkbox" checked="checked" name="ccf_import_forms" value="1" />
2357
- <label for="ccf_import_forms">
2358
- <?php _e("Forms", 'custom-contact-forms'); ?>
2359
- </label>
2360
- </li>
2361
- <li>
2362
- <input type="checkbox" checked="checked" name="ccf_import_field_options" value="1" />
2363
- <label for="ccf_import_field_options">
2364
- <?php _e("Field Options", 'custom-contact-forms'); ?>
2365
- </label>
2366
- </li>
2367
- <li>
2368
- <input type="checkbox" checked="checked" name="ccf_import_styles" value="1" />
2369
- <label for="ccf_import_styles">
2370
- <?php _e("Styles", 'custom-contact-forms'); ?>
2371
- </label>
2372
- </li>
2373
- </ul>
2374
- <p class="choose_import">
2375
- <label for="import_file">
2376
- <?php _e("Choose an Import File:", 'custom-contact-forms'); ?>
2377
- </label>
2378
- <input type="file" name="import_file" />
2379
- </p>
2380
- <input name="ccf_clear_import" type="submit" value="<?php _e("Clear and Import", 'custom-contact-forms'); ?>" />
2381
- <input type="checkbox" name="ccf_import_confirm" value="1" />
2382
- <?php _e('Yes, I want to do this and have created a backup.', 'custom-contact-forms'); ?>
2383
- </form>
2384
- </div>
2385
- </div>
2386
- <?php $this->insertUsagePopover(); ?>
2387
- </div>
2388
- <?php
2389
- }
2390
- }
2391
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2392
  ?>
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('CustomContactFormsAdmin')) {
8
+ class CustomContactFormsAdmin extends CustomContactForms {
9
+ var $action_complete = '';
10
+
11
+ function adminInit() {
12
+ $this->downloadExportFile();
13
+ $this->runImport();
14
+ }
15
+
16
+ function insertUsagePopover() {
17
+ ccf_utils::load_module('usage_popover/custom-contact-forms-usage-popover.php');
18
+ }
19
+
20
+ function insertQuickStartPopover() {
21
+ ccf_utils::load_module('usage_popover/custom-contact-forms-quick-start-popover.php');
22
+ }
23
+
24
+ function isPluginAdminPage() {
25
+ $pages = array('custom-contact-forms', 'ccf-settings', 'ccf-saved-form-submissions');
26
+ return (in_array($GLOBALS['ccf_current_page'], $pages));
27
+ }
28
+
29
+ function appendToActionLinks($action_links, $plugin_file) {
30
+ static $link_added = false;
31
+ if (!$link_added && basename($plugin_file) == 'custom-contact-forms.php') {
32
+ $new_link = '<a style="font-weight:bold;" href="admin.php?page=custom-contact-forms" title="' . __('Manage Custom Contact Forms', 'custom-contact-forms') . '">' . __('Settings', 'custom-contact-forms') . '</a>';
33
+ array_unshift($action_links, $new_link);
34
+ $link_added = true;
35
+ }
36
+ return $action_links;
37
+ }
38
+
39
+ function downloadExportFile() {
40
+ if ($_POST['ccf_export']) {
41
+ //chmod('modules/export/', 0777);
42
+ ccf_utils::load_module('export/custom-contact-forms-export.php');
43
+ $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
44
+ $transit->exportAll();
45
+ $file = $transit->exportToFile();
46
+ ccf_utils::redirect(plugins_url() . '/custom-contact-forms/download.php?location=export/' . $file);
47
+ }
48
+ }
49
+
50
+ function runImport() {
51
+ if ($_POST['ccf_clear_import'] || $_POST['ccf_merge_import']) {
52
+ //chmod('modules/export/', 0777);
53
+ ccf_utils::load_module('export/custom-contact-forms-export.php');
54
+ $transit = new CustomContactFormsExport(parent::getAdminOptionsName());
55
+ $settings['import_general_settings'] = ($_POST['ccf_import_overwrite_settings'] == 1) ? true : false;
56
+ $settings['import_forms'] = ($_POST['ccf_import_forms'] == 1) ? true : false;
57
+ $settings['import_fields'] = ($_POST['ccf_import_fields'] == 1) ? true : false;
58
+ $settings['import_field_options'] = ($_POST['ccf_import_field_options'] == 1) ? true : false;
59
+ $settings['import_styles'] = ($_POST['ccf_import_styles'] == 1) ? true : false;
60
+ $settings['import_saved_submissions'] = ($_POST['ccf_import_saved_submissions'] == 1) ? true : false;
61
+ $settings['mode'] = ($_POST['ccf_clear_import']) ? 'clear_import' : 'merge_import';
62
+ $transit->importFromFile($_FILES['import_file'], $settings);
63
+ ccf_utils::redirect('options-general.php?page=custom-contact-forms');
64
+ }
65
+ }
66
+
67
+ function contactAuthor($name, $email, $website, $message, $type, $host, $ccf_version, $wp_version) {
68
+ if (empty($message)) return false;
69
+ if (!class_exists('PHPMailer'))
70
+ require_once(ABSPATH . "wp-includes/class-phpmailer.php");
71
+ $mail = new PHPMailer();
72
+ $body = "Name: $name<br />\n";
73
+ $body .= "Email: $email<br />\n";
74
+ $body .= "Website: $website<br />\n";
75
+ $body .= "CCF Version: $ccf_version<br />\n";
76
+ $body .= "WP Version: $wp_version<br />\n";
77
+ $body .= "Host: $host<br />\n";
78
+ $body .= "Message: $message<br />\n";
79
+ $body .= "Message Type: $type<br />\n";
80
+ $body .= 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "<br />\n";
81
+ $admin_options = parent::getAdminOptions();
82
+ if ($admin_options['mail_function'] == 'smtp') {
83
+ $mail->IsSMTP();
84
+ $mail->Host = $admin_options['smtp_host'];
85
+ if ($admin_options['smtp_authentication'] == 1) {
86
+ $mail->SMTPAuth = true;
87
+ $mail->Username = $admin_options['smtp_username'];
88
+ $mail->Password = $admin_options['smtp_password'];
89
+ $mail->Port = $admin_options['smtp_port'];
90
+ } else
91
+ $mail->SMTPAuth = false;
92
+ }
93
+ $mail->From = $email;
94
+ $mail->FromName = 'Custom Contact Forms';
95
+ $mail->AddAddress('admin@taylorlovett.com');
96
+ $mail->Subject = "CCF Message: $type";
97
+ $mail->CharSet = "utf-8";
98
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
99
+ $mail->MsgHTML($body);
100
+ $mail->Send();
101
+ return true;
102
+ }
103
+
104
+ function displayPluginNewsFeed() {
105
+ include_once(ABSPATH . WPINC . '/feed.php');
106
+ $rss = @fetch_feed('http://www.taylorlovett.com/category/custom-contact-forms/feed');
107
+ if (!is_wp_error($rss) ) {
108
+ $maxitems = $rss->get_item_quantity(5);
109
+ $rss_items = $rss->get_items(0, 1);
110
+ $rss_items2 = $rss->get_items(1, $maxitems);
111
+ }
112
+ ?>
113
+ <ul>
114
+ <?php if ($maxitems == 0) echo '<li>' . __('Nothing to show.', 'custom-contact-forms') . '</li>';
115
+ else
116
+ foreach ( $rss_items as $item ) : ?>
117
+ <li class="first">
118
+ <a href='<?php echo $item->get_permalink(); ?>'
119
+ title='<?php echo __('Posted', 'custom-contact-forms'). ' '.$item->get_date('j F Y | g:i a'); ?>'>
120
+ <?php echo $item->get_title(); ?></a><br />
121
+ <?php echo $item->get_content(); ?>
122
+ </li>
123
+ <?php endforeach; ?>
124
+ <?php if ($maxitems == 0) echo '';
125
+ else
126
+ foreach ( $rss_items2 as $item ) : ?>
127
+ <li>
128
+ <a href='<?php echo $item->get_permalink(); ?>'
129
+ title='<?php echo __('Posted', 'custom-contact-forms') . ' '.$item->get_date('j F Y | g:i a'); ?>'>
130
+ <?php echo $item->get_title(); ?></a><br />
131
+ </li>
132
+ <?php endforeach; ?>
133
+ </ul>
134
+ <?php
135
+ }
136
+
137
+
138
+ function getFieldsForm() {
139
+ $fields = parent::selectAllFields();
140
+ $out = '';
141
+ foreach ($fields as $field) {
142
+ $out .= '<option value="'.$field->id.'">'.$field->field_slug.'</option>' . "\n";
143
+ }
144
+ return $out;
145
+ }
146
+
147
+ function handleAJAX() {
148
+
149
+ if (!wp_verify_nonce($_POST['nonce'], 'ccf_nonce')) exit(__('Invalid request.', 'custom-contact-forms'));
150
+ $output = $this->handleAdminPostRequests();
151
+ $response = json_encode( $output );
152
+ header("Content-Type: application/json");
153
+ exit($response);
154
+ return true;
155
+ }
156
+
157
+
158
+ function getFieldOptionsForm() {
159
+ $options = parent::selectAllFieldOptions();
160
+ $out = '';
161
+ foreach ($options as $option) {
162
+ $out .= '<option value="'.$option->id.'">'.$option->option_slug.'</option>' . "\n";
163
+ }
164
+ return $out;
165
+ }
166
+
167
+ function insertBackEndStyles() {
168
+ wp_register_style('ccf-standards', plugins_url() . '/custom-contact-forms/css/custom-contact-forms-standards.css');
169
+ wp_register_style('ccf-jquery-ui', plugins_url() . '/custom-contact-forms/css/jquery-ui.css');
170
+ wp_register_style('ccf-admin', plugins_url() . '/custom-contact-forms/css/custom-contact-forms-admin.css');
171
+ wp_register_style('ccf-colorpicker', plugins_url() . '/custom-contact-forms/css/colorpicker.css');
172
+ wp_enqueue_style('ccf-jquery-ui');
173
+ wp_enqueue_style('ccf-standards');
174
+ wp_enqueue_style('ccf-admin');
175
+ wp_enqueue_style('ccf-colorpicker');
176
+ }
177
+
178
+ function insertAdminScripts() {
179
+ $js_version = '1.0.19';
180
+ $admin_options = parent::getAdminOptions();
181
+ $js_lang = array(
182
+ 'attaching' => __('Attaching', 'custom-contact-forms'),
183
+ 'detaching' => __('Detaching', 'custom-contact-forms'),
184
+ 'detach_button' => __('Detach', 'custom-contact-forms'),
185
+ 'attach_button' => __('Attach', 'custom-contact-forms'),
186
+ 'saving' => __('Saving', 'custom-contact-forms'),
187
+ 'more_options' => __('More Options', 'custom-contact-forms'),
188
+ 'expand' => __('Expand', 'custom-contact-forms'),
189
+ 'click_to_confirm' => __('Click to Confirm', 'custom-contact-forms'),
190
+ 'delete_confirm' => __('Are you sure you want to delete this', 'custom-contact-forms'),
191
+ 'error' => __('An error has occured. Please try again later.', 'custom-contact-forms'),
192
+ 'nothing_to_show' => __('Nothing to show.', 'custom-contact-forms'),
193
+ 'nothing_attached' => __('Nothing Attached!', 'custom-contact-forms'),
194
+ 'nonce' => wp_create_nonce('ccf_nonce')
195
+ );
196
+ $js_ajax = array('plugin_dir' => plugins_url() . '/custom-contact-forms',
197
+ 'url' => admin_url('admin-ajax.php'),
198
+ 'nonce' => wp_create_nonce('ccf-ajax-nonce'));
199
+ wp_enqueue_script('jquery');
200
+ wp_enqueue_script('jquery-form');
201
+ wp_enqueue_script('jquery-ui-core');
202
+ wp_enqueue_script('jquery-ui-tabs');
203
+ wp_enqueue_script('jquery-ui-dialog');
204
+
205
+ wp_enqueue_script('jquery-tools', plugins_url() . '/custom-contact-forms/js/jquery.tools.min.js');
206
+ wp_enqueue_script('jquery-ui-widget', plugins_url() . '/custom-contact-forms/js/jquery.ui.widget.js');
207
+ //wp_enqueue_script('jquery-ui-dialog', plugins_url() . '/custom-contact-forms/js/jquery.ui.dialog.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'));
208
+ //wp_enqueue_script('ccf-pagination', plugins_url() . '/custom-contact-forms/js/jquery.pagination.js');
209
+ wp_enqueue_script('ccf-admin-inc', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-admin-inc.js', $js_version);
210
+ wp_enqueue_script('ccf-admin', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-admin.js', $js_version);
211
+ if ($admin_options['admin_ajax'] == 1) {
212
+ wp_enqueue_script('ccf-admin-ajax', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-admin-ajax.js', $js_version);
213
+ wp_localize_script('ccf-admin-ajax', 'ccfLang', $js_lang);
214
+ wp_localize_script('ccf-admin-ajax', 'ccfAjax', $js_ajax);
215
+ }
216
+ wp_enqueue_script('ccf-colorpicker', plugins_url() . '/custom-contact-forms/js/colorpicker.js');
217
+ wp_enqueue_script('ccf-eye', plugins_url() . '/custom-contact-forms/js/eye.js');
218
+ wp_enqueue_script('ccf-utils', plugins_url() . '/custom-contact-forms/js/utils.js');
219
+ wp_enqueue_script('ccf-layout', plugins_url() . '/custom-contact-forms/js/layout.js?ver=1.0.2');
220
+ wp_localize_script('ccf-admin-inc', 'ccfLang', $js_lang);
221
+ wp_localize_script('ccf-admin-inc', 'ccfAjax', $js_ajax);
222
+ wp_localize_script('ccf-admin', 'ccfLang', $js_lang);
223
+ }
224
+
225
+ function handleAdminPostRequests() {
226
+ $out = array('success' => true);
227
+ if ($_POST['object_create']) {
228
+ if ($_POST['object_type'] == 'form') {
229
+ if (parent::insertForm($_POST['object']) != false)
230
+ $this->action_complete = __('A new form was successfully created!', 'custom-contact-forms');
231
+ } elseif ($_POST['object_type'] == 'field') {
232
+ if (parent::insertField($_POST['object']) != false)
233
+ $this->action_complete = __('A new field was successful created!', 'custom-contact-forms');
234
+ } elseif ($_POST['object_type'] == 'field_option') {
235
+ if (parent::insertFieldOption($_POST['object']) != false)
236
+ $this->action_complete = __('A new field option was successful created!', 'custom-contact-forms');
237
+ } elseif ($_POST['object_type'] == 'style') {
238
+ if (parent::insertStyle($_POST['object']) != false)
239
+ $this->action_complete = __('A new style was successful created!', 'custom-contact-forms');
240
+ }
241
+ return $out;
242
+ }
243
+
244
+ if ($_POST['object_attach']) {
245
+ if ($_POST['object_type'] == 'form') {
246
+ if (parent::addFieldToForm($_POST['attach_object_id'], $_POST['object_id']) != false)
247
+ $this->action_complete = __('A field was successful attached!', 'custom-contact-forms');
248
+ } elseif ($_POST['object_type'] == 'field') {
249
+ if (parent::addFieldOptionToField($_POST['attach_object_id'], $_POST['object_id']) != false)
250
+ $this->action_complete = __('A field option was successful attached!', 'custom-contact-forms');
251
+ }
252
+ return $out;
253
+ }
254
+
255
+ if ($_POST['object_detach']) {
256
+ if ($_POST['object_type'] == 'form') {
257
+ if (parent::detachField($_POST['detach_object_id'], $_POST['object_id']) != false)
258
+ $this->action_complete = __('A field was successful detached!', 'custom-contact-forms');
259
+ } elseif ($_POST['object_type'] == 'field') {
260
+ if (parent::detachFieldOption($_POST['detach_object_id'], $_POST['object_id']) != false)
261
+ $this->action_complete = __('A field option was successful detached!', 'custom-contact-forms');
262
+ }
263
+ return $out;
264
+ }
265
+
266
+ if (isset($_POST['object_bulk_apply'])) {
267
+ $out['object_bulk_action'] = $_POST['object_bulk_action'];
268
+ if ($_POST['object_bulk_action'] == 'edit') {
269
+ foreach ($_POST['objects'] as $obj) {
270
+ if ($obj['object_do'] == 1) {
271
+ if ($obj['object_type'] == 'form') {
272
+ parent::updateForm($obj['values'], $obj['object_id']);
273
+ if ($obj['detach_confirm'] == 1 && $obj['detach'] > 0) {
274
+ parent::detachField($obj['detach'], $obj['object_id']);
275
+ } if ($obj['attach_confirm'] == 1 && $obj['attach'] > 0) {
276
+ parent::addFieldToForm($obj['attach'], $obj['object_id']);
277
+ }
278
+ } elseif ($obj['object_type'] == 'field') {
279
+ parent::updateField($obj['values'], $obj['object_id']);
280
+ if ($obj['detach_confirm'] == 1 && $obj['detach'] > 0) {
281
+ parent::detachFieldOption($obj['detach'], $obj['object_id']);
282
+ } if ($obj['attach_confirm'] == 1 && $obj['attach'] > 0) {
283
+ parent::addFieldOptionToField($obj['attach'], $obj['object_id']);
284
+ }
285
+ } elseif ($obj['object_type'] == 'field_option') parent::updateFieldOption($obj['values'], $obj['object_id']);
286
+ elseif ($obj['object_type'] == 'style') parent::updateStyle($obj['values'], $obj['object_id']);
287
+ $out['objects'][] = $obj;
288
+ }
289
+ }
290
+ $this->action_complete = __('Your bulk action has been completed!', 'custom-contact-forms');
291
+ }
292
+
293
+ elseif ($_POST['object_bulk_action'] == 'delete') {
294
+ foreach ($_POST['objects'] as $obj) {
295
+ if ($obj['object_do'] == 1) {
296
+ if ($obj['object_type'] == 'form') parent::deleteForm($obj['object_id']);
297
+ elseif ($obj['object_type'] == 'field') parent::deleteField($obj['object_id']);
298
+ elseif ($obj['object_type'] == 'field_option') parent::deleteFieldOption($obj['object_id']);
299
+ elseif ($obj['object_type'] == 'style') parent::deleteStyle($obj['object_id']);
300
+ elseif ($obj['object_type'] == 'form_submission') {
301
+ parent::deleteUserData($obj['object_id']);
302
+ }
303
+ $out['objects'][] = $obj;
304
+ }
305
+ }
306
+ $this->action_complete = __('Your bulk action has been completed!', 'custom-contact-forms');
307
+ }
308
+ }
309
+ return $out;
310
+ }
311
+
312
+ function printAdminPage() {
313
+ $admin_options = parent::getAdminOptions();
314
+ if ($admin_options['show_install_popover'] == 1) {
315
+ $admin_options['show_install_popover'] = 0;
316
+ ?>
317
+ <script type="text/javascript" language="javascript">
318
+ $j(document).ready(function() {
319
+ $j("#ccf-usage-popover").dialog('open');
320
+ });
321
+ </script>
322
+ <?php
323
+ update_option(parent::getAdminOptionsName(), $admin_options);
324
+ }
325
+ $this->handleAdminPostRequests();
326
+ //parent::serializeAllFormFields();
327
+ //parent::serializeAllFieldOptions();
328
+ if ($_POST['insert_default_content']) {
329
+ ccf_utils::load_module('db/custom-contact-forms-default-db.php');
330
+ $this->action_complete = __('Default content has been inserted!', 'custom-contact-forms');
331
+ new CustomContactFormsDefaultDB();
332
+ } elseif ($_POST['contact_author']) {
333
+ $this->action_complete = __('Your message has been sent!', 'custom-contact-forms');
334
+ $this_url = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : $_SERVER['SERVER_NAME'];
335
+ $this->contactAuthor($_POST['name'], $_POST['email'], $this_url, $_POST['message'], $_POST['type'], $_POST['host'], $_POST['ccf-version'], $_POST['wp-version']);
336
+ } elseif ($_GET['clear_tables'] == 1) {
337
+ parent::emptyAllTables();
338
+ }
339
+ $styles = parent::selectAllStyles();
340
+ $style_options = '<option value="0">Default</option>';
341
+ foreach ($styles as $style)
342
+ $style_options .= '<option value="'.$style->id.'">'.$style->style_slug.'</option>';
343
+ ?>
344
+ <div id="customcontactforms-admin">
345
+ <div class="plugin-header">
346
+ <h2>
347
+ <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
348
+ </h2>
349
+ <input type="button" class="quick-start-button" value="<?php _e("Quick Start Guide", 'custom-contact-forms'); ?>" />
350
+ <input type="button" class="usage-popover-button" value="<?php _e("Plugin Usage Manual", 'custom-contact-forms'); ?>" />
351
+ </div>
352
+ <ul id="plugin-nav">
353
+ <li><a href="#create-fields"><?php _e("Create Fields", 'custom-contact-forms'); ?></a></li>
354
+ <li><a href="#create-forms"><?php _e("Create Forms", 'custom-contact-forms'); ?></a></li>
355
+ <li><a href="#manage-fields"><?php _e("Manage Fields", 'custom-contact-forms'); ?></a></li>
356
+ <li><a href="#manage-fixed-fields"><?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?></a></li>
357
+ <li><a href="#manage-forms"><?php _e("Manage Forms", 'custom-contact-forms'); ?></a></li>
358
+ <li><a href="#create-styles"><?php _e("Create Styles", 'custom-contact-forms'); ?></a></li>
359
+ <li><a href="#manage-styles"><?php _e("Manage Styles", 'custom-contact-forms'); ?></a></li>
360
+ <li><a href="#manage-field-options"><?php _e("Manage Field Options", 'custom-contact-forms'); ?></a></li>
361
+ <li><a href="#contact-author"><?php _e("Suggest a Feature", 'custom-contact-forms'); ?></a></li>
362
+ <li><a href="#contact-author"><?php _e("Bug Report", 'custom-contact-forms'); ?></a></li>
363
+ <li><a href="#custom-html"><?php _e("Custom HTML Forms", 'custom-contact-forms'); ?></a></li>
364
+ <li class="last"><a href="#plugin-news"><?php _e("Plugin News", 'custom-contact-forms'); ?></a></li>
365
+ </ul>
366
+ <div style="text-align:center"><a target="_blank" href="http://www.shareasale.com/r.cfm?b=256143&u=481196&m=25929&urllink=&afftrack="><img src="http://www.shareasale.com/image/25929/728x90.png" alt="Scribe. SEO Made Simple." border="0"></a>
367
+ </div><a class="genesis" href="http://www.shareasale.com/r.cfm?b=241369&u=481196&m=28169&urllink=&afftrack="><?php _e('Custom Contact Forms works best with any of the 20+ ', 'custom-contact-forms'); ?><span><?php _e('Genesis', 'custom-contact-forms'); ?></span> <?php _e('Wordpress child themes. The', 'custom-contact-forms'); ?> <span><?php _e('Genesis Framework', 'custom-contact-forms'); ?></span> <?php _e('empowers you to quickly and easily build incredible websites with WordPress.', 'custom-contact-forms'); ?></a>
368
+
369
+ <form class="blog-horizontal-form" method="post" action="http://www.aweber.com/scripts/addlead.pl">
370
+ <input type="hidden" name="meta_web_form_id" value="1578604781" />
371
+ <input type="hidden" name="meta_split_id" value="" />
372
+ <input type="hidden" name="listname" value="ccf-plugin" />
373
+ <input type="hidden" name="redirect" value="http://www.taylorlovett.com/wordpress-plugins/tutorials-offers-tips/" id="redirect_5832e41084448adb07da67a35dc83c27" />
374
+ <input type="hidden" name="meta_adtracking" value="CCF_-_Wordpress_Plugins_Horizontal" />
375
+ <input type="hidden" name="meta_message" value="1" />
376
+ <input type="hidden" name="meta_required" value="name,email" />
377
+ <span><?php _e('WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials', 'custom-contact-forms'); ?></span>
378
+ <input type="text" name="name" value="Your Name" onclick="value=''" />
379
+ <input type="text" name="email" value="Your Email" onclick="value=''" />
380
+ <input type="submit" value="Sign Up for Free" />
381
+ </form>
382
+
383
+ <?php if (!empty($this->action_complete)) { ?>
384
+ <div class="action-complete">
385
+ <?php echo $this->action_complete; ?>
386
+ </div>
387
+ <?php } ?>
388
+
389
+ <a name="create-fields"></a>
390
+ <div id="create-fields" class="postbox">
391
+ <h3 class="hndle"><span>
392
+ <?php _e("Create A Form Field", 'custom-contact-forms'); ?>
393
+ </span></h3>
394
+ <div class="inside">
395
+ <form id="ccf-create-field" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
396
+ <ul>
397
+ <li>
398
+ <label for="field_slug">*
399
+ <?php _e("Field Slug:", 'custom-contact-forms'); ?>
400
+ </label>
401
+ <input name="object[field_slug]" type="text" maxlength="40" />
402
+ <br />
403
+ <?php _e("This is just a unique way for CCF to refer to your field. Must be unique from other slugs and contain only underscores and alphanumeric characters.", 'custom-contact-forms'); ?>
404
+ </li>
405
+ <li>
406
+ <label for="field_label">
407
+ <?php _e("Field Label:", 'custom-contact-forms'); ?>
408
+ </label>
409
+ <input name="object[field_label]" type="text" maxlength="100" />
410
+ <br />
411
+ <?php _e("The field label is displayed next to the field and is visible to the user.", 'custom-contact-forms'); ?>
412
+ </li>
413
+ <li>
414
+ <label for="field_type">*
415
+ <?php _e("Field Type:", 'custom-contact-forms'); ?>
416
+ </label>
417
+ <select name="object[field_type]">
418
+ <option>Text</option>
419
+ <option>Textarea</option>
420
+ <option>Hidden</option>
421
+ <option>Checkbox</option>
422
+ <option>Radio</option>
423
+ <option>Dropdown</option>
424
+ </select>
425
+ </li>
426
+ <li>
427
+ <label for="field_value">
428
+ <?php _e("Initial Value:", 'custom-contact-forms'); ?>
429
+ </label>
430
+ <input name="object[field_value]" type="text" maxlength="50" />
431
+ <br />
432
+ (
433
+ <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox
434
+ 'Are you human?', I would set the initial value to 'Yes'.", 'custom-contact-forms'); ?>
435
+ <?php _e("If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the", 'custom-contact-forms'); ?>
436
+ <a href="#manage-field-options" title="<?php _e("Create a Field Option", 'custom-contact-forms'); ?>"><?php _e("field option", 'custom-contact-forms'); ?></a>
437
+ <?php _e("you would like initially selected.", 'custom-contact-forms'); ?>
438
+ ) </li>
439
+ <li>
440
+ <label for="field_maxlength">
441
+ <?php _e("Max Length:", 'custom-contact-forms'); ?>
442
+ </label>
443
+ <input class="ccf-width50" size="10" name="object[field_maxlength]" type="text" maxlength="4" />
444
+ <br />
445
+ <?php _e("0 for no limit; only applies to Text fields", 'custom-contact-forms'); ?>
446
+ </li>
447
+ <li>
448
+ <label for="field_required">*
449
+ <?php _e("Required Field:", 'custom-contact-forms'); ?>
450
+ </label>
451
+ <select name="object[field_required]">
452
+ <option value="0">
453
+ <?php _e("No", 'custom-contact-forms'); ?>
454
+ </option>
455
+ <option value="1">
456
+ <?php _e("Yes", 'custom-contact-forms'); ?>
457
+ </option>
458
+ </select>
459
+ <br />
460
+ <?php _e("If a field is required and a user leaves it blank, the plugin will display an error message (which you can customize using 'Field Error') explaining the problem.", 'custom-contact-forms'); ?>
461
+ </li>
462
+ <li>
463
+ <label for="field_instructions">
464
+ <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
465
+ </label>
466
+ <input name="object[field_instructions]" type="text" />
467
+ <br />
468
+ <?php _e("If this is filled out, a tooltip popover displaying this text will show when the field is selected.", 'custom-contact-forms'); ?>
469
+ </li>
470
+ <li>
471
+ <label for="field_class">
472
+ <?php _e("Field Class:", 'custom-contact-forms'); ?>
473
+ </label>
474
+ <input name="object[field_class]" type="text" />
475
+ <br />
476
+ <?php _e("If you manage your own .css stylesheet, you can use this to attach a class to this field. Leaving this blank will do nothing.", 'custom-contact-forms'); ?>
477
+ </li>
478
+ <li>
479
+ <label for="field_error">
480
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
481
+ </label>
482
+ <input name="object[field_error]" type="text" />
483
+ <br />
484
+ <?php _e("If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank.", 'custom-contact-forms'); ?>
485
+ </li>
486
+ <li>
487
+ <input type="hidden" name="object[user_field]" value="1" />
488
+ <input type="hidden" name="object_type" value="field" />
489
+ <input type="submit" value="<?php _e("Create Field", 'custom-contact-forms'); ?>" name="object_create" class="create-button" />
490
+ </li>
491
+ <li class="attach"><span class="ccf-red">*</span> <?php _e('If this is a dropdown or radio field, you should go to the field manager below to attach field options after you create it.', 'custom-contact-forms'); ?></li>
492
+
493
+ </ul>
494
+ </form>
495
+ </div>
496
+ </div>
497
+ <a name="create-forms"></a>
498
+ <div id="create-forms" class="postbox">
499
+ <h3 class="hndle"><span>
500
+ <?php _e("Create A Form", 'custom-contact-forms'); ?>
501
+ </span></h3>
502
+ <div class="inside">
503
+ <form id="ccf-create-form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
504
+ <ul>
505
+ <li>
506
+ <label for="object[form_slug]">*
507
+ <?php _e("Form Slug:", 'custom-contact-forms'); ?>
508
+ </label>
509
+ <input type="text" maxlength="100" name="object[form_slug]" />
510
+ <br />
511
+ <?php _e("This is just a unique way for CCF to refer to your form. Must be unique from other slugs and contain only underscores and alphanumeric characters.", 'custom-contact-forms'); ?>
512
+ </li>
513
+ <li>
514
+ <label for="object[form_title]">
515
+ <?php _e("Form Title:", 'custom-contact-forms'); ?>
516
+ </label>
517
+ <input type="text" maxlength="200" name="object[form_title]" />
518
+ <?php _e("This text is displayed above the form as the heading.", 'custom-contact-forms'); ?>
519
+ </li>
520
+ <li>
521
+ <label for="object[form_action]">
522
+ <?php _e("Form Style:", 'custom-contact-forms'); ?>
523
+ </label>
524
+ <select name="object[form_style]" class="form_style_input">
525
+ <?php echo $style_options; ?>
526
+ </select>
527
+ (<a href="#create-styles"><?php _e("Click to create a style", 'custom-contact-forms'); ?></a>)</li>
528
+ <li>
529
+ <label for="object[submit_button_text]">
530
+ <?php _e("Submit Button Text:", 'custom-contact-forms'); ?>
531
+ </label>
532
+ <input type="text" maxlength="200" name="object[submit_button_text]" />
533
+ </li>
534
+ <li>
535
+ <label for="object[form_email]">
536
+ <?php _e("Form Destination Email:", 'custom-contact-forms'); ?>
537
+ </label>
538
+ <input type="text" name="object[form_email]" />
539
+ <br />
540
+ <?php _e("Will receive all submissions from this form; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
541
+ </li>
542
+ <li>
543
+ <label for="object[form_email_subject]">
544
+ <?php _e("Form Email Subject:", 'custom-contact-forms'); ?>
545
+ </label>
546
+ <input type="text" name="object[form_email_subject]" />
547
+ <br />
548
+ <?php _e("When submitted and configured accordingly, the form will send an email with this subject.", 'custom-contact-forms'); ?>
549
+ </li>
550
+ <li>
551
+ <label for="object[form_email_name]">
552
+ <?php _e("Form Email Name:", 'custom-contact-forms'); ?>
553
+ </label>
554
+ <input type="text" name="object[form_email_name]" />
555
+ <br />
556
+ <?php _e("When submitted and configured accordingly, the form will send an email with this as the email 'from name'.", 'custom-contact-forms'); ?>
557
+ </li>
558
+ <li>
559
+ <label for="object[form_success_message]">
560
+ <?php _e("Form Success Message:", 'custom-contact-forms'); ?>
561
+ </label>
562
+ <input type="text" name="object[form_success_message]" />
563
+ <br />
564
+ <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
565
+ </li>
566
+ <li>
567
+ <label for="object[form_success_title]">
568
+ <?php _e("Form Success Message Title:", 'custom-contact-forms'); ?>
569
+ </label>
570
+ <input type="text" name="object[form_success_title]" />
571
+ <br />
572
+ <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
573
+ </li>
574
+ <li>
575
+ <label for="object[form_thank_you_page]">
576
+ <?php _e("Custom Success URL:", 'custom-contact-forms'); ?>
577
+ </label>
578
+ <input type="text" name="object[form_thank_you_page]" />
579
+ <br />
580
+ <?php _e("If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.", 'custom-contact-forms'); ?>
581
+ </li>
582
+ <li>
583
+ <label for="form_access"><?php _e('Who Can View This Form:', ''); ?></label>
584
+
585
+ <?php
586
+ $roles = parent::getRolesArray();
587
+ $i = 0;
588
+ foreach ($roles as $role) {
589
+ if ($i == 3) echo '<br />';
590
+ ?>
591
+ <div class="role">
592
+ <input type="checkbox" checked="checked" name="object[form_access][]" value="<?php echo $role; ?>" />
593
+ <?php echo $role; ?>
594
+ </div>
595
+ <?php
596
+ $i++;
597
+ }
598
+ ?><br />
599
+ <?php _e('Choose which types of users should be able to view this form.', 'custom-contact-forms'); ?>
600
+ </li>
601
+ <li>
602
+ <input type="hidden" name="object_type" value="form" />
603
+ <input type="submit" class="create-button" value="<?php _e("Create Form", 'custom-contact-forms'); ?>" name="object_create" />
604
+ </li>
605
+ <li class="attach"><span class="ccf-red">*</span> <?php _e('You should go to the form manager below to attach fields to this form after you create it.', 'custom-contact-forms'); ?></li>
606
+ </ul>
607
+ </form>
608
+ </div>
609
+ </div>
610
+ <a name="manage-fields"></a>
611
+ <h3 class="manage-h3">
612
+ <?php _e("Manage User Fields", 'custom-contact-forms'); ?>
613
+ </h3>
614
+ <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
615
+ <table class="widefat post" id="manage-fields" cellspacing="0">
616
+ <thead>
617
+ <tr>
618
+ <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
619
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
620
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
621
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
622
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
623
+ <th scope="col" class="manage-column field-required"><?php _e("Required", 'custom-contact-forms'); ?></th>
624
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
625
+ <th scope="col" class="manage-column field-expand"></th>
626
+ </tr>
627
+ </thead>
628
+ <tbody>
629
+ <?php
630
+ $fields = parent::selectAllFields();
631
+ for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
632
+ if ($fields[$i]->user_field == 0) { $z--; continue; }
633
+ $attached_options = parent::getAttachedFieldOptionsArray($fields[$i]->id);
634
+ $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option><option>Radio</option><option>Dropdown</option>';
635
+ $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
636
+
637
+ ?>
638
+ <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 1) echo ' ccf-evenrow'; ?>">
639
+ <td><input class="object-check" type="checkbox" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
640
+ <td><input type="text" name="objects[<?php echo $i; ?>][values][field_slug]" class="ccf-width100" maxlength="50" value="<?php echo $fields[$i]->field_slug; ?>" /></td>
641
+ <td><input type="text" name="objects[<?php echo $i; ?>][values][field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" /></td>
642
+ <td><select name="objects[<?php echo $i; ?>][values][field_type]">
643
+ <?php echo $field_types; ?>
644
+ </select></td>
645
+ <td><input type="text" name="objects[<?php echo $i; ?>][values][field_value]" maxlength="50" class="ccf-width75" value="<?php echo $fields[$i]->field_value; ?>" /></td>
646
+ <td><select name="objects[<?php echo $i; ?>][values][field_required]">
647
+ <option value="1">
648
+ <?php _e("Yes", 'custom-contact-forms'); ?>
649
+ </option>
650
+ <option value="0" <?php if ($fields[$i]->field_required != 1) echo 'selected="selected"'; ?>>
651
+ <?php _e("No", 'custom-contact-forms'); ?>
652
+ </option>
653
+ </select></td>
654
+ <td><?php if ($fields[$i]->field_type == 'Dropdown' || $fields[$i]->field_type == 'Radio') { ?>
655
+ <b>-</b>
656
+ <?php } else { ?>
657
+ <input type="text" class="ccf-width50" name="objects[<?php echo $i; ?>][values][field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
658
+ <?php } ?>
659
+ </td>
660
+ <td><input type="hidden" class="object-type" name="objects[<?php echo $i; ?>][object_type]" value="field" />
661
+ <input type="hidden" class="object-id" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $fields[$i]->id; ?>" />
662
+ <span class="fields-options-expand"></span>
663
+ </tr>
664
+ <?php $show_field_options = ($fields[$i]->field_type == 'Radio' || $fields[$i]->field_type == 'Dropdown') ? true : false; ?>
665
+ <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 1) echo 'ccf-evenrow'; ?>">
666
+ <td class="fields-extra-options" colspan="8">
667
+ <div class="row-one">
668
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If this is filled out, a tooltip popover displaying this text will show when the field is selected.', 'custom-contact-forms'); ?>">(?)</a>
669
+ <label for="field_instructions">
670
+ <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
671
+ </label>
672
+ <input type="text" class="ccf-width150" name="objects[<?php echo $i; ?>][values][field_instructions]" value="<?php echo $fields[$i]->field_instructions; ?>" />
673
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
674
+ <label for="field_class">
675
+ <?php _e("Field Class:", 'custom-contact-forms'); ?>
676
+ </label>
677
+ <input type="text" class="ccf-width100" name="objects[<?php echo $i; ?>][values][field_class]" value="<?php echo $fields[$i]->field_class; ?>" />
678
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('This lets you customize the error message displayed when this field is required and left blank.', 'custom-contact-forms'); ?>">(?)</a>
679
+ <label for="field_error">
680
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
681
+ </label>
682
+ <input type="text" class="ccf-width200" name="objects[<?php echo $i; ?>][values][field_error]" value="<?php echo $fields[$i]->field_error; ?>" />
683
+ </div>
684
+ <?php
685
+ if ($show_field_options) { ?>
686
+ <div class="fattach">
687
+ <div class="field-detach">
688
+ <span class="ccf-bold">Detach Options:</span>
689
+ <?php if (empty($attached_options)) { ?>
690
+ <select class="onObject<?php echo $fields[$i]->id ?> detach-object detach-field-option objectTypeField" name="objects[<?php echo $i; ?>][detach]">
691
+ <option value="-1">Nothing Attached!</option>
692
+ </select>
693
+ <?php } else { ?>
694
+ <select name="objects[<?php echo $i; ?>][detach]" class="onObject<?php echo $fields[$i]->id ?> detach-object detach-field-option objectTypeField">
695
+ <?php
696
+ foreach ($attached_options as $option_id) {
697
+ $option = parent::selectFieldOption($option_id);
698
+ ?>
699
+ <option value="<?php echo $option_id; ?>"><?php echo $option->option_slug; ?></option>
700
+ <?php
701
+ }
702
+ ?>
703
+ </select>
704
+ <?php } ?>
705
+ <span class="field-detach-check">
706
+ <input class="detach-check" type="checkbox" name="objects[<?php echo $i; ?>][detach_confirm]" value="1" />
707
+ <span class="detach-lang">(Check to detach option)</span>
708
+ </span><br />
709
+ <span class="ccf-red ccf-bold">*</span>
710
+ <?php _e("Detach field options you", 'custom-contact-forms'); ?>
711
+ <a href="#create-field-options">
712
+ <?php _e("create", 'custom-contact-forms'); ?>
713
+ </a>. </div>
714
+ <?php $all_options = $this->getFieldOptionsForm(); ?>
715
+ <div class="field-attach">
716
+ <span class="ccf-bold">Attach Options:</span>
717
+ <?php if (empty($all_options)) { ?>
718
+ <b>No Field Options to Attach</b>
719
+ <?php } else { ?>
720
+ <select name="objects[<?php echo $i; ?>][attach]" class="onObject<?php echo $fields[$i]->id ?> attach-object attach-field-option objectTypeField">
721
+ <?php echo $all_options; ?>
722
+ </select>
723
+ <span class="field-attach-check">
724
+ <input type="checkbox" class="attach-check" name="objects[<?php echo $i; ?>][attach_confirm]" value="1" />
725
+ <?php } ?>
726
+ <span class="attach-lang">(Check to attach option)</span>
727
+ </span><br />
728
+ <span class="ccf-red ccf-bold">*</span>
729
+ <?php _e("Attach field options in the order you want them to display.", 'custom-contact-forms'); ?>
730
+ </div>
731
+ </div>
732
+ <?php } ?>
733
+ </td>
734
+ </tr>
735
+ <?php
736
+ }
737
+ ?>
738
+ </tbody>
739
+
740
+ <tfoot>
741
+ <tr>
742
+ <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
743
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
744
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
745
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
746
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
747
+ <th scope="col" class="manage-column field-required"><?php _e("Required", 'custom-contact-forms'); ?></th>
748
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
749
+ <th scope="col" class="manage-column field-expand"></th>
750
+ </tr>
751
+ </tfoot>
752
+ </table>
753
+ <select class="bulk-dropdown" name="object_bulk_action">
754
+ <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
755
+ <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
756
+ <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option>
757
+ </select> <input type="submit" name="object_bulk_apply" class="bulk-apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
758
+ </form>
759
+ <a name="manage-fixed-fields"></a>
760
+ <h3 class="manage-h3">
761
+ <?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?>
762
+ </h3>
763
+ <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
764
+ <table class="widefat post" id="manage-fixed-fields" cellspacing="0">
765
+ <thead>
766
+ <tr>
767
+ <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
768
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
769
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
770
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
771
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
772
+ <th scope="col" class="manage-column field-value"><?php _e("Required", 'custom-contact-forms'); ?></th>
773
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
774
+ <th scope="col" class="manage-column field-expand"></th>
775
+ </tr>
776
+ </thead>
777
+ <tbody>
778
+ <?php
779
+ $fields = parent::selectAllFields();
780
+ for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
781
+ if ($fields[$i]->user_field == 1) { $z--; continue;}
782
+ $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option>';
783
+ $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
784
+
785
+ ?>
786
+ <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 0) echo 'ccf-evenrow'; ?>">
787
+ <td><input class="object-check" type="checkbox" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
788
+ <td><?php echo $fields[$i]->field_slug; ?></td>
789
+ <td><?php if ($fields[$i]->field_slug == 'resetButton') { _e('None', 'custom-contact-forms'); } else { ?>
790
+ <input type="text" name="objects[<?php echo $i; ?>][values][field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" />
791
+ <?php } ?></td>
792
+ <td><?php echo $fields[$i]->field_type; ?>
793
+ <td><?php if ($fields[$i]->field_type != 'Checkbox') { ?>
794
+ <input type="text" name="objects[<?php echo $i; ?>][values][field_value]" class="ccf-width75" maxlength="50" value="<?php echo $fields[$i]->field_value; ?>" />
795
+ <?php } else {
796
+ echo $fields[$i]->field_value;
797
+ ?>
798
+ <?php } ?>
799
+ </td>
800
+ <td><?php if ($fields[$i]->field_slug == 'fixedEmail' || $fields[$i]->field_slug == 'emailSubject' || $fields[$i]->field_slug == 'fixedWebsite' || $fields[$i]->field_slug == 'usaStates' || $fields[$i]->field_slug == 'datePicker' || $fields[$i]->field_slug == 'allCountries') { ?>
801
+ <select name="objects[<?php echo $i; ?>][values][field_required]">
802
+ <option value="1">
803
+ <?php _e("Yes", 'custom-contact-forms'); ?>
804
+ </option>
805
+ <option <?php if($fields[$i]->field_required != 1) echo 'selected="selected"'; ?> value="0">
806
+ <?php _e("No", 'custom-contact-forms'); ?>
807
+ </option>
808
+ </select>
809
+ <?php } else {
810
+ if ($fields[$i]->field_slug == 'resetButton') {
811
+ echo '-';
812
+ } else {
813
+ _e("Yes", 'custom-contact-forms');
814
+ }
815
+ }
816
+ ?>
817
+ </td>
818
+ <td><?php if ($fields[$i]->field_type != 'Checkbox' && $fields[$i]->field_slug != 'resetButton' && $fields[$i]->field_slug != 'allCountries' && $fields[$i]->field_slug != 'usaStates') { ?>
819
+ <input type="text" class="ccf-width50" name="objects[<?php echo $i; ?>][values][field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
820
+ <?php } else { _e('None', 'custom-contact-forms'); } ?>
821
+ </td>
822
+ <td><input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="field" />
823
+ <input type="hidden" class="object-id" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $fields[$i]->id; ?>" />
824
+ <span class="fixed-fields-options-expand"></span>
825
+ </tr>
826
+ <tr class="row-field-<?php echo $fields[$i]->id; ?> <?php if ($z % 2 == 0) echo 'ccf-evenrow'; ?>">
827
+ <td class="fixed-fields-extra-options" colspan="8"><label for="field_class">
828
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
829
+ <?php _e('Field Class:', 'custom-contact-forms'); ?>
830
+ </label>
831
+ <input type="text" value="<?php echo $fields[$i]->field_class; ?>" name="objects[<?php echo $i; ?>][values][field_class]" />
832
+ <?php if ($fields[$i]->field_slug != 'resetButton') { ?>
833
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If this is filled out, a tooltip popover displaying this text will show when the field is selected.', 'custom-contact-forms'); ?>">(?)</a>
834
+ <label for="field_instructions">
835
+ <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
836
+ </label>
837
+ <input type="text" name="objects[<?php echo $i; ?>][values][field_instructions]" class="ccf-width200" value="<?php echo $fields[$i]->field_instructions; ?>" />
838
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('This lets you customize the error message displayed when this field is required and left blank.', 'custom-contact-forms'); ?>">(?)</a>
839
+ <label for="field_error">
840
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
841
+ </label>
842
+ <input type="text" class="ccf-width200" name="objects[<?php echo $i; ?>][values][field_error]" value="<?php echo $fields[$i]->field_error; ?>" />
843
+ <br />
844
+ <?php } ?>
845
+ <div class="field_descrip"><?php echo $GLOBALS['ccf_fixed_fields'][$fields[$i]->field_slug]; ?></div></td>
846
+ </tr>
847
+ <?php
848
+ }
849
+ ?>
850
+ </tbody>
851
+
852
+ <tfoot>
853
+ <tr>
854
+ <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
855
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
856
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
857
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
858
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
859
+ <th scope="col" class="manage-column field-value"><?php _e("Required", 'custom-contact-forms'); ?></th>
860
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
861
+ <th scope="col" class="manage-column field-expand"></th>
862
+ </tr>
863
+ </tfoot>
864
+ </table>
865
+ <select class="bulk-dropdown" name="object_bulk_action">
866
+ <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
867
+ <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
868
+ </select> <input type="submit" class="bulk-apply" name="object_bulk_apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
869
+ </form>
870
+ <a name="manage-field-options"></a>
871
+ <div id="manage-field-options" class="postbox">
872
+ <h3 class="hndle"><span>
873
+ <?php _e("Manage Field Options", 'custom-contact-forms'); ?>
874
+ </span></h3>
875
+ <div class="inside">
876
+ <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
877
+
878
+ <table cellpadding="0" cellspacing="0">
879
+ <thead>
880
+ <tr>
881
+ <th><input class="checkall" type="checkbox" /></th>
882
+ <th><?php _e("Slug", 'custom-contact-forms'); ?></th>
883
+ <th><?php _e("Label", 'custom-contact-forms'); ?></th>
884
+ <th><?php _e("Value", 'custom-contact-forms'); ?></th>
885
+ <th><?php _e("Is Dead", 'custom-contact-forms'); ?></th>
886
+ </tr>
887
+ </thead>
888
+ <tfoot>
889
+ <tr>
890
+ <th><input class="checkall" type="checkbox" /></th>
891
+ <th><?php _e("Slug", 'custom-contact-forms'); ?></th>
892
+ <th><?php _e("Label", 'custom-contact-forms'); ?></th>
893
+ <th><?php _e("Value", 'custom-contact-forms'); ?></th>
894
+ <th><?php _e("Is Dead", 'custom-contact-forms'); ?></th>
895
+ </tr>
896
+ </tfoot>
897
+ <tbody>
898
+ <?php
899
+ $options = parent::selectAllFieldOptions(1);
900
+ $option_count = count($options);
901
+ $i = 0;
902
+ foreach ($options as $option) {
903
+ ?>
904
+ <tr class="row-field_option-<?php echo $option->id; ?> <?php if ($i % 2 == 1) echo 'evenrow-field-options'; ?>">
905
+ <td><input type="checkbox" class="object-check" name="objects[<?php echo $i; ?>][object_do]" value="1" /> </td>
906
+ <td><input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="field_option" />
907
+
908
+ <input class="object-id" type="hidden" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $option->id; ?>" />
909
+
910
+ <input type="text" maxlength="20" name="<?php ?>objects[<?php echo $i; ?>][values][option_slug]" value="<?php echo $option->option_slug; ?>" class="ccf-width50" /></td>
911
+ <td><input type="text" name="objects[<?php echo $i; ?>][values][option_label]" value="<?php echo $option->option_label; ?>" class="ccf-width100" /></td>
912
+ <td><input type="text" name="objects[<?php echo $i; ?>][values][option_value]" value="<?php echo $option->option_value; ?>" class="ccf-width100" /></td>
913
+ <td><select name="objects[<?php echo $i; ?>][values][option_dead]"><option value="0"><?php _e('No', 'custom-contact-forms'); ?></option><option <?php if ($option->option_dead == 1) echo 'selected="selected"'; ?> value="1"><?php _e('Yes', 'custom-contact-forms'); ?></option></select></td>
914
+
915
+ </tr>
916
+ <?php
917
+ $i++;
918
+ } if (empty($options)) {
919
+ ?>
920
+ <tr>
921
+ <td class="ccf-center"><?php _e("No field options have been created.", 'custom-contact-forms'); ?></td>
922
+ </tr>
923
+ <?php
924
+ }
925
+ ?>
926
+ </tbody>
927
+ </table>
928
+ <select class="bulk-dropdown" name="object_bulk_action">
929
+ <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
930
+ <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
931
+ <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option></select>
932
+ <input type="submit" class="bulk-apply" name="object_bulk_apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
933
+ </form>
934
+ </div>
935
+ </div>
936
+
937
+ <div id="create-field-options" class="postbox">
938
+ <h3 class="hndle"><span>
939
+ <?php _e("Create A Field Option", 'custom-contact-forms'); ?>
940
+ </span></h3>
941
+ <div class="inside">
942
+ <form id="ccf-create-field-option" method="post" action="<?php echo $_SERVER['REQUEST_URI']?>">
943
+ <ul>
944
+ <li>
945
+ <label for="object[option_slug]">*
946
+ <?php _e("Option Slug:", 'custom-contact-forms'); ?>
947
+ </label>
948
+ <input maxlength="20" type="text" name="object[option_slug]" />
949
+ <br />
950
+ <?php _e("Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'", 'custom-contact-forms'); ?>
951
+ </li>
952
+ <li>
953
+ <label for="object[option_label]">*
954
+ <?php _e("Option Label:", 'custom-contact-forms'); ?>
955
+ </label>
956
+ <input type="text" name="object[option_label]" />
957
+ <br />
958
+ <?php _e("This is what is shown to the user in the dropdown or radio field. Example: 'United States'", 'custom-contact-forms'); ?>
959
+ </li>
960
+ <li>
961
+ <label for="object[option_value]">
962
+ <?php _e("Option Value:", 'custom-contact-forms'); ?>
963
+ </label>
964
+ <input type="text" name="object[option_value]" /> <a href="javascript:void(0)" class="toollink" title="<?php _e("This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'.", 'custom-contact-forms'); ?>">(?)</a>
965
+ <br />
966
+ <?php _e('This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: "The color green" => "green" or "Yes" => "1".', 'custom-contact-forms'); ?>
967
+ </li>
968
+ <li>
969
+ <label for="object[option_dead]"><?php _e("Is Dead Option:", 'custom-contact-forms'); ?></label>
970
+ <select name="object[option_dead]"><option value="0"><?php _e('No', 'custom-contact-forms'); ?></option><option value="1"><?php _e('Yes', 'custom-contact-forms'); ?></option></select>
971
+ <a href="javascript:void(0)" class="toollink" title="<?php _e("A dead option is something like 'Please Select One'. This is a useful tool for required dropdown fields. If a dead option is submitted by a user for a required dropdown field, then the user will have to go back and fill out the field again.", 'custom-contact-forms'); ?>">(?)</a>
972
+ </li>
973
+ <li>
974
+ <input name="object_type" type="hidden" value="field_option" />
975
+ <input type="submit" class="object-action" name="object_create" value="<?php _e("Create Field Option", 'custom-contact-forms'); ?>" />
976
+
977
+ </li>
978
+ </ul>
979
+ </form>
980
+ </div>
981
+ </div>
982
+ <form class="rate-me" action="https://www.paypal.com/cgi-bin/webscr" method="post">
983
+ <input type="hidden" name="cmd" value="_s-xclick">
984
+ <input type="hidden" name="hosted_button_id" value="TXYVDCH955V28">
985
+ <a href="http://wordpress.org/extend/plugins/custom-contact-forms" title="<?php _e("Rate This Plugin", 'custom-contact-forms'); ?>">
986
+ <?php _e("We need your help to continue development! Please <span>rate this plugin</span> to show your support.", 'custom-contact-forms'); ?></a>
987
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
988
+ <img alt="Donate to Custom Contact Forms plugin" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
989
+ </form>
990
+
991
+ <a name="manage-forms"></a>
992
+ <h3 class="manage-h3">
993
+ <?php _e("Manage Forms", 'custom-contact-forms'); ?>
994
+ </h3>
995
+ <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
996
+ <table class="widefat post" id="manage-forms" cellspacing="0">
997
+ <thead>
998
+ <tr>
999
+ <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
1000
+ <th scope="col" class="manage-column form-code"><?php _e("Form Display Code", 'custom-contact-forms'); ?></th>
1001
+ <th scope="col" class="manage-column form-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
1002
+ <th scope="col" class="manage-column form-slug"><?php _e("Destination Email", 'custom-contact-forms'); ?></th>
1003
+ <th scope="col" class="manage-column form-title"><?php _e("Title", 'custom-contact-forms'); ?></th>
1004
+ <th scope="col" class="manage-column form-button"><?php _e("Button Text", 'custom-contact-forms'); ?></th>
1005
+ <th scope="col" class="manage-column form-style"><?php _e("Style", 'custom-contact-forms'); ?></th>
1006
+ <th scope="col" class="manage-column form-expand"></th>
1007
+ </tr>
1008
+ </thead>
1009
+ <tbody>
1010
+ <?php
1011
+ $forms = parent::selectAllForms();
1012
+ for ($i = 0; $i < count($forms); $i++) {
1013
+ $form_methods = '<option>Post</option><option>Get</option>';
1014
+ $form_methods = str_replace('<option>'.$forms[$i]->form_method.'</option>', '<option selected="selected">'.$forms[$i]->form_method.'</option>', $form_methods);
1015
+ $add_fields = $this->getFieldsForm();
1016
+ $this_style = parent::selectStyle($forms[$i]->form_style, '');
1017
+ $sty_opt = str_replace('<option value="'.$forms[$i]->form_style.'">'.$this_style->style_slug.'</option>', '<option value="'.$forms[$i]->form_style.'" selected="selected">'.$this_style->style_slug.'</option>', $style_options);
1018
+ ?>
1019
+ <tr class="row-form-<?php echo $forms[$i]->id; ?> <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1020
+ <td><input type="checkbox" class="object-check" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
1021
+ <td><span class="ccf-bold">[customcontact form=<?php echo $forms[$i]->id ?>]</span></td>
1022
+ <td><input type="text" class="ccf-width75" name="objects[<?php echo $i; ?>][values][form_slug]" value="<?php echo $forms[$i]->form_slug; ?>" /></td>
1023
+ <td><input type="text" name="objects[<?php echo $i; ?>][values][form_email]" value="<?php echo $forms[$i]->form_email; ?>" /></td>
1024
+ <td><input type="text" class="ccf-width125" name="objects[<?php echo $i; ?>][values][form_title]" value="<?php echo $forms[$i]->form_title; ?>" /></td>
1025
+ <td><input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][submit_button_text]" value="<?php echo $forms[$i]->submit_button_text; ?>" /></td>
1026
+ <td><select name="objects[<?php echo $i; ?>][values][form_style]" class="form_style_input">
1027
+ <?php echo $sty_opt; ?>
1028
+ </select></td>
1029
+ <td><input class="object-id" type="hidden" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $forms[$i]->id; ?>" />
1030
+ <input type="hidden" class="object-type" name="objects[<?php echo $i; ?>][object_type]" value="form" />
1031
+ <span class="form-options-expand"></span>
1032
+ </td>
1033
+ </tr>
1034
+ <tr class="row-form-<?php echo $forms[$i]->id; ?> <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1035
+ <td class="form-extra-options ccf-center" colspan="8"><table class="form-extra-options-table">
1036
+ <tbody>
1037
+ <tr>
1038
+ <td class="ccf-bold"><?php _e("Method", 'custom-contact-forms'); ?></td>
1039
+ <td class="ccf-bold"><?php _e("Form Action", 'custom-contact-forms'); ?></td>
1040
+ <td class="ccf-bold"><?php _e("Email Subject", 'custom-contact-forms'); ?></td>
1041
+ <td class="ccf-bold"><?php _e("Email From Name", 'custom-contact-forms'); ?></td>
1042
+ <td class="ccf-bold"><?php _e("Success Message Title", 'custom-contact-forms'); ?></td>
1043
+ <td class="ccf-bold"><?php _e("Success Message", 'custom-contact-forms'); ?></td>
1044
+ <td class="ccf-bold"><?php _e("Custom Success URL", 'custom-contact-forms'); ?></td>
1045
+ </tr>
1046
+ <tr>
1047
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post.", 'custom-contact-forms'); ?>">(?)</a>
1048
+ <select name="objects[<?php echo $i; ?>][values][form_method]">
1049
+ <?php echo $form_methods; ?>
1050
+ </select></td>
1051
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank.", 'custom-contact-forms'); ?>">(?)</a>
1052
+ <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_action]" value="<?php echo $forms[$i]->form_action; ?>" /></td>
1053
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This is the form email subject sent to the destination email address. If left blank, the default from General Settings will be used.", 'custom-contact-forms'); ?>">(?)</a>
1054
+ <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_email_subject]" maxlength="250" value="<?php echo $forms[$i]->form_email_subject; ?>" /></td>
1055
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This is the from name of the email sent on successful form submission. If left blank, the default from General Settings will be used.", 'custom-contact-forms'); ?>">(?)</a>
1056
+ <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_email_name]" maxlength="100" value="<?php echo $forms[$i]->form_email_name; ?>" /></td>
1057
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>">(?)</a>
1058
+ <input class="ccf-width100" type="text" name="objects[<?php echo $i; ?>][values][form_success_title]" value="<?php echo $forms[$i]->form_success_title; ?>" /></td>
1059
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>">(?)</a>
1060
+ <input type="text" name="objects[<?php echo $i; ?>][values][form_success_message]" class="ccf-width100" value="<?php echo $forms[$i]->form_success_message; ?>" /></td>
1061
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.", 'custom-contact-forms'); ?>">(?)</a>
1062
+ <input type="text" class="ccf-width100" name="objects[<?php echo $i; ?>][values][form_thank_you_page]" value="<?php echo $forms[$i]->form_thank_you_page; ?>" /></td>
1063
+ </tr>
1064
+ <tr>
1065
+ <td colspan="7"><a href="javascript:void(0)" class="toollink" title="<?php _e("The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet.", 'custom-contact-forms'); ?>">(?)</a>
1066
+ <label for="theme_code_<?php echo $forms[$i]->id; ?>"><span><?php _e("Code to Display Form in Theme Files:", 'custom-contact-forms'); ?>
1067
+ </span></label>
1068
+ <input type="text" class="ccf-width225" value="&lt;?php if (function_exists('serveCustomContactForm')) { serveCustomContactForm(<?php echo $forms[$i]->id; ?>); } ?&gt;" name="theme_code_<?php echo $forms[$i]->id; ?>" />
1069
+ <a href="javascript:void(0)" class="toollink" title="<?php _e("This field allows you to insert HTML directly after the starting <form> tag.", 'custom-contact-forms'); ?>">(?)</a>
1070
+ <label for="objects[<?php echo $i; ?>][values][custom_code]"><?php _e("Custom Code:", 'custom-contact-forms'); ?></label>
1071
+ <input name="objects[<?php echo $i; ?>][values][custom_code]" type="text" value="<?php echo $forms[$i]->custom_code; ?>" /></td>
1072
+ <input name="objects[<?php echo $i; ?>][values][form_access_update]" type="hidden" value="1" /></td>
1073
+ <a href="javascript:void(0)" class="toollink" title="<?php _e("If you want to show this form to only certain types of users, you can uncheck boxes accordingly. To show this form to anyone, check all the boxes. This will only take effect if 'Form Access Capabilities' is enabled in general settings.", 'custom-contact-forms'); ?>">(?)</a>
1074
+ <label for="form_access">Can View Form:</label>
1075
+
1076
+ <?php
1077
+ $roles = parent::getRolesArray();
1078
+ $access_array = parent::getFormAccessArray($forms[$i]->form_access);
1079
+ foreach ($roles as $role) {
1080
+ ?>
1081
+ <input type="checkbox" <?php if (parent::formHasRole($access_array, $role)) { echo 'checked="checked"'; } ?> name="objects[<?php echo $i; ?>][values][form_access][]" value="<?php echo $role; ?>" />
1082
+ <?php
1083
+ echo $role;
1084
+ }
1085
+ ?>
1086
+ </tr>
1087
+ <tr>
1088
+ <td colspan="7">
1089
+ <div class="fattach">
1090
+ <div class="form-detach">
1091
+ <label for="detach_object_id"><span>
1092
+ <?php _e("Attached Fields:", 'custom-contact-forms'); ?>
1093
+ </span></label>
1094
+ <?php
1095
+ $attached_fields = parent::getAttachedFieldsArray($forms[$i]->id);
1096
+ if (empty($attached_fields)) echo '<select class="onObject' . $forms[$i]->id . ' objectTypeForm detach-field detach-object" name="objects['.$i.'][detach]"><option value="-1">Nothing Attached!</option></select> ';
1097
+ else {
1098
+ echo '<select name="objects['.$i.'][detach]" class="onObject' . $forms[$i]->id . ' detach-object detach-field objectTypeForm">';
1099
+ foreach($attached_fields as $attached_field) {
1100
+ $this_field = parent::selectField($attached_field, '');
1101
+ echo $this_field->field_slug . ' <option value="'.$this_field->id.'">'.$this_field->field_slug.'</option>';
1102
+ }
1103
+ echo '</select>';
1104
+ }
1105
+ ?>
1106
+ <span class="form-detach-check">
1107
+ <input type="checkbox" class="detach-check" value="1" name="objects[<?php echo $i; ?>][detach_confirm]" />
1108
+ <span class="detach-lang">(Check to detach field)</span>
1109
+ </span>
1110
+ <br />
1111
+ <span class="ccf-red ccf-bold">*</span>
1112
+ <?php _e("Attach fields in the order you want them displayed.", 'custom-contact-forms'); ?>
1113
+ </div>
1114
+ <div class="form-attach">
1115
+ <label for="field_id"><span>
1116
+ <?php _e("Attach Field:", 'custom-contact-forms'); ?>
1117
+ </span></label>
1118
+ <select class="onObject<?php echo $forms[$i]->id; ?> attach-object attach-field objectTypeForm" name="objects[<?php echo $i; ?>][attach]">
1119
+ <?php echo $add_fields; ?>
1120
+ </select>
1121
+ <span class="form-attach-check">
1122
+ <input class="attach-check" type="checkbox" name="objects[<?php echo $i; ?>][attach_confirm]" value="1" />
1123
+ <span class="attach-lang">((Check to attach field)</span>
1124
+ </span>
1125
+ <br />
1126
+ <span class="ccf-red ccf-bold">*</span>
1127
+ <?php _e("Attach fixed fields or ones you", 'custom-contact-forms'); ?>
1128
+ <a href="#create-fields">
1129
+ <?php _e("create", 'custom-contact-forms'); ?>
1130
+ </a>. </div></div></td>
1131
+ </tr>
1132
+ </tbody>
1133
+ </table></td>
1134
+ </tr>
1135
+ <?php
1136
+ }
1137
+ $remember_check = ($admin_options['remember_field_values'] == 0) ? 'selected="selected"' : '';
1138
+ $remember_fields = '<option value="1">'.__('Yes', 'custom-contact-forms').'</option><option '.$remember_check.' value="0">'.__('No', 'custom-contact-forms').'</option>';
1139
+ $border_style_options = '<option>solid</option><option>dashed</option>
1140
+ <option>grooved</option><option>double</option><option>dotted</option><option>ridged</option><option>none</option>
1141
+ <option>inset</option><option>outset</option>';
1142
+ ?>
1143
+ </tbody>
1144
+
1145
+ <tfoot>
1146
+ <tr>
1147
+ <tr>
1148
+ <th scope="col" class="manage-column check-col"><input type="checkbox" class="checkall" /></th>
1149
+ <th scope="col" class="manage-column form-code"><?php _e("Form Code", 'custom-contact-forms'); ?></th>
1150
+ <th scope="col" class="manage-column form-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
1151
+ <th scope="col" class="manage-column form-slug"><?php _e("Destination Email", 'custom-contact-forms'); ?></th>
1152
+ <th scope="col" class="manage-column form-title"><?php _e("Title", 'custom-contact-forms'); ?></th>
1153
+ <th scope="col" class="manage-column form-button"><?php _e("Button Text", 'custom-contact-forms'); ?></th>
1154
+ <th scope="col" class="manage-column form-style"><?php _e("Style", 'custom-contact-forms'); ?></th>
1155
+ <th scope="col" class="manage-column form-expand"></th>
1156
+ </tr>
1157
+ </tr>
1158
+
1159
+ </tfoot>
1160
+ </table>
1161
+ <select class="bulk-dropdown" name="object_bulk_action">
1162
+ <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
1163
+ <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
1164
+ <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option></select>
1165
+ <input type="submit" name="object_bulk_apply" class="bulk-apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
1166
+ </form>
1167
+
1168
+ <a name="create-styles"></a>
1169
+ <div id="create-styles" class="postbox">
1170
+ <h3 class="hndle"><span>
1171
+ <?php _e("Create A Style for Your Forms", 'custom-contact-forms'); ?>
1172
+ </span></h3>
1173
+ <div class="inside">
1174
+ <p>
1175
+ <?php _e("Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values.", 'custom-contact-forms'); ?>
1176
+ </p>
1177
+ <form id="ccf-create-style" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1178
+ <ul class="style_left">
1179
+ <li>
1180
+ <label for="style_slug">*
1181
+ <?php _e("Style Slug:", 'custom-contact-forms'); ?>
1182
+ </label>
1183
+ <input type="text" maxlength="30" class="ccf-width75" name="object[style_slug]" />
1184
+ <?php _e("(Must be unique)", 'custom-contact-forms'); ?>
1185
+ </li>
1186
+ <li>
1187
+ <label for="title_fontsize">
1188
+ <?php _e("Title Font Size:", 'custom-contact-forms'); ?>
1189
+ </label>
1190
+ <input type="text" maxlength="20" value="1.2em" class="ccf-width75" name="object[title_fontsize]" />
1191
+ <?php _e("(ex: 10pt, 10px, 1em)", 'custom-contact-forms'); ?>
1192
+ </li>
1193
+ <li>
1194
+ <label for="title_fontcolor">
1195
+ <?php _e("Title Font Color:", 'custom-contact-forms'); ?>
1196
+ </label>
1197
+ <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[title_fontcolor]" />
1198
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1199
+ </li>
1200
+ <li>
1201
+ <label for="label_width">
1202
+ <?php _e("Label Width:", 'custom-contact-forms'); ?>
1203
+ </label>
1204
+ <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[label_width]" />
1205
+ <?php _e("(ex: 100px or 20%)", 'custom-contact-forms'); ?>
1206
+ </li>
1207
+ <li>
1208
+ <label for="label_fontsize">
1209
+ <?php _e("Label Font Size:", 'custom-contact-forms'); ?>
1210
+ </label>
1211
+ <input type="text" maxlength="20" value="1em" class="ccf-width75" name="object[label_fontsize]" />
1212
+ <?php _e("(ex: 10px, 10pt, 1em)", 'custom-contact-forms'); ?>
1213
+ </li>
1214
+ <li>
1215
+ <label for="label_fontcolor">
1216
+ <?php _e("Label Font Color:", 'custom-contact-forms'); ?>
1217
+ </label>
1218
+ <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[label_fontcolor]" />
1219
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1220
+ </li>
1221
+ <li>
1222
+ <label for="input_width">
1223
+ <?php _e("Text Field Width:", 'custom-contact-forms'); ?>
1224
+ </label>
1225
+ <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[input_width]" />
1226
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1227
+ </li>
1228
+ <li>
1229
+ <label for="textarea_width">
1230
+ <?php _e("Textarea Field Width:", 'custom-contact-forms'); ?>
1231
+ </label>
1232
+ <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[textarea_width]" />
1233
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1234
+ </li>
1235
+ <li>
1236
+ <label for="textarea_height">
1237
+ <?php _e("Textarea Field Height:", 'custom-contact-forms'); ?>
1238
+ </label>
1239
+ <input type="text" maxlength="20" value="90px" class="ccf-width75" name="object[textarea_height]" />
1240
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1241
+ </li>
1242
+ <li>
1243
+ <label for="field_fontsize">
1244
+ <?php _e("Field Font Size:", 'custom-contact-forms'); ?>
1245
+ </label>
1246
+ <input type="text" maxlength="20" value="1.3em" class="ccf-width75" name="object[field_fontsize]" />
1247
+ <?php _e("(ex: 10px, 10pt, 1em", 'custom-contact-forms'); ?>
1248
+ </li>
1249
+ <li>
1250
+ <label for="field_fontcolor">
1251
+ <?php _e("Field Font Color:", 'custom-contact-forms'); ?>
1252
+ </label>
1253
+ <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[field_fontcolor]" />
1254
+ <?php _e("(ex: 333333)", 'custom-contact-forms'); ?>
1255
+ </li>
1256
+ <li>
1257
+ <label for="field_borderstyle">
1258
+ <?php _e("Field Border Style:", 'custom-contact-forms'); ?>
1259
+ </label>
1260
+ <select class="ccf-width75" name="object[field_borderstyle]">
1261
+ <?php echo str_replace('<option>solid</option>', '<option selected="selected">solid</option>', $border_style_options); ?>
1262
+ </select>
1263
+ </li>
1264
+ <li>
1265
+ <label for="form_margin">
1266
+ <?php _e("Form Margin:", 'custom-contact-forms'); ?>
1267
+ </label>
1268
+ <input type="text" maxlength="20" value="7px" class="ccf-width75" name="object[form_margin]" />
1269
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1270
+ </li>
1271
+ <li>
1272
+ <label for="label_margin">
1273
+ <?php _e("Label Margin:", 'custom-contact-forms'); ?>
1274
+ </label>
1275
+ <input type="text" maxlength="20" value="5px" class="ccf-width75" name="object[label_margin]" />
1276
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1277
+ </li>
1278
+ <li>
1279
+ <label for="textarea_backgroundcolor">
1280
+ <?php _e("Textarea Background Color:", 'custom-contact-forms'); ?>
1281
+ </label>
1282
+ <input type="text" maxlength="20" value="f5f5f5" class="ccf-width75 colorfield" name="object[textarea_backgroundcolor]" />
1283
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1284
+ </li>
1285
+ <li>
1286
+ <label for="success_popover_fontcolor">
1287
+ <?php _e("Success Popover Font Color:", 'custom-contact-forms'); ?>
1288
+ </label>
1289
+ <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[success_popover_fontcolor]" />
1290
+ <?php _e("(ex: 333333)", 'custom-contact-forms'); ?>
1291
+ </li>
1292
+ <li>
1293
+ <label for="success_popover_title_fontsize">
1294
+ <?php _e("Success Popover Title Font Size:", 'custom-contact-forms'); ?>
1295
+ </label>
1296
+ <input type="text" maxlength="20" value="15px" class="ccf-width75" name="object[success_popover_title_fontsize]" />
1297
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1298
+ </li>
1299
+ <li>
1300
+ <label for="form_backgroundcolor">
1301
+ <?php _e("Form Background Color:", 'custom-contact-forms'); ?>
1302
+ </label>
1303
+ <input type="text" maxlength="20" value="ffffff" class="ccf-width75 colorfield" name="object[form_backgroundcolor]" />
1304
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1305
+ </li>
1306
+ <li>
1307
+ <label for="tooltip_backgroundcolor">
1308
+ <?php _e("Tooltip Background Color:", 'custom-contact-forms'); ?>
1309
+ </label>
1310
+ <input type="text" maxlength="20" value="000000" class="ccf-width75 colorfield" name="object[tooltip_backgroundcolor]" />
1311
+ <?php _e("(ex: 000000 or black)", 'custom-contact-forms'); ?>
1312
+ </li>
1313
+ </ul>
1314
+ <ul class="style_right">
1315
+ <li>
1316
+ <label for="input_width">
1317
+ <?php _e("Field Border Color:", 'custom-contact-forms'); ?>
1318
+ </label>
1319
+ <input type="text" maxlength="20" value="999999" class="ccf-width75 colorfield" name="object[field_bordercolor]" />
1320
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?>
1321
+ </li>
1322
+ <li>
1323
+ <label for="form_borderstyle">
1324
+ <?php _e("Form Border Style:", 'custom-contact-forms'); ?>
1325
+ </label>
1326
+ <select class="ccf-width75" name="object[form_borderstyle]">
1327
+ <?php echo $border_style_options; ?>
1328
+ </select>
1329
+ </li>
1330
+ <li>
1331
+ <label for="form_bordercolor">
1332
+ <?php _e("Form Border Color:", 'custom-contact-forms'); ?>
1333
+ </label>
1334
+ <input type="text" maxlength="20" value="ffffff" class="ccf-width75 colorfield" name="object[form_bordercolor]" />
1335
+ <?php _e("(ex: 000000)", 'custom-contact-forms'); ?>
1336
+ </li>
1337
+ <li>
1338
+ <label for="form_borderwidth">
1339
+ <?php _e("Form Border Width:", 'custom-contact-forms'); ?>
1340
+ </label>
1341
+ <input type="text" maxlength="20" value="0px" class="ccf-width75" name="object[form_borderwidth]" />
1342
+ <?php _e("(ex: 1px)", 'custom-contact-forms'); ?>
1343
+ </li>
1344
+ <li>
1345
+ <label for="form_borderwidth">
1346
+ <?php _e("Form Width:", 'custom-contact-forms'); ?>
1347
+ </label>
1348
+ <input type="text" maxlength="20" value="100%" class="ccf-width75" name="object[form_width]" />
1349
+ <?php _e("(ex: 100px or 50%)", 'custom-contact-forms'); ?>
1350
+ </li>
1351
+ <li>
1352
+ <label for="form_borderwidth">
1353
+ <?php _e("Form Font Family:", 'custom-contact-forms'); ?>
1354
+ </label>
1355
+ <input type="text" maxlength="120" value="Verdana, tahoma, arial" class="ccf-width75" name="object[form_fontfamily]" />
1356
+ <?php _e("(ex: Verdana, Tahoma, Arial)", 'custom-contact-forms'); ?>
1357
+ </li>
1358
+ <li>
1359
+ <label for="submit_width">
1360
+ <?php _e("Button Width:", 'custom-contact-forms'); ?>
1361
+ </label>
1362
+ <input type="text" maxlength="20" value="auto" class="ccf-width75" name="object[submit_width]" />
1363
+ <?php _e("(ex: 100px, 30%, auto)", 'custom-contact-forms'); ?>
1364
+ </li>
1365
+ <li>
1366
+ <label for="submit_height">
1367
+ <?php _e("Button Height:", 'custom-contact-forms'); ?>
1368
+ </label>
1369
+ <input type="text" maxlength="20" value="30px" class="ccf-width75" name="object[submit_height]" />
1370
+ <?php _e("(ex: 100px or 30%)", 'custom-contact-forms'); ?>
1371
+ </li>
1372
+ <li>
1373
+ <label for="submit_fontsize">
1374
+ <?php _e("Button Font Size:", 'custom-contact-forms'); ?>
1375
+ </label>
1376
+ <input type="text" maxlength="20" value="1.1em" class="ccf-width75" name="object[submit_fontsize]" />
1377
+ <?php _e("(ex: 10px, 10pt, 1em)", 'custom-contact-forms'); ?>
1378
+ </li>
1379
+ <li>
1380
+ <label for="submit_fontcolor">
1381
+ <?php _e("Button Font Color:", 'custom-contact-forms'); ?>
1382
+ </label>
1383
+ <input type="text" maxlength="20" value="333333" class="ccf-width75 colorfield" name="object[submit_fontcolor]" />
1384
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1385
+ </li>
1386
+ <li>
1387
+ <label for="field_backgroundcolor">
1388
+ <?php _e("Field Background Color:", 'custom-contact-forms'); ?>
1389
+ </label>
1390
+ <input type="text" maxlength="20" value="f5f5f5" class="ccf-width75 colorfield" name="object[field_backgroundcolor]" />
1391
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1392
+ </li>
1393
+ <li>
1394
+ <label for="form_padding">
1395
+ <?php _e("Form Padding:", 'custom-contact-forms'); ?>
1396
+ </label>
1397
+ <input type="text" maxlength="20" value="8px" class="ccf-width75" name="object[form_padding]" />
1398
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1399
+ </li>
1400
+ <li>
1401
+ <label for="title_margin">
1402
+ <?php _e("Title Margin:", 'custom-contact-forms'); ?>
1403
+ </label>
1404
+ <input type="text" maxlength="20" value="5px" class="ccf-width75" name="object[title_margin]" />
1405
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?>
1406
+ </li>
1407
+ <li>
1408
+ <label for="title_margin">
1409
+ <?php _e("Dropdown Width:", 'custom-contact-forms'); ?>
1410
+ </label>
1411
+ <input type="text" maxlength="20" value="auto" class="ccf-width75" name="object[dropdown_width]" />
1412
+ <?php _e("(ex: 30px, 20%, or auto)", 'custom-contact-forms'); ?>
1413
+ </li>
1414
+ <li>
1415
+ <label for="success_popover_bordercolor">
1416
+ <?php _e("Success Popover Border Color:", 'custom-contact-forms'); ?>
1417
+ </label>
1418
+ <input type="text" maxlength="20" value="efefef" class="ccf-width75 colorfield" name="object[success_popover_bordercolor]" />
1419
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?>
1420
+ </li>
1421
+ <li>
1422
+ <label for="success_popover_fontsize">
1423
+ <?php _e("Success Popover Font Size:", 'custom-contact-forms'); ?>
1424
+ </label>
1425
+ <input type="text" maxlength="20" value="12px" class="ccf-width75" name="object[success_popover_fontsize]" />
1426
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1427
+ </li>
1428
+ <li>
1429
+ <label for="success_popover_height">
1430
+ <?php _e("Success Popover Height:", 'custom-contact-forms'); ?>
1431
+ </label>
1432
+ <input type="text" maxlength="20" value="200px" class="ccf-width75" name="object[success_popover_height]" />
1433
+ <?php _e("(ex: 200px, 6em, 50%)", 'custom-contact-forms'); ?>
1434
+ </li>
1435
+ <li>
1436
+ <label for="field_borderround">
1437
+ <?php _e("Field Border Roundness:", 'custom-contact-forms'); ?>
1438
+ </label>
1439
+ <input type="text" maxlength="20" value="6px" class="ccf-width75" name="object[field_borderround]" />
1440
+ <?php _e("(ex: 6px, or 0px)", 'custom-contact-forms'); ?>
1441
+ </li>
1442
+ <li>
1443
+ <label for="tooltip_fontsize">
1444
+ <?php _e("Tooltip", 'custom-contact-forms'); ?>
1445
+ <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a>
1446
+ <?php _e("Font Size:", 'custom-contact-forms'); ?>
1447
+ </label>
1448
+ <input type="text" maxlength="20" value="12px" class="ccf-width75" name="object[tooltip_fontsize]" />
1449
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?>
1450
+ </li>
1451
+ <li>
1452
+ <label for="tooltip_fontcolor">
1453
+ <?php _e("Tooltip Font Color:", 'custom-contact-forms'); ?>
1454
+ </label>
1455
+ <input type="text" maxlength="20" value="ffffff" class="ccf-width75 colorfield" name="object[tooltip_fontcolor]" />
1456
+ <?php _e("(ex: ffffff or white)", 'custom-contact-forms'); ?>
1457
+ </li>
1458
+ <li>
1459
+ <input name="object_type" type="hidden" value="style" />
1460
+ <input type="submit" value="<?php _e("Create Style", 'custom-contact-forms'); ?>" name="object_create" class="create-button" />
1461
+ </li>
1462
+ </ul>
1463
+ </form>
1464
+ </div>
1465
+ </div>
1466
+ <a name="manage-styles"></a>
1467
+ <h3 class="manage-h3">
1468
+ <?php _e("Manage Form Styles", 'custom-contact-forms'); ?>
1469
+ </h3>
1470
+ <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1471
+ <table class="widefat post" id="manage-styles" cellspacing="0">
1472
+ <thead>
1473
+ <tr>
1474
+ <th scope="col" class="manage-column"><input type="checkbox" class="checkall" /></th>
1475
+ <th scope="col" class="manage-column"></th>
1476
+ <th scope="col" class="manage-column"></th>
1477
+ <th scope="col" class="manage-column"></th>
1478
+ <th scope="col" class="manage-column"></th>
1479
+ <th scope="col" class="manage-column"></th>
1480
+ </tr>
1481
+ </thead>
1482
+ <tbody>
1483
+ <?php
1484
+ $styles = parent::selectAllStyles();
1485
+ $i = 0;
1486
+ foreach ($styles as $style) {
1487
+ ?>
1488
+ <tr class="row-style-<?php echo $style->id; ?> <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1489
+ <td> <label><input type="checkbox" class="object-check" value="1" name="objects[<?php echo $i; ?>][object_do]" />
1490
+ * <?php _e("Slug:", 'custom-contact-forms'); ?>
1491
+ </label>
1492
+ <input type="text" maxlength="30" value="<?php echo $style->style_slug; ?>" name="objects[<?php echo $i; ?>][values][style_slug]" />
1493
+ <br />
1494
+ <label>
1495
+ <?php _e("Font Family:", 'custom-contact-forms'); ?>
1496
+ </label>
1497
+ <input type="text" maxlength="120" value="<?php echo $style->form_fontfamily; ?>" name="objects[<?php echo $i; ?>][values][form_fontfamily]" />
1498
+ <br />
1499
+ <label>
1500
+ <?php _e("Textarea Background", 'custom-contact-forms'); ?>
1501
+ <br />
1502
+ <?php _e("Color:", 'custom-contact-forms'); ?>
1503
+ </label>
1504
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->textarea_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][textarea_backgroundcolor]" />
1505
+ <br />
1506
+ <label>
1507
+ <?php _e("Success Popover", 'custom-contact-forms'); ?>
1508
+ <br />
1509
+ <?php _e("Border Color:", 'custom-contact-forms'); ?>
1510
+ </label>
1511
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_bordercolor; ?>" name="objects[<?php echo $i; ?>][values][success_popover_bordercolor]" />
1512
+ <br />
1513
+ <label>
1514
+ <?php _e("Tooltip", 'custom-contact-forms'); ?>
1515
+ <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a>
1516
+ <?php _e("Font Color:", 'custom-contact-forms'); ?>
1517
+ </label>
1518
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->tooltip_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][tooltip_fontcolor]" />
1519
+ </td>
1520
+ <td><label>
1521
+ <?php _e("Form Width:", 'custom-contact-forms'); ?>
1522
+ </label>
1523
+ <input type="text" maxlength="20" value="<?php echo $style->form_width; ?>" name="objects[<?php echo $i; ?>][values][form_width]" />
1524
+ <br />
1525
+ <label>
1526
+ <?php _e("Text Field Width:", 'custom-contact-forms'); ?>
1527
+ </label>
1528
+ <input type="text" maxlength="20" value="<?php echo $style->input_width; ?>" name="objects[<?php echo $i; ?>][values][input_width]" />
1529
+ <br />
1530
+ <label>
1531
+ <?php _e("Textarea Width:", 'custom-contact-forms'); ?>
1532
+ </label>
1533
+ <input type="text" maxlength="20" value="<?php echo $style->textarea_width; ?>" name="objects[<?php echo $i; ?>][values][textarea_width]" />
1534
+ <br />
1535
+ <label>
1536
+ <?php _e("Textarea Height:", 'custom-contact-forms'); ?>
1537
+ </label>
1538
+ <input type="text" maxlength="20" value="<?php echo $style->textarea_height; ?>" name="objects[<?php echo $i; ?>][values][textarea_height]" />
1539
+ <br />
1540
+ <label>
1541
+ <?php _e("Dropdown Width:", 'custom-contact-forms'); ?>
1542
+ </label>
1543
+ <input type="text" maxlength="20" value="<?php echo $style->dropdown_width; ?>" name="objects[<?php echo $i; ?>][values][dropdown_width]" />
1544
+ <br />
1545
+ <label>
1546
+ <?php _e("Label Margin:", 'custom-contact-forms'); ?>
1547
+ </label>
1548
+ <input type="text" maxlength="20" value="<?php echo $style->label_margin; ?>" name="objects[<?php echo $i; ?>][values][label_margin]" />
1549
+ <br />
1550
+ <label>
1551
+ <?php _e("Success Popover", 'custom-contact-forms'); ?>
1552
+ <br />
1553
+ <?php _e("Height:", 'custom-contact-forms'); ?>
1554
+ </label>
1555
+ <input type="text" maxlength="20" value="<?php echo $style->success_popover_height; ?>" name="objects[<?php echo $i; ?>][values][success_popover_height]" />
1556
+ <br />
1557
+ </td>
1558
+ <td><label>
1559
+ <?php _e("Label Width:", 'custom-contact-forms'); ?>
1560
+ </label>
1561
+ <input type="text" maxlength="20" value="<?php echo $style->label_width; ?>" name="objects[<?php echo $i; ?>][values][label_width]" />
1562
+ <br />
1563
+ <label>
1564
+ <?php _e("Button Width:", 'custom-contact-forms'); ?>
1565
+ </label>
1566
+ <input type="text" maxlength="20" value="<?php echo $style->submit_width; ?>" name="objects[<?php echo $i; ?>][values][submit_width]" />
1567
+ <br />
1568
+ <label>
1569
+ <?php _e("Button Height:", 'custom-contact-forms'); ?>
1570
+ </label>
1571
+ <input type="text" maxlength="20" value="<?php echo $style->submit_height; ?>" name="objects[<?php echo $i; ?>][values][submit_height]" />
1572
+ <br />
1573
+ <label>
1574
+ <?php _e("Field Background Color:", 'custom-contact-forms'); ?>
1575
+ </label>
1576
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][field_backgroundcolor]" />
1577
+ <br />
1578
+ <label>
1579
+ <?php _e("Title Margin:", 'custom-contact-forms'); ?>
1580
+ </label>
1581
+ <input type="text" maxlength="20" value="<?php echo $style->title_margin; ?>" name="objects[<?php echo $i; ?>][values][title_margin]" />
1582
+ <br />
1583
+ <label>
1584
+ <?php _e("Success Popover", 'custom-contact-forms'); ?>
1585
+ <br />
1586
+ <?php _e("Title Font Size:", 'custom-contact-forms'); ?>
1587
+ </label>
1588
+ <input type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontsize; ?>" name="objects[<?php echo $i; ?>][values][success_popover_title_fontsize]" />
1589
+ <label>
1590
+ <?php _e("Form Background Color:", 'custom-contact-forms'); ?>
1591
+ </label>
1592
+ <input type="text" class="colorfield" maxlength="20" value="<?php echo $style->form_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][form_backgroundcolor]" />
1593
+ </td>
1594
+ <td><label>
1595
+ <?php _e("Title Font Size:", 'custom-contact-forms'); ?>
1596
+ </label>
1597
+ <input type="text" maxlength="20" value="<?php echo $style->title_fontsize; ?>" name="objects[<?php echo $i; ?>][values][title_fontsize]" />
1598
+ <br />
1599
+ <label>
1600
+ <?php _e("Label Font Size:", 'custom-contact-forms'); ?>
1601
+ </label>
1602
+ <input type="text" maxlength="20" value="<?php echo $style->label_fontsize; ?>" name="objects[<?php echo $i; ?>][values][label_fontsize]" />
1603
+ <br />
1604
+ <label>
1605
+ <?php _e("Field Font Size:", 'custom-contact-forms'); ?>
1606
+ </label>
1607
+ <input type="text" maxlength="20" value="<?php echo $style->field_fontsize; ?>" name="objects[<?php echo $i; ?>][values][field_fontsize]" />
1608
+ <br />
1609
+ <label>
1610
+ <?php _e("Button Font Size:", 'custom-contact-forms'); ?>
1611
+ </label>
1612
+ <input type="text" maxlength="20" value="<?php echo $style->submit_fontsize; ?>" name="objects[<?php echo $i; ?>][values][submit_fontsize]" />
1613
+ <br />
1614
+ <label>
1615
+ <?php _e("Form Padding:", 'custom-contact-forms'); ?>
1616
+ </label>
1617
+ <input type="text" maxlength="20" value="<?php echo $style->form_padding; ?>" name="objects[<?php echo $i; ?>][values][form_padding]" />
1618
+ <br />
1619
+ <label>
1620
+ <?php _e("Success Popover", 'custom-contact-forms'); ?>
1621
+ <br />
1622
+ <?php _e("Font Size:", 'custom-contact-forms'); ?>
1623
+ </label>
1624
+ <input type="text" maxlength="20" value="<?php echo $style->success_popover_fontsize; ?>" name="objects[<?php echo $i; ?>][values][success_popover_fontsize]" />
1625
+ <br />
1626
+ <label>
1627
+ <?php _e("Tooltip", 'custom-contact-forms'); ?>
1628
+ <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a>
1629
+ <?php _e("Background Color:", 'custom-contact-forms'); ?>
1630
+ </label>
1631
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->tooltip_backgroundcolor; ?>" name="objects[<?php echo $i; ?>][values][tooltip_backgroundcolor]" />
1632
+ </td>
1633
+ <td><label>
1634
+ <?php _e("Title Font Color:", 'custom-contact-forms'); ?>
1635
+ </label>
1636
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->title_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][title_fontcolor]" />
1637
+ <br />
1638
+ <label>
1639
+ <?php _e("Label Font Color:", 'custom-contact-forms'); ?>
1640
+ </label>
1641
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->label_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][label_fontcolor]" />
1642
+ <br />
1643
+ <label>
1644
+ <?php _e("Field Font Color:", 'custom-contact-forms'); ?>
1645
+ </label>
1646
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][field_fontcolor]" />
1647
+ <br />
1648
+ <label>
1649
+ <?php _e("Button Font Color:", 'custom-contact-forms'); ?>
1650
+ </label>
1651
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->submit_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][submit_fontcolor]" />
1652
+ <br />
1653
+ <label>
1654
+ <?php _e("Form Margin:", 'custom-contact-forms'); ?>
1655
+ </label>
1656
+ <input type="text" maxlength="20" value="<?php echo $style->form_margin; ?>" name="objects[<?php echo $i; ?>][values][form_margin]" />
1657
+ <br />
1658
+ <label>
1659
+ <?php _e("Success Popover", 'custom-contact-forms'); ?>
1660
+ <br />
1661
+ <?php _e("Font Color:", 'custom-contact-forms'); ?>
1662
+ </label>
1663
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][success_popover_fontcolor]" />
1664
+ <br />
1665
+ <label>
1666
+ <?php _e("Tooltip Font Size:", 'custom-contact-forms'); ?>
1667
+ </label>
1668
+ <input type="text" maxlength="20" value="<?php echo $style->tooltip_fontsize; ?>" name="objects[<?php echo $i; ?>][values][tooltip_fontsize]" />
1669
+ </td>
1670
+ <td><label>
1671
+ <?php _e("Form Border Style:", 'custom-contact-forms'); ?>
1672
+ </label>
1673
+ <select name="object[form_borderstyle]">
1674
+ <?php echo str_replace('<option>'.$style->form_borderstyle.'</option>', '<option selected="selected">'.$style->form_borderstyle.'</option>', $border_style_options); ?>
1675
+ </select>
1676
+ <br />
1677
+ <label>
1678
+ <?php _e("Form Border Width:", 'custom-contact-forms'); ?>
1679
+ </label>
1680
+ <input type="text" maxlength="20" value="<?php echo $style->form_borderwidth; ?>" name="objects[<?php echo $i; ?>][values][form_borderwidth]" />
1681
+ <br />
1682
+ <label>
1683
+ <?php _e("Form Border Color:", 'custom-contact-forms'); ?>
1684
+ </label>
1685
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->form_bordercolor; ?>" name="objects[<?php echo $i; ?>][values][form_bordercolor]" />
1686
+ <br />
1687
+ <label>
1688
+ <?php _e("Field Border Color:", 'custom-contact-forms'); ?>
1689
+ </label>
1690
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_bordercolor; ?>" name="objects[<?php echo $i; ?>][values][field_bordercolor]" />
1691
+ <br />
1692
+ <label>
1693
+ <?php _e("Field Border Style:", 'custom-contact-forms'); ?>
1694
+ </label>
1695
+ <select name="objects[<?php echo $i; ?>][values][field_borderstyle]">
1696
+ <?php echo str_replace('<option>'.$style->field_borderstyle.'</option>', '<option selected="selected">'.$style->field_borderstyle.'</option>', $border_style_options); ?>
1697
+ </select>
1698
+ <br />
1699
+ <label>
1700
+ <?php _e("Success Popover", 'custom-contact-forms'); ?>
1701
+ <br />
1702
+ <?php _e("Title Font Color:", 'custom-contact-forms'); ?>
1703
+ </label>
1704
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontcolor; ?>" name="objects[<?php echo $i; ?>][values][success_popover_title_fontcolor]" />
1705
+ <br />
1706
+ <label>
1707
+ <?php _e("Field Border Roundness:", 'custom-contact-forms'); ?>
1708
+ </label>
1709
+ <input name="objects[<?php echo $i; ?>][values][field_borderround]" value="<?php echo $style->field_borderround; ?>" type="text" maxlength="20" />
1710
+ <br />
1711
+ <input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="style" />
1712
+ <input class="object-id" name="objects[<?php echo $i; ?>][object_id]" type="hidden" value="<?php echo $style->id; ?>" />
1713
+ </td>
1714
+ </tr>
1715
+ <?php
1716
+ $i++;
1717
+ }
1718
+ ?>
1719
+ </tbody>
1720
+ <tfoot>
1721
+ <tr>
1722
+ <th scope="col" class="manage-column"><input type="checkbox" class="checkall" /></th>
1723
+ <th scope="col" class="manage-column"></th>
1724
+ <th scope="col" class="manage-column"></th>
1725
+ <th scope="col" class="manage-column"></th>
1726
+ <th scope="col" class="manage-column"></th>
1727
+ <th scope="col" class="manage-column"></th>
1728
+ </tr>
1729
+ </tfoot>
1730
+ </table>
1731
+ <select class="bulk-dropdown" name="object_bulk_action">
1732
+ <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
1733
+ <option value="edit"><?php _e('Save', 'custom-contact-forms'); ?></option>
1734
+ <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option></select>
1735
+ <input type="submit" name="object_bulk_apply" class="bulk-apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" width="16" height="16" class="loading-img" />
1736
+ </form>
1737
+ <a name="contact-author"></a>
1738
+ <div id="contact-author" class="postbox">
1739
+ <h3 class="hndle"><span>
1740
+ <?php _e("Report a Bug/Suggest a Feature", 'custom-contact-forms'); ?>
1741
+ </span></h3>
1742
+ <div class="inside">
1743
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1744
+ <ul>
1745
+ <li>
1746
+ <label for="name">
1747
+ <?php _e("Your Name:", 'custom-contact-forms'); ?>
1748
+ </label>
1749
+ <input id="name" type="text" name="name" maxlength="100" />
1750
+ </li>
1751
+ <li>
1752
+ <label for="email">
1753
+ <?php _e("Your Email:", 'custom-contact-forms'); ?>
1754
+ </label>
1755
+ <input id="email" type="text" value="<?php echo get_option('admin_email'); ?>" name="email" maxlength="100" />
1756
+ </li>
1757
+ <li>
1758
+ <label for="host">
1759
+ <?php _e("Who Hosts Your Website?", 'custom-contact-forms'); ?>
1760
+ </label>
1761
+ <input id="host" type="text" name="host" maxlength="150" />
1762
+ </li>
1763
+ <li>
1764
+ <label for="message">*
1765
+ <?php _e("Your Message:", 'custom-contact-forms'); ?>
1766
+ </label>
1767
+ <textarea id="message" name="message"></textarea>
1768
+ </li>
1769
+ <li>
1770
+ <label for="type">*
1771
+ <?php _e("Purpose of this message:", 'custom-contact-forms'); ?>
1772
+ </label>
1773
+ <select id="type" name="type">
1774
+ <option>
1775
+ <?php _e("Bug Report", 'custom-contact-forms'); ?>
1776
+ </option>
1777
+ <option>
1778
+ <?php _e("Suggest a Feature", 'custom-contact-forms'); ?>
1779
+ </option>
1780
+ <option>
1781
+ <?php _e("Plugin Question", 'custom-contact-forms'); ?>
1782
+ </option>
1783
+ </select>
1784
+ </li>
1785
+ <li>
1786
+ <label for="ccf-version">
1787
+ <?php _e("Version of Custom Contact Forms?", 'custom-contact-forms'); ?>
1788
+ </label>
1789
+ <input id="ccf-version" type="text" name="ccf-version" maxlength="50" />
1790
+ </li>
1791
+ <li>
1792
+ <label for="wp-version">
1793
+ <?php _e("Version of WordPress?", 'custom-contact-forms'); ?>
1794
+ </label>
1795
+ <input id="wp-version" type="text" name="wp-version" maxlength="50" />
1796
+ </li>
1797
+ </ul>
1798
+ <p>
1799
+ <input type="submit" name="contact_author" value="<?php _e("Send Message", 'custom-contact-forms'); ?>" />
1800
+ </p>
1801
+ </form>
1802
+ </div>
1803
+ </div>
1804
+ <a name="custom-html"></a>
1805
+ <div id="custom-html" class="postbox">
1806
+ <h3 class="hndle"><span>
1807
+ <?php _e("Custom HTML Forms (Advanced)", 'custom-contact-forms'); ?>
1808
+ </span></h3>
1809
+ <div class="inside">
1810
+ <p>
1811
+ <?php _e("If you know HTML and simply want to use this plugin to process form requests, this feature is for you.
1812
+ The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a
1813
+ hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately.", 'custom-contact-forms'); ?>
1814
+ </p>
1815
+ <textarea id="custom_html_textarea">
1816
+ &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
1817
+ &lt;input type=&quot;hidden&quot; name=&quot;ccf_customhtml&quot; value=&quot;1&quot; /&gt;
1818
+ &lt;input type=&quot;hidden&quot; name=&quot;success_message&quot; value=&quot;<?php _e("Thank you for filling out our form!", 'custom-contact-forms'); ?>&quot; /&gt;
1819
+ &lt;input type=&quot;hidden&quot; name=&quot;thank_you_page&quot; value=&quot;http://www.google.com&quot; /&gt;
1820
+ &lt;input type=&quot;hidden&quot; name=&quot;destination_email&quot; value=&quot;<?php echo $admin_options['default_to_email']; ?>&quot; /&gt;
1821
+ &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;field_name1, field_name2&quot; /&gt;
1822
+
1823
+ &lt;!-- <?php _e("Paste all this code into a page or post and edit it to your liking. It is recommended you only use this feature if you are experienced with HTML. The destination_email
1824
+ field specifies where emails will be sent on successful submission; you can have the form send to multiple addresses by separating email's with semi-colons (i.e. email@google.com; email2@google.com).
1825
+ The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force
1826
+ the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate
1827
+ the field names you want required by commas. Remember to use underscores instead of spaces in field names!", 'custom-contact-forms'); ?> --&gt;
1828
+
1829
+ &lt;/form&gt;</textarea>
1830
+ </div>
1831
+ </div>
1832
+ <?php $this->insertUsagePopover(); ?>
1833
+ <?php $this->insertQuickStartPopover(); ?>
1834
+ </div>
1835
+ <?php
1836
+ }
1837
+
1838
+ function printFormSubmissionsPage() {
1839
+ $this->handleAdminPostRequests();
1840
+ if ($admin_options['show_install_popover'] == 1) {
1841
+ $admin_options['show_install_popover'] = 0;
1842
+ ?>
1843
+ <script type="text/javascript" language="javascript">
1844
+ $j(document).ready(function() {
1845
+ showCCFUsagePopover();
1846
+ });
1847
+ </script>
1848
+ <?php
1849
+ update_option(parent::getAdminOptionsName(), $admin_options);
1850
+ } /*if ($_POST['form_submission_delete']) {
1851
+ if (parent::deleteUserData($_POST['uid']) != false)
1852
+ $this->action_complete = __('A form submission has be successfully deleted!', 'custom-contact-forms');
1853
+ }*/
1854
+ ccf_utils::load_module('export/custom-contact-forms-user-data.php');
1855
+ $user_data_array = parent::selectAllUserData();
1856
+ ?>
1857
+ <div id="customcontactforms-admin">
1858
+ <div class="plugin-header">
1859
+ <h2>
1860
+ <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
1861
+ </h2>
1862
+ <input type="button" class="usage-popover-button" value="<?php _e("Plugin Usage Manual", 'custom-contact-forms'); ?>" />
1863
+ </div>
1864
+ <a class="genesis" href="http://www.shareasale.com/r.cfm?b=241369&u=481196&m=28169&urllink=&afftrack=">Custom Contact Forms works best with any of the 20+ <span>Genesis</span> Wordpress child themes. The <span>Genesis Framework</span> empowers you to quickly and easily build incredible websites with WordPress.</a>
1865
+
1866
+ <form class="blog-horizontal-form" method="post" action="http://www.aweber.com/scripts/addlead.pl">
1867
+ <input type="hidden" name="meta_web_form_id" value="1578604781" />
1868
+ <input type="hidden" name="meta_split_id" value="" />
1869
+ <input type="hidden" name="listname" value="ccf-plugin" />
1870
+ <input type="hidden" name="redirect" value="http://www.taylorlovett.com/wordpress-plugins/tutorials-offers-tips/" id="redirect_5832e41084448adb07da67a35dc83c27" />
1871
+ <input type="hidden" name="meta_adtracking" value="CCF_-_Wordpress_Plugins_Horizontal" />
1872
+ <input type="hidden" name="meta_message" value="1" />
1873
+ <input type="hidden" name="meta_required" value="name,email" />
1874
+ <span>WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials</span>
1875
+ <input type="text" name="name" value="Your Name" onclick="value=''" />
1876
+ <input type="text" name="email" value="Your Email" onclick="value=''" />
1877
+ <input type="submit" value="Sign Up for Free" />
1878
+ </form>
1879
+ <?php if (!empty($this->action_complete)) { ?>
1880
+ <div class="action-complete">
1881
+ <?php echo $this->action_complete; ?>
1882
+ </div>
1883
+ <?php } ?>
1884
+ <h3 class="hndle"><span>
1885
+ <?php _e("Saved Form Submissions", 'custom-contact-forms'); ?>
1886
+ </span></h3>
1887
+ <form class="ccf-edit-ajax" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1888
+ <table class="widefat post" id="form-submissions-table" cellspacing="0">
1889
+ <thead>
1890
+ <tr>
1891
+ <th scope="col" class="manage-column ccf-width25"><input type="checkbox" class="checkall" /></th>
1892
+ <th scope="col" class="manage-column ccf-width250"><?php _e("Date Submitted", 'custom-contact-forms'); ?></th>
1893
+ <th scope="col" class="manage-column ccf-width150"><?php _e("Form Submitted", 'custom-contact-forms'); ?></th>
1894
+ <th scope="col" class="manage-column ccf-width250"><?php _e("Form Page", 'custom-contact-forms'); ?></th>
1895
+ <th scope="col" class="manage-column "></th>
1896
+ </tr>
1897
+ </thead>
1898
+ <tbody>
1899
+ <?php
1900
+ $i = 0;
1901
+ foreach ($user_data_array as $data_object) {
1902
+ $data = new CustomContactFormsUserData(array('form_id' => $data_object->data_formid, 'data_time' => $data_object->data_time, 'form_page' => $data_object->data_formpage, 'encoded_data' => $data_object->data_value));
1903
+ ?>
1904
+ <tr class="row-form_submission-<?php echo $data_object->id; ?> submission-top <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1905
+ <td><input type="checkbox" class="object-check" value="1" name="objects[<?php echo $i; ?>][object_do]" /></td>
1906
+ <td><?php echo date('F d, Y h:i:s A', $data->getDataTime()); ?></td>
1907
+ <td><?php
1908
+ if ($data->getFormID() > 0) {
1909
+ $data_form = parent::selectForm($data->getFormID());
1910
+ $this_form = (!empty($data_form->form_slug)) ? $data_form->form_slug : '-';
1911
+ echo $this_form;
1912
+ } else
1913
+ _e('Custom HTML Form', 'custom-contact-forms');
1914
+ ?>
1915
+ </td>
1916
+ <td><?php echo $data->getFormPage(); ?> </td>
1917
+ <td class="ccf-alignright">
1918
+ <span class="submission-content-expand"></span>
1919
+ <input type="hidden" name="objects[<?php echo $i; ?>][object_type]" value="form_submission" />
1920
+ <input class="object-id" type="hidden" name="objects[<?php echo $i; ?>][object_id]" value="<?php echo $data_object->id; ?>" />
1921
+ </td>
1922
+ </tr>
1923
+ <tr class="row-form_submission-<?php echo $data_object->id; ?> submission-content <?php if ($i % 2 == 0) echo 'ccf-evenrow'; ?>">
1924
+ <td colspan="5"><ul>
1925
+ <?php
1926
+ $data_array = $data->getDataArray();
1927
+ foreach ($data_array as $item_key => $item_value) {
1928
+ ?>
1929
+ <li>
1930
+ <div><?php echo $item_key; ?></div>
1931
+ <p><?php echo $item_value; ?></p>
1932
+ </li>
1933
+ <?php
1934
+ }
1935
+ ?>
1936
+ </ul></td>
1937
+ </tr>
1938
+ <?php
1939
+ $i++;
1940
+ }
1941
+ ?>
1942
+ </tbody>
1943
+ <tfoot>
1944
+ <tr>
1945
+ <th scope="col" class="manage-column25"><input type="checkbox" class="checkall" /></th>
1946
+ <th scope="col" class="manage-column ccf-width250"><?php _e("Date Submitted", 'custom-contact-forms'); ?></th>
1947
+ <th scope="col" class="manage-column ccf-width150"><?php _e("Form Submitted", 'custom-contact-forms'); ?></th>
1948
+ <th scope="col" class="manage-column ccf-width250"><?php _e("Form Page", 'custom-contact-forms'); ?></th>
1949
+ <th scope="col" class="manage-column"></th>
1950
+ </tr>
1951
+ </tfoot>
1952
+ </table>
1953
+
1954
+ <select class="bulk-dropdown" name="object_bulk_action">
1955
+ <option value="0"><?php _e('Bulk Actions', 'custom-contact-forms'); ?></option>
1956
+ <option value="delete"><?php _e('Delete', 'custom-contact-forms'); ?></option>
1957
+ </select> <input type="submit" class="bulk-apply" name="object_bulk_apply" value="<?php _e('Apply', 'custom-contact-forms'); ?>" /> <img src="<?php echo plugins_url(); ?>/custom-contact-forms/images/wpspin_light.gif" class="loading-img" width="16" height="16" />
1958
+
1959
+
1960
+
1961
+ </form>
1962
+ <?php $this->insertUsagePopover(); ?>
1963
+ <?php $this->insertQuickStartPopover(); ?>
1964
+ </div>
1965
+ <?php
1966
+ }
1967
+
1968
+ function printSettingsPage() {
1969
+ $admin_options = parent::getAdminOptions();
1970
+ if ($admin_options['show_install_popover'] == 1) {
1971
+ $admin_options['show_install_popover'] = 0;
1972
+ ?>
1973
+ <script type="text/javascript" language="javascript">
1974
+ $j(document).ready(function() {
1975
+ showCCFUsagePopover();
1976
+ });
1977
+ </script>
1978
+ <?php
1979
+ update_option(parent::getAdminOptionsName(), $admin_options);
1980
+ } if ($_POST['general_settings']) {
1981
+ $_POST['settings'] = array_map(array('ccf_utils', 'encodeOption'), $_POST['settings']);
1982
+ $admin_options = array_merge($admin_options, $_POST['settings']);
1983
+ $admin_options[show_widget_categories] = $_POST['settings']['show_widget_categories'];
1984
+ $admin_options[show_widget_singles] = $_POST['settings']['show_widget_singles'];
1985
+ $admin_options[show_widget_pages] = $_POST['settings']['show_widget_pages'];
1986
+ $admin_options[show_widget_archives] = $_POST['settings']['show_widget_archives'];
1987
+ $admin_options[show_widget_home] = $_POST['settings']['show_widget_home'];
1988
+ $this->action_complete = __('Your settings have been successfully saved!', 'custom-contact-forms');
1989
+ update_option(parent::getAdminOptionsName(), $admin_options);
1990
+ } elseif ($_POST['configure_mail']) {
1991
+ $_POST['mail_config'] = array_map(array('ccf_utils', 'encodeOption'), $_POST['mail_config']);
1992
+ $admin_options = array_merge($admin_options, $_POST['mail_config']);
1993
+ $this->action_complete = __('Your mail settings have been successfully saved!', 'custom-contact-forms');
1994
+ update_option(parent::getAdminOptionsName(), $admin_options);
1995
+ }
1996
+ ccf_utils::load_module('export/custom-contact-forms-export.php');
1997
+ ?>
1998
+ <div id="customcontactforms-admin">
1999
+ <div class="plugin-header">
2000
+ <h2>
2001
+ <?php _e("Custom Contact Forms", 'custom-contact-forms'); ?>
2002
+ </h2>
2003
+ <input type="button" class="usage-popover-button" value="<?php _e("Plugin Usage Manual", 'custom-contact-forms'); ?>" />
2004
+ </div>
2005
+ <a class="genesis" href="http://www.shareasale.com/r.cfm?b=241369&u=481196&m=28169&urllink=&afftrack=">Custom Contact Forms works best with any of the 20+ <span>Genesis</span> Wordpress child themes. The <span>Genesis Framework</span> empowers you to quickly and easily build incredible websites with WordPress.</a>
2006
+
2007
+ <form class="blog-horizontal-form" method="post" action="http://www.aweber.com/scripts/addlead.pl">
2008
+ <input type="hidden" name="meta_web_form_id" value="1578604781" />
2009
+ <input type="hidden" name="meta_split_id" value="" />
2010
+ <input type="hidden" name="listname" value="ccf-plugin" />
2011
+ <input type="hidden" name="redirect" value="http://www.taylorlovett.com/wordpress-plugins/tutorials-offers-tips/" id="redirect_5832e41084448adb07da67a35dc83c27" />
2012
+ <input type="hidden" name="meta_adtracking" value="CCF_-_Wordpress_Plugins_Horizontal" />
2013
+ <input type="hidden" name="meta_message" value="1" />
2014
+ <input type="hidden" name="meta_required" value="name,email" />
2015
+ <span>WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials</span>
2016
+ <input type="text" name="name" value="Your Name" onclick="value=''" />
2017
+ <input type="text" name="email" value="Your Email" onclick="value=''" />
2018
+ <input type="submit" value="Sign Up for Free" />
2019
+ </form>
2020
+
2021
+ <?php if (!empty($this->action_complete)) { ?>
2022
+ <div class="action-complete">
2023
+ <?php echo $this->action_complete; ?>
2024
+ </div>
2025
+ <?php } ?>
2026
+
2027
+ <div id="general-settings" class="postbox">
2028
+ <h3 class="hndle"><span>
2029
+ <?php _e("General Settings", 'custom-contact-forms'); ?>
2030
+ </span></h3>
2031
+ <div class="inside">
2032
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2033
+ <ul class="gleft">
2034
+ <li>
2035
+ <label for="email_form_submissions">
2036
+ <?php _e("Email Form Submissions:", 'custom-contact-forms'); ?>
2037
+ </label>
2038
+ <select name="settings[email_form_submissions]">
2039
+ <option value="1">
2040
+ <?php _e("Yes", 'custom-contact-forms'); ?>
2041
+ </option>
2042
+ <option value="0" <?php if ($admin_options['email_form_submissions'] == 0) echo 'selected="selected"'; ?>>
2043
+ <?php _e("No", 'custom-contact-forms'); ?>
2044
+ </option>
2045
+ </select>
2046
+ </li>
2047
+ <li class="descrip">
2048
+ <?php _e("When a user fills out one of your forms, the info submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info.", 'custom-contact-forms'); ?>
2049
+ </li>
2050
+ <li>
2051
+ <label for="default_to_email">
2052
+ <?php _e("Default Email:", 'custom-contact-forms'); ?>
2053
+ </label>
2054
+ <input name="settings[default_to_email]" value="<?php echo $admin_options['default_to_email']; ?>" type="text" maxlength="100" />
2055
+ </li>
2056
+ <li class="descrip">
2057
+ <?php _e("Form emails will be sent <span>to</span> this address, if no destination email is specified by the form.", 'custom-contact-forms'); ?>
2058
+ </li>
2059
+ <li>
2060
+ <label for="enable_jquery">
2061
+ <?php _e("Front End JQuery:", 'custom-contact-forms'); ?>
2062
+ </label>
2063
+ <select name="settings[enable_jquery]">
2064
+ <option value="1">
2065
+ <?php _e("Enabled", 'custom-contact-forms'); ?>
2066
+ </option>
2067
+ <option <?php if ($admin_options['enable_jquery'] != 1) echo 'selected="selected"'; ?> value="0">
2068
+ <?php _e("Disabled", 'custom-contact-forms'); ?>
2069
+ </option>
2070
+ </select>
2071
+ </li>
2072
+ <li class="descrip">
2073
+ <?php _e("Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips.", 'custom-contact-forms'); ?>
2074
+ </li>
2075
+ <li>
2076
+ <label for="default_from_email">
2077
+ <?php _e("Default From Email:", 'custom-contact-forms'); ?>
2078
+ </label>
2079
+ <input name="settings[default_from_email]" value="<?php echo $admin_options['default_from_email']; ?>" type="text" maxlength="100" />
2080
+ </li>
2081
+ <li class="descrip">
2082
+ <?php _e("Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host.", 'custom-contact-forms'); ?>
2083
+ </li>
2084
+ <li>
2085
+ <label for="default_from_name">
2086
+ <?php _e("Default From Name:", 'custom-contact-forms'); ?>
2087
+ </label>
2088
+ <input name="settings[default_from_name]" value="<?php echo $admin_options['default_from_name']; ?>" type="text" maxlength="100" />
2089
+ </li>
2090
+ <li class="descrip">
2091
+ <?php _e("This setting allows you to specify the name under which form emails are sent. The default is 'Custom Contact Forms'.", 'custom-contact-forms'); ?>
2092
+ </li>
2093
+ <li>
2094
+ <label for="default_form_subject">
2095
+ <?php _e("Default Email Subject:", 'custom-contact-forms'); ?>
2096
+ </label>
2097
+ <input name="settings[default_form_subject]" value="<?php echo $admin_options['default_form_subject']; ?>" type="text" />
2098
+ </li>
2099
+ <li class="descrip">
2100
+ <?php _e("Default subject to be included in all form emails.", 'custom-contact-forms'); ?>
2101
+ </li>
2102
+ <li>
2103
+ <label for="enable_dashboard_widget">
2104
+ <?php _e("Enable Dashboard Widget:", 'custom-contact-forms'); ?>
2105
+ </label>
2106
+ <select name="settings[enable_dashboard_widget]">
2107
+ <option value="1">
2108
+ <?php _e("Enabled", 'custom-contact-forms'); ?>
2109
+ </option>
2110
+ <option value="0" <?php if ($admin_options['enable_dashboard_widget'] == 0) echo 'selected="selected"'; ?>>
2111
+ <?php _e("Disabled", 'custom-contact-forms'); ?>
2112
+ </option></select>
2113
+ </li>
2114
+ <li class="descrip">
2115
+ <?php _e("Enabling this will display a widget on your dashboard that shows the latest form submissions.", 'custom-contact-forms'); ?>
2116
+ </li>
2117
+ <li>
2118
+ <label for="dashboard_access">
2119
+ <?php _e("Dashboard Widget Accessibility:", 'custom-contact-forms'); ?>
2120
+ </label>
2121
+ <select name="settings[dashboard_access]">
2122
+ <option value="2">
2123
+ <?php _e("Only admins can view", 'custom-contact-forms'); ?>
2124
+ </option>
2125
+ <option value="1" <?php if ($admin_options['dashboard_access'] == 1) echo 'selected="selected"'; ?>>
2126
+ <?php _e("All roles except subscribers can view", 'custom-contact-forms'); ?>
2127
+ </option>
2128
+ <option value="0" <?php if ($admin_options['dashboard_access'] == 0) echo 'selected="selected"'; ?>>
2129
+ <?php _e("All roles can view", 'custom-contact-forms'); ?>
2130
+ </option></select>
2131
+ </li>
2132
+ <li class="descrip">
2133
+ <?php _e("If you are using the dashboard widget, this allows you to disallow certain users from viewing it.", 'custom-contact-forms'); ?>
2134
+ </li>
2135
+ <li>
2136
+ <label for="default_form_error_header">
2137
+ <?php _e("Default Form Error Header:", 'custom-contact-forms'); ?>
2138
+ </label>
2139
+ <input name="settings[default_form_error_header]" value="<?php echo $admin_options['default_form_error_header']; ?>" type="text" />
2140
+ </li>
2141
+ <li class="descrip">
2142
+ <?php _e("When a form is filled out incorrectly, this message will be displayed followed by the individual field error messages.", 'custom-contact-forms'); ?>
2143
+ </li>
2144
+
2145
+ </ul>
2146
+ <ul class="gright">
2147
+ <li>
2148
+ <label for="form_success_message_title">
2149
+ <?php _e("Default Form Success Message Title:", 'custom-contact-forms'); ?>
2150
+ </label>
2151
+ <input name="settings[form_success_message_title]" value="<?php echo $admin_options['form_success_message_title']; ?>" type="text"/>
2152
+ </li>
2153
+ <li class="descrip">
2154
+ <?php _e("If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title.", 'custom-contact-forms'); ?>
2155
+ </li>
2156
+ <li>
2157
+ <label for="form_success_message">
2158
+ <?php _e("Default Form Success Message:", 'custom-contact-forms'); ?>
2159
+ </label>
2160
+ <input name="settings[form_success_message]" value="<?php echo $admin_options['form_success_message']; ?>" type="text"/>
2161
+ </li>
2162
+ <li class="descrip">
2163
+ <?php _e("If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message.", 'custom-contact-forms'); ?>
2164
+ </li>
2165
+ <li>
2166
+ <label for="remember_field_values">
2167
+ <?php _e("Remember Field Values:", 'custom-contact-forms'); ?>
2168
+ </label>
2169
+ <select name="settings[remember_field_values]">
2170
+ <option value="1">
2171
+ <?php _e("Yes", 'custom-contact-forms'); ?>
2172
+ </option>
2173
+ <option <?php if ($admin_options['remember_field_values'] == 0) echo 'selected="selected"'; ?> value="0">
2174
+ <?php _e("No", 'custom-contact-forms'); ?>
2175
+ </option>
2176
+ </select>
2177
+ </li>
2178
+ <li class="descrip">
2179
+ <?php _e("Selecting yes will make form fields remember how they were last filled out.", 'custom-contact-forms'); ?>
2180
+ </li>
2181
+ <li>
2182
+ <label for="enable_widget_tooltips">
2183
+ <?php _e("Tooltips in Widget:", 'custom-contact-forms'); ?>
2184
+ </label>
2185
+ <select name="settings[enable_widget_tooltips]">
2186
+ <option value="1">
2187
+ <?php _e("Enabled", 'custom-contact-forms'); ?>
2188
+ </option>
2189
+ <option <?php if ($admin_options['enable_widget_tooltips'] == 0) echo 'selected="selected"'; ?> value="0">
2190
+ <?php _e("Disabled", 'custom-contact-forms'); ?>
2191
+ </option>
2192
+ </select>
2193
+ </li>
2194
+ <li class="descrip">
2195
+ <?php _e("Enabling this shows tooltips containing field instructions on forms in the widget.", 'custom-contact-forms'); ?>
2196
+ </li>
2197
+ <li>
2198
+ <label for="author_link">
2199
+ <?php _e("Hide Plugin Author Link in Code:", 'custom-contact-forms'); ?>
2200
+ </label>
2201
+ <select name="settings[author_link]">
2202
+ <option value="1">
2203
+ <?php _e("Yes", 'custom-contact-forms'); ?>
2204
+ </option>
2205
+ <option <?php if ($admin_options['author_link'] == 0) echo 'selected="selected"'; ?> value="0">
2206
+ <?php _e("No", 'custom-contact-forms'); ?>
2207
+ </option>
2208
+ </select>
2209
+ </li>
2210
+ <li>
2211
+ <label for="admin_ajax">
2212
+ <?php _e("Fancy Admin AJAX Abilities:", 'custom-contact-forms'); ?>
2213
+ </label>
2214
+ <select name="settings[admin_ajax]">
2215
+ <option value="1">
2216
+ <?php _e("Enabled", 'custom-contact-forms'); ?>
2217
+ </option>
2218
+ <option value="0" <?php if ($admin_options['admin_ajax'] == 0) echo 'selected="selected"'; ?>>
2219
+ <?php _e("Disabled", 'custom-contact-forms'); ?>
2220
+ </option>
2221
+ </select>
2222
+ </li>
2223
+ <li class="descrip">
2224
+ <?php _e("If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below.", 'custom-contact-forms'); ?>
2225
+ </li>
2226
+ <li>
2227
+ <label for="default_form_bad_permissions">
2228
+ <?php _e("Default Permissions Error:", 'custom-contact-forms'); ?>
2229
+ </label>
2230
+ <input name="settings[default_form_bad_permissions]" value="<?php echo $admin_options['default_form_bad_permissions']; ?>" type="text" />
2231
+ </li>
2232
+ <li class="descrip">
2233
+ <?php _e("When someone doesn't have the proper permissions to use a form, this message is displayed in place of the form. You control who can view each form with the form access manager which is located inside the form manager.", 'custom-contact-forms'); ?>
2234
+ </li>
2235
+ <li>
2236
+ <label for="enable_form_access_manager">
2237
+ <?php _e("Form Access Capabilities:", 'custom-contact-forms'); ?>
2238
+ </label>
2239
+ <select name="settings[enable_form_access_manager]">
2240
+ <option value="0">
2241
+ <?php _e("Disabled", 'custom-contact-forms'); ?>
2242
+ </option>
2243
+ <option value="1" <?php if ($admin_options['enable_form_access_manager'] == 1) echo 'selected="selected"'; ?>>
2244
+ <?php _e("Enabled", 'custom-contact-forms'); ?>
2245
+ </option>
2246
+ </select>
2247
+ </li>
2248
+ <li class="descrip">
2249
+ <?php _e("The form access manager within each form allows you to control who can view your form. However, that will take effect on any of your forms unless this is enabled.", 'custom-contact-forms'); ?>
2250
+ </li>
2251
+ <li class="show-widget"><b>
2252
+ <?php _e("Show Sidebar Widget:", 'custom-contact-forms'); ?>
2253
+ </b></li>
2254
+ <li>
2255
+ <label>
2256
+ <input value="1" type="checkbox" name="settings[show_widget_home]" <?php if ($admin_options['show_widget_home'] == 1) echo 'checked="checked"'; ?> />
2257
+ <?php _e("On Homepage", 'custom-contact-forms'); ?>
2258
+ </label>
2259
+ <label>
2260
+ <input value="1" type="checkbox" name="settings[show_widget_pages]" <?php if ($admin_options['show_widget_pages'] == 1) echo 'checked="checked"'; ?> />
2261
+ <?php _e("On Pages", 'custom-contact-forms'); ?>
2262
+ </label>
2263
+ <label>
2264
+ <input value="1" type="checkbox" name="settings[show_widget_singles]" <?php if ($admin_options['show_widget_singles'] == 1) echo 'checked="checked"'; ?> />
2265
+ <?php _e("On Single Posts", 'custom-contact-forms'); ?>
2266
+ </label>
2267
+ <br />
2268
+ <label>
2269
+ <input value="1" type="checkbox" name="settings[show_widget_categories]" <?php if ($admin_options['show_widget_categories'] == 1) echo 'checked="checked"'; ?> />
2270
+ <?php _e("On Categories", 'custom-contact-forms'); ?>
2271
+ </label>
2272
+ <label>
2273
+ <input value="1" type="checkbox" name="settings[show_widget_archives]" <?php if ($admin_options['show_widget_archives'] == 1) echo 'checked="checked"'; ?> />
2274
+ <?php _e("On Archives", 'custom-contact-forms'); ?>
2275
+ </label>
2276
+ </li>
2277
+ <li>
2278
+ <label for="code_type">
2279
+ <?php _e("Use Code Type:", 'custom-contact-forms'); ?>
2280
+ </label>
2281
+ <select name="settings[code_type]">
2282
+ <option>XHTML</option>
2283
+ <option <?php if ($admin_options['code_type'] == 'HTML') echo 'selected="selected"'; ?>>HTML</option>
2284
+ </select>
2285
+ </li>
2286
+ <li class="descrip">
2287
+ <?php _e("This lets you switch the form code between HTML and XHTML.", 'custom-contact-forms'); ?>
2288
+ </li>
2289
+ <li>
2290
+ <input type="submit" value="<?php _e("Update", 'custom-contact-forms'); ?>" name="general_settings" />
2291
+ </li>
2292
+ </ul>
2293
+ </form>
2294
+ </div>
2295
+ </div>
2296
+ <div id="configure-mail" class="postbox">
2297
+ <h3 class="hndle"><span>
2298
+ <?php _e("Mail Settings", 'custom-contact-forms'); ?>
2299
+ </span></h3>
2300
+ <div class="inside">
2301
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2302
+ <p><?php _e("There are two ways you can send emails: using the PHP mail() function or using SMTP (secure/insecure). If you choose to use the PHP mail() function you can ignore all the other options. For some people Wordpress's default way of sending mail does not work; if for some reason your mail is being sent you should try the SMTP option.", 'custom-contact-forms'); ?></p>
2303
+ <label for="mail_function"><?php _e("* Send My Emails Using the Following:", 'custom-contact-forms'); ?></label>
2304
+ <select name="mail_config[mail_function]">
2305
+ <option value="default"><?php _e("Wordpress Default", 'custom-contact-forms'); ?></option>
2306
+ <option <?php if ($admin_options['mail_function'] == 'smtp') echo 'selected="selected"'; ?> value="smtp"><?php _e("SMTP", 'custom-contact-forms'); ?></option>
2307
+ </select> <?php _e("(If mail isn't sending, try toggling this option.)", 'custom-contact-forms'); ?>
2308
+ <div>
2309
+ <ul class="left">
2310
+ <li><label for="smtp_host"><?php _e("SMTP Host:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_host]" value="<?php echo $admin_options['smtp_host']; ?>" /></li>
2311
+ <li><label for="smtp_port"><?php _e("SMTP Port:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_port]" value="<?php echo $admin_options['smtp_port']; ?>" /></li>
2312
+ <li><label for="smtp_encryption"><?php _e("Encryption:", 'custom-contact-forms'); ?></label> <select name="mail_config[smtp_encryption]">
2313
+ <option value="none"><?php _e("None", 'custom-contact-forms'); ?></option>
2314
+ <option <?php if ($admin_options['smtp_encryption'] == 'ssl') echo 'selected="selected"'; ?> value="ssl"><?php _e("SSL", 'custom-contact-forms'); ?></option>
2315
+ <option <?php if ($admin_options['smtp_encryption'] == 'tls') echo 'selected="selected"'; ?> value="tls"><?php _e("TLS", 'custom-contact-forms'); ?></option>
2316
+ </select></li>
2317
+ </ul>
2318
+ <ul class="right">
2319
+ <li><label for="smtp_authentication"><?php _e("SMTP Authentication:", 'custom-contact-forms'); ?></label> <select name="mail_config[smtp_authentication]"><option value="0"><?php _e("None Needed", 'custom-contact-forms'); ?></option><option <?php if ($admin_options['smtp_authentication'] == 1) echo 'selected="selected"'; ?> value="1"><?php _e("Use SMTP Username/Password", 'custom-contact-forms'); ?></option></select></li>
2320
+ <li><label for="smtp_username"><?php _e("SMTP Username:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_username]" value="<?php echo $admin_options['smtp_username']; ?>" /></li>
2321
+ <li><label for="smtp_password"><?php _e("SMTP Password:", 'custom-contact-forms'); ?></label> <input class="ccf-width125" type="text" size="10" name="mail_config[smtp_password]" value="<?php echo $admin_options['smtp_password']; ?>" /></li>
2322
+ </ul>
2323
+ </div>
2324
+ <input type="submit" name="configure_mail" value="<?php _e("Save Mail Sending Options", 'custom-contact-forms'); ?>" />
2325
+ </form>
2326
+ </div>
2327
+ </div>
2328
+ <a name="import-export"></a>
2329
+ <div id="export" class="postbox">
2330
+ <h3 class="hndle"><span>
2331
+ <?php _e("Export", 'custom-contact-forms'); ?>
2332
+ </span></h3>
2333
+ <div class="inside">
2334
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2335
+ <p>
2336
+ <?php _e("Preforming a Custom Contact Forms export will create a file of the form
2337
+ ccf-export-xxxx.sql on your web server. The file created contains SQL that
2338
+ will recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined.", 'custom-contact-forms'); ?>
2339
+ </p>
2340
+ <input type="submit" name="ccf_export" value="<?php _e("Export All CCF Plugin Content", 'custom-contact-forms'); ?>" />
2341
+ </form>
2342
+ </div>
2343
+ </div>
2344
+ <div id="import" class="postbox">
2345
+ <h3 class="hndle"><span>
2346
+ <?php _e("Import", 'custom-contact-forms'); ?>
2347
+ </span></h3>
2348
+ <div class="inside">
2349
+ <form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
2350
+ <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
2351
+ <p>
2352
+ <?php _e("Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one. Pressing the 'Clear and Import' button deletes all current data and then imports the selected file; this will not work for merging to data!. Clearing all CCF data before importing prevents any conflicts from occuring. Before you attempt an import, you should always download a backup, by clicking the 'Export All' button.", 'custom-contact-forms'); ?>
2353
+ </p>
2354
+ <p class="choose_import">
2355
+ <?php _e("Choose What You Want to Use from the Import File:", 'custom-contact-forms'); ?>
2356
+ </p>
2357
+ <ul>
2358
+ <li>
2359
+ <input type="checkbox" checked="checked" name="ccf_import_overwrite_settings" value="1" />
2360
+ <label for="ccf_import_overwrite_settings">
2361
+ <?php _e("Use General Settings", 'custom-contact-forms'); ?>
2362
+ </label>
2363
+ </li>
2364
+ <li>
2365
+ <input type="checkbox" checked="checked" name="ccf_import_forms" value="1" />
2366
+ <label for="ccf_import_forms">
2367
+ <?php _e("Forms", 'custom-contact-forms'); ?>
2368
+ </label>
2369
+ </li>
2370
+ <li>
2371
+ <input type="checkbox" checked="checked" name="ccf_import_saved_submissions" value="1" />
2372
+ <label for="ccf_import_saved_submissions">
2373
+ <?php _e("Form Submissions", 'custom-contact-forms'); ?>
2374
+ </label>
2375
+ </li>
2376
+ <li>
2377
+ <input type="checkbox" checked="checked" name="ccf_import_fields" value="1" />
2378
+ <label for="ccf_import_fields">
2379
+ <?php _e("Fields", 'custom-contact-forms'); ?>
2380
+ </label>
2381
+ </li>
2382
+ <li>
2383
+ <input type="checkbox" checked="checked" name="ccf_import_forms" value="1" />
2384
+ <label for="ccf_import_forms">
2385
+ <?php _e("Forms", 'custom-contact-forms'); ?>
2386
+ </label>
2387
+ </li>
2388
+ <li>
2389
+ <input type="checkbox" checked="checked" name="ccf_import_field_options" value="1" />
2390
+ <label for="ccf_import_field_options">
2391
+ <?php _e("Field Options", 'custom-contact-forms'); ?>
2392
+ </label>
2393
+ </li>
2394
+ <li>
2395
+ <input type="checkbox" checked="checked" name="ccf_import_styles" value="1" />
2396
+ <label for="ccf_import_styles">
2397
+ <?php _e("Styles", 'custom-contact-forms'); ?>
2398
+ </label>
2399
+ </li>
2400
+ </ul>
2401
+ <p class="choose_import">
2402
+ <label for="import_file">
2403
+ <?php _e("Choose an Import File:", 'custom-contact-forms'); ?>
2404
+ </label>
2405
+ <input type="file" name="import_file" />
2406
+ </p>
2407
+ <input name="ccf_clear_import" type="submit" value="<?php _e("Clear and Import", 'custom-contact-forms'); ?>" />
2408
+ <input type="checkbox" name="ccf_import_confirm" value="1" />
2409
+ <?php _e('Yes, I want to do this and have created a backup.', 'custom-contact-forms'); ?>
2410
+ </form>
2411
+ </div>
2412
+ </div>
2413
+ <?php $this->insertUsagePopover(); ?>
2414
+ <?php $this->insertQuickStartPopover(); ?>
2415
+ </div>
2416
+ <?php
2417
+ }
2418
+ }
2419
+ }
2420
  ?>
custom-contact-forms-utils.php CHANGED
@@ -1,82 +1,83 @@
1
- <?php
2
- /*
3
- Custom Contact Forms Plugin
4
- By Taylor Lovett - http://www.taylorlovett.com
5
- Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
- */
7
- if (!class_exists('ccf_utils')) {
8
- class ccf_utils {
9
- function ccf_utils() {
10
- $this->defineConstants();
11
- }
12
-
13
- function redirect($location) {
14
- if (!empty($location)) {
15
- wp_redirect($location);
16
- exit();
17
- }
18
- }
19
-
20
- function load_module($path, $required = true) {
21
- if (empty($path)) return false;
22
- if ($required) require_once('modules/' . $path);
23
- else include_once('modules/' . $path);
24
- return true;
25
- }
26
-
27
- function encodeOption($option) {
28
- return htmlspecialchars(stripslashes($option), ENT_QUOTES);
29
- }
30
-
31
- function startSession() {
32
- if (!@session_id()) @session_start();
33
- }
34
-
35
- function getWPTablePrefix() {
36
- global $wpdb;
37
- return $wpdb->prefix;
38
- }
39
-
40
- function encodeOptionArray($option_array) {
41
- foreach ($option_array as $option) {
42
- if (is_array($option))
43
- $option = ccf_utils::encodeOptionArray($option);
44
- else
45
- $option = ccf_utils::encodeOption($option);
46
- }
47
- return $option_array;
48
- }
49
-
50
- function decodeOption($option, $strip_slashes = 1, $decode_html_chars = 1) {
51
- if ($strip_slashes == 1) $option = stripslashes($option);
52
- if ($decode_html_chars == 1) $option = html_entity_decode($option);
53
- return $option;
54
- }
55
-
56
- function defineConstants() {
57
- $prefix = ccf_utils::getWPTablePrefix();
58
- define('CCF_AJAX_URL', admin_url('admin-ajax.php'));
59
- define('CCF_FORMS_TABLE', $prefix . 'customcontactforms_forms');
60
- define('CCF_FIELDS_TABLE', $prefix . 'customcontactforms_fields');
61
- define('CCF_STYLES_TABLE', $prefix . 'customcontactforms_styles');
62
- define('CCF_USER_DATA_TABLE', $prefix . 'customcontactforms_user_data');
63
- define('CCF_FIELD_OPTIONS_TABLE', $prefix . 'customcontactforms_field_options');
64
- define('CCF_BASE_PATH', ABSPATH . 'wp-content/plugins/custom-contact-forms/');
65
- define('CCF_DEAD_STATE_VALUE', 'ccf-dead-state');
66
- $GLOBALS['ccf_tables_array'] = array(CCF_FORMS_TABLE, CCF_FIELDS_TABLE, CCF_STYLES_TABLE, CCF_USER_DATA_TABLE, CCF_FIELD_OPTIONS_TABLE);
67
- $GLOBALS['ccf_fixed_fields'] = array('customcontactforms_submit' => '',
68
- 'fid' => '',
69
- 'fixedEmail' => __("Use this field if you want the plugin to throw an error on fake emails.", 'custom-contact-forms'),
70
- 'fixedWebsite' => __("This field will throw an error on invalid website addresses.", 'custom-contact-forms'),
71
- 'emailSubject' => __("This field lets users specify the subject of the email sent to you on submission.", 'custom-contact-forms'),
72
- 'form_page' => '',
73
- 'captcha' => __("This field requires users to type numbers in an image preventing spam.", 'custom-contact-forms'),
74
- 'ishuman' => __("This field requires users to check a box to prove they aren't a spam bot.", 'custom-contact-forms'),
75
- 'usaStates' => __("This is a dropdown field showing each state in the US. If you want a state initially selected, enter it in 'Initial Value.'", 'custom-contact-forms'),
76
- 'allCountries' => __("This is a dropdown field showing countries. If you want a country initially selected, enter it in 'Initial Value.'", 'custom-contact-forms'),
77
- 'resetButton' => __("This field lets users reset all form fields to their initial values. This will be inserted next to the submit button.", 'custom-contact-forms')
78
- );
79
- }
80
- }
81
- }
 
82
  ?>
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('ccf_utils')) {
8
+ class ccf_utils {
9
+ function ccf_utils() {
10
+ $this->defineConstants();
11
+ }
12
+
13
+ function redirect($location) {
14
+ if (!empty($location)) {
15
+ wp_redirect($location);
16
+ exit();
17
+ }
18
+ }
19
+
20
+ function load_module($path, $required = true) {
21
+ if (empty($path)) return false;
22
+ if ($required) require_once('modules/' . $path);
23
+ else include_once('modules/' . $path);
24
+ return true;
25
+ }
26
+
27
+ function encodeOption($option) {
28
+ return htmlspecialchars(stripslashes($option), ENT_QUOTES);
29
+ }
30
+
31
+ function startSession() {
32
+ if (!@session_id()) @session_start();
33
+ }
34
+
35
+ function getWPTablePrefix() {
36
+ global $wpdb;
37
+ return $wpdb->prefix;
38
+ }
39
+
40
+ function encodeOptionArray($option_array) {
41
+ foreach ($option_array as $option) {
42
+ if (is_array($option))
43
+ $option = ccf_utils::encodeOptionArray($option);
44
+ else
45
+ $option = ccf_utils::encodeOption($option);
46
+ }
47
+ return $option_array;
48
+ }
49
+
50
+ function decodeOption($option, $strip_slashes = 1, $decode_html_chars = 1) {
51
+ if ($strip_slashes == 1) $option = stripslashes($option);
52
+ if ($decode_html_chars == 1) $option = html_entity_decode($option);
53
+ return $option;
54
+ }
55
+
56
+ function defineConstants() {
57
+ $prefix = ccf_utils::getWPTablePrefix();
58
+ define('CCF_AJAX_URL', admin_url('admin-ajax.php'));
59
+ define('CCF_FORMS_TABLE', $prefix . 'customcontactforms_forms');
60
+ define('CCF_FIELDS_TABLE', $prefix . 'customcontactforms_fields');
61
+ define('CCF_STYLES_TABLE', $prefix . 'customcontactforms_styles');
62
+ define('CCF_USER_DATA_TABLE', $prefix . 'customcontactforms_user_data');
63
+ define('CCF_FIELD_OPTIONS_TABLE', $prefix . 'customcontactforms_field_options');
64
+ define('CCF_BASE_PATH', ABSPATH . 'wp-content/plugins/custom-contact-forms/');
65
+ define('CCF_DEAD_STATE_VALUE', 'ccf-dead-state');
66
+ $GLOBALS['ccf_tables_array'] = array(CCF_FORMS_TABLE, CCF_FIELDS_TABLE, CCF_STYLES_TABLE, CCF_USER_DATA_TABLE, CCF_FIELD_OPTIONS_TABLE);
67
+ $GLOBALS['ccf_fixed_fields'] = array('customcontactforms_submit' => '',
68
+ 'fid' => '',
69
+ 'fixedEmail' => __("Use this field if you want the plugin to throw an error on fake emails.", 'custom-contact-forms'),
70
+ 'fixedWebsite' => __("This field will throw an error on invalid website addresses.", 'custom-contact-forms'),
71
+ 'emailSubject' => __("This field lets users specify the subject of the email sent to you on submission.", 'custom-contact-forms'),
72
+ 'form_page' => '',
73
+ 'captcha' => __("This field requires users to type numbers in an image preventing spam.", 'custom-contact-forms'),
74
+ 'ishuman' => __("This field requires users to check a box to prove they aren't a spam bot.", 'custom-contact-forms'),
75
+ 'usaStates' => __("This is a dropdown field showing each state in the US. If you want a state initially selected, enter it in 'Initial Value.'", 'custom-contact-forms'),
76
+ 'datePicker' => __("This field displays a text box that when clicked pops up an interactive calender.'", 'custom-contact-forms'),
77
+ 'allCountries' => __("This is a dropdown field showing countries. If you want a country initially selected, enter it in 'Initial Value.'", 'custom-contact-forms'),
78
+ 'resetButton' => __("This field lets users reset all form fields to their initial values. This will be inserted next to the submit button.", 'custom-contact-forms')
79
+ );
80
+ }
81
+ }
82
+ }
83
  ?>
custom-contact-forms.php CHANGED
@@ -1,135 +1,137 @@
1
- <?php
2
- /*
3
- Plugin Name: Custom Contact Forms
4
- Plugin URI: http://taylorlovett.com/wordpress-plugins
5
- Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
- Version: 4.5.2.3
7
- Author: Taylor Lovett
8
- Author URI: http://www.taylorlovett.com
9
- */
10
-
11
- /*
12
- If you have time to translate this plugin in to your native language, please contact me at
13
- admin@taylorlovett.com and I will add you as a contributer with your name and website to the
14
- Wordpress plugin page.
15
-
16
- Languages: English
17
-
18
- Copyright (C) 2010-2011 Taylor Lovett, taylorlovett.com (admin@taylorlovett.com)
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 3 of the License, or
22
- (at your option) any later version.
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
- You should have received a copy of the GNU General Public License
28
- along with this program. If not, see <http://www.gnu.org/licenses/>.
29
- */
30
- $old_error_settings = error_reporting();
31
- //error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED);
32
- require_once('custom-contact-forms-utils.php');
33
- new ccf_utils();
34
- ccf_utils::load_module('db/custom-contact-forms-db.php');
35
- if (!class_exists('CustomContactForms')) {
36
- class CustomContactForms extends CustomContactFormsDB {
37
- var $adminOptionsName = 'customContactFormsAdminOptions';
38
-
39
- function activatePlugin() {
40
- $admin_options = $this->getAdminOptions();
41
- $admin_options['show_install_popover'] = 1;
42
- update_option($this->getAdminOptionsName(), $admin_options);
43
- ccf_utils::load_module('db/custom-contact-forms-activate-db.php');
44
- new CustomContactFormsActivateDB();
45
- }
46
-
47
- function getAdminOptionsName() {
48
- return $this->adminOptionsName;
49
- }
50
-
51
- function getAdminOptions() {
52
- $admin_email = get_option('admin_email');
53
- $customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_from_name' => 'Custom Contact Forms', 'default_form_subject' => __('Someone Filled Out Your Contact Form!', 'custom-contact-forms'),
54
- 'remember_field_values' => 0, 'author_link' => 1, 'enable_widget_tooltips' => 1, 'mail_function' => 'default', 'form_success_message_title' => __('Successful Form Submission', 'custom-contact-forms'), 'form_success_message' => __('Thank you for filling out our web form. We will get back to you ASAP.', 'custom-contact-forms'), 'enable_jquery' => 1, 'code_type' => 'XHTML',
55
- 'show_install_popover' => 0, 'email_form_submissions' => 1, 'enable_dashboard_widget' => 1, 'admin_ajax' => 1, 'smtp_host' => '', 'smtp_encryption' => 'none', 'smtp_authentication' => 0, 'smtp_username' => '', 'smtp_password' => '', 'smtp_port' => '', 'default_form_error_header' => __('You filled out the form incorrectly.', 'custom-contact-forms'),
56
- 'default_form_bad_permissions' => __("You don't have the proper permissions to view this form.", 'custom-contact-forms'), 'enable_form_access_manager' => 0); // default general settings
57
- $customcontactOptions = get_option($this->getAdminOptionsName());
58
- if (!empty($customcontactOptions)) {
59
- foreach ($customcontactOptions as $key => $option)
60
- $customcontactAdminOptions[$key] = $option;
61
- }
62
- update_option($this->getAdminOptionsName, $customcontactAdminOptions);
63
- return $customcontactAdminOptions;
64
- }
65
- }
66
- }
67
- $custom_contact_forms = new CustomContactForms();
68
-
69
- /* general plugin stuff */
70
- if (isset($custom_contact_forms)) {
71
- register_activation_hook(__FILE__, array(&$custom_contact_forms, 'activatePlugin'));
72
- }
73
-
74
- if (!is_admin()) { /* is front */
75
- require_once('custom-contact-forms-front.php');
76
- $custom_contact_front = new CustomContactFormsFront();
77
- if (!function_exists('serveCustomContactForm')) {
78
- function serveCustomContactForm($fid) {
79
- global $custom_contact_front;
80
- echo $custom_contact_front->getFormCode($custom_contact_front->selectForm($fid));
81
- }
82
- }
83
- add_action('init', array(&$custom_contact_front, 'frontInit'), 1);
84
- add_action('wp_enqueue_scripts', array(&$custom_contact_front, 'insertFrontEndScripts'), 1);
85
- add_action('wp_print_styles', array(&$custom_contact_front, 'insertFrontEndStyles'), 1);
86
- add_shortcode('customcontact', array(&$custom_contact_front, 'shortCodeToForm'));
87
-
88
- add_filter('the_content', array(&$custom_contact_front, 'contentFilter'));
89
- } else { /* is admin */
90
- $GLOBALS['ccf_current_page'] = ($_GET['page']) ? $_GET['page'] : '';
91
- require_once('custom-contact-forms-admin.php');
92
- $custom_contact_admin = new CustomContactFormsAdmin();
93
- if (!function_exists('CustomContactForms_ap')) {
94
- function CustomContactForms_ap() {
95
- global $custom_contact_admin;
96
- if (!isset($custom_contact_admin)) return;
97
- if (function_exists('add_menu_page')) {
98
- add_menu_page(__('Custom Contact Forms', 'custom-contact-forms'), __('Custom Contact Forms', 'custom-contact-forms'), 'manage_options', 'custom-contact-forms', array(&$custom_contact_admin, 'printAdminPage'));
99
- add_submenu_page('custom-contact-forms', __('Custom Contact Forms', 'custom-contact-forms'), __('Custom Contact Forms', 'custom-contact-forms'), 'manage_options', 'custom-contact-forms', array(&$custom_contact_admin, 'printAdminPage'));
100
- add_submenu_page('custom-contact-forms', __('Saved Form Submissions', 'custom-contact-forms'), __('Saved Form Submissions', 'custom-contact-forms'), 'manage_options', 'ccf-saved-form-submissions', array(&$custom_contact_admin, 'printFormSubmissionsPage'));
101
- add_submenu_page('custom-contact-forms', __('General Settings', 'custom-contact-forms'), __('General Settings', 'custom-contact-forms'), 'manage_options', 'ccf-settings', array(&$custom_contact_admin, 'printSettingsPage'));
102
- }
103
- }
104
- }
105
- $admin_options = $custom_contact_admin->getAdminOptions();
106
- if ($admin_options['enable_dashboard_widget'] == 1) {
107
- ccf_utils::load_module('widget/custom-contact-forms-dashboard.php');
108
- $ccf_dashboard = new CustomContactFormsDashboard();
109
- if ($ccf_dashboard->isDashboardPage()) {
110
- add_action('admin_print_styles', array(&$ccf_dashboard, 'insertDashboardStyles'), 1);
111
- add_action('admin_enqueue_scripts', array(&$ccf_dashboard, 'insertDashboardScripts'), 1);
112
- }
113
- add_action('wp_dashboard_setup', array(&$ccf_dashboard, 'install'));
114
- }
115
- add_action('init', array(&$custom_contact_admin, 'adminInit'), 1);
116
- if ($custom_contact_admin->isPluginAdminPage()) {
117
- add_action('admin_print_styles', array(&$custom_contact_admin, 'insertBackEndStyles'), 1);
118
- add_action('admin_enqueue_scripts', array(&$custom_contact_admin, 'insertAdminScripts'), 1);
119
- }
120
- add_action('wp_ajax_ccf-ajax', array(&$custom_contact_admin, 'handleAJAX'));
121
- add_action('wp_ajax_nopriv_ccf-ajax', array(&$custom_contact_admin, 'handleAJAX'));
122
- add_filter('plugin_action_links', array(&$custom_contact_admin,'appendToActionLinks'), 10, 2);
123
- add_action('admin_menu', 'CustomContactForms_ap');
124
- }
125
-
126
- /* widget stuff */
127
- ccf_utils::load_module('widget/custom-contact-forms-widget.php');
128
- if (!function_exists('CCFWidgetInit')) {
129
- function CCFWidgetInit() {
130
- register_widget('CustomContactFormsWidget');
131
- }
132
- }
133
- add_action('widgets_init', 'CCFWidgetInit');
134
- error_reporting($old_error_settings);
 
 
135
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Custom Contact Forms
4
+ Plugin URI: http://taylorlovett.com/wordpress-plugins
5
+ Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
+ Version: 4.5.3.0
7
+ Author: Taylor Lovett
8
+ Author URI: http://www.taylorlovett.com
9
+ */
10
+
11
+ /*
12
+ If you have time to translate this plugin in to your native language, please contact me at
13
+ admin@taylorlovett.com and I will add you as a contributer with your name and website to the
14
+ Wordpress plugin page.
15
+
16
+ Languages: English
17
+
18
+ Copyright (C) 2010-2011 Taylor Lovett, taylorlovett.com (admin@taylorlovett.com)
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 3 of the License, or
22
+ (at your option) any later version.
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+ You should have received a copy of the GNU General Public License
28
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
29
+ */
30
+ $old_error_settings = error_reporting();
31
+ //error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED);
32
+ require_once('custom-contact-forms-utils.php');
33
+ new ccf_utils();
34
+ ccf_utils::load_module('db/custom-contact-forms-db.php');
35
+ if (!class_exists('CustomContactForms')) {
36
+ class CustomContactForms extends CustomContactFormsDB {
37
+ var $adminOptionsName = 'customContactFormsAdminOptions';
38
+
39
+ function activatePlugin() {
40
+ $admin_options = $this->getAdminOptions();
41
+ $admin_options['show_install_popover'] = 1;
42
+ update_option($this->getAdminOptionsName(), $admin_options);
43
+ ccf_utils::load_module('db/custom-contact-forms-activate-db.php');
44
+ new CustomContactFormsActivateDB();
45
+ }
46
+
47
+ function getAdminOptionsName() {
48
+ return $this->adminOptionsName;
49
+ }
50
+
51
+ function getAdminOptions() {
52
+ $admin_email = get_option('admin_email');
53
+ $customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_from_name' => 'Custom Contact Forms', 'default_form_subject' => __('Someone Filled Out Your Contact Form!', 'custom-contact-forms'),
54
+ 'remember_field_values' => 0, 'author_link' => 1, 'enable_widget_tooltips' => 1, 'mail_function' => 'default', 'form_success_message_title' => __('Successful Form Submission', 'custom-contact-forms'), 'form_success_message' => __('Thank you for filling out our web form. We will get back to you ASAP.', 'custom-contact-forms'), 'enable_jquery' => 1, 'code_type' => 'XHTML',
55
+ 'show_install_popover' => 0, 'email_form_submissions' => 1, 'enable_dashboard_widget' => 1, 'admin_ajax' => 1, 'smtp_host' => '', 'smtp_encryption' => 'none', 'smtp_authentication' => 0, 'smtp_username' => '', 'smtp_password' => '', 'smtp_port' => '', 'default_form_error_header' => __('You filled out the form incorrectly.', 'custom-contact-forms'),
56
+ 'default_form_bad_permissions' => __("You don't have the proper permissions to view this form.", 'custom-contact-forms'), 'enable_form_access_manager' => 0, 'dashboard_access' => 2); // default general settings
57
+ $customcontactOptions = get_option($this->getAdminOptionsName());
58
+ if (!empty($customcontactOptions)) {
59
+ foreach ($customcontactOptions as $key => $option)
60
+ $customcontactAdminOptions[$key] = $option;
61
+ }
62
+ update_option($this->getAdminOptionsName, $customcontactAdminOptions);
63
+ return $customcontactAdminOptions;
64
+ }
65
+ }
66
+ }
67
+ $custom_contact_forms = new CustomContactForms();
68
+
69
+ /* general plugin stuff */
70
+ if (isset($custom_contact_forms)) {
71
+ register_activation_hook(__FILE__, array(&$custom_contact_forms, 'activatePlugin'));
72
+ }
73
+
74
+ if (!is_admin()) { /* is front */
75
+ require_once('custom-contact-forms-front.php');
76
+ $custom_contact_front = new CustomContactFormsFront();
77
+ if (!function_exists('serveCustomContactForm')) {
78
+ function serveCustomContactForm($fid) {
79
+ global $custom_contact_front;
80
+ echo $custom_contact_front->getFormCode($custom_contact_front->selectForm($fid));
81
+ }
82
+ }
83
+ add_action('init', array(&$custom_contact_front, 'frontInit'), 1);
84
+ add_action('wp_enqueue_scripts', array(&$custom_contact_front, 'insertFrontEndScripts'), 1);
85
+ add_action('wp_print_styles', array(&$custom_contact_front, 'insertFrontEndStyles'), 1);
86
+ add_shortcode('customcontact', array(&$custom_contact_front, 'shortCodeToForm'));
87
+
88
+ add_filter('the_content', array(&$custom_contact_front, 'contentFilter'));
89
+ } else { /* is admin */
90
+ $GLOBALS['ccf_current_page'] = ($_GET['page']) ? $_GET['page'] : '';
91
+ require_once('custom-contact-forms-admin.php');
92
+ $custom_contact_admin = new CustomContactFormsAdmin();
93
+ if (!function_exists('CustomContactForms_ap')) {
94
+ function CustomContactForms_ap() {
95
+ global $custom_contact_admin;
96
+ if (!isset($custom_contact_admin)) return;
97
+ if (function_exists('add_menu_page')) {
98
+ add_menu_page(__('Custom Contact Forms', 'custom-contact-forms'), __('Custom Contact Forms', 'custom-contact-forms'), 'manage_options', 'custom-contact-forms', array(&$custom_contact_admin, 'printAdminPage'));
99
+ add_submenu_page('custom-contact-forms', __('Custom Contact Forms', 'custom-contact-forms'), __('Custom Contact Forms', 'custom-contact-forms'), 'manage_options', 'custom-contact-forms', array(&$custom_contact_admin, 'printAdminPage'));
100
+ add_submenu_page('custom-contact-forms', __('Saved Form Submissions', 'custom-contact-forms'), __('Saved Form Submissions', 'custom-contact-forms'), 'manage_options', 'ccf-saved-form-submissions', array(&$custom_contact_admin, 'printFormSubmissionsPage'));
101
+ add_submenu_page('custom-contact-forms', __('General Settings', 'custom-contact-forms'), __('General Settings', 'custom-contact-forms'), 'manage_options', 'ccf-settings', array(&$custom_contact_admin, 'printSettingsPage'));
102
+ }
103
+ }
104
+ }
105
+ $admin_options = $custom_contact_admin->getAdminOptions();
106
+ if ($admin_options['enable_dashboard_widget'] == 1) {
107
+ ccf_utils::load_module('widget/custom-contact-forms-dashboard.php');
108
+ $ccf_dashboard = new CustomContactFormsDashboard();
109
+ if ($ccf_dashboard->userCanViewWidget()) {
110
+ if ($ccf_dashboard->isDashboardPage()) {
111
+ add_action('admin_print_styles', array(&$ccf_dashboard, 'insertDashboardStyles'), 1);
112
+ add_action('admin_enqueue_scripts', array(&$ccf_dashboard, 'insertDashboardScripts'), 1);
113
+ }
114
+ add_action('wp_dashboard_setup', array(&$ccf_dashboard, 'install'));
115
+ }
116
+ }
117
+ add_action('init', array(&$custom_contact_admin, 'adminInit'), 1);
118
+ if ($custom_contact_admin->isPluginAdminPage()) {
119
+ add_action('admin_print_styles', array(&$custom_contact_admin, 'insertBackEndStyles'), 1);
120
+ add_action('admin_enqueue_scripts', array(&$custom_contact_admin, 'insertAdminScripts'), 1);
121
+ }
122
+ add_action('wp_ajax_ccf-ajax', array(&$custom_contact_admin, 'handleAJAX'));
123
+ add_action('wp_ajax_nopriv_ccf-ajax', array(&$custom_contact_admin, 'handleAJAX'));
124
+ add_filter('plugin_action_links', array(&$custom_contact_admin,'appendToActionLinks'), 10, 2);
125
+ add_action('admin_menu', 'CustomContactForms_ap');
126
+ }
127
+
128
+ /* widget stuff */
129
+ ccf_utils::load_module('widget/custom-contact-forms-widget.php');
130
+ if (!function_exists('CCFWidgetInit')) {
131
+ function CCFWidgetInit() {
132
+ register_widget('CustomContactFormsWidget');
133
+ }
134
+ }
135
+ add_action('widgets_init', 'CCFWidgetInit');
136
+ error_reporting($old_error_settings);
137
  ?>
images/Thumbs.db ADDED
Binary file
js/custom-contact-forms-admin.js CHANGED
@@ -1,75 +1,84 @@
1
- $j(document).ready(function(){
2
-
3
- $j('.checkall').live("click", function() {
4
- var checked_status = this.checked;
5
- $j(this).parents("form").find("input.object-check ,input.checkall").each(function() {
6
- if ($j(this).attr("type") == "checkbox")
7
- this.checked = checked_status;
8
- });
9
- });
10
-
11
- $j('.form-options-expand').prepend('<input type="button" class="form-options-expand-link" value="' + ccfLang.more_options + '" />');
12
- $j('.form-options-expand-link').click(function() {
13
- $j(this)
14
- .parent()
15
- .parent()
16
- .parent()
17
- .next()
18
- .find(".form-extra-options:first")
19
- .toggle();
20
- });
21
- $j('.form-extra-options').hide();
22
-
23
- $j('.submission-content').hide();
24
- $j('.submission-content-expand').prepend('<input type="button" class="submission-content-expand-button" value="' + ccfLang.expand + '" />');
25
- $j('.submission-content-expand-button').click(function() {
26
- $j(this)
27
- .parent()
28
- .parent()
29
- .parent()
30
- .next()
31
- .toggle();
32
- });
33
-
34
-
35
- $j('.fixed-fields-options-expand').prepend('<input type="button" class="fixed-fields-options-expand-link" value="' + ccfLang.more_options + '" />');
36
- $j('.fixed-fields-options-expand-link').click(function() {
37
- $j(this)
38
- .parent()
39
- .parent()
40
- .parent()
41
- .next()
42
- .find(".fixed-fields-extra-options:first")
43
- .toggle();
44
- });
45
- $j('.fixed-fields-extra-options').hide();
46
-
47
- $j('.fields-options-expand').prepend('<input type="button" class="fields-options-expand-link" value="' + ccfLang.more_options + '" />');
48
- $j('.fields-options-expand-link').click(function() {
49
- $j(this)
50
- .parent()
51
- .parent()
52
- .parent()
53
- .next()
54
- .find(".fields-extra-options:first")
55
- .toggle();
56
- });
57
- $j('.fields-extra-options').hide();
58
-
59
- $j("#ccf-usage-popover").dialog({
60
- height: 420,
61
- width:600,
62
- modal: true,
63
- autoOpen: false
64
- });
65
-
66
- $j(".usage-popover-button").click(function() { $j("#ccf-usage-popover").dialog('open'); });
67
-
68
- $j("a[title].toollink").tooltip({
69
- position: "bottom left",
70
- offset: [-2, 10],
71
- effect: "fade",
72
- tipClass: 'ccf-tooltip',
73
- opacity: 1.0
74
- });
 
 
 
 
 
 
 
 
 
75
  });
1
+ $j(document).ready(function(){
2
+
3
+ $j('.checkall').live("click", function() {
4
+ var checked_status = this.checked;
5
+ $j(this).parents("form").find("input.object-check ,input.checkall").each(function() {
6
+ if ($j(this).attr("type") == "checkbox")
7
+ this.checked = checked_status;
8
+ });
9
+ });
10
+
11
+ $j('.form-options-expand').prepend('<input type="button" class="form-options-expand-link" value="' + ccfLang.more_options + '" />');
12
+ $j('.form-options-expand-link').click(function() {
13
+ $j(this)
14
+ .parent()
15
+ .parent()
16
+ .parent()
17
+ .next()
18
+ .find(".form-extra-options:first")
19
+ .toggle();
20
+ });
21
+ $j('.form-extra-options').hide();
22
+
23
+ $j('.submission-content').hide();
24
+ $j('.submission-content-expand').prepend('<input type="button" class="submission-content-expand-button" value="' + ccfLang.expand + '" />');
25
+ $j('.submission-content-expand-button').click(function() {
26
+ $j(this)
27
+ .parent()
28
+ .parent()
29
+ .parent()
30
+ .next()
31
+ .toggle();
32
+ });
33
+
34
+
35
+ $j('.fixed-fields-options-expand').prepend('<input type="button" class="fixed-fields-options-expand-link" value="' + ccfLang.more_options + '" />');
36
+ $j('.fixed-fields-options-expand-link').click(function() {
37
+ $j(this)
38
+ .parent()
39
+ .parent()
40
+ .parent()
41
+ .next()
42
+ .find(".fixed-fields-extra-options:first")
43
+ .toggle();
44
+ });
45
+ $j('.fixed-fields-extra-options').hide();
46
+
47
+ $j('.fields-options-expand').prepend('<input type="button" class="fields-options-expand-link" value="' + ccfLang.more_options + '" />');
48
+ $j('.fields-options-expand-link').click(function() {
49
+ $j(this)
50
+ .parent()
51
+ .parent()
52
+ .parent()
53
+ .next()
54
+ .find(".fields-extra-options:first")
55
+ .toggle();
56
+ });
57
+ $j('.fields-extra-options').hide();
58
+
59
+ $j("#ccf-usage-popover").dialog({
60
+ height: 420,
61
+ width:600,
62
+ modal: true,
63
+ autoOpen: false
64
+ });
65
+
66
+ $j(".usage-popover-button").click(function() { $j("#ccf-usage-popover").dialog('open'); });
67
+
68
+ $j("#ccf-quick-start-popover").dialog({
69
+ height: 420,
70
+ width:600,
71
+ modal: true,
72
+ autoOpen: false
73
+ });
74
+
75
+ $j(".quick-start-button").click(function() { $j("#ccf-quick-start-popover").dialog('open'); });
76
+
77
+ $j("a[title].toollink").tooltip({
78
+ position: "bottom left",
79
+ offset: [-2, 10],
80
+ effect: "fade",
81
+ tipClass: 'ccf-tooltip',
82
+ opacity: 1.0
83
+ });
84
  });
js/jquery.ui.datepicker.js ADDED
@@ -0,0 +1,1791 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI Datepicker 1.8.13
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Datepicker
9
+ *
10
+ * Depends:
11
+ * jquery.ui.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.extend($.ui, { datepicker: { version: "1.8.13" } });
16
+
17
+ var PROP_NAME = 'datepicker';
18
+ var dpuuid = new Date().getTime();
19
+ var instActive;
20
+
21
+ /* Date picker manager.
22
+ Use the singleton instance of this class, $.datepicker, to interact with the date picker.
23
+ Settings for (groups of) date pickers are maintained in an instance object,
24
+ allowing multiple different settings on the same page. */
25
+
26
+ function Datepicker() {
27
+ this.debug = false; // Change this to true to start debugging
28
+ this._curInst = null; // The current instance in use
29
+ this._keyEvent = false; // If the last event was a key event
30
+ this._disabledInputs = []; // List of date picker inputs that have been disabled
31
+ this._datepickerShowing = false; // True if the popup picker is showing , false if not
32
+ this._inDialog = false; // True if showing within a "dialog", false if not
33
+ this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
34
+ this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
35
+ this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
36
+ this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
37
+ this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
38
+ this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
39
+ this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
40
+ this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
41
+ this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
42
+ this.regional = []; // Available regional settings, indexed by language code
43
+ this.regional[''] = { // Default regional settings
44
+ closeText: 'Done', // Display text for close link
45
+ prevText: 'Prev', // Display text for previous month link
46
+ nextText: 'Next', // Display text for next month link
47
+ currentText: 'Today', // Display text for current month link
48
+ monthNames: ['January','February','March','April','May','June',
49
+ 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
50
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
51
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
52
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
53
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
54
+ weekHeader: 'Wk', // Column header for week of the year
55
+ dateFormat: 'mm/dd/yy', // See format options on parseDate
56
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
57
+ isRTL: false, // True if right-to-left language, false if left-to-right
58
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
59
+ yearSuffix: '' // Additional text to append to the year in the month headers
60
+ };
61
+ this._defaults = { // Global defaults for all the date picker instances
62
+ showOn: 'focus', // 'focus' for popup on focus,
63
+ // 'button' for trigger button, or 'both' for either
64
+ showAnim: 'fadeIn', // Name of jQuery animation for popup
65
+ showOptions: {}, // Options for enhanced animations
66
+ defaultDate: null, // Used when field is blank: actual date,
67
+ // +/-number for offset from today, null for today
68
+ appendText: '', // Display text following the input box, e.g. showing the format
69
+ buttonText: '...', // Text for trigger button
70
+ buttonImage: '', // URL for trigger button image
71
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
72
+ hideIfNoPrevNext: false, // True to hide next/previous month links
73
+ // if not applicable, false to just disable them
74
+ navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
75
+ gotoCurrent: false, // True if today link goes back to current selection instead
76
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
77
+ changeYear: false, // True if year can be selected directly, false if only prev/next
78
+ yearRange: 'c-10:c+10', // Range of years to display in drop-down,
79
+ // either relative to today's year (-nn:+nn), relative to currently displayed year
80
+ // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
81
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
82
+ selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
83
+ showWeek: false, // True to show week of the year, false to not show it
84
+ calculateWeek: this.iso8601Week, // How to calculate the week of the year,
85
+ // takes a Date and returns the number of the week for it
86
+ shortYearCutoff: '+10', // Short year values < this are in the current century,
87
+ // > this are in the previous century,
88
+ // string value starting with '+' for current year + value
89
+ minDate: null, // The earliest selectable date, or null for no limit
90
+ maxDate: null, // The latest selectable date, or null for no limit
91
+ duration: 'fast', // Duration of display/closure
92
+ beforeShowDay: null, // Function that takes a date and returns an array with
93
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
94
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
95
+ beforeShow: null, // Function that takes an input field and
96
+ // returns a set of custom settings for the date picker
97
+ onSelect: null, // Define a callback function when a date is selected
98
+ onChangeMonthYear: null, // Define a callback function when the month or year is changed
99
+ onClose: null, // Define a callback function when the datepicker is closed
100
+ numberOfMonths: 1, // Number of months to show at a time
101
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
102
+ stepMonths: 1, // Number of months to step back/forward
103
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
104
+ altField: '', // Selector for an alternate field to store selected dates into
105
+ altFormat: '', // The date format to use for the alternate field
106
+ constrainInput: true, // The input is constrained by the current date format
107
+ showButtonPanel: false, // True to show button panel, false to not show it
108
+ autoSize: false // True to size the input for the date format, false to leave as is
109
+ };
110
+ $.extend(this._defaults, this.regional['']);
111
+ this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
112
+ }
113
+
114
+ $.extend(Datepicker.prototype, {
115
+ /* Class name added to elements to indicate already configured with a date picker. */
116
+ markerClassName: 'hasDatepicker',
117
+
118
+ /* Debug logging (if enabled). */
119
+ log: function () {
120
+ if (this.debug)
121
+ console.log.apply('', arguments);
122
+ },
123
+
124
+ // TODO rename to "widget" when switching to widget factory
125
+ _widgetDatepicker: function() {
126
+ return this.dpDiv;
127
+ },
128
+
129
+ /* Override the default settings for all instances of the date picker.
130
+ @param settings object - the new settings to use as defaults (anonymous object)
131
+ @return the manager object */
132
+ setDefaults: function(settings) {
133
+ extendRemove(this._defaults, settings || {});
134
+ return this;
135
+ },
136
+
137
+ /* Attach the date picker to a jQuery selection.
138
+ @param target element - the target input field or division or span
139
+ @param settings object - the new settings to use for this date picker instance (anonymous) */
140
+ _attachDatepicker: function(target, settings) {
141
+ // check for settings on the control itself - in namespace 'date:'
142
+ var inlineSettings = null;
143
+ for (var attrName in this._defaults) {
144
+ var attrValue = target.getAttribute('date:' + attrName);
145
+ if (attrValue) {
146
+ inlineSettings = inlineSettings || {};
147
+ try {
148
+ inlineSettings[attrName] = eval(attrValue);
149
+ } catch (err) {
150
+ inlineSettings[attrName] = attrValue;
151
+ }
152
+ }
153
+ }
154
+ var nodeName = target.nodeName.toLowerCase();
155
+ var inline = (nodeName == 'div' || nodeName == 'span');
156
+ if (!target.id) {
157
+ this.uuid += 1;
158
+ target.id = 'dp' + this.uuid;
159
+ }
160
+ var inst = this._newInst($(target), inline);
161
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
162
+ if (nodeName == 'input') {
163
+ this._connectDatepicker(target, inst);
164
+ } else if (inline) {
165
+ this._inlineDatepicker(target, inst);
166
+ }
167
+ },
168
+
169
+ /* Create a new instance object. */
170
+ _newInst: function(target, inline) {
171
+ var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
172
+ return {id: id, input: target, // associated target
173
+ selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
174
+ drawMonth: 0, drawYear: 0, // month being drawn
175
+ inline: inline, // is datepicker inline or not
176
+ dpDiv: (!inline ? this.dpDiv : // presentation div
177
+ bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
178
+ },
179
+
180
+ /* Attach the date picker to an input field. */
181
+ _connectDatepicker: function(target, inst) {
182
+ var input = $(target);
183
+ inst.append = $([]);
184
+ inst.trigger = $([]);
185
+ if (input.hasClass(this.markerClassName))
186
+ return;
187
+ this._attachments(input, inst);
188
+ input.addClass(this.markerClassName).keydown(this._doKeyDown).
189
+ keypress(this._doKeyPress).keyup(this._doKeyUp).
190
+ bind("setData.datepicker", function(event, key, value) {
191
+ inst.settings[key] = value;
192
+ }).bind("getData.datepicker", function(event, key) {
193
+ return this._get(inst, key);
194
+ });
195
+ this._autoSize(inst);
196
+ $.data(target, PROP_NAME, inst);
197
+ },
198
+
199
+ /* Make attachments based on settings. */
200
+ _attachments: function(input, inst) {
201
+ var appendText = this._get(inst, 'appendText');
202
+ var isRTL = this._get(inst, 'isRTL');
203
+ if (inst.append)
204
+ inst.append.remove();
205
+ if (appendText) {
206
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
207
+ input[isRTL ? 'before' : 'after'](inst.append);
208
+ }
209
+ input.unbind('focus', this._showDatepicker);
210
+ if (inst.trigger)
211
+ inst.trigger.remove();
212
+ var showOn = this._get(inst, 'showOn');
213
+ if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
214
+ input.focus(this._showDatepicker);
215
+ if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
216
+ var buttonText = this._get(inst, 'buttonText');
217
+ var buttonImage = this._get(inst, 'buttonImage');
218
+ inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
219
+ $('<img/>').addClass(this._triggerClass).
220
+ attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
221
+ $('<button type="button"></button>').addClass(this._triggerClass).
222
+ html(buttonImage == '' ? buttonText : $('<img/>').attr(
223
+ { src:buttonImage, alt:buttonText, title:buttonText })));
224
+ input[isRTL ? 'before' : 'after'](inst.trigger);
225
+ inst.trigger.click(function() {
226
+ if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
227
+ $.datepicker._hideDatepicker();
228
+ else
229
+ $.datepicker._showDatepicker(input[0]);
230
+ return false;
231
+ });
232
+ }
233
+ },
234
+
235
+ /* Apply the maximum length for the date format. */
236
+ _autoSize: function(inst) {
237
+ if (this._get(inst, 'autoSize') && !inst.inline) {
238
+ var date = new Date(2009, 12 - 1, 20); // Ensure double digits
239
+ var dateFormat = this._get(inst, 'dateFormat');
240
+ if (dateFormat.match(/[DM]/)) {
241
+ var findMax = function(names) {
242
+ var max = 0;
243
+ var maxI = 0;
244
+ for (var i = 0; i < names.length; i++) {
245
+ if (names[i].length > max) {
246
+ max = names[i].length;
247
+ maxI = i;
248
+ }
249
+ }
250
+ return maxI;
251
+ };
252
+ date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
253
+ 'monthNames' : 'monthNamesShort'))));
254
+ date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
255
+ 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
256
+ }
257
+ inst.input.attr('size', this._formatDate(inst, date).length);
258
+ }
259
+ },
260
+
261
+ /* Attach an inline date picker to a div. */
262
+ _inlineDatepicker: function(target, inst) {
263
+ var divSpan = $(target);
264
+ if (divSpan.hasClass(this.markerClassName))
265
+ return;
266
+ divSpan.addClass(this.markerClassName).append(inst.dpDiv).
267
+ bind("setData.datepicker", function(event, key, value){
268
+ inst.settings[key] = value;
269
+ }).bind("getData.datepicker", function(event, key){
270
+ return this._get(inst, key);
271
+ });
272
+ $.data(target, PROP_NAME, inst);
273
+ this._setDate(inst, this._getDefaultDate(inst), true);
274
+ this._updateDatepicker(inst);
275
+ this._updateAlternate(inst);
276
+ inst.dpDiv.show();
277
+ },
278
+
279
+ /* Pop-up the date picker in a "dialog" box.
280
+ @param input element - ignored
281
+ @param date string or Date - the initial date to display
282
+ @param onSelect function - the function to call when a date is selected
283
+ @param settings object - update the dialog date picker instance's settings (anonymous object)
284
+ @param pos int[2] - coordinates for the dialog's position within the screen or
285
+ event - with x/y coordinates or
286
+ leave empty for default (screen centre)
287
+ @return the manager object */
288
+ _dialogDatepicker: function(input, date, onSelect, settings, pos) {
289
+ var inst = this._dialogInst; // internal instance
290
+ if (!inst) {
291
+ this.uuid += 1;
292
+ var id = 'dp' + this.uuid;
293
+ this._dialogInput = $('<input type="text" id="' + id +
294
+ '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
295
+ this._dialogInput.keydown(this._doKeyDown);
296
+ $('body').append(this._dialogInput);
297
+ inst = this._dialogInst = this._newInst(this._dialogInput, false);
298
+ inst.settings = {};
299
+ $.data(this._dialogInput[0], PROP_NAME, inst);
300
+ }
301
+ extendRemove(inst.settings, settings || {});
302
+ date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
303
+ this._dialogInput.val(date);
304
+
305
+ this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
306
+ if (!this._pos) {
307
+ var browserWidth = document.documentElement.clientWidth;
308
+ var browserHeight = document.documentElement.clientHeight;
309
+ var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
310
+ var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
311
+ this._pos = // should use actual width/height below
312
+ [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
313
+ }
314
+
315
+ // move input on screen for focus, but hidden behind dialog
316
+ this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
317
+ inst.settings.onSelect = onSelect;
318
+ this._inDialog = true;
319
+ this.dpDiv.addClass(this._dialogClass);
320
+ this._showDatepicker(this._dialogInput[0]);
321
+ if ($.blockUI)
322
+ $.blockUI(this.dpDiv);
323
+ $.data(this._dialogInput[0], PROP_NAME, inst);
324
+ return this;
325
+ },
326
+
327
+ /* Detach a datepicker from its control.
328
+ @param target element - the target input field or division or span */
329
+ _destroyDatepicker: function(target) {
330
+ var $target = $(target);
331
+ var inst = $.data(target, PROP_NAME);
332
+ if (!$target.hasClass(this.markerClassName)) {
333
+ return;
334
+ }
335
+ var nodeName = target.nodeName.toLowerCase();
336
+ $.removeData(target, PROP_NAME);
337
+ if (nodeName == 'input') {
338
+ inst.append.remove();
339
+ inst.trigger.remove();
340
+ $target.removeClass(this.markerClassName).
341
+ unbind('focus', this._showDatepicker).
342
+ unbind('keydown', this._doKeyDown).
343
+ unbind('keypress', this._doKeyPress).
344
+ unbind('keyup', this._doKeyUp);
345
+ } else if (nodeName == 'div' || nodeName == 'span')
346
+ $target.removeClass(this.markerClassName).empty();
347
+ },
348
+
349
+ /* Enable the date picker to a jQuery selection.
350
+ @param target element - the target input field or division or span */
351
+ _enableDatepicker: function(target) {
352
+ var $target = $(target);
353
+ var inst = $.data(target, PROP_NAME);
354
+ if (!$target.hasClass(this.markerClassName)) {
355
+ return;
356
+ }
357
+ var nodeName = target.nodeName.toLowerCase();
358
+ if (nodeName == 'input') {
359
+ target.disabled = false;
360
+ inst.trigger.filter('button').
361
+ each(function() { this.disabled = false; }).end().
362
+ filter('img').css({opacity: '1.0', cursor: ''});
363
+ }
364
+ else if (nodeName == 'div' || nodeName == 'span') {
365
+ var inline = $target.children('.' + this._inlineClass);
366
+ inline.children().removeClass('ui-state-disabled');
367
+ inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
368
+ removeAttr("disabled");
369
+ }
370
+ this._disabledInputs = $.map(this._disabledInputs,
371
+ function(value) { return (value == target ? null : value); }); // delete entry
372
+ },
373
+
374
+ /* Disable the date picker to a jQuery selection.
375
+ @param target element - the target input field or division or span */
376
+ _disableDatepicker: function(target) {
377
+ var $target = $(target);
378
+ var inst = $.data(target, PROP_NAME);
379
+ if (!$target.hasClass(this.markerClassName)) {
380
+ return;
381
+ }
382
+ var nodeName = target.nodeName.toLowerCase();
383
+ if (nodeName == 'input') {
384
+ target.disabled = true;
385
+ inst.trigger.filter('button').
386
+ each(function() { this.disabled = true; }).end().
387
+ filter('img').css({opacity: '0.5', cursor: 'default'});
388
+ }
389
+ else if (nodeName == 'div' || nodeName == 'span') {
390
+ var inline = $target.children('.' + this._inlineClass);
391
+ inline.children().addClass('ui-state-disabled');
392
+ inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
393
+ attr("disabled", "disabled");
394
+ }
395
+ this._disabledInputs = $.map(this._disabledInputs,
396
+ function(value) { return (value == target ? null : value); }); // delete entry
397
+ this._disabledInputs[this._disabledInputs.length] = target;
398
+ },
399
+
400
+ /* Is the first field in a jQuery collection disabled as a datepicker?
401
+ @param target element - the target input field or division or span
402
+ @return boolean - true if disabled, false if enabled */
403
+ _isDisabledDatepicker: function(target) {
404
+ if (!target) {
405
+ return false;
406
+ }
407
+ for (var i = 0; i < this._disabledInputs.length; i++) {
408
+ if (this._disabledInputs[i] == target)
409
+ return true;
410
+ }
411
+ return false;
412
+ },
413
+
414
+ /* Retrieve the instance data for the target control.
415
+ @param target element - the target input field or division or span
416
+ @return object - the associated instance data
417
+ @throws error if a jQuery problem getting data */
418
+ _getInst: function(target) {
419
+ try {
420
+ return $.data(target, PROP_NAME);
421
+ }
422
+ catch (err) {
423
+ throw 'Missing instance data for this datepicker';
424
+ }
425
+ },
426
+
427
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
428
+ @param target element - the target input field or division or span
429
+ @param name object - the new settings to update or
430
+ string - the name of the setting to change or retrieve,
431
+ when retrieving also 'all' for all instance settings or
432
+ 'defaults' for all global defaults
433
+ @param value any - the new value for the setting
434
+ (omit if above is an object or to retrieve a value) */
435
+ _optionDatepicker: function(target, name, value) {
436
+ var inst = this._getInst(target);
437
+ if (arguments.length == 2 && typeof name == 'string') {
438
+ return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
439
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
440
+ this._get(inst, name)) : null));
441
+ }
442
+ var settings = name || {};
443
+ if (typeof name == 'string') {
444
+ settings = {};
445
+ settings[name] = value;
446
+ }
447
+ if (inst) {
448
+ if (this._curInst == inst) {
449
+ this._hideDatepicker();
450
+ }
451
+ var date = this._getDateDatepicker(target, true);
452
+ var minDate = this._getMinMaxDate(inst, 'min');
453
+ var maxDate = this._getMinMaxDate(inst, 'max');
454
+ extendRemove(inst.settings, settings);
455
+ // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
456
+ if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
457
+ inst.settings.minDate = this._formatDate(inst, minDate);
458
+ if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
459
+ inst.settings.maxDate = this._formatDate(inst, maxDate);
460
+ this._attachments($(target), inst);
461
+ this._autoSize(inst);
462
+ this._setDate(inst, date);
463
+ this._updateAlternate(inst);
464
+ this._updateDatepicker(inst);
465
+ }
466
+ },
467
+
468
+ // change method deprecated
469
+ _changeDatepicker: function(target, name, value) {
470
+ this._optionDatepicker(target, name, value);
471
+ },
472
+
473
+ /* Redraw the date picker attached to an input field or division.
474
+ @param target element - the target input field or division or span */
475
+ _refreshDatepicker: function(target) {
476
+ var inst = this._getInst(target);
477
+ if (inst) {
478
+ this._updateDatepicker(inst);
479
+ }
480
+ },
481
+
482
+ /* Set the dates for a jQuery selection.
483
+ @param target element - the target input field or division or span
484
+ @param date Date - the new date */
485
+ _setDateDatepicker: function(target, date) {
486
+ var inst = this._getInst(target);
487
+ if (inst) {
488
+ this._setDate(inst, date);
489
+ this._updateDatepicker(inst);
490
+ this._updateAlternate(inst);
491
+ }
492
+ },
493
+
494
+ /* Get the date(s) for the first entry in a jQuery selection.
495
+ @param target element - the target input field or division or span
496
+ @param noDefault boolean - true if no default date is to be used
497
+ @return Date - the current date */
498
+ _getDateDatepicker: function(target, noDefault) {
499
+ var inst = this._getInst(target);
500
+ if (inst && !inst.inline)
501
+ this._setDateFromField(inst, noDefault);
502
+ return (inst ? this._getDate(inst) : null);
503
+ },
504
+
505
+ /* Handle keystrokes. */
506
+ _doKeyDown: function(event) {
507
+ var inst = $.datepicker._getInst(event.target);
508
+ var handled = true;
509
+ var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
510
+ inst._keyEvent = true;
511
+ if ($.datepicker._datepickerShowing)
512
+ switch (event.keyCode) {
513
+ case 9: $.datepicker._hideDatepicker();
514
+ handled = false;
515
+ break; // hide on tab out
516
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
517
+ $.datepicker._currentClass + ')', inst.dpDiv);
518
+ if (sel[0])
519
+ $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
520
+ else
521
+ $.datepicker._hideDatepicker();
522
+ return false; // don't submit the form
523
+ break; // select the value on enter
524
+ case 27: $.datepicker._hideDatepicker();
525
+ break; // hide on escape
526
+ case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
527
+ -$.datepicker._get(inst, 'stepBigMonths') :
528
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
529
+ break; // previous month/year on page up/+ ctrl
530
+ case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
531
+ +$.datepicker._get(inst, 'stepBigMonths') :
532
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
533
+ break; // next month/year on page down/+ ctrl
534
+ case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
535
+ handled = event.ctrlKey || event.metaKey;
536
+ break; // clear on ctrl or command +end
537
+ case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
538
+ handled = event.ctrlKey || event.metaKey;
539
+ break; // current on ctrl or command +home
540
+ case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
541
+ handled = event.ctrlKey || event.metaKey;
542
+ // -1 day on ctrl or command +left
543
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
544
+ -$.datepicker._get(inst, 'stepBigMonths') :
545
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
546
+ // next month/year on alt +left on Mac
547
+ break;
548
+ case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
549
+ handled = event.ctrlKey || event.metaKey;
550
+ break; // -1 week on ctrl or command +up
551
+ case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
552
+ handled = event.ctrlKey || event.metaKey;
553
+ // +1 day on ctrl or command +right
554
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
555
+ +$.datepicker._get(inst, 'stepBigMonths') :
556
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
557
+ // next month/year on alt +right
558
+ break;
559
+ case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
560
+ handled = event.ctrlKey || event.metaKey;
561
+ break; // +1 week on ctrl or command +down
562
+ default: handled = false;
563
+ }
564
+ else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
565
+ $.datepicker._showDatepicker(this);
566
+ else {
567
+ handled = false;
568
+ }
569
+ if (handled) {
570
+ event.preventDefault();
571
+ event.stopPropagation();
572
+ }
573
+ },
574
+
575
+ /* Filter entered characters - based on date format. */
576
+ _doKeyPress: function(event) {
577
+ var inst = $.datepicker._getInst(event.target);
578
+ if ($.datepicker._get(inst, 'constrainInput')) {
579
+ var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
580
+ var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
581
+ return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
582
+ }
583
+ },
584
+
585
+ /* Synchronise manual entry and field/alternate field. */
586
+ _doKeyUp: function(event) {
587
+ var inst = $.datepicker._getInst(event.target);
588
+ if (inst.input.val() != inst.lastVal) {
589
+ try {
590
+ var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
591
+ (inst.input ? inst.input.val() : null),
592
+ $.datepicker._getFormatConfig(inst));
593
+ if (date) { // only if valid
594
+ $.datepicker._setDateFromField(inst);
595
+ $.datepicker._updateAlternate(inst);
596
+ $.datepicker._updateDatepicker(inst);
597
+ }
598
+ }
599
+ catch (event) {
600
+ $.datepicker.log(event);
601
+ }
602
+ }
603
+ return true;
604
+ },
605
+
606
+ /* Pop-up the date picker for a given input field.
607
+ @param input element - the input field attached to the date picker or
608
+ event - if triggered by focus */
609
+ _showDatepicker: function(input) {
610
+ input = input.target || input;
611
+ if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
612
+ input = $('input', input.parentNode)[0];
613
+ if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
614
+ return;
615
+ var inst = $.datepicker._getInst(input);
616
+ if ($.datepicker._curInst && $.datepicker._curInst != inst) {
617
+ $.datepicker._curInst.dpDiv.stop(true, true);
618
+ }
619
+ var beforeShow = $.datepicker._get(inst, 'beforeShow');
620
+ extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
621
+ inst.lastVal = null;
622
+ $.datepicker._lastInput = input;
623
+ $.datepicker._setDateFromField(inst);
624
+ if ($.datepicker._inDialog) // hide cursor
625
+ input.value = '';
626
+ if (!$.datepicker._pos) { // position below input
627
+ $.datepicker._pos = $.datepicker._findPos(input);
628
+ $.datepicker._pos[1] += input.offsetHeight; // add the height
629
+ }
630
+ var isFixed = false;
631
+ $(input).parents().each(function() {
632
+ isFixed |= $(this).css('position') == 'fixed';
633
+ return !isFixed;
634
+ });
635
+ if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
636
+ $.datepicker._pos[0] -= document.documentElement.scrollLeft;
637
+ $.datepicker._pos[1] -= document.documentElement.scrollTop;
638
+ }
639
+ var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
640
+ $.datepicker._pos = null;
641
+ //to avoid flashes on Firefox
642
+ inst.dpDiv.empty();
643
+ // determine sizing offscreen
644
+ inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
645
+ $.datepicker._updateDatepicker(inst);
646
+ // fix width for dynamic number of date pickers
647
+ // and adjust position before showing
648
+ offset = $.datepicker._checkOffset(inst, offset, isFixed);
649
+ inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
650
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
651
+ left: offset.left + 'px', top: offset.top + 'px'});
652
+ if (!inst.inline) {
653
+ var showAnim = $.datepicker._get(inst, 'showAnim');
654
+ var duration = $.datepicker._get(inst, 'duration');
655
+ var postProcess = function() {
656
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
657
+ if( !! cover.length ){
658
+ var borders = $.datepicker._getBorders(inst.dpDiv);
659
+ cover.css({left: -borders[0], top: -borders[1],
660
+ width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
661
+ }
662
+ };
663
+ inst.dpDiv.zIndex($(input).zIndex()+1);
664
+ $.datepicker._datepickerShowing = true;
665
+ if ($.effects && $.effects[showAnim])
666
+ inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
667
+ else
668
+ inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
669
+ if (!showAnim || !duration)
670
+ postProcess();
671
+ if (inst.input.is(':visible') && !inst.input.is(':disabled'))
672
+ inst.input.focus();
673
+ $.datepicker._curInst = inst;
674
+ }
675
+ },
676
+
677
+ /* Generate the date picker content. */
678
+ _updateDatepicker: function(inst) {
679
+ var self = this;
680
+ var borders = $.datepicker._getBorders(inst.dpDiv);
681
+ instActive = inst; // for delegate hover events
682
+ inst.dpDiv.empty().append(this._generateHTML(inst));
683
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
684
+ if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
685
+ cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
686
+ }
687
+ inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
688
+ var numMonths = this._getNumberOfMonths(inst);
689
+ var cols = numMonths[1];
690
+ var width = 17;
691
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
692
+ if (cols > 1)
693
+ inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
694
+ inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
695
+ 'Class']('ui-datepicker-multi');
696
+ inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
697
+ 'Class']('ui-datepicker-rtl');
698
+ if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
699
+ // #6694 - don't focus the input if it's already focused
700
+ // this breaks the change event in IE
701
+ inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
702
+ inst.input.focus();
703
+ // deffered render of the years select (to avoid flashes on Firefox)
704
+ if( inst.yearshtml ){
705
+ var origyearshtml = inst.yearshtml;
706
+ setTimeout(function(){
707
+ //assure that inst.yearshtml didn't change.
708
+ if( origyearshtml === inst.yearshtml && inst.yearshtml ){
709
+ inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
710
+ }
711
+ origyearshtml = inst.yearshtml = null;
712
+ }, 0);
713
+ }
714
+ },
715
+
716
+ /* Retrieve the size of left and top borders for an element.
717
+ @param elem (jQuery object) the element of interest
718
+ @return (number[2]) the left and top borders */
719
+ _getBorders: function(elem) {
720
+ var convert = function(value) {
721
+ return {thin: 1, medium: 2, thick: 3}[value] || value;
722
+ };
723
+ return [parseFloat(convert(elem.css('border-left-width'))),
724
+ parseFloat(convert(elem.css('border-top-width')))];
725
+ },
726
+
727
+ /* Check positioning to remain on screen. */
728
+ _checkOffset: function(inst, offset, isFixed) {
729
+ var dpWidth = inst.dpDiv.outerWidth();
730
+ var dpHeight = inst.dpDiv.outerHeight();
731
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
732
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
733
+ var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
734
+ var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
735
+
736
+ offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
737
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
738
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
739
+
740
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
741
+ offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
742
+ Math.abs(offset.left + dpWidth - viewWidth) : 0);
743
+ offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
744
+ Math.abs(dpHeight + inputHeight) : 0);
745
+
746
+ return offset;
747
+ },
748
+
749
+ /* Find an object's position on the screen. */
750
+ _findPos: function(obj) {
751
+ var inst = this._getInst(obj);
752
+ var isRTL = this._get(inst, 'isRTL');
753
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
754
+ obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
755
+ }
756
+ var position = $(obj).offset();
757
+ return [position.left, position.top];
758
+ },
759
+
760
+ /* Hide the date picker from view.
761
+ @param input element - the input field attached to the date picker */
762
+ _hideDatepicker: function(input) {
763
+ var inst = this._curInst;
764
+ if (!inst || (input && inst != $.data(input, PROP_NAME)))
765
+ return;
766
+ if (this._datepickerShowing) {
767
+ var showAnim = this._get(inst, 'showAnim');
768
+ var duration = this._get(inst, 'duration');
769
+ var postProcess = function() {
770
+ $.datepicker._tidyDialog(inst);
771
+ this._curInst = null;
772
+ };
773
+ if ($.effects && $.effects[showAnim])
774
+ inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
775
+ else
776
+ inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
777
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
778
+ if (!showAnim)
779
+ postProcess();
780
+ var onClose = this._get(inst, 'onClose');
781
+ if (onClose)
782
+ onClose.apply((inst.input ? inst.input[0] : null),
783
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
784
+ this._datepickerShowing = false;
785
+ this._lastInput = null;
786
+ if (this._inDialog) {
787
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
788
+ if ($.blockUI) {
789
+ $.unblockUI();
790
+ $('body').append(this.dpDiv);
791
+ }
792
+ }
793
+ this._inDialog = false;
794
+ }
795
+ },
796
+
797
+ /* Tidy up after a dialog display. */
798
+ _tidyDialog: function(inst) {
799
+ inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
800
+ },
801
+
802
+ /* Close date picker if clicked elsewhere. */
803
+ _checkExternalClick: function(event) {
804
+ if (!$.datepicker._curInst)
805
+ return;
806
+ var $target = $(event.target);
807
+ if ($target[0].id != $.datepicker._mainDivId &&
808
+ $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
809
+ !$target.hasClass($.datepicker.markerClassName) &&
810
+ !$target.hasClass($.datepicker._triggerClass) &&
811
+ $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
812
+ $.datepicker._hideDatepicker();
813
+ },
814
+
815
+ /* Adjust one of the date sub-fields. */
816
+ _adjustDate: function(id, offset, period) {
817
+ var target = $(id);
818
+ var inst = this._getInst(target[0]);
819
+ if (this._isDisabledDatepicker(target[0])) {
820
+ return;
821
+ }
822
+ this._adjustInstDate(inst, offset +
823
+ (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
824
+ period);
825
+ this._updateDatepicker(inst);
826
+ },
827
+
828
+ /* Action for current link. */
829
+ _gotoToday: function(id) {
830
+ var target = $(id);
831
+ var inst = this._getInst(target[0]);
832
+ if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
833
+ inst.selectedDay = inst.currentDay;
834
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth;
835
+ inst.drawYear = inst.selectedYear = inst.currentYear;
836
+ }
837
+ else {
838
+ var date = new Date();
839
+ inst.selectedDay = date.getDate();
840
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
841
+ inst.drawYear = inst.selectedYear = date.getFullYear();
842
+ }
843
+ this._notifyChange(inst);
844
+ this._adjustDate(target);
845
+ },
846
+
847
+ /* Action for selecting a new month/year. */
848
+ _selectMonthYear: function(id, select, period) {
849
+ var target = $(id);
850
+ var inst = this._getInst(target[0]);
851
+ inst._selectingMonthYear = false;
852
+ inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
853
+ inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
854
+ parseInt(select.options[select.selectedIndex].value,10);
855
+ this._notifyChange(inst);
856
+ this._adjustDate(target);
857
+ },
858
+
859
+ /* Restore input focus after not changing month/year. */
860
+ _clickMonthYear: function(id) {
861
+ var target = $(id);
862
+ var inst = this._getInst(target[0]);
863
+ if (inst.input && inst._selectingMonthYear) {
864
+ setTimeout(function() {
865
+ inst.input.focus();
866
+ }, 0);
867
+ }
868
+ inst._selectingMonthYear = !inst._selectingMonthYear;
869
+ },
870
+
871
+ /* Action for selecting a day. */
872
+ _selectDay: function(id, month, year, td) {
873
+ var target = $(id);
874
+ if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
875
+ return;
876
+ }
877
+ var inst = this._getInst(target[0]);
878
+ inst.selectedDay = inst.currentDay = $('a', td).html();
879
+ inst.selectedMonth = inst.currentMonth = month;
880
+ inst.selectedYear = inst.currentYear = year;
881
+ this._selectDate(id, this._formatDate(inst,
882
+ inst.currentDay, inst.currentMonth, inst.currentYear));
883
+ },
884
+
885
+ /* Erase the input field and hide the date picker. */
886
+ _clearDate: function(id) {
887
+ var target = $(id);
888
+ var inst = this._getInst(target[0]);
889
+ this._selectDate(target, '');
890
+ },
891
+
892
+ /* Update the input field with the selected date. */
893
+ _selectDate: function(id, dateStr) {
894
+ var target = $(id);
895
+ var inst = this._getInst(target[0]);
896
+ dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
897
+ if (inst.input)
898
+ inst.input.val(dateStr);
899
+ this._updateAlternate(inst);
900
+ var onSelect = this._get(inst, 'onSelect');
901
+ if (onSelect)
902
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
903
+ else if (inst.input)
904
+ inst.input.trigger('change'); // fire the change event
905
+ if (inst.inline)
906
+ this._updateDatepicker(inst);
907
+ else {
908
+ this._hideDatepicker();
909
+ this._lastInput = inst.input[0];
910
+ if (typeof(inst.input[0]) != 'object')
911
+ inst.input.focus(); // restore focus
912
+ this._lastInput = null;
913
+ }
914
+ },
915
+
916
+ /* Update any alternate field to synchronise with the main field. */
917
+ _updateAlternate: function(inst) {
918
+ var altField = this._get(inst, 'altField');
919
+ if (altField) { // update alternate field too
920
+ var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
921
+ var date = this._getDate(inst);
922
+ var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
923
+ $(altField).each(function() { $(this).val(dateStr); });
924
+ }
925
+ },
926
+
927
+ /* Set as beforeShowDay function to prevent selection of weekends.
928
+ @param date Date - the date to customise
929
+ @return [boolean, string] - is this date selectable?, what is its CSS class? */
930
+ noWeekends: function(date) {
931
+ var day = date.getDay();
932
+ return [(day > 0 && day < 6), ''];
933
+ },
934
+
935
+ /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
936
+ @param date Date - the date to get the week for
937
+ @return number - the number of the week within the year that contains this date */
938
+ iso8601Week: function(date) {
939
+ var checkDate = new Date(date.getTime());
940
+ // Find Thursday of this week starting on Monday
941
+ checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
942
+ var time = checkDate.getTime();
943
+ checkDate.setMonth(0); // Compare with Jan 1
944
+ checkDate.setDate(1);
945
+ return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
946
+ },
947
+
948
+ /* Parse a string value into a date object.
949
+ See formatDate below for the possible formats.
950
+
951
+ @param format string - the expected format of the date
952
+ @param value string - the date in the above format
953
+ @param settings Object - attributes include:
954
+ shortYearCutoff number - the cutoff year for determining the century (optional)
955
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
956
+ dayNames string[7] - names of the days from Sunday (optional)
957
+ monthNamesShort string[12] - abbreviated names of the months (optional)
958
+ monthNames string[12] - names of the months (optional)
959
+ @return Date - the extracted date value or null if value is blank */
960
+ parseDate: function (format, value, settings) {
961
+ if (format == null || value == null)
962
+ throw 'Invalid arguments';
963
+ value = (typeof value == 'object' ? value.toString() : value + '');
964
+ if (value == '')
965
+ return null;
966
+ var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
967
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
968
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
969
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
970
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
971
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
972
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
973
+ var year = -1;
974
+ var month = -1;
975
+ var day = -1;
976
+ var doy = -1;
977
+ var literal = false;
978
+ // Check whether a format character is doubled
979
+ var lookAhead = function(match) {
980
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
981
+ if (matches)
982
+ iFormat++;
983
+ return matches;
984
+ };
985
+ // Extract a number from the string value
986
+ var getNumber = function(match) {
987
+ var isDoubled = lookAhead(match);
988
+ var size = (match == '@' ? 14 : (match == '!' ? 20 :
989
+ (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
990
+ var digits = new RegExp('^\\d{1,' + size + '}');
991
+ var num = value.substring(iValue).match(digits);
992
+ if (!num)
993
+ throw 'Missing number at position ' + iValue;
994
+ iValue += num[0].length;
995
+ return parseInt(num[0], 10);
996
+ };
997
+ // Extract a name from the string value and convert to an index
998
+ var getName = function(match, shortNames, longNames) {
999
+ var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
1000
+ return [ [k, v] ];
1001
+ }).sort(function (a, b) {
1002
+ return -(a[1].length - b[1].length);
1003
+ });
1004
+ var index = -1;
1005
+ $.each(names, function (i, pair) {
1006
+ var name = pair[1];
1007
+ if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
1008
+ index = pair[0];
1009
+ iValue += name.length;
1010
+ return false;
1011
+ }
1012
+ });
1013
+ if (index != -1)
1014
+ return index + 1;
1015
+ else
1016
+ throw 'Unknown name at position ' + iValue;
1017
+ };
1018
+ // Confirm that a literal character matches the string value
1019
+ var checkLiteral = function() {
1020
+ if (value.charAt(iValue) != format.charAt(iFormat))
1021
+ throw 'Unexpected literal at position ' + iValue;
1022
+ iValue++;
1023
+ };
1024
+ var iValue = 0;
1025
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
1026
+ if (literal)
1027
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
1028
+ literal = false;
1029
+ else
1030
+ checkLiteral();
1031
+ else
1032
+ switch (format.charAt(iFormat)) {
1033
+ case 'd':
1034
+ day = getNumber('d');
1035
+ break;
1036
+ case 'D':
1037
+ getName('D', dayNamesShort, dayNames);
1038
+ break;
1039
+ case 'o':
1040
+ doy = getNumber('o');
1041
+ break;
1042
+ case 'm':
1043
+ month = getNumber('m');
1044
+ break;
1045
+ case 'M':
1046
+ month = getName('M', monthNamesShort, monthNames);
1047
+ break;
1048
+ case 'y':
1049
+ year = getNumber('y');
1050
+ break;
1051
+ case '@':
1052
+ var date = new Date(getNumber('@'));
1053
+ year = date.getFullYear();
1054
+ month = date.getMonth() + 1;
1055
+ day = date.getDate();
1056
+ break;
1057
+ case '!':
1058
+ var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
1059
+ year = date.getFullYear();
1060
+ month = date.getMonth() + 1;
1061
+ day = date.getDate();
1062
+ break;
1063
+ case "'":
1064
+ if (lookAhead("'"))
1065
+ checkLiteral();
1066
+ else
1067
+ literal = true;
1068
+ break;
1069
+ default:
1070
+ checkLiteral();
1071
+ }
1072
+ }
1073
+ if (year == -1)
1074
+ year = new Date().getFullYear();
1075
+ else if (year < 100)
1076
+ year += new Date().getFullYear() - new Date().getFullYear() % 100 +
1077
+ (year <= shortYearCutoff ? 0 : -100);
1078
+ if (doy > -1) {
1079
+ month = 1;
1080
+ day = doy;
1081
+ do {
1082
+ var dim = this._getDaysInMonth(year, month - 1);
1083
+ if (day <= dim)
1084
+ break;
1085
+ month++;
1086
+ day -= dim;
1087
+ } while (true);
1088
+ }
1089
+ var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
1090
+ if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
1091
+ throw 'Invalid date'; // E.g. 31/02/00
1092
+ return date;
1093
+ },
1094
+
1095
+ /* Standard date formats. */
1096
+ ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
1097
+ COOKIE: 'D, dd M yy',
1098
+ ISO_8601: 'yy-mm-dd',
1099
+ RFC_822: 'D, d M y',
1100
+ RFC_850: 'DD, dd-M-y',
1101
+ RFC_1036: 'D, d M y',
1102
+ RFC_1123: 'D, d M yy',
1103
+ RFC_2822: 'D, d M yy',
1104
+ RSS: 'D, d M y', // RFC 822
1105
+ TICKS: '!',
1106
+ TIMESTAMP: '@',
1107
+ W3C: 'yy-mm-dd', // ISO 8601
1108
+
1109
+ _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
1110
+ Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
1111
+
1112
+ /* Format a date object into a string value.
1113
+ The format can be combinations of the following:
1114
+ d - day of month (no leading zero)
1115
+ dd - day of month (two digit)
1116
+ o - day of year (no leading zeros)
1117
+ oo - day of year (three digit)
1118
+ D - day name short
1119
+ DD - day name long
1120
+ m - month of year (no leading zero)
1121
+ mm - month of year (two digit)
1122
+ M - month name short
1123
+ MM - month name long
1124
+ y - year (two digit)
1125
+ yy - year (four digit)
1126
+ @ - Unix timestamp (ms since 01/01/1970)
1127
+ ! - Windows ticks (100ns since 01/01/0001)
1128
+ '...' - literal text
1129
+ '' - single quote
1130
+
1131
+ @param format string - the desired format of the date
1132
+ @param date Date - the date value to format
1133
+ @param settings Object - attributes include:
1134
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
1135
+ dayNames string[7] - names of the days from Sunday (optional)
1136
+ monthNamesShort string[12] - abbreviated names of the months (optional)
1137
+ monthNames string[12] - names of the months (optional)
1138
+ @return string - the date in the above format */
1139
+ formatDate: function (format, date, settings) {
1140
+ if (!date)
1141
+ return '';
1142
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
1143
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
1144
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
1145
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
1146
+ // Check whether a format character is doubled
1147
+ var lookAhead = function(match) {
1148
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
1149
+ if (matches)
1150
+ iFormat++;
1151
+ return matches;
1152
+ };
1153
+ // Format a number, with leading zero if necessary
1154
+ var formatNumber = function(match, value, len) {
1155
+ var num = '' + value;
1156
+ if (lookAhead(match))
1157
+ while (num.length < len)
1158
+ num = '0' + num;
1159
+ return num;
1160
+ };
1161
+ // Format a name, short or long as requested
1162
+ var formatName = function(match, value, shortNames, longNames) {
1163
+ return (lookAhead(match) ? longNames[value] : shortNames[value]);
1164
+ };
1165
+ var output = '';
1166
+ var literal = false;
1167
+ if (date)
1168
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
1169
+ if (literal)
1170
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
1171
+ literal = false;
1172
+ else
1173
+ output += format.charAt(iFormat);
1174
+ else
1175
+ switch (format.charAt(iFormat)) {
1176
+ case 'd':
1177
+ output += formatNumber('d', date.getDate(), 2);
1178
+ break;
1179
+ case 'D':
1180
+ output += formatName('D', date.getDay(), dayNamesShort, dayNames);
1181
+ break;
1182
+ case 'o':
1183
+ output += formatNumber('o',
1184
+ (date.getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000, 3);
1185
+ break;
1186
+ case 'm':
1187
+ output += formatNumber('m', date.getMonth() + 1, 2);
1188
+ break;
1189
+ case 'M':
1190
+ output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
1191
+ break;
1192
+ case 'y':
1193
+ output += (lookAhead('y') ? date.getFullYear() :
1194
+ (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
1195
+ break;
1196
+ case '@':
1197
+ output += date.getTime();
1198
+ break;
1199
+ case '!':
1200
+ output += date.getTime() * 10000 + this._ticksTo1970;
1201
+ break;
1202
+ case "'":
1203
+ if (lookAhead("'"))
1204
+ output += "'";
1205
+ else
1206
+ literal = true;
1207
+ break;
1208
+ default:
1209
+ output += format.charAt(iFormat);
1210
+ }
1211
+ }
1212
+ return output;
1213
+ },
1214
+
1215
+ /* Extract all possible characters from the date format. */
1216
+ _possibleChars: function (format) {
1217
+ var chars = '';
1218
+ var literal = false;
1219
+ // Check whether a format character is doubled
1220
+ var lookAhead = function(match) {
1221
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
1222
+ if (matches)
1223
+ iFormat++;
1224
+ return matches;
1225
+ };
1226
+ for (var iFormat = 0; iFormat < format.length; iFormat++)
1227
+ if (literal)
1228
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
1229
+ literal = false;
1230
+ else
1231
+ chars += format.charAt(iFormat);
1232
+ else
1233
+ switch (format.charAt(iFormat)) {
1234
+ case 'd': case 'm': case 'y': case '@':
1235
+ chars += '0123456789';
1236
+ break;
1237
+ case 'D': case 'M':
1238
+ return null; // Accept anything
1239
+ case "'":
1240
+ if (lookAhead("'"))
1241
+ chars += "'";
1242
+ else
1243
+ literal = true;
1244
+ break;
1245
+ default:
1246
+ chars += format.charAt(iFormat);
1247
+ }
1248
+ return chars;
1249
+ },
1250
+
1251
+ /* Get a setting value, defaulting if necessary. */
1252
+ _get: function(inst, name) {
1253
+ return inst.settings[name] !== undefined ?
1254
+ inst.settings[name] : this._defaults[name];
1255
+ },
1256
+
1257
+ /* Parse existing date and initialise date picker. */
1258
+ _setDateFromField: function(inst, noDefault) {
1259
+ if (inst.input.val() == inst.lastVal) {
1260
+ return;
1261
+ }
1262
+ var dateFormat = this._get(inst, 'dateFormat');
1263
+ var dates = inst.lastVal = inst.input ? inst.input.val() : null;
1264
+ var date, defaultDate;
1265
+ date = defaultDate = this._getDefaultDate(inst);
1266
+ var settings = this._getFormatConfig(inst);
1267
+ try {
1268
+ date = this.parseDate(dateFormat, dates, settings) || defaultDate;
1269
+ } catch (event) {
1270
+ this.log(event);
1271
+ dates = (noDefault ? '' : dates);
1272
+ }
1273
+ inst.selectedDay = date.getDate();
1274
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
1275
+ inst.drawYear = inst.selectedYear = date.getFullYear();
1276
+ inst.currentDay = (dates ? date.getDate() : 0);
1277
+ inst.currentMonth = (dates ? date.getMonth() : 0);
1278
+ inst.currentYear = (dates ? date.getFullYear() : 0);
1279
+ this._adjustInstDate(inst);
1280
+ },
1281
+
1282
+ /* Retrieve the default date shown on opening. */
1283
+ _getDefaultDate: function(inst) {
1284
+ return this._restrictMinMax(inst,
1285
+ this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
1286
+ },
1287
+
1288
+ /* A date may be specified as an exact value or a relative one. */
1289
+ _determineDate: function(inst, date, defaultDate) {
1290
+ var offsetNumeric = function(offset) {
1291
+ var date = new Date();
1292
+ date.setDate(date.getDate() + offset);
1293
+ return date;
1294
+ };
1295
+ var offsetString = function(offset) {
1296
+ try {
1297
+ return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
1298
+ offset, $.datepicker._getFormatConfig(inst));
1299
+ }
1300
+ catch (e) {
1301
+ // Ignore
1302
+ }
1303
+ var date = (offset.toLowerCase().match(/^c/) ?
1304
+ $.datepicker._getDate(inst) : null) || new Date();
1305
+ var year = date.getFullYear();
1306
+ var month = date.getMonth();
1307
+ var day = date.getDate();
1308
+ var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
1309
+ var matches = pattern.exec(offset);
1310
+ while (matches) {
1311
+ switch (matches[2] || 'd') {
1312
+ case 'd' : case 'D' :
1313
+ day += parseInt(matches[1],10); break;
1314
+ case 'w' : case 'W' :
1315
+ day += parseInt(matches[1],10) * 7; break;
1316
+ case 'm' : case 'M' :
1317
+ month += parseInt(matches[1],10);
1318
+ day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
1319
+ break;
1320
+ case 'y': case 'Y' :
1321
+ year += parseInt(matches[1],10);
1322
+ day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
1323
+ break;
1324
+ }
1325
+ matches = pattern.exec(offset);
1326
+ }
1327
+ return new Date(year, month, day);
1328
+ };
1329
+ var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
1330
+ (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
1331
+ newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
1332
+ if (newDate) {
1333
+ newDate.setHours(0);
1334
+ newDate.setMinutes(0);
1335
+ newDate.setSeconds(0);
1336
+ newDate.setMilliseconds(0);
1337
+ }
1338
+ return this._daylightSavingAdjust(newDate);
1339
+ },
1340
+
1341
+ /* Handle switch to/from daylight saving.
1342
+ Hours may be non-zero on daylight saving cut-over:
1343
+ > 12 when midnight changeover, but then cannot generate
1344
+ midnight datetime, so jump to 1AM, otherwise reset.
1345
+ @param date (Date) the date to check
1346
+ @return (Date) the corrected date */
1347
+ _daylightSavingAdjust: function(date) {
1348
+ if (!date) return null;
1349
+ date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
1350
+ return date;
1351
+ },
1352
+
1353
+ /* Set the date(s) directly. */
1354
+ _setDate: function(inst, date, noChange) {
1355
+ var clear = !date;
1356
+ var origMonth = inst.selectedMonth;
1357
+ var origYear = inst.selectedYear;
1358
+ var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
1359
+ inst.selectedDay = inst.currentDay = newDate.getDate();
1360
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
1361
+ inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
1362
+ if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
1363
+ this._notifyChange(inst);
1364
+ this._adjustInstDate(inst);
1365
+ if (inst.input) {
1366
+ inst.input.val(clear ? '' : this._formatDate(inst));
1367
+ }
1368
+ },
1369
+
1370
+ /* Retrieve the date(s) directly. */
1371
+ _getDate: function(inst) {
1372
+ var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
1373
+ this._daylightSavingAdjust(new Date(
1374
+ inst.currentYear, inst.currentMonth, inst.currentDay)));
1375
+ return startDate;
1376
+ },
1377
+
1378
+ /* Generate the HTML for the current state of the date picker. */
1379
+ _generateHTML: function(inst) {
1380
+ var today = new Date();
1381
+ today = this._daylightSavingAdjust(
1382
+ new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
1383
+ var isRTL = this._get(inst, 'isRTL');
1384
+ var showButtonPanel = this._get(inst, 'showButtonPanel');
1385
+ var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
1386
+ var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
1387
+ var numMonths = this._getNumberOfMonths(inst);
1388
+ var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
1389
+ var stepMonths = this._get(inst, 'stepMonths');
1390
+ var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
1391
+ var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
1392
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
1393
+ var minDate = this._getMinMaxDate(inst, 'min');
1394
+ var maxDate = this._getMinMaxDate(inst, 'max');
1395
+ var drawMonth = inst.drawMonth - showCurrentAtPos;
1396
+ var drawYear = inst.drawYear;
1397
+ if (drawMonth < 0) {
1398
+ drawMonth += 12;
1399
+ drawYear--;
1400
+ }
1401
+ if (maxDate) {
1402
+ var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
1403
+ maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
1404
+ maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
1405
+ while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
1406
+ drawMonth--;
1407
+ if (drawMonth < 0) {
1408
+ drawMonth = 11;
1409
+ drawYear--;
1410
+ }
1411
+ }
1412
+ }
1413
+ inst.drawMonth = drawMonth;
1414
+ inst.drawYear = drawYear;
1415
+ var prevText = this._get(inst, 'prevText');
1416
+ prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
1417
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
1418
+ this._getFormatConfig(inst)));
1419
+ var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
1420
+ '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1421
+ '.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
1422
+ ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
1423
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
1424
+ var nextText = this._get(inst, 'nextText');
1425
+ nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
1426
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
1427
+ this._getFormatConfig(inst)));
1428
+ var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
1429
+ '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1430
+ '.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
1431
+ ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
1432
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
1433
+ var currentText = this._get(inst, 'currentText');
1434
+ var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
1435
+ currentText = (!navigationAsDateFormat ? currentText :
1436
+ this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
1437
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1438
+ '.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
1439
+ var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
1440
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1441
+ '.datepicker._gotoToday(\'#' + inst.id + '\');"' +
1442
+ '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
1443
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
1444
+ firstDay = (isNaN(firstDay) ? 0 : firstDay);
1445
+ var showWeek = this._get(inst, 'showWeek');
1446
+ var dayNames = this._get(inst, 'dayNames');
1447
+ var dayNamesShort = this._get(inst, 'dayNamesShort');
1448
+ var dayNamesMin = this._get(inst, 'dayNamesMin');
1449
+ var monthNames = this._get(inst, 'monthNames');
1450
+ var monthNamesShort = this._get(inst, 'monthNamesShort');
1451
+ var beforeShowDay = this._get(inst, 'beforeShowDay');
1452
+ var showOtherMonths = this._get(inst, 'showOtherMonths');
1453
+ var selectOtherMonths = this._get(inst, 'selectOtherMonths');
1454
+ var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
1455
+ var defaultDate = this._getDefaultDate(inst);
1456
+ var html = '';
1457
+ for (var row = 0; row < numMonths[0]; row++) {
1458
+ var group = '';
1459
+ for (var col = 0; col < numMonths[1]; col++) {
1460
+ var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
1461
+ var cornerClass = ' ui-corner-all';
1462
+ var calender = '';
1463
+ if (isMultiMonth) {
1464
+ calender += '<div class="ui-datepicker-group';
1465
+ if (numMonths[1] > 1)
1466
+ switch (col) {
1467
+ case 0: calender += ' ui-datepicker-group-first';
1468
+ cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
1469
+ case numMonths[1]-1: calender += ' ui-datepicker-group-last';
1470
+ cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
1471
+ default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
1472
+ }
1473
+ calender += '">';
1474
+ }
1475
+ calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
1476
+ (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
1477
+ (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
1478
+ this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
1479
+ row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
1480
+ '</div><table class="ui-datepicker-calendar"><thead>' +
1481
+ '<tr>';
1482
+ var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
1483
+ for (var dow = 0; dow < 7; dow++) { // days of the week
1484
+ var day = (dow + firstDay) % 7;
1485
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
1486
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
1487
+ }
1488
+ calender += thead + '</tr></thead><tbody>';
1489
+ var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
1490
+ if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
1491
+ inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
1492
+ var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
1493
+ var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
1494
+ var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
1495
+ for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
1496
+ calender += '<tr>';
1497
+ var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
1498
+ this._get(inst, 'calculateWeek')(printDate) + '</td>');
1499
+ for (var dow = 0; dow < 7; dow++) { // create date picker days
1500
+ var daySettings = (beforeShowDay ?
1501
+ beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
1502
+ var otherMonth = (printDate.getMonth() != drawMonth);
1503
+ var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
1504
+ (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
1505
+ tbody += '<td class="' +
1506
+ ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
1507
+ (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
1508
+ ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
1509
+ (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
1510
+ // or defaultDate is current printedDate and defaultDate is selectedDate
1511
+ ' ' + this._dayOverClass : '') + // highlight selected day
1512
+ (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
1513
+ (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
1514
+ (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
1515
+ (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
1516
+ ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
1517
+ (unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
1518
+ inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
1519
+ (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
1520
+ (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
1521
+ (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
1522
+ (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
1523
+ (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
1524
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
1525
+ printDate.setDate(printDate.getDate() + 1);
1526
+ printDate = this._daylightSavingAdjust(printDate);
1527
+ }
1528
+ calender += tbody + '</tr>';
1529
+ }
1530
+ drawMonth++;
1531
+ if (drawMonth > 11) {
1532
+ drawMonth = 0;
1533
+ drawYear++;
1534
+ }
1535
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
1536
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
1537
+ group += calender;
1538
+ }
1539
+ html += group;
1540
+ }
1541
+ html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
1542
+ '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
1543
+ inst._keyEvent = false;
1544
+ return html;
1545
+ },
1546
+
1547
+ /* Generate the month and year header. */
1548
+ _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
1549
+ secondary, monthNames, monthNamesShort) {
1550
+ var changeMonth = this._get(inst, 'changeMonth');
1551
+ var changeYear = this._get(inst, 'changeYear');
1552
+ var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
1553
+ var html = '<div class="ui-datepicker-title">';
1554
+ var monthHtml = '';
1555
+ // month selection
1556
+ if (secondary || !changeMonth)
1557
+ monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
1558
+ else {
1559
+ var inMinYear = (minDate && minDate.getFullYear() == drawYear);
1560
+ var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
1561
+ monthHtml += '<select class="ui-datepicker-month" ' +
1562
+ 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
1563
+ 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
1564
+ '>';
1565
+ for (var month = 0; month < 12; month++) {
1566
+ if ((!inMinYear || month >= minDate.getMonth()) &&
1567
+ (!inMaxYear || month <= maxDate.getMonth()))
1568
+ monthHtml += '<option value="' + month + '"' +
1569
+ (month == drawMonth ? ' selected="selected"' : '') +
1570
+ '>' + monthNamesShort[month] + '</option>';
1571
+ }
1572
+ monthHtml += '</select>';
1573
+ }
1574
+ if (!showMonthAfterYear)
1575
+ html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
1576
+ // year selection
1577
+ if ( !inst.yearshtml ) {
1578
+ inst.yearshtml = '';
1579
+ if (secondary || !changeYear)
1580
+ html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
1581
+ else {
1582
+ // determine range of years to display
1583
+ var years = this._get(inst, 'yearRange').split(':');
1584
+ var thisYear = new Date().getFullYear();
1585
+ var determineYear = function(value) {
1586
+ var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
1587
+ (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
1588
+ parseInt(value, 10)));
1589
+ return (isNaN(year) ? thisYear : year);
1590
+ };
1591
+ var year = determineYear(years[0]);
1592
+ var endYear = Math.max(year, determineYear(years[1] || ''));
1593
+ year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
1594
+ endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
1595
+ inst.yearshtml += '<select class="ui-datepicker-year" ' +
1596
+ 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
1597
+ 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
1598
+ '>';
1599
+ for (; year <= endYear; year++) {
1600
+ inst.yearshtml += '<option value="' + year + '"' +
1601
+ (year == drawYear ? ' selected="selected"' : '') +
1602
+ '>' + year + '</option>';
1603
+ }
1604
+ inst.yearshtml += '</select>';
1605
+
1606
+ html += inst.yearshtml;
1607
+ inst.yearshtml = null;
1608
+ }
1609
+ }
1610
+ html += this._get(inst, 'yearSuffix');
1611
+ if (showMonthAfterYear)
1612
+ html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
1613
+ html += '</div>'; // Close datepicker_header
1614
+ return html;
1615
+ },
1616
+
1617
+ /* Adjust one of the date sub-fields. */
1618
+ _adjustInstDate: function(inst, offset, period) {
1619
+ var year = inst.drawYear + (period == 'Y' ? offset : 0);
1620
+ var month = inst.drawMonth + (period == 'M' ? offset : 0);
1621
+ var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
1622
+ (period == 'D' ? offset : 0);
1623
+ var date = this._restrictMinMax(inst,
1624
+ this._daylightSavingAdjust(new Date(year, month, day)));
1625
+ inst.selectedDay = date.getDate();
1626
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
1627
+ inst.drawYear = inst.selectedYear = date.getFullYear();
1628
+ if (period == 'M' || period == 'Y')
1629
+ this._notifyChange(inst);
1630
+ },
1631
+
1632
+ /* Ensure a date is within any min/max bounds. */
1633
+ _restrictMinMax: function(inst, date) {
1634
+ var minDate = this._getMinMaxDate(inst, 'min');
1635
+ var maxDate = this._getMinMaxDate(inst, 'max');
1636
+ var newDate = (minDate && date < minDate ? minDate : date);
1637
+ newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
1638
+ return newDate;
1639
+ },
1640
+
1641
+ /* Notify change of month/year. */
1642
+ _notifyChange: function(inst) {
1643
+ var onChange = this._get(inst, 'onChangeMonthYear');
1644
+ if (onChange)
1645
+ onChange.apply((inst.input ? inst.input[0] : null),
1646
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
1647
+ },
1648
+
1649
+ /* Determine the number of months to show. */
1650
+ _getNumberOfMonths: function(inst) {
1651
+ var numMonths = this._get(inst, 'numberOfMonths');
1652
+ return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
1653
+ },
1654
+
1655
+ /* Determine the current maximum date - ensure no time components are set. */
1656
+ _getMinMaxDate: function(inst, minMax) {
1657
+ return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
1658
+ },
1659
+
1660
+ /* Find the number of days in a given month. */
1661
+ _getDaysInMonth: function(year, month) {
1662
+ return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
1663
+ },
1664
+
1665
+ /* Find the day of the week of the first of a month. */
1666
+ _getFirstDayOfMonth: function(year, month) {
1667
+ return new Date(year, month, 1).getDay();
1668
+ },
1669
+
1670
+ /* Determines if we should allow a "next/prev" month display change. */
1671
+ _canAdjustMonth: function(inst, offset, curYear, curMonth) {
1672
+ var numMonths = this._getNumberOfMonths(inst);
1673
+ var date = this._daylightSavingAdjust(new Date(curYear,
1674
+ curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
1675
+ if (offset < 0)
1676
+ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
1677
+ return this._isInRange(inst, date);
1678
+ },
1679
+
1680
+ /* Is the given date in the accepted range? */
1681
+ _isInRange: function(inst, date) {
1682
+ var minDate = this._getMinMaxDate(inst, 'min');
1683
+ var maxDate = this._getMinMaxDate(inst, 'max');
1684
+ return ((!minDate || date.getTime() >= minDate.getTime()) &&
1685
+ (!maxDate || date.getTime() <= maxDate.getTime()));
1686
+ },
1687
+
1688
+ /* Provide the configuration settings for formatting/parsing. */
1689
+ _getFormatConfig: function(inst) {
1690
+ var shortYearCutoff = this._get(inst, 'shortYearCutoff');
1691
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
1692
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
1693
+ return {shortYearCutoff: shortYearCutoff,
1694
+ dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
1695
+ monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
1696
+ },
1697
+
1698
+ /* Format the given date for display. */
1699
+ _formatDate: function(inst, day, month, year) {
1700
+ if (!day) {
1701
+ inst.currentDay = inst.selectedDay;
1702
+ inst.currentMonth = inst.selectedMonth;
1703
+ inst.currentYear = inst.selectedYear;
1704
+ }
1705
+ var date = (day ? (typeof day == 'object' ? day :
1706
+ this._daylightSavingAdjust(new Date(year, month, day))) :
1707
+ this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
1708
+ return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
1709
+ }
1710
+ });
1711
+
1712
+ /*
1713
+ * Bind hover events for datepicker elements.
1714
+ * Done via delegate so the binding only occurs once in the lifetime of the parent div.
1715
+ * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
1716
+ */
1717
+ function bindHover(dpDiv) {
1718
+ var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
1719
+ return dpDiv.delegate(selector, 'mouseout', function() {
1720
+ $(this).removeClass('ui-state-hover');
1721
+ if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
1722
+ if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
1723
+ })
1724
+ .delegate(selector, 'mouseover', function(){
1725
+ if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
1726
+ $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
1727
+ $(this).addClass('ui-state-hover');
1728
+ if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
1729
+ if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
1730
+ }
1731
+ });
1732
+ }
1733
+
1734
+ /* jQuery extend now ignores nulls! */
1735
+ function extendRemove(target, props) {
1736
+ $.extend(target, props);
1737
+ for (var name in props)
1738
+ if (props[name] == null || props[name] == undefined)
1739
+ target[name] = props[name];
1740
+ return target;
1741
+ };
1742
+
1743
+ /* Determine whether an object is an array. */
1744
+ function isArray(a) {
1745
+ return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
1746
+ (a.constructor && a.constructor.toString().match(/\Array\(\)/))));
1747
+ };
1748
+
1749
+ /* Invoke the datepicker functionality.
1750
+ @param options string - a command, optionally followed by additional parameters or
1751
+ Object - settings for attaching new datepicker functionality
1752
+ @return jQuery object */
1753
+ $.fn.datepicker = function(options){
1754
+
1755
+ /* Verify an empty collection wasn't passed - Fixes #6976 */
1756
+ if ( !this.length ) {
1757
+ return this;
1758
+ }
1759
+
1760
+ /* Initialise the date picker. */
1761
+ if (!$.datepicker.initialized) {
1762
+ $(document).mousedown($.datepicker._checkExternalClick).
1763
+ find('body').append($.datepicker.dpDiv);
1764
+ $.datepicker.initialized = true;
1765
+ }
1766
+
1767
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
1768
+ if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
1769
+ return $.datepicker['_' + options + 'Datepicker'].
1770
+ apply($.datepicker, [this[0]].concat(otherArgs));
1771
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
1772
+ return $.datepicker['_' + options + 'Datepicker'].
1773
+ apply($.datepicker, [this[0]].concat(otherArgs));
1774
+ return this.each(function() {
1775
+ typeof options == 'string' ?
1776
+ $.datepicker['_' + options + 'Datepicker'].
1777
+ apply($.datepicker, [this].concat(otherArgs)) :
1778
+ $.datepicker._attachDatepicker(this, options);
1779
+ });
1780
+ };
1781
+
1782
+ $.datepicker = new Datepicker(); // singleton instance
1783
+ $.datepicker.initialized = false;
1784
+ $.datepicker.uuid = new Date().getTime();
1785
+ $.datepicker.version = "1.8.13";
1786
+
1787
+ // Workaround for #4055
1788
+ // Add another global to avoid noConflict issues with inline event handlers
1789
+ window['DP_jQuery_' + dpuuid] = $;
1790
+
1791
+ })(jQuery);
lang/custom-contact-forms.mo CHANGED
Binary file
lang/custom-contact-forms.po CHANGED
@@ -2,9 +2,9 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: custom-contact-forms\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-01-27 23:34-0500\n"
6
- "PO-Revision-Date: 2011-01-27 23:35-0500\n"
7
- "Last-Translator: Taylor Lovett <sdfds@sfs.com>\n"
8
  "Language-Team: TaylorLovett.com <admin@taylorlovett.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -20,1042 +20,1046 @@ msgstr ""
20
  "X-Poedit-SearchPath-4: ../modules/usage_popover\n"
21
  "X-Poedit-SearchPath-5: ../modules/widget\n"
22
 
23
- #: ../custom-contact-forms-admin.php:342
24
- #: ../custom-contact-forms-admin.php:1852
25
- #: ../custom-contact-forms-admin.php:1991
26
  msgid "Custom Contact Forms"
27
  msgstr ""
28
 
29
- #: ../custom-contact-forms-admin.php:344
30
- #: ../custom-contact-forms-admin.php:1854
31
- #: ../custom-contact-forms-admin.php:1993
 
 
 
 
 
32
  msgid "Plugin Usage Manual"
33
  msgstr ""
34
 
35
- #: ../custom-contact-forms-admin.php:347
36
  msgid "Create Fields"
37
  msgstr ""
38
 
39
- #: ../custom-contact-forms-admin.php:348
40
  msgid "Create Forms"
41
  msgstr ""
42
 
43
- #: ../custom-contact-forms-admin.php:349
44
  msgid "Manage Fields"
45
  msgstr ""
46
 
47
- #: ../custom-contact-forms-admin.php:350
48
- #: ../custom-contact-forms-admin.php:754
49
  msgid "Manage Fixed Fields"
50
  msgstr ""
51
 
52
- #: ../custom-contact-forms-admin.php:351
53
- #: ../custom-contact-forms-admin.php:986
54
  msgid "Manage Forms"
55
  msgstr ""
56
 
57
- #: ../custom-contact-forms-admin.php:352
58
  msgid "Create Styles"
59
  msgstr ""
60
 
61
- #: ../custom-contact-forms-admin.php:353
62
  msgid "Manage Styles"
63
  msgstr ""
64
 
65
- #: ../custom-contact-forms-admin.php:354
66
- #: ../custom-contact-forms-admin.php:866
67
  msgid "Manage Field Options"
68
  msgstr ""
69
 
70
- #: ../custom-contact-forms-admin.php:355
71
- #: ../custom-contact-forms-admin.php:1771
72
  msgid "Suggest a Feature"
73
  msgstr ""
74
 
75
- #: ../custom-contact-forms-admin.php:356
76
- #: ../custom-contact-forms-admin.php:1768
77
  msgid "Bug Report"
78
  msgstr ""
79
 
80
- #: ../custom-contact-forms-admin.php:357
81
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:20
82
  msgid "Custom HTML Forms"
83
  msgstr ""
84
 
85
- #: ../custom-contact-forms-admin.php:358
86
  msgid "Plugin News"
87
  msgstr ""
88
 
89
- #: ../custom-contact-forms-admin.php:385
90
- msgid "Create A Form Field"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  msgstr ""
92
 
93
  #: ../custom-contact-forms-admin.php:392
 
 
 
 
94
  msgid "Field Slug:"
95
  msgstr ""
96
 
97
- #: ../custom-contact-forms-admin.php:396
98
  msgid "This is just a unique way for CCF to refer to your field. Must be unique from other slugs and contain only underscores and alphanumeric characters."
99
  msgstr ""
100
 
101
- #: ../custom-contact-forms-admin.php:400
102
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:130
103
  msgid "Field Label:"
104
  msgstr ""
105
 
106
- #: ../custom-contact-forms-admin.php:404
107
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:132
108
  msgid "The field label is displayed next to the field and is visible to the user."
109
  msgstr ""
110
 
111
- #: ../custom-contact-forms-admin.php:408
112
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:135
113
  msgid "Field Type:"
114
  msgstr ""
115
 
116
- #: ../custom-contact-forms-admin.php:421
117
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:140
118
  msgid "Initial Value:"
119
  msgstr ""
120
 
121
- #: ../custom-contact-forms-admin.php:426
122
  msgid ""
123
  "This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox \n"
124
  "\t\t\t\t\t\t'Are you human?', I would set the initial value to 'Yes'."
125
  msgstr ""
126
 
127
- #: ../custom-contact-forms-admin.php:428
128
  msgid "If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the"
129
  msgstr ""
130
 
131
- #: ../custom-contact-forms-admin.php:429
132
  msgid "Create a Field Option"
133
  msgstr ""
134
 
135
- #: ../custom-contact-forms-admin.php:429
136
  msgid "field option"
137
  msgstr ""
138
 
139
- #: ../custom-contact-forms-admin.php:430
140
  msgid "you would like initially selected."
141
  msgstr ""
142
 
143
- #: ../custom-contact-forms-admin.php:434
144
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:145
145
  msgid "Max Length:"
146
  msgstr ""
147
 
148
- #: ../custom-contact-forms-admin.php:438
149
  msgid "0 for no limit; only applies to Text fields"
150
  msgstr ""
151
 
152
- #: ../custom-contact-forms-admin.php:442
153
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:150
154
  msgid "Required Field:"
155
  msgstr ""
156
 
157
- #: ../custom-contact-forms-admin.php:446
158
- #: ../custom-contact-forms-admin.php:644
159
- #: ../custom-contact-forms-admin.php:799
160
- #: ../custom-contact-forms-admin.php:906
161
- #: ../custom-contact-forms-admin.php:963
162
- #: ../custom-contact-forms-admin.php:2032
163
- #: ../custom-contact-forms-admin.php:2156
164
- #: ../custom-contact-forms-admin.php:2188
165
  msgid "No"
166
  msgstr ""
167
 
168
- #: ../custom-contact-forms-admin.php:449
169
- #: ../custom-contact-forms-admin.php:641
170
- #: ../custom-contact-forms-admin.php:796
171
- #: ../custom-contact-forms-admin.php:806
172
- #: ../custom-contact-forms-admin.php:906
173
- #: ../custom-contact-forms-admin.php:963
174
- #: ../custom-contact-forms-admin.php:2029
175
- #: ../custom-contact-forms-admin.php:2153
176
- #: ../custom-contact-forms-admin.php:2185
177
  msgid "Yes"
178
  msgstr ""
179
 
180
- #: ../custom-contact-forms-admin.php:453
181
  msgid "If a field is required and a user leaves it blank, the plugin will display an error message (which you can customize using 'Field Error') explaining the problem."
182
  msgstr ""
183
 
184
- #: ../custom-contact-forms-admin.php:457
185
- #: ../custom-contact-forms-admin.php:663
186
- #: ../custom-contact-forms-admin.php:828
187
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:155
188
  msgid "Field Instructions:"
189
  msgstr ""
190
 
191
- #: ../custom-contact-forms-admin.php:461
192
- #: ../custom-contact-forms-admin.php:661
193
- #: ../custom-contact-forms-admin.php:826
194
  msgid "If this is filled out, a tooltip popover displaying this text will show when the field is selected."
195
  msgstr ""
196
 
197
- #: ../custom-contact-forms-admin.php:465
198
- #: ../custom-contact-forms-admin.php:668
199
- #: ../custom-contact-forms-admin.php:822
200
  msgid "Field Class:"
201
  msgstr ""
202
 
203
- #: ../custom-contact-forms-admin.php:469
204
  msgid "If you manage your own .css stylesheet, you can use this to attach a class to this field. Leaving this blank will do nothing."
205
  msgstr ""
206
 
207
- #: ../custom-contact-forms-admin.php:473
208
- #: ../custom-contact-forms-admin.php:673
209
- #: ../custom-contact-forms-admin.php:833
210
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:160
211
  msgid "Field Error:"
212
  msgstr ""
213
 
214
- #: ../custom-contact-forms-admin.php:477
215
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:162
216
  msgid "If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank."
217
  msgstr ""
218
 
219
- #: ../custom-contact-forms-admin.php:482
220
  msgid "Create Field"
221
  msgstr ""
222
 
223
- #: ../custom-contact-forms-admin.php:484
224
  msgid "If this is a dropdown or radio field, you should go to the field manager below to attach field options after you create it."
225
  msgstr ""
226
 
227
- #: ../custom-contact-forms-admin.php:493
228
  msgid "Create A Form"
229
  msgstr ""
230
 
231
- #: ../custom-contact-forms-admin.php:500
232
  msgid "Form Slug:"
233
  msgstr ""
234
 
235
- #: ../custom-contact-forms-admin.php:504
236
  msgid "This is just a unique way for CCF to refer to your form. Must be unique from other slugs and contain only underscores and alphanumeric characters."
237
  msgstr ""
238
 
239
- #: ../custom-contact-forms-admin.php:508
240
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:240
241
  msgid "Form Title:"
242
  msgstr ""
243
 
244
- #: ../custom-contact-forms-admin.php:511
245
  msgid "This text is displayed above the form as the heading."
246
  msgstr ""
247
 
248
- #: ../custom-contact-forms-admin.php:515
249
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:255
250
  msgid "Form Style:"
251
  msgstr ""
252
 
253
- #: ../custom-contact-forms-admin.php:520
254
  msgid "Click to create a style"
255
  msgstr ""
256
 
257
- #: ../custom-contact-forms-admin.php:523
258
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:260
259
  msgid "Submit Button Text:"
260
  msgstr ""
261
 
262
- #: ../custom-contact-forms-admin.php:529
263
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:270
264
  msgid "Form Destination Email:"
265
  msgstr ""
266
 
267
- #: ../custom-contact-forms-admin.php:533
268
  msgid "Will receive all submissions from this form; if left blank it will use the default specified in general settings."
269
  msgstr ""
270
 
271
- #: ../custom-contact-forms-admin.php:537
272
  msgid "Form Email Subject:"
273
  msgstr ""
274
 
275
- #: ../custom-contact-forms-admin.php:541
276
  msgid "When submitted and configured accordingly, the form will send an email with this subject."
277
  msgstr ""
278
 
279
- #: ../custom-contact-forms-admin.php:545
280
  msgid "Form Email Name:"
281
  msgstr ""
282
 
283
- #: ../custom-contact-forms-admin.php:549
284
  msgid "When submitted and configured accordingly, the form will send an email with this as the email 'from name'."
285
  msgstr ""
286
 
287
- #: ../custom-contact-forms-admin.php:553
288
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:275
289
  msgid "Form Success Message:"
290
  msgstr ""
291
 
292
- #: ../custom-contact-forms-admin.php:557
293
- #: ../custom-contact-forms-admin.php:565
294
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:282
295
  msgid "Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
296
  msgstr ""
297
 
298
- #: ../custom-contact-forms-admin.php:561
299
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:280
300
  msgid "Form Success Message Title:"
301
  msgstr ""
302
 
303
- #: ../custom-contact-forms-admin.php:569
304
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:285
305
  msgid "Custom Success URL:"
306
  msgstr ""
307
 
308
- #: ../custom-contact-forms-admin.php:573
309
  msgid "If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
310
  msgstr ""
311
 
312
- #: ../custom-contact-forms-admin.php:576
313
  msgid "Who Can View This Form:"
314
  msgstr ""
315
 
316
- #: ../custom-contact-forms-admin.php:592
317
  msgid "Choose which types of users should be able to view this form."
318
  msgstr ""
319
 
320
- #: ../custom-contact-forms-admin.php:596
321
  msgid "Create Form"
322
  msgstr ""
323
 
324
- #: ../custom-contact-forms-admin.php:598
325
  msgid "You should go to the form manager below to attach fields to this form after you create it."
326
  msgstr ""
327
 
328
- #: ../custom-contact-forms-admin.php:605
329
  msgid "Manage User Fields"
330
  msgstr ""
331
 
332
- #: ../custom-contact-forms-admin.php:612
333
- #: ../custom-contact-forms-admin.php:736
334
- #: ../custom-contact-forms-admin.php:761
335
- #: ../custom-contact-forms-admin.php:848
336
- #: ../custom-contact-forms-admin.php:875
337
- #: ../custom-contact-forms-admin.php:884
338
- #: ../custom-contact-forms-admin.php:994
339
- #: ../custom-contact-forms-admin.php:1143
340
  msgid "Slug"
341
  msgstr ""
342
 
343
- #: ../custom-contact-forms-admin.php:613
344
- #: ../custom-contact-forms-admin.php:737
345
- #: ../custom-contact-forms-admin.php:762
346
- #: ../custom-contact-forms-admin.php:849
347
- #: ../custom-contact-forms-admin.php:876
348
- #: ../custom-contact-forms-admin.php:885
349
  msgid "Label"
350
  msgstr ""
351
 
352
- #: ../custom-contact-forms-admin.php:614
353
- #: ../custom-contact-forms-admin.php:738
354
- #: ../custom-contact-forms-admin.php:763
355
- #: ../custom-contact-forms-admin.php:850
356
  msgid "Type"
357
  msgstr ""
358
 
359
- #: ../custom-contact-forms-admin.php:615
360
- #: ../custom-contact-forms-admin.php:739
361
- #: ../custom-contact-forms-admin.php:764
362
- #: ../custom-contact-forms-admin.php:851
363
  msgid "Initial Value"
364
  msgstr ""
365
 
366
- #: ../custom-contact-forms-admin.php:616
367
- #: ../custom-contact-forms-admin.php:740
368
- #: ../custom-contact-forms-admin.php:765
369
- #: ../custom-contact-forms-admin.php:852
370
  msgid "Required"
371
  msgstr ""
372
 
373
- #: ../custom-contact-forms-admin.php:617
374
- #: ../custom-contact-forms-admin.php:741
375
- #: ../custom-contact-forms-admin.php:766
376
- #: ../custom-contact-forms-admin.php:853
377
  msgid "Maxlength"
378
  msgstr ""
379
 
380
- #: ../custom-contact-forms-admin.php:666
381
- #: ../custom-contact-forms-admin.php:821
382
  msgid "If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a \"Form Style\" other than the default, styles inherited from the \"Field Class\" might be overwritten."
383
  msgstr ""
384
 
385
- #: ../custom-contact-forms-admin.php:671
386
- #: ../custom-contact-forms-admin.php:831
387
  msgid "This lets you customize the error message displayed when this field is required and left blank."
388
  msgstr ""
389
 
390
- #: ../custom-contact-forms-admin.php:703
391
  msgid "Detach field options you"
392
  msgstr ""
393
 
394
- #: ../custom-contact-forms-admin.php:705
395
- #: ../custom-contact-forms-admin.php:1122
396
  msgid "create"
397
  msgstr ""
398
 
399
- #: ../custom-contact-forms-admin.php:722
400
  msgid "Attach field options in the order you want them to display."
401
  msgstr ""
402
 
403
- #: ../custom-contact-forms-admin.php:747
404
- #: ../custom-contact-forms-admin.php:859
405
- #: ../custom-contact-forms-admin.php:922
406
- #: ../custom-contact-forms-admin.php:1155
407
- #: ../custom-contact-forms-admin.php:1725
408
- #: ../custom-contact-forms-admin.php:1946
409
  msgid "Bulk Actions"
410
  msgstr ""
411
 
412
- #: ../custom-contact-forms-admin.php:748
413
- #: ../custom-contact-forms-admin.php:860
414
- #: ../custom-contact-forms-admin.php:923
415
- #: ../custom-contact-forms-admin.php:1156
416
- #: ../custom-contact-forms-admin.php:1726
417
  msgid "Save"
418
  msgstr ""
419
 
420
- #: ../custom-contact-forms-admin.php:749
421
- #: ../custom-contact-forms-admin.php:924
422
- #: ../custom-contact-forms-admin.php:1157
423
- #: ../custom-contact-forms-admin.php:1727
424
- #: ../custom-contact-forms-admin.php:1947
425
  msgid "Delete"
426
  msgstr ""
427
 
428
- #: ../custom-contact-forms-admin.php:750
429
- #: ../custom-contact-forms-admin.php:861
430
- #: ../custom-contact-forms-admin.php:925
431
- #: ../custom-contact-forms-admin.php:1158
432
- #: ../custom-contact-forms-admin.php:1728
433
- #: ../custom-contact-forms-admin.php:1948
434
  msgid "Apply"
435
  msgstr ""
436
 
437
- #: ../custom-contact-forms-admin.php:782
438
- #: ../custom-contact-forms-admin.php:813
439
- #: ../custom-contact-forms-admin.php:2283
440
  msgid "None"
441
  msgstr ""
442
 
443
- #: ../custom-contact-forms-admin.php:877
444
- #: ../custom-contact-forms-admin.php:886
445
  msgid "Value"
446
  msgstr ""
447
 
448
- #: ../custom-contact-forms-admin.php:878
449
- #: ../custom-contact-forms-admin.php:887
450
  msgid "Is Dead"
451
  msgstr ""
452
 
453
- #: ../custom-contact-forms-admin.php:914
454
  msgid "No field options have been created."
455
  msgstr ""
456
 
457
- #: ../custom-contact-forms-admin.php:932
458
  msgid "Create A Field Option"
459
  msgstr ""
460
 
461
- #: ../custom-contact-forms-admin.php:939
462
  msgid "Option Slug:"
463
  msgstr ""
464
 
465
- #: ../custom-contact-forms-admin.php:943
466
  msgid "Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'"
467
  msgstr ""
468
 
469
- #: ../custom-contact-forms-admin.php:947
470
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:207
471
  msgid "Option Label:"
472
  msgstr ""
473
 
474
- #: ../custom-contact-forms-admin.php:951
475
  msgid "This is what is shown to the user in the dropdown or radio field. Example: 'United States'"
476
  msgstr ""
477
 
478
- #: ../custom-contact-forms-admin.php:955
479
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:212
480
  msgid "Option Value:"
481
  msgstr ""
482
 
483
- #: ../custom-contact-forms-admin.php:957
484
  msgid "This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'."
485
  msgstr ""
486
 
487
- #: ../custom-contact-forms-admin.php:959
488
  msgid "This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: \"The color green\" => \"green\" or \"Yes\" => \"1\"."
489
  msgstr ""
490
 
491
- #: ../custom-contact-forms-admin.php:962
492
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:217
493
  msgid "Is Dead Option:"
494
  msgstr ""
495
 
496
- #: ../custom-contact-forms-admin.php:964
497
  msgid "A dead option is something like 'Please Select One'. This is a useful tool for required dropdown fields. If a dead option is submitted by a user for a required dropdown field, then the user will have to go back and fill out the field again."
498
  msgstr ""
499
 
500
- #: ../custom-contact-forms-admin.php:968
501
  msgid "Create Field Option"
502
  msgstr ""
503
 
504
- #: ../custom-contact-forms-admin.php:978
505
  msgid "Rate This Plugin"
506
  msgstr ""
507
 
508
- #: ../custom-contact-forms-admin.php:979
509
  msgid "We need your help to continue development! Please <span>rate this plugin</span> to show your support."
510
  msgstr ""
511
 
512
- #: ../custom-contact-forms-admin.php:993
513
  msgid "Form Display Code"
514
  msgstr ""
515
 
516
- #: ../custom-contact-forms-admin.php:995
517
- #: ../custom-contact-forms-admin.php:1144
518
  msgid "Destination Email"
519
  msgstr ""
520
 
521
- #: ../custom-contact-forms-admin.php:996
522
- #: ../custom-contact-forms-admin.php:1145
523
  msgid "Title"
524
  msgstr ""
525
 
526
- #: ../custom-contact-forms-admin.php:997
527
- #: ../custom-contact-forms-admin.php:1146
528
  msgid "Button Text"
529
  msgstr ""
530
 
531
- #: ../custom-contact-forms-admin.php:998
532
- #: ../custom-contact-forms-admin.php:1147
533
  msgid "Style"
534
  msgstr ""
535
 
536
- #: ../custom-contact-forms-admin.php:1031
537
  msgid "Method"
538
  msgstr ""
539
 
540
- #: ../custom-contact-forms-admin.php:1032
541
  msgid "Form Action"
542
  msgstr ""
543
 
544
- #: ../custom-contact-forms-admin.php:1033
545
  msgid "Email Subject"
546
  msgstr ""
547
 
548
- #: ../custom-contact-forms-admin.php:1034
549
  msgid "Email From Name"
550
  msgstr ""
551
 
552
- #: ../custom-contact-forms-admin.php:1035
553
  msgid "Success Message Title"
554
  msgstr ""
555
 
556
- #: ../custom-contact-forms-admin.php:1036
557
  msgid "Success Message"
558
  msgstr ""
559
 
560
- #: ../custom-contact-forms-admin.php:1037
561
  msgid "Custom Success URL"
562
  msgstr ""
563
 
564
- #: ../custom-contact-forms-admin.php:1040
565
  msgid "The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post."
566
  msgstr ""
567
 
568
- #: ../custom-contact-forms-admin.php:1044
569
  msgid "This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank."
570
  msgstr ""
571
 
572
- #: ../custom-contact-forms-admin.php:1046
573
  msgid "This is the form email subject sent to the destination email address. If left blank, the default from General Settings will be used."
574
  msgstr ""
575
 
576
- #: ../custom-contact-forms-admin.php:1048
577
  msgid "This is the from name of the email sent on successful form submission. If left blank, the default from General Settings will be used."
578
  msgstr ""
579
 
580
- #: ../custom-contact-forms-admin.php:1050
581
  msgid "This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
582
  msgstr ""
583
 
584
- #: ../custom-contact-forms-admin.php:1052
585
  msgid "This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
586
  msgstr ""
587
 
588
- #: ../custom-contact-forms-admin.php:1054
589
  msgid "If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
590
  msgstr ""
591
 
592
- #: ../custom-contact-forms-admin.php:1058
593
  msgid "The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet."
594
  msgstr ""
595
 
596
- #: ../custom-contact-forms-admin.php:1059
597
  msgid "Code to Display Form in Theme Files:"
598
  msgstr ""
599
 
600
- #: ../custom-contact-forms-admin.php:1062
601
  msgid "This field allows you to insert HTML directly after the starting <form> tag."
602
  msgstr ""
603
 
604
- #: ../custom-contact-forms-admin.php:1063
605
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:265
606
  msgid "Custom Code:"
607
  msgstr ""
608
 
609
- #: ../custom-contact-forms-admin.php:1066
610
  msgid "If you want to show this form to only certain types of users, you can uncheck boxes accordingly. To show this form to anyone, check all the boxes. This will only take effect if 'Form Access Capabilities' is enabled in general settings."
611
  msgstr ""
612
 
613
- #: ../custom-contact-forms-admin.php:1085
614
  msgid "Attached Fields:"
615
  msgstr ""
616
 
617
- #: ../custom-contact-forms-admin.php:1105
618
  msgid "Attach fields in the order you want them displayed."
619
  msgstr ""
620
 
621
- #: ../custom-contact-forms-admin.php:1109
622
  msgid "Attach Field:"
623
  msgstr ""
624
 
625
- #: ../custom-contact-forms-admin.php:1120
626
  msgid "Attach fixed fields or ones you"
627
  msgstr ""
628
 
629
- #: ../custom-contact-forms-admin.php:1142
630
  msgid "Form Code"
631
  msgstr ""
632
 
633
- #: ../custom-contact-forms-admin.php:1164
634
  msgid "Create A Style for Your Forms"
635
  msgstr ""
636
 
637
- #: ../custom-contact-forms-admin.php:1168
638
  msgid "Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values."
639
  msgstr ""
640
 
641
- #: ../custom-contact-forms-admin.php:1174
642
  msgid "Style Slug:"
643
  msgstr ""
644
 
645
- #: ../custom-contact-forms-admin.php:1177
646
  msgid "(Must be unique)"
647
  msgstr ""
648
 
649
- #: ../custom-contact-forms-admin.php:1181
650
- #: ../custom-contact-forms-admin.php:1579
651
- #: ../custom-contact-forms-admin.php:1588
652
  msgid "Title Font Size:"
653
  msgstr ""
654
 
655
- #: ../custom-contact-forms-admin.php:1184
656
  msgid "(ex: 10pt, 10px, 1em)"
657
  msgstr ""
658
 
659
- #: ../custom-contact-forms-admin.php:1188
660
- #: ../custom-contact-forms-admin.php:1627
661
- #: ../custom-contact-forms-admin.php:1695
662
  msgid "Title Font Color:"
663
  msgstr ""
664
 
665
- #: ../custom-contact-forms-admin.php:1191
666
- #: ../custom-contact-forms-admin.php:1212
667
- #: ../custom-contact-forms-admin.php:1276
668
- #: ../custom-contact-forms-admin.php:1377
669
  #: ../custom-contact-forms-admin.php:1384
670
- #: ../custom-contact-forms-admin.php:1412
 
671
  msgid "(ex: FF0000)"
672
  msgstr ""
673
 
674
- #: ../custom-contact-forms-admin.php:1195
675
- #: ../custom-contact-forms-admin.php:1552
676
  msgid "Label Width:"
677
  msgstr ""
678
 
679
- #: ../custom-contact-forms-admin.php:1198
680
  msgid "(ex: 100px or 20%)"
681
  msgstr ""
682
 
683
- #: ../custom-contact-forms-admin.php:1202
684
- #: ../custom-contact-forms-admin.php:1593
685
  msgid "Label Font Size:"
686
  msgstr ""
687
 
688
- #: ../custom-contact-forms-admin.php:1205
689
- #: ../custom-contact-forms-admin.php:1370
690
  msgid "(ex: 10px, 10pt, 1em)"
691
  msgstr ""
692
 
693
- #: ../custom-contact-forms-admin.php:1209
694
- #: ../custom-contact-forms-admin.php:1632
695
  msgid "Label Font Color:"
696
  msgstr ""
697
 
698
- #: ../custom-contact-forms-admin.php:1216
699
- #: ../custom-contact-forms-admin.php:1519
700
  msgid "Text Field Width:"
701
  msgstr ""
702
 
703
- #: ../custom-contact-forms-admin.php:1219
704
  #: ../custom-contact-forms-admin.php:1226
705
  #: ../custom-contact-forms-admin.php:1233
706
- #: ../custom-contact-forms-admin.php:1313
 
707
  msgid "(ex: 100px or 100%)"
708
  msgstr ""
709
 
710
- #: ../custom-contact-forms-admin.php:1223
711
  msgid "Textarea Field Width:"
712
  msgstr ""
713
 
714
- #: ../custom-contact-forms-admin.php:1230
715
  msgid "Textarea Field Height:"
716
  msgstr ""
717
 
718
- #: ../custom-contact-forms-admin.php:1237
719
- #: ../custom-contact-forms-admin.php:1598
720
  msgid "Field Font Size:"
721
  msgstr ""
722
 
723
- #: ../custom-contact-forms-admin.php:1240
724
  msgid "(ex: 10px, 10pt, 1em"
725
  msgstr ""
726
 
727
- #: ../custom-contact-forms-admin.php:1244
728
- #: ../custom-contact-forms-admin.php:1637
729
  msgid "Field Font Color:"
730
  msgstr ""
731
 
732
- #: ../custom-contact-forms-admin.php:1247
733
- #: ../custom-contact-forms-admin.php:1283
734
  msgid "(ex: 333333)"
735
  msgstr ""
736
 
737
- #: ../custom-contact-forms-admin.php:1251
738
- #: ../custom-contact-forms-admin.php:1686
739
  msgid "Field Border Style:"
740
  msgstr ""
741
 
742
- #: ../custom-contact-forms-admin.php:1259
743
- #: ../custom-contact-forms-admin.php:1647
744
  msgid "Form Margin:"
745
  msgstr ""
746
 
747
- #: ../custom-contact-forms-admin.php:1262
748
  #: ../custom-contact-forms-admin.php:1269
749
- #: ../custom-contact-forms-admin.php:1391
750
  #: ../custom-contact-forms-admin.php:1398
 
751
  msgid "(ex: 5px or 1em)"
752
  msgstr ""
753
 
754
- #: ../custom-contact-forms-admin.php:1266
755
- #: ../custom-contact-forms-admin.php:1539
756
  msgid "Label Margin:"
757
  msgstr ""
758
 
759
- #: ../custom-contact-forms-admin.php:1273
760
  msgid "Textarea Background Color:"
761
  msgstr ""
762
 
763
- #: ../custom-contact-forms-admin.php:1280
764
  msgid "Success Popover Font Color:"
765
  msgstr ""
766
 
767
- #: ../custom-contact-forms-admin.php:1287
768
  msgid "Success Popover Title Font Size:"
769
  msgstr ""
770
 
771
- #: ../custom-contact-forms-admin.php:1290
772
  #: ../custom-contact-forms-admin.php:1297
773
- #: ../custom-contact-forms-admin.php:1419
774
- #: ../custom-contact-forms-admin.php:1442
 
775
  msgid "(ex: 12px, 1em, 100%)"
776
  msgstr ""
777
 
778
- #: ../custom-contact-forms-admin.php:1294
779
- #: ../custom-contact-forms-admin.php:1583
780
  msgid "Form Background Color:"
781
  msgstr ""
782
 
783
- #: ../custom-contact-forms-admin.php:1301
784
  msgid "Tooltip Background Color:"
785
  msgstr ""
786
 
787
- #: ../custom-contact-forms-admin.php:1304
788
  msgid "(ex: 000000 or black)"
789
  msgstr ""
790
 
791
- #: ../custom-contact-forms-admin.php:1310
792
- #: ../custom-contact-forms-admin.php:1681
793
  msgid "Field Border Color:"
794
  msgstr ""
795
 
796
- #: ../custom-contact-forms-admin.php:1317
797
- #: ../custom-contact-forms-admin.php:1664
798
  msgid "Form Border Style:"
799
  msgstr ""
800
 
801
- #: ../custom-contact-forms-admin.php:1325
802
- #: ../custom-contact-forms-admin.php:1676
803
  msgid "Form Border Color:"
804
  msgstr ""
805
 
806
- #: ../custom-contact-forms-admin.php:1328
807
  msgid "(ex: 000000)"
808
  msgstr ""
809
 
810
- #: ../custom-contact-forms-admin.php:1332
811
- #: ../custom-contact-forms-admin.php:1671
812
  msgid "Form Border Width:"
813
  msgstr ""
814
 
815
- #: ../custom-contact-forms-admin.php:1335
816
  msgid "(ex: 1px)"
817
  msgstr ""
818
 
819
- #: ../custom-contact-forms-admin.php:1339
820
- #: ../custom-contact-forms-admin.php:1514
821
  msgid "Form Width:"
822
  msgstr ""
823
 
824
- #: ../custom-contact-forms-admin.php:1342
825
  msgid "(ex: 100px or 50%)"
826
  msgstr ""
827
 
828
- #: ../custom-contact-forms-admin.php:1346
829
  msgid "Form Font Family:"
830
  msgstr ""
831
 
832
- #: ../custom-contact-forms-admin.php:1349
833
  msgid "(ex: Verdana, Tahoma, Arial)"
834
  msgstr ""
835
 
836
- #: ../custom-contact-forms-admin.php:1353
837
- #: ../custom-contact-forms-admin.php:1557
838
  msgid "Button Width:"
839
  msgstr ""
840
 
841
- #: ../custom-contact-forms-admin.php:1356
842
  msgid "(ex: 100px, 30%, auto)"
843
  msgstr ""
844
 
845
- #: ../custom-contact-forms-admin.php:1360
846
- #: ../custom-contact-forms-admin.php:1562
847
  msgid "Button Height:"
848
  msgstr ""
849
 
850
- #: ../custom-contact-forms-admin.php:1363
851
  msgid "(ex: 100px or 30%)"
852
  msgstr ""
853
 
854
- #: ../custom-contact-forms-admin.php:1367
855
- #: ../custom-contact-forms-admin.php:1603
856
  msgid "Button Font Size:"
857
  msgstr ""
858
 
859
- #: ../custom-contact-forms-admin.php:1374
860
- #: ../custom-contact-forms-admin.php:1642
861
  msgid "Button Font Color:"
862
  msgstr ""
863
 
864
- #: ../custom-contact-forms-admin.php:1381
865
- #: ../custom-contact-forms-admin.php:1567
866
  msgid "Field Background Color:"
867
  msgstr ""
868
 
869
- #: ../custom-contact-forms-admin.php:1388
870
- #: ../custom-contact-forms-admin.php:1608
871
  msgid "Form Padding:"
872
  msgstr ""
873
 
874
- #: ../custom-contact-forms-admin.php:1395
875
- #: ../custom-contact-forms-admin.php:1572
876
  msgid "Title Margin:"
877
  msgstr ""
878
 
879
- #: ../custom-contact-forms-admin.php:1402
880
- #: ../custom-contact-forms-admin.php:1534
881
  msgid "Dropdown Width:"
882
  msgstr ""
883
 
884
- #: ../custom-contact-forms-admin.php:1405
885
  msgid "(ex: 30px, 20%, or auto)"
886
  msgstr ""
887
 
888
- #: ../custom-contact-forms-admin.php:1409
889
  msgid "Success Popover Border Color:"
890
  msgstr ""
891
 
892
- #: ../custom-contact-forms-admin.php:1416
893
  msgid "Success Popover Font Size:"
894
  msgstr ""
895
 
896
- #: ../custom-contact-forms-admin.php:1423
897
  msgid "Success Popover Height:"
898
  msgstr ""
899
 
900
- #: ../custom-contact-forms-admin.php:1426
901
  msgid "(ex: 200px, 6em, 50%)"
902
  msgstr ""
903
 
904
- #: ../custom-contact-forms-admin.php:1430
905
- #: ../custom-contact-forms-admin.php:1700
906
  msgid "Field Border Roundness:"
907
  msgstr ""
908
 
909
- #: ../custom-contact-forms-admin.php:1433
910
  msgid "(ex: 6px, or 0px)"
911
  msgstr ""
912
 
913
- #: ../custom-contact-forms-admin.php:1437
914
- #: ../custom-contact-forms-admin.php:1507
915
- #: ../custom-contact-forms-admin.php:1620
916
  msgid "Tooltip"
917
  msgstr ""
918
 
919
- #: ../custom-contact-forms-admin.php:1438
920
- #: ../custom-contact-forms-admin.php:1508
921
- #: ../custom-contact-forms-admin.php:1621
922
  msgid "A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field."
923
  msgstr ""
924
 
925
- #: ../custom-contact-forms-admin.php:1439
926
- #: ../custom-contact-forms-admin.php:1615
927
  msgid "Font Size:"
928
  msgstr ""
929
 
930
- #: ../custom-contact-forms-admin.php:1446
931
  msgid "Tooltip Font Color:"
932
  msgstr ""
933
 
934
- #: ../custom-contact-forms-admin.php:1449
935
  msgid "(ex: ffffff or white)"
936
  msgstr ""
937
 
938
- #: ../custom-contact-forms-admin.php:1453
939
  msgid "Create Style"
940
  msgstr ""
941
 
942
- #: ../custom-contact-forms-admin.php:1461
943
  msgid "Manage Form Styles"
944
  msgstr ""
945
 
946
- #: ../custom-contact-forms-admin.php:1483
947
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:125
948
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:202
949
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:235
950
  msgid "Slug:"
951
  msgstr ""
952
 
953
- #: ../custom-contact-forms-admin.php:1488
954
  msgid "Font Family:"
955
  msgstr ""
956
 
957
- #: ../custom-contact-forms-admin.php:1493
958
  msgid "Textarea Background"
959
  msgstr ""
960
 
961
- #: ../custom-contact-forms-admin.php:1495
962
  msgid "Color:"
963
  msgstr ""
964
 
965
- #: ../custom-contact-forms-admin.php:1500
966
- #: ../custom-contact-forms-admin.php:1544
967
- #: ../custom-contact-forms-admin.php:1577
968
- #: ../custom-contact-forms-admin.php:1613
969
- #: ../custom-contact-forms-admin.php:1652
970
- #: ../custom-contact-forms-admin.php:1693
971
  msgid "Success Popover"
972
  msgstr ""
973
 
974
- #: ../custom-contact-forms-admin.php:1502
975
  msgid "Border Color:"
976
  msgstr ""
977
 
978
- #: ../custom-contact-forms-admin.php:1509
979
- #: ../custom-contact-forms-admin.php:1654
980
  msgid "Font Color:"
981
  msgstr ""
982
 
983
- #: ../custom-contact-forms-admin.php:1524
984
  msgid "Textarea Width:"
985
  msgstr ""
986
 
987
- #: ../custom-contact-forms-admin.php:1529
988
  msgid "Textarea Height:"
989
  msgstr ""
990
 
991
- #: ../custom-contact-forms-admin.php:1546
992
  msgid "Height:"
993
  msgstr ""
994
 
995
- #: ../custom-contact-forms-admin.php:1622
996
  msgid "Background Color:"
997
  msgstr ""
998
 
999
- #: ../custom-contact-forms-admin.php:1659
1000
  msgid "Tooltip Font Size:"
1001
  msgstr ""
1002
 
1003
- #: ../custom-contact-forms-admin.php:1733
1004
  msgid "Report a Bug/Suggest a Feature"
1005
  msgstr ""
1006
 
1007
- #: ../custom-contact-forms-admin.php:1740
1008
  msgid "Your Name:"
1009
  msgstr ""
1010
 
1011
- #: ../custom-contact-forms-admin.php:1746
1012
  msgid "Your Email:"
1013
  msgstr ""
1014
 
1015
- #: ../custom-contact-forms-admin.php:1752
1016
  msgid "Who Hosts Your Website?"
1017
  msgstr ""
1018
 
1019
- #: ../custom-contact-forms-admin.php:1758
1020
  msgid "Your Message:"
1021
  msgstr ""
1022
 
1023
- #: ../custom-contact-forms-admin.php:1764
1024
  msgid "Purpose of this message:"
1025
  msgstr ""
1026
 
1027
- #: ../custom-contact-forms-admin.php:1774
1028
  msgid "Plugin Question"
1029
  msgstr ""
1030
 
1031
- #: ../custom-contact-forms-admin.php:1780
1032
  msgid "Version of Custom Contact Forms?"
1033
  msgstr ""
1034
 
1035
- #: ../custom-contact-forms-admin.php:1786
1036
  msgid "Version of WordPress?"
1037
  msgstr ""
1038
 
1039
- #: ../custom-contact-forms-admin.php:1792
1040
  msgid "Send Message"
1041
  msgstr ""
1042
 
1043
- #: ../custom-contact-forms-admin.php:1800
1044
  msgid "Custom HTML Forms (Advanced)"
1045
  msgstr ""
1046
 
1047
- #: ../custom-contact-forms-admin.php:1804
1048
  msgid ""
1049
  "If you know HTML and simply want to use this plugin to process form requests, this feature is for you. \n"
1050
  "\t\t\t\t\tThe following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a \n"
1051
  "\t\t\t\t\thidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately."
1052
  msgstr ""
1053
 
1054
- #: ../custom-contact-forms-admin.php:1811
1055
  msgid "Thank you for filling out our form!"
1056
  msgstr ""
1057
 
1058
- #: ../custom-contact-forms-admin.php:1816
1059
  msgid ""
1060
  "Paste all this code into a page or post and edit it to your liking. It is recommended you only use this feature if you are experienced with HTML. The destination_email \n"
1061
  "field specifies where emails will be sent on successful submission; you can have the form send to multiple addresses by separating email's with semi-colons (i.e. email@google.com; email2@google.com). \n"
@@ -1064,351 +1068,382 @@ msgid ""
1064
  "the field names you want required by commas. Remember to use underscores instead of spaces in field names!"
1065
  msgstr ""
1066
 
1067
- #: ../custom-contact-forms-admin.php:1877
1068
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:351
1069
  msgid "Saved Form Submissions"
1070
  msgstr ""
1071
 
1072
- #: ../custom-contact-forms-admin.php:1884
1073
- #: ../custom-contact-forms-admin.php:1937
1074
  msgid "Date Submitted"
1075
  msgstr ""
1076
 
1077
- #: ../custom-contact-forms-admin.php:1885
1078
- #: ../custom-contact-forms-admin.php:1938
1079
  msgid "Form Submitted"
1080
  msgstr ""
1081
 
1082
- #: ../custom-contact-forms-admin.php:1886
1083
- #: ../custom-contact-forms-admin.php:1939
1084
  msgid "Form Page"
1085
  msgstr ""
1086
 
1087
- #: ../custom-contact-forms-admin.php:1904
1088
  msgid "Custom HTML Form"
1089
  msgstr ""
1090
 
1091
- #: ../custom-contact-forms-admin.php:2018
1092
  msgid "General Settings"
1093
  msgstr ""
1094
 
1095
- #: ../custom-contact-forms-admin.php:2025
1096
  msgid "Email Form Submissions:"
1097
  msgstr ""
1098
 
1099
- #: ../custom-contact-forms-admin.php:2037
1100
  msgid "When a user fills out one of your forms, the info submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info."
1101
  msgstr ""
1102
 
1103
- #: ../custom-contact-forms-admin.php:2041
1104
  msgid "Default Email:"
1105
  msgstr ""
1106
 
1107
- #: ../custom-contact-forms-admin.php:2046
1108
  msgid "Form emails will be sent <span>to</span> this address, if no destination email is specified by the form."
1109
  msgstr ""
1110
 
1111
- #: ../custom-contact-forms-admin.php:2050
1112
  msgid "Front End JQuery:"
1113
  msgstr ""
1114
 
1115
- #: ../custom-contact-forms-admin.php:2054
1116
- #: ../custom-contact-forms-admin.php:2097
1117
- #: ../custom-contact-forms-admin.php:2169
1118
- #: ../custom-contact-forms-admin.php:2198
1119
- #: ../custom-contact-forms-admin.php:2226
1120
  msgid "Enabled"
1121
  msgstr ""
1122
 
1123
- #: ../custom-contact-forms-admin.php:2057
1124
- #: ../custom-contact-forms-admin.php:2100
1125
- #: ../custom-contact-forms-admin.php:2172
1126
- #: ../custom-contact-forms-admin.php:2201
1127
- #: ../custom-contact-forms-admin.php:2223
1128
  msgid "Disabled"
1129
  msgstr ""
1130
 
1131
- #: ../custom-contact-forms-admin.php:2062
1132
  #, php-format
1133
  msgid "Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips."
1134
  msgstr ""
1135
 
1136
- #: ../custom-contact-forms-admin.php:2066
1137
  msgid "Default From Email:"
1138
  msgstr ""
1139
 
1140
- #: ../custom-contact-forms-admin.php:2071
1141
  msgid "Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host."
1142
  msgstr ""
1143
 
1144
- #: ../custom-contact-forms-admin.php:2075
1145
  msgid "Default From Name:"
1146
  msgstr ""
1147
 
1148
- #: ../custom-contact-forms-admin.php:2080
1149
  msgid "This setting allows you to specify the name under which form emails are sent. The default is 'Custom Contact Forms'."
1150
  msgstr ""
1151
 
1152
- #: ../custom-contact-forms-admin.php:2084
1153
  msgid "Default Email Subject:"
1154
  msgstr ""
1155
 
1156
- #: ../custom-contact-forms-admin.php:2089
1157
  msgid "Default subject to be included in all form emails."
1158
  msgstr ""
1159
 
1160
- #: ../custom-contact-forms-admin.php:2093
1161
  msgid "Enable Dashboard Widget:"
1162
  msgstr ""
1163
 
1164
- #: ../custom-contact-forms-admin.php:2104
1165
  msgid "Enabling this will display a widget on your dashboard that shows the latest form submissions."
1166
  msgstr ""
1167
 
1168
- #: ../custom-contact-forms-admin.php:2108
1169
- msgid "Default Form Error Header:"
1170
  msgstr ""
1171
 
1172
- #: ../custom-contact-forms-admin.php:2113
1173
- msgid "When a form is filled out incorrectly, this message will be displayed followed by the individual field error messages."
1174
  msgstr ""
1175
 
1176
- #: ../custom-contact-forms-admin.php:2117
1177
- msgid "Use Code Type:"
1178
  msgstr ""
1179
 
1180
- #: ../custom-contact-forms-admin.php:2125
1181
- msgid "This lets you switch the form code between HTML and XHTML."
 
 
 
 
1182
  msgstr ""
1183
 
1184
- #: ../custom-contact-forms-admin.php:2131
 
 
 
 
 
 
 
 
1185
  msgid "Default Form Success Message Title:"
1186
  msgstr ""
1187
 
1188
- #: ../custom-contact-forms-admin.php:2136
1189
  msgid "If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title."
1190
  msgstr ""
1191
 
1192
- #: ../custom-contact-forms-admin.php:2140
1193
  msgid "Default Form Success Message:"
1194
  msgstr ""
1195
 
1196
- #: ../custom-contact-forms-admin.php:2145
1197
  msgid "If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message."
1198
  msgstr ""
1199
 
1200
- #: ../custom-contact-forms-admin.php:2149
1201
  msgid "Remember Field Values:"
1202
  msgstr ""
1203
 
1204
- #: ../custom-contact-forms-admin.php:2161
1205
  msgid "Selecting yes will make form fields remember how they were last filled out."
1206
  msgstr ""
1207
 
1208
- #: ../custom-contact-forms-admin.php:2165
1209
  msgid "Tooltips in Widget:"
1210
  msgstr ""
1211
 
1212
- #: ../custom-contact-forms-admin.php:2177
1213
  msgid "Enabling this shows tooltips containing field instructions on forms in the widget."
1214
  msgstr ""
1215
 
1216
- #: ../custom-contact-forms-admin.php:2181
1217
  msgid "Hide Plugin Author Link in Code:"
1218
  msgstr ""
1219
 
1220
- #: ../custom-contact-forms-admin.php:2194
1221
  msgid "Fancy Admin AJAX Abilities:"
1222
  msgstr ""
1223
 
1224
- #: ../custom-contact-forms-admin.php:2206
1225
  msgid "If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below."
1226
  msgstr ""
1227
 
1228
- #: ../custom-contact-forms-admin.php:2210
1229
  msgid "Default Permissions Error:"
1230
  msgstr ""
1231
 
1232
- #: ../custom-contact-forms-admin.php:2215
1233
  msgid "When someone doesn't have the proper permissions to use a form, this message is displayed in place of the form. You control who can view each form with the form access manager which is located inside the form manager."
1234
  msgstr ""
1235
 
1236
- #: ../custom-contact-forms-admin.php:2219
1237
  msgid "Form Access Capabilities:"
1238
  msgstr ""
1239
 
1240
- #: ../custom-contact-forms-admin.php:2231
1241
  msgid "The form access manager within each form allows you to control who can view your form. However, that will take effect on any of your forms unless this is enabled."
1242
  msgstr ""
1243
 
1244
- #: ../custom-contact-forms-admin.php:2234
1245
  msgid "Show Sidebar Widget:"
1246
  msgstr ""
1247
 
1248
- #: ../custom-contact-forms-admin.php:2239
1249
  msgid "On Homepage"
1250
  msgstr ""
1251
 
1252
- #: ../custom-contact-forms-admin.php:2243
1253
  msgid "On Pages"
1254
  msgstr ""
1255
 
1256
- #: ../custom-contact-forms-admin.php:2247
1257
  msgid "On Single Posts"
1258
  msgstr ""
1259
 
1260
- #: ../custom-contact-forms-admin.php:2252
1261
  msgid "On Categories"
1262
  msgstr ""
1263
 
1264
- #: ../custom-contact-forms-admin.php:2256
1265
  msgid "On Archives"
1266
  msgstr ""
1267
 
1268
- #: ../custom-contact-forms-admin.php:2260
 
 
 
 
 
 
 
 
1269
  msgid "Update"
1270
  msgstr ""
1271
 
1272
- #: ../custom-contact-forms-admin.php:2268
1273
  msgid "Mail Settings"
1274
  msgstr ""
1275
 
1276
- #: ../custom-contact-forms-admin.php:2272
1277
  msgid "There are two ways you can send emails: using the PHP mail() function or using SMTP (secure/insecure). If you choose to use the PHP mail() function you can ignore all the other options. For some people Wordpress's default way of sending mail does not work; if for some reason your mail is being sent you should try the SMTP option."
1278
  msgstr ""
1279
 
1280
- #: ../custom-contact-forms-admin.php:2273
1281
  msgid "* Send My Emails Using the Following:"
1282
  msgstr ""
1283
 
1284
- #: ../custom-contact-forms-admin.php:2275
1285
  msgid "Wordpress Default"
1286
  msgstr ""
1287
 
1288
- #: ../custom-contact-forms-admin.php:2276
1289
  msgid "SMTP"
1290
  msgstr ""
1291
 
1292
- #: ../custom-contact-forms-admin.php:2277
1293
  msgid "(If mail isn't sending, try toggling this option.)"
1294
  msgstr ""
1295
 
1296
- #: ../custom-contact-forms-admin.php:2280
1297
  msgid "SMTP Host:"
1298
  msgstr ""
1299
 
1300
- #: ../custom-contact-forms-admin.php:2281
1301
  msgid "SMTP Port:"
1302
  msgstr ""
1303
 
1304
- #: ../custom-contact-forms-admin.php:2282
1305
  msgid "Encryption:"
1306
  msgstr ""
1307
 
1308
- #: ../custom-contact-forms-admin.php:2284
1309
  msgid "SSL"
1310
  msgstr ""
1311
 
1312
- #: ../custom-contact-forms-admin.php:2285
1313
  msgid "TLS"
1314
  msgstr ""
1315
 
1316
- #: ../custom-contact-forms-admin.php:2289
1317
  msgid "SMTP Authentication:"
1318
  msgstr ""
1319
 
1320
- #: ../custom-contact-forms-admin.php:2289
1321
  msgid "None Needed"
1322
  msgstr ""
1323
 
1324
- #: ../custom-contact-forms-admin.php:2289
1325
  msgid "Use SMTP Username/Password"
1326
  msgstr ""
1327
 
1328
- #: ../custom-contact-forms-admin.php:2290
1329
  msgid "SMTP Username:"
1330
  msgstr ""
1331
 
1332
- #: ../custom-contact-forms-admin.php:2291
1333
  msgid "SMTP Password:"
1334
  msgstr ""
1335
 
1336
- #: ../custom-contact-forms-admin.php:2294
1337
  msgid "Save Mail Sending Options"
1338
  msgstr ""
1339
 
1340
- #: ../custom-contact-forms-admin.php:2301
1341
  msgid "Export"
1342
  msgstr ""
1343
 
1344
- #: ../custom-contact-forms-admin.php:2306
1345
  msgid ""
1346
  "Preforming a Custom Contact Forms export will create a file of the form \n"
1347
  "\t\t\t\t\t\tccf-export-xxxx.sql on your web server. The file created contains SQL that \n"
1348
  "\t\t\t\t\t\twill recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined."
1349
  msgstr ""
1350
 
1351
- #: ../custom-contact-forms-admin.php:2310
1352
  msgid "Export All CCF Plugin Content"
1353
  msgstr ""
1354
 
1355
- #: ../custom-contact-forms-admin.php:2316
1356
  msgid "Import"
1357
  msgstr ""
1358
 
1359
- #: ../custom-contact-forms-admin.php:2322
1360
  msgid "Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one. Pressing the 'Clear and Import' button deletes all current data and then imports the selected file; this will not work for merging to data!. Clearing all CCF data before importing prevents any conflicts from occuring. Before you attempt an import, you should always download a backup, by clicking the 'Export All' button."
1361
  msgstr ""
1362
 
1363
- #: ../custom-contact-forms-admin.php:2325
1364
  msgid "Choose What You Want to Use from the Import File:"
1365
  msgstr ""
1366
 
1367
- #: ../custom-contact-forms-admin.php:2331
1368
  msgid "Use General Settings"
1369
  msgstr ""
1370
 
1371
- #: ../custom-contact-forms-admin.php:2337
1372
- #: ../custom-contact-forms-admin.php:2355
1373
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:5
1374
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:228
1375
  msgid "Forms"
1376
  msgstr ""
1377
 
1378
- #: ../custom-contact-forms-admin.php:2343
1379
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:26
1380
  msgid "Form Submissions"
1381
  msgstr ""
1382
 
1383
- #: ../custom-contact-forms-admin.php:2349
1384
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:8
1385
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:49
1386
  msgid "Fields"
1387
  msgstr ""
1388
 
1389
- #: ../custom-contact-forms-admin.php:2361
1390
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:14
1391
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:195
1392
  msgid "Field Options"
1393
  msgstr ""
1394
 
1395
- #: ../custom-contact-forms-admin.php:2367
1396
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:17
1397
  msgid "Styles"
1398
  msgstr ""
1399
 
1400
- #: ../custom-contact-forms-admin.php:2373
1401
  msgid "Choose an Import File:"
1402
  msgstr ""
1403
 
1404
- #: ../custom-contact-forms-admin.php:2377
1405
  msgid "Clear and Import"
1406
  msgstr ""
1407
 
1408
- #: ../custom-contact-forms-admin.php:2379
1409
  msgid "Yes, I want to do this and have created a backup."
1410
  msgstr ""
1411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1412
  #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:1
1413
  msgid "Plugin Usage Popover"
1414
  msgstr ""
@@ -1440,10 +1475,6 @@ msgstr ""
1440
  msgid "in the instruction area of the admin page."
1441
  msgstr ""
1442
 
1443
- #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:41
1444
- msgid "Insert Default Content"
1445
- msgstr ""
1446
-
1447
  #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:44
1448
  msgid "Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Another useful part of the plugin is the 'Custom HTML Feature' which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience. Also explained below is the 'Saved Form Submissions' feature which displays all form submissions in the admin panel."
1449
  msgstr ""
@@ -1841,24 +1872,24 @@ msgstr ""
1841
  msgid "More import/export methods will be added in the future. Always create a backup before attempting an import! * Note: If you are having problems getting the importer/exporter to work, try CHMODing the import/ and export/ directories to 0777."
1842
  msgstr ""
1843
 
1844
- #: ../modules/widget/custom-contact-forms-dashboard.php:73
1845
  msgid "View"
1846
  msgstr ""
1847
 
1848
- #: ../modules/widget/custom-contact-forms-dashboard.php:74
1849
  msgid "CCF Saved Form Submission"
1850
  msgstr ""
1851
 
1852
- #: ../modules/widget/custom-contact-forms-dashboard.php:77
1853
  msgid "Form Submitted:"
1854
  msgstr ""
1855
 
1856
- #: ../modules/widget/custom-contact-forms-dashboard.php:78
1857
  msgid "Form Location:"
1858
  msgstr ""
1859
 
1860
- #: ../modules/widget/custom-contact-forms-dashboard.php:100
1861
- #: ../modules/widget/custom-contact-forms-dashboard.php:110
1862
  msgid "View All Submissions"
1863
  msgstr ""
1864
 
2
  msgstr ""
3
  "Project-Id-Version: custom-contact-forms\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-05-21 15:51-0500\n"
6
+ "PO-Revision-Date: 2011-05-21 15:51-0500\n"
7
+ "Last-Translator: Taylor Lovett <admin@taylorlovett.com>\n"
8
  "Language-Team: TaylorLovett.com <admin@taylorlovett.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
20
  "X-Poedit-SearchPath-4: ../modules/usage_popover\n"
21
  "X-Poedit-SearchPath-5: ../modules/widget\n"
22
 
23
+ #: ../custom-contact-forms-admin.php:347
24
+ #: ../custom-contact-forms-admin.php:1860
25
+ #: ../custom-contact-forms-admin.php:2001
26
  msgid "Custom Contact Forms"
27
  msgstr ""
28
 
29
+ #: ../custom-contact-forms-admin.php:349
30
+ #: ../modules/usage_popover/custom-contact-forms-quick-start-popover.php:1
31
+ msgid "Quick Start Guide"
32
+ msgstr ""
33
+
34
+ #: ../custom-contact-forms-admin.php:350
35
+ #: ../custom-contact-forms-admin.php:1862
36
+ #: ../custom-contact-forms-admin.php:2003
37
  msgid "Plugin Usage Manual"
38
  msgstr ""
39
 
40
+ #: ../custom-contact-forms-admin.php:353
41
  msgid "Create Fields"
42
  msgstr ""
43
 
44
+ #: ../custom-contact-forms-admin.php:354
45
  msgid "Create Forms"
46
  msgstr ""
47
 
48
+ #: ../custom-contact-forms-admin.php:355
49
  msgid "Manage Fields"
50
  msgstr ""
51
 
52
+ #: ../custom-contact-forms-admin.php:356
53
+ #: ../custom-contact-forms-admin.php:761
54
  msgid "Manage Fixed Fields"
55
  msgstr ""
56
 
57
+ #: ../custom-contact-forms-admin.php:357
58
+ #: ../custom-contact-forms-admin.php:993
59
  msgid "Manage Forms"
60
  msgstr ""
61
 
62
+ #: ../custom-contact-forms-admin.php:358
63
  msgid "Create Styles"
64
  msgstr ""
65
 
66
+ #: ../custom-contact-forms-admin.php:359
67
  msgid "Manage Styles"
68
  msgstr ""
69
 
70
+ #: ../custom-contact-forms-admin.php:360
71
+ #: ../custom-contact-forms-admin.php:873
72
  msgid "Manage Field Options"
73
  msgstr ""
74
 
75
+ #: ../custom-contact-forms-admin.php:361
76
+ #: ../custom-contact-forms-admin.php:1778
77
  msgid "Suggest a Feature"
78
  msgstr ""
79
 
80
+ #: ../custom-contact-forms-admin.php:362
81
+ #: ../custom-contact-forms-admin.php:1775
82
  msgid "Bug Report"
83
  msgstr ""
84
 
85
+ #: ../custom-contact-forms-admin.php:363
 
86
  msgid "Custom HTML Forms"
87
  msgstr ""
88
 
89
+ #: ../custom-contact-forms-admin.php:364
90
  msgid "Plugin News"
91
  msgstr ""
92
 
93
+ #: ../custom-contact-forms-admin.php:367
94
+ msgid "Custom Contact Forms works best with any of the 20+ "
95
+ msgstr ""
96
+
97
+ #: ../custom-contact-forms-admin.php:367
98
+ msgid "Genesis"
99
+ msgstr ""
100
+
101
+ #: ../custom-contact-forms-admin.php:367
102
+ msgid "Wordpress child themes. The"
103
+ msgstr ""
104
+
105
+ #: ../custom-contact-forms-admin.php:367
106
+ msgid "Genesis Framework"
107
+ msgstr ""
108
+
109
+ #: ../custom-contact-forms-admin.php:367
110
+ msgid "empowers you to quickly and easily build incredible websites with WordPress."
111
+ msgstr ""
112
+
113
+ #: ../custom-contact-forms-admin.php:377
114
+ msgid "WP Blogging Tips, Downloads, SEO Tricks & Exclusive Tutorials"
115
  msgstr ""
116
 
117
  #: ../custom-contact-forms-admin.php:392
118
+ msgid "Create A Form Field"
119
+ msgstr ""
120
+
121
+ #: ../custom-contact-forms-admin.php:399
122
  msgid "Field Slug:"
123
  msgstr ""
124
 
125
+ #: ../custom-contact-forms-admin.php:403
126
  msgid "This is just a unique way for CCF to refer to your field. Must be unique from other slugs and contain only underscores and alphanumeric characters."
127
  msgstr ""
128
 
129
+ #: ../custom-contact-forms-admin.php:407
 
130
  msgid "Field Label:"
131
  msgstr ""
132
 
133
+ #: ../custom-contact-forms-admin.php:411
 
134
  msgid "The field label is displayed next to the field and is visible to the user."
135
  msgstr ""
136
 
137
+ #: ../custom-contact-forms-admin.php:415
 
138
  msgid "Field Type:"
139
  msgstr ""
140
 
141
+ #: ../custom-contact-forms-admin.php:428
 
142
  msgid "Initial Value:"
143
  msgstr ""
144
 
145
+ #: ../custom-contact-forms-admin.php:433
146
  msgid ""
147
  "This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox \n"
148
  "\t\t\t\t\t\t'Are you human?', I would set the initial value to 'Yes'."
149
  msgstr ""
150
 
151
+ #: ../custom-contact-forms-admin.php:435
152
  msgid "If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the"
153
  msgstr ""
154
 
155
+ #: ../custom-contact-forms-admin.php:436
156
  msgid "Create a Field Option"
157
  msgstr ""
158
 
159
+ #: ../custom-contact-forms-admin.php:436
160
  msgid "field option"
161
  msgstr ""
162
 
163
+ #: ../custom-contact-forms-admin.php:437
164
  msgid "you would like initially selected."
165
  msgstr ""
166
 
167
+ #: ../custom-contact-forms-admin.php:441
 
168
  msgid "Max Length:"
169
  msgstr ""
170
 
171
+ #: ../custom-contact-forms-admin.php:445
172
  msgid "0 for no limit; only applies to Text fields"
173
  msgstr ""
174
 
175
+ #: ../custom-contact-forms-admin.php:449
 
176
  msgid "Required Field:"
177
  msgstr ""
178
 
179
+ #: ../custom-contact-forms-admin.php:453
180
+ #: ../custom-contact-forms-admin.php:651
181
+ #: ../custom-contact-forms-admin.php:806
182
+ #: ../custom-contact-forms-admin.php:913
183
+ #: ../custom-contact-forms-admin.php:970
184
+ #: ../custom-contact-forms-admin.php:2043
185
+ #: ../custom-contact-forms-admin.php:2174
186
+ #: ../custom-contact-forms-admin.php:2206
187
  msgid "No"
188
  msgstr ""
189
 
190
+ #: ../custom-contact-forms-admin.php:456
191
+ #: ../custom-contact-forms-admin.php:648
192
+ #: ../custom-contact-forms-admin.php:803
193
+ #: ../custom-contact-forms-admin.php:813
194
+ #: ../custom-contact-forms-admin.php:913
195
+ #: ../custom-contact-forms-admin.php:970
196
+ #: ../custom-contact-forms-admin.php:2040
197
+ #: ../custom-contact-forms-admin.php:2171
198
+ #: ../custom-contact-forms-admin.php:2203
199
  msgid "Yes"
200
  msgstr ""
201
 
202
+ #: ../custom-contact-forms-admin.php:460
203
  msgid "If a field is required and a user leaves it blank, the plugin will display an error message (which you can customize using 'Field Error') explaining the problem."
204
  msgstr ""
205
 
206
+ #: ../custom-contact-forms-admin.php:464
207
+ #: ../custom-contact-forms-admin.php:670
208
+ #: ../custom-contact-forms-admin.php:835
 
209
  msgid "Field Instructions:"
210
  msgstr ""
211
 
212
+ #: ../custom-contact-forms-admin.php:468
213
+ #: ../custom-contact-forms-admin.php:668
214
+ #: ../custom-contact-forms-admin.php:833
215
  msgid "If this is filled out, a tooltip popover displaying this text will show when the field is selected."
216
  msgstr ""
217
 
218
+ #: ../custom-contact-forms-admin.php:472
219
+ #: ../custom-contact-forms-admin.php:675
220
+ #: ../custom-contact-forms-admin.php:829
221
  msgid "Field Class:"
222
  msgstr ""
223
 
224
+ #: ../custom-contact-forms-admin.php:476
225
  msgid "If you manage your own .css stylesheet, you can use this to attach a class to this field. Leaving this blank will do nothing."
226
  msgstr ""
227
 
228
+ #: ../custom-contact-forms-admin.php:480
229
+ #: ../custom-contact-forms-admin.php:680
230
+ #: ../custom-contact-forms-admin.php:840
 
231
  msgid "Field Error:"
232
  msgstr ""
233
 
234
+ #: ../custom-contact-forms-admin.php:484
 
235
  msgid "If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank."
236
  msgstr ""
237
 
238
+ #: ../custom-contact-forms-admin.php:489
239
  msgid "Create Field"
240
  msgstr ""
241
 
242
+ #: ../custom-contact-forms-admin.php:491
243
  msgid "If this is a dropdown or radio field, you should go to the field manager below to attach field options after you create it."
244
  msgstr ""
245
 
246
+ #: ../custom-contact-forms-admin.php:500
247
  msgid "Create A Form"
248
  msgstr ""
249
 
250
+ #: ../custom-contact-forms-admin.php:507
251
  msgid "Form Slug:"
252
  msgstr ""
253
 
254
+ #: ../custom-contact-forms-admin.php:511
255
  msgid "This is just a unique way for CCF to refer to your form. Must be unique from other slugs and contain only underscores and alphanumeric characters."
256
  msgstr ""
257
 
258
+ #: ../custom-contact-forms-admin.php:515
 
259
  msgid "Form Title:"
260
  msgstr ""
261
 
262
+ #: ../custom-contact-forms-admin.php:518
263
  msgid "This text is displayed above the form as the heading."
264
  msgstr ""
265
 
266
+ #: ../custom-contact-forms-admin.php:522
 
267
  msgid "Form Style:"
268
  msgstr ""
269
 
270
+ #: ../custom-contact-forms-admin.php:527
271
  msgid "Click to create a style"
272
  msgstr ""
273
 
274
+ #: ../custom-contact-forms-admin.php:530
 
275
  msgid "Submit Button Text:"
276
  msgstr ""
277
 
278
+ #: ../custom-contact-forms-admin.php:536
 
279
  msgid "Form Destination Email:"
280
  msgstr ""
281
 
282
+ #: ../custom-contact-forms-admin.php:540
283
  msgid "Will receive all submissions from this form; if left blank it will use the default specified in general settings."
284
  msgstr ""
285
 
286
+ #: ../custom-contact-forms-admin.php:544
287
  msgid "Form Email Subject:"
288
  msgstr ""
289
 
290
+ #: ../custom-contact-forms-admin.php:548
291
  msgid "When submitted and configured accordingly, the form will send an email with this subject."
292
  msgstr ""
293
 
294
+ #: ../custom-contact-forms-admin.php:552
295
  msgid "Form Email Name:"
296
  msgstr ""
297
 
298
+ #: ../custom-contact-forms-admin.php:556
299
  msgid "When submitted and configured accordingly, the form will send an email with this as the email 'from name'."
300
  msgstr ""
301
 
302
+ #: ../custom-contact-forms-admin.php:560
 
303
  msgid "Form Success Message:"
304
  msgstr ""
305
 
306
+ #: ../custom-contact-forms-admin.php:564
307
+ #: ../custom-contact-forms-admin.php:572
 
308
  msgid "Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
309
  msgstr ""
310
 
311
+ #: ../custom-contact-forms-admin.php:568
 
312
  msgid "Form Success Message Title:"
313
  msgstr ""
314
 
315
+ #: ../custom-contact-forms-admin.php:576
 
316
  msgid "Custom Success URL:"
317
  msgstr ""
318
 
319
+ #: ../custom-contact-forms-admin.php:580
320
  msgid "If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
321
  msgstr ""
322
 
323
+ #: ../custom-contact-forms-admin.php:583
324
  msgid "Who Can View This Form:"
325
  msgstr ""
326
 
327
+ #: ../custom-contact-forms-admin.php:599
328
  msgid "Choose which types of users should be able to view this form."
329
  msgstr ""
330
 
331
+ #: ../custom-contact-forms-admin.php:603
332
  msgid "Create Form"
333
  msgstr ""
334
 
335
+ #: ../custom-contact-forms-admin.php:605
336
  msgid "You should go to the form manager below to attach fields to this form after you create it."
337
  msgstr ""
338
 
339
+ #: ../custom-contact-forms-admin.php:612
340
  msgid "Manage User Fields"
341
  msgstr ""
342
 
343
+ #: ../custom-contact-forms-admin.php:619
344
+ #: ../custom-contact-forms-admin.php:743
345
+ #: ../custom-contact-forms-admin.php:768
346
+ #: ../custom-contact-forms-admin.php:855
347
+ #: ../custom-contact-forms-admin.php:882
348
+ #: ../custom-contact-forms-admin.php:891
349
+ #: ../custom-contact-forms-admin.php:1001
350
+ #: ../custom-contact-forms-admin.php:1150
351
  msgid "Slug"
352
  msgstr ""
353
 
354
+ #: ../custom-contact-forms-admin.php:620
355
+ #: ../custom-contact-forms-admin.php:744
356
+ #: ../custom-contact-forms-admin.php:769
357
+ #: ../custom-contact-forms-admin.php:856
358
+ #: ../custom-contact-forms-admin.php:883
359
+ #: ../custom-contact-forms-admin.php:892
360
  msgid "Label"
361
  msgstr ""
362
 
363
+ #: ../custom-contact-forms-admin.php:621
364
+ #: ../custom-contact-forms-admin.php:745
365
+ #: ../custom-contact-forms-admin.php:770
366
+ #: ../custom-contact-forms-admin.php:857
367
  msgid "Type"
368
  msgstr ""
369
 
370
+ #: ../custom-contact-forms-admin.php:622
371
+ #: ../custom-contact-forms-admin.php:746
372
+ #: ../custom-contact-forms-admin.php:771
373
+ #: ../custom-contact-forms-admin.php:858
374
  msgid "Initial Value"
375
  msgstr ""
376
 
377
+ #: ../custom-contact-forms-admin.php:623
378
+ #: ../custom-contact-forms-admin.php:747
379
+ #: ../custom-contact-forms-admin.php:772
380
+ #: ../custom-contact-forms-admin.php:859
381
  msgid "Required"
382
  msgstr ""
383
 
384
+ #: ../custom-contact-forms-admin.php:624
385
+ #: ../custom-contact-forms-admin.php:748
386
+ #: ../custom-contact-forms-admin.php:773
387
+ #: ../custom-contact-forms-admin.php:860
388
  msgid "Maxlength"
389
  msgstr ""
390
 
391
+ #: ../custom-contact-forms-admin.php:673
392
+ #: ../custom-contact-forms-admin.php:828
393
  msgid "If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a \"Form Style\" other than the default, styles inherited from the \"Field Class\" might be overwritten."
394
  msgstr ""
395
 
396
+ #: ../custom-contact-forms-admin.php:678
397
+ #: ../custom-contact-forms-admin.php:838
398
  msgid "This lets you customize the error message displayed when this field is required and left blank."
399
  msgstr ""
400
 
401
+ #: ../custom-contact-forms-admin.php:710
402
  msgid "Detach field options you"
403
  msgstr ""
404
 
405
+ #: ../custom-contact-forms-admin.php:712
406
+ #: ../custom-contact-forms-admin.php:1129
407
  msgid "create"
408
  msgstr ""
409
 
410
+ #: ../custom-contact-forms-admin.php:729
411
  msgid "Attach field options in the order you want them to display."
412
  msgstr ""
413
 
414
+ #: ../custom-contact-forms-admin.php:754
415
+ #: ../custom-contact-forms-admin.php:866
416
+ #: ../custom-contact-forms-admin.php:929
417
+ #: ../custom-contact-forms-admin.php:1162
418
+ #: ../custom-contact-forms-admin.php:1732
419
+ #: ../custom-contact-forms-admin.php:1955
420
  msgid "Bulk Actions"
421
  msgstr ""
422
 
423
+ #: ../custom-contact-forms-admin.php:755
424
+ #: ../custom-contact-forms-admin.php:867
425
+ #: ../custom-contact-forms-admin.php:930
426
+ #: ../custom-contact-forms-admin.php:1163
427
+ #: ../custom-contact-forms-admin.php:1733
428
  msgid "Save"
429
  msgstr ""
430
 
431
+ #: ../custom-contact-forms-admin.php:756
432
+ #: ../custom-contact-forms-admin.php:931
433
+ #: ../custom-contact-forms-admin.php:1164
434
+ #: ../custom-contact-forms-admin.php:1734
435
+ #: ../custom-contact-forms-admin.php:1956
436
  msgid "Delete"
437
  msgstr ""
438
 
439
+ #: ../custom-contact-forms-admin.php:757
440
+ #: ../custom-contact-forms-admin.php:868
441
+ #: ../custom-contact-forms-admin.php:932
442
+ #: ../custom-contact-forms-admin.php:1165
443
+ #: ../custom-contact-forms-admin.php:1735
444
+ #: ../custom-contact-forms-admin.php:1957
445
  msgid "Apply"
446
  msgstr ""
447
 
448
+ #: ../custom-contact-forms-admin.php:789
449
+ #: ../custom-contact-forms-admin.php:820
450
+ #: ../custom-contact-forms-admin.php:2313
451
  msgid "None"
452
  msgstr ""
453
 
454
+ #: ../custom-contact-forms-admin.php:884
455
+ #: ../custom-contact-forms-admin.php:893
456
  msgid "Value"
457
  msgstr ""
458
 
459
+ #: ../custom-contact-forms-admin.php:885
460
+ #: ../custom-contact-forms-admin.php:894
461
  msgid "Is Dead"
462
  msgstr ""
463
 
464
+ #: ../custom-contact-forms-admin.php:921
465
  msgid "No field options have been created."
466
  msgstr ""
467
 
468
+ #: ../custom-contact-forms-admin.php:939
469
  msgid "Create A Field Option"
470
  msgstr ""
471
 
472
+ #: ../custom-contact-forms-admin.php:946
473
  msgid "Option Slug:"
474
  msgstr ""
475
 
476
+ #: ../custom-contact-forms-admin.php:950
477
  msgid "Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'"
478
  msgstr ""
479
 
480
+ #: ../custom-contact-forms-admin.php:954
 
481
  msgid "Option Label:"
482
  msgstr ""
483
 
484
+ #: ../custom-contact-forms-admin.php:958
485
  msgid "This is what is shown to the user in the dropdown or radio field. Example: 'United States'"
486
  msgstr ""
487
 
488
+ #: ../custom-contact-forms-admin.php:962
 
489
  msgid "Option Value:"
490
  msgstr ""
491
 
492
+ #: ../custom-contact-forms-admin.php:964
493
  msgid "This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'."
494
  msgstr ""
495
 
496
+ #: ../custom-contact-forms-admin.php:966
497
  msgid "This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: \"The color green\" => \"green\" or \"Yes\" => \"1\"."
498
  msgstr ""
499
 
500
+ #: ../custom-contact-forms-admin.php:969
 
501
  msgid "Is Dead Option:"
502
  msgstr ""
503
 
504
+ #: ../custom-contact-forms-admin.php:971
505
  msgid "A dead option is something like 'Please Select One'. This is a useful tool for required dropdown fields. If a dead option is submitted by a user for a required dropdown field, then the user will have to go back and fill out the field again."
506
  msgstr ""
507
 
508
+ #: ../custom-contact-forms-admin.php:975
509
  msgid "Create Field Option"
510
  msgstr ""
511
 
512
+ #: ../custom-contact-forms-admin.php:985
513
  msgid "Rate This Plugin"
514
  msgstr ""
515
 
516
+ #: ../custom-contact-forms-admin.php:986
517
  msgid "We need your help to continue development! Please <span>rate this plugin</span> to show your support."
518
  msgstr ""
519
 
520
+ #: ../custom-contact-forms-admin.php:1000
521
  msgid "Form Display Code"
522
  msgstr ""
523
 
524
+ #: ../custom-contact-forms-admin.php:1002
525
+ #: ../custom-contact-forms-admin.php:1151
526
  msgid "Destination Email"
527
  msgstr ""
528
 
529
+ #: ../custom-contact-forms-admin.php:1003
530
+ #: ../custom-contact-forms-admin.php:1152
531
  msgid "Title"
532
  msgstr ""
533
 
534
+ #: ../custom-contact-forms-admin.php:1004
535
+ #: ../custom-contact-forms-admin.php:1153
536
  msgid "Button Text"
537
  msgstr ""
538
 
539
+ #: ../custom-contact-forms-admin.php:1005
540
+ #: ../custom-contact-forms-admin.php:1154
541
  msgid "Style"
542
  msgstr ""
543
 
544
+ #: ../custom-contact-forms-admin.php:1038
545
  msgid "Method"
546
  msgstr ""
547
 
548
+ #: ../custom-contact-forms-admin.php:1039
549
  msgid "Form Action"
550
  msgstr ""
551
 
552
+ #: ../custom-contact-forms-admin.php:1040
553
  msgid "Email Subject"
554
  msgstr ""
555
 
556
+ #: ../custom-contact-forms-admin.php:1041
557
  msgid "Email From Name"
558
  msgstr ""
559
 
560
+ #: ../custom-contact-forms-admin.php:1042
561
  msgid "Success Message Title"
562
  msgstr ""
563
 
564
+ #: ../custom-contact-forms-admin.php:1043
565
  msgid "Success Message"
566
  msgstr ""
567
 
568
+ #: ../custom-contact-forms-admin.php:1044
569
  msgid "Custom Success URL"
570
  msgstr ""
571
 
572
+ #: ../custom-contact-forms-admin.php:1047
573
  msgid "The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post."
574
  msgstr ""
575
 
576
+ #: ../custom-contact-forms-admin.php:1051
577
  msgid "This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank."
578
  msgstr ""
579
 
580
+ #: ../custom-contact-forms-admin.php:1053
581
  msgid "This is the form email subject sent to the destination email address. If left blank, the default from General Settings will be used."
582
  msgstr ""
583
 
584
+ #: ../custom-contact-forms-admin.php:1055
585
  msgid "This is the from name of the email sent on successful form submission. If left blank, the default from General Settings will be used."
586
  msgstr ""
587
 
588
+ #: ../custom-contact-forms-admin.php:1057
589
  msgid "This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
590
  msgstr ""
591
 
592
+ #: ../custom-contact-forms-admin.php:1059
593
  msgid "This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
594
  msgstr ""
595
 
596
+ #: ../custom-contact-forms-admin.php:1061
597
  msgid "If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
598
  msgstr ""
599
 
600
+ #: ../custom-contact-forms-admin.php:1065
601
  msgid "The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet."
602
  msgstr ""
603
 
604
+ #: ../custom-contact-forms-admin.php:1066
605
  msgid "Code to Display Form in Theme Files:"
606
  msgstr ""
607
 
608
+ #: ../custom-contact-forms-admin.php:1069
609
  msgid "This field allows you to insert HTML directly after the starting <form> tag."
610
  msgstr ""
611
 
612
+ #: ../custom-contact-forms-admin.php:1070
 
613
  msgid "Custom Code:"
614
  msgstr ""
615
 
616
+ #: ../custom-contact-forms-admin.php:1073
617
  msgid "If you want to show this form to only certain types of users, you can uncheck boxes accordingly. To show this form to anyone, check all the boxes. This will only take effect if 'Form Access Capabilities' is enabled in general settings."
618
  msgstr ""
619
 
620
+ #: ../custom-contact-forms-admin.php:1092
621
  msgid "Attached Fields:"
622
  msgstr ""
623
 
624
+ #: ../custom-contact-forms-admin.php:1112
625
  msgid "Attach fields in the order you want them displayed."
626
  msgstr ""
627
 
628
+ #: ../custom-contact-forms-admin.php:1116
629
  msgid "Attach Field:"
630
  msgstr ""
631
 
632
+ #: ../custom-contact-forms-admin.php:1127
633
  msgid "Attach fixed fields or ones you"
634
  msgstr ""
635
 
636
+ #: ../custom-contact-forms-admin.php:1149
637
  msgid "Form Code"
638
  msgstr ""
639
 
640
+ #: ../custom-contact-forms-admin.php:1171
641
  msgid "Create A Style for Your Forms"
642
  msgstr ""
643
 
644
+ #: ../custom-contact-forms-admin.php:1175
645
  msgid "Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values."
646
  msgstr ""
647
 
648
+ #: ../custom-contact-forms-admin.php:1181
649
  msgid "Style Slug:"
650
  msgstr ""
651
 
652
+ #: ../custom-contact-forms-admin.php:1184
653
  msgid "(Must be unique)"
654
  msgstr ""
655
 
656
+ #: ../custom-contact-forms-admin.php:1188
657
+ #: ../custom-contact-forms-admin.php:1586
658
+ #: ../custom-contact-forms-admin.php:1595
659
  msgid "Title Font Size:"
660
  msgstr ""
661
 
662
+ #: ../custom-contact-forms-admin.php:1191
663
  msgid "(ex: 10pt, 10px, 1em)"
664
  msgstr ""
665
 
666
+ #: ../custom-contact-forms-admin.php:1195
667
+ #: ../custom-contact-forms-admin.php:1634
668
+ #: ../custom-contact-forms-admin.php:1702
669
  msgid "Title Font Color:"
670
  msgstr ""
671
 
672
+ #: ../custom-contact-forms-admin.php:1198
673
+ #: ../custom-contact-forms-admin.php:1219
674
+ #: ../custom-contact-forms-admin.php:1283
 
675
  #: ../custom-contact-forms-admin.php:1384
676
+ #: ../custom-contact-forms-admin.php:1391
677
+ #: ../custom-contact-forms-admin.php:1419
678
  msgid "(ex: FF0000)"
679
  msgstr ""
680
 
681
+ #: ../custom-contact-forms-admin.php:1202
682
+ #: ../custom-contact-forms-admin.php:1559
683
  msgid "Label Width:"
684
  msgstr ""
685
 
686
+ #: ../custom-contact-forms-admin.php:1205
687
  msgid "(ex: 100px or 20%)"
688
  msgstr ""
689
 
690
+ #: ../custom-contact-forms-admin.php:1209
691
+ #: ../custom-contact-forms-admin.php:1600
692
  msgid "Label Font Size:"
693
  msgstr ""
694
 
695
+ #: ../custom-contact-forms-admin.php:1212
696
+ #: ../custom-contact-forms-admin.php:1377
697
  msgid "(ex: 10px, 10pt, 1em)"
698
  msgstr ""
699
 
700
+ #: ../custom-contact-forms-admin.php:1216
701
+ #: ../custom-contact-forms-admin.php:1639
702
  msgid "Label Font Color:"
703
  msgstr ""
704
 
705
+ #: ../custom-contact-forms-admin.php:1223
706
+ #: ../custom-contact-forms-admin.php:1526
707
  msgid "Text Field Width:"
708
  msgstr ""
709
 
 
710
  #: ../custom-contact-forms-admin.php:1226
711
  #: ../custom-contact-forms-admin.php:1233
712
+ #: ../custom-contact-forms-admin.php:1240
713
+ #: ../custom-contact-forms-admin.php:1320
714
  msgid "(ex: 100px or 100%)"
715
  msgstr ""
716
 
717
+ #: ../custom-contact-forms-admin.php:1230
718
  msgid "Textarea Field Width:"
719
  msgstr ""
720
 
721
+ #: ../custom-contact-forms-admin.php:1237
722
  msgid "Textarea Field Height:"
723
  msgstr ""
724
 
725
+ #: ../custom-contact-forms-admin.php:1244
726
+ #: ../custom-contact-forms-admin.php:1605
727
  msgid "Field Font Size:"
728
  msgstr ""
729
 
730
+ #: ../custom-contact-forms-admin.php:1247
731
  msgid "(ex: 10px, 10pt, 1em"
732
  msgstr ""
733
 
734
+ #: ../custom-contact-forms-admin.php:1251
735
+ #: ../custom-contact-forms-admin.php:1644
736
  msgid "Field Font Color:"
737
  msgstr ""
738
 
739
+ #: ../custom-contact-forms-admin.php:1254
740
+ #: ../custom-contact-forms-admin.php:1290
741
  msgid "(ex: 333333)"
742
  msgstr ""
743
 
744
+ #: ../custom-contact-forms-admin.php:1258
745
+ #: ../custom-contact-forms-admin.php:1693
746
  msgid "Field Border Style:"
747
  msgstr ""
748
 
749
+ #: ../custom-contact-forms-admin.php:1266
750
+ #: ../custom-contact-forms-admin.php:1654
751
  msgid "Form Margin:"
752
  msgstr ""
753
 
 
754
  #: ../custom-contact-forms-admin.php:1269
755
+ #: ../custom-contact-forms-admin.php:1276
756
  #: ../custom-contact-forms-admin.php:1398
757
+ #: ../custom-contact-forms-admin.php:1405
758
  msgid "(ex: 5px or 1em)"
759
  msgstr ""
760
 
761
+ #: ../custom-contact-forms-admin.php:1273
762
+ #: ../custom-contact-forms-admin.php:1546
763
  msgid "Label Margin:"
764
  msgstr ""
765
 
766
+ #: ../custom-contact-forms-admin.php:1280
767
  msgid "Textarea Background Color:"
768
  msgstr ""
769
 
770
+ #: ../custom-contact-forms-admin.php:1287
771
  msgid "Success Popover Font Color:"
772
  msgstr ""
773
 
774
+ #: ../custom-contact-forms-admin.php:1294
775
  msgid "Success Popover Title Font Size:"
776
  msgstr ""
777
 
 
778
  #: ../custom-contact-forms-admin.php:1297
779
+ #: ../custom-contact-forms-admin.php:1304
780
+ #: ../custom-contact-forms-admin.php:1426
781
+ #: ../custom-contact-forms-admin.php:1449
782
  msgid "(ex: 12px, 1em, 100%)"
783
  msgstr ""
784
 
785
+ #: ../custom-contact-forms-admin.php:1301
786
+ #: ../custom-contact-forms-admin.php:1590
787
  msgid "Form Background Color:"
788
  msgstr ""
789
 
790
+ #: ../custom-contact-forms-admin.php:1308
791
  msgid "Tooltip Background Color:"
792
  msgstr ""
793
 
794
+ #: ../custom-contact-forms-admin.php:1311
795
  msgid "(ex: 000000 or black)"
796
  msgstr ""
797
 
798
+ #: ../custom-contact-forms-admin.php:1317
799
+ #: ../custom-contact-forms-admin.php:1688
800
  msgid "Field Border Color:"
801
  msgstr ""
802
 
803
+ #: ../custom-contact-forms-admin.php:1324
804
+ #: ../custom-contact-forms-admin.php:1671
805
  msgid "Form Border Style:"
806
  msgstr ""
807
 
808
+ #: ../custom-contact-forms-admin.php:1332
809
+ #: ../custom-contact-forms-admin.php:1683
810
  msgid "Form Border Color:"
811
  msgstr ""
812
 
813
+ #: ../custom-contact-forms-admin.php:1335
814
  msgid "(ex: 000000)"
815
  msgstr ""
816
 
817
+ #: ../custom-contact-forms-admin.php:1339
818
+ #: ../custom-contact-forms-admin.php:1678
819
  msgid "Form Border Width:"
820
  msgstr ""
821
 
822
+ #: ../custom-contact-forms-admin.php:1342
823
  msgid "(ex: 1px)"
824
  msgstr ""
825
 
826
+ #: ../custom-contact-forms-admin.php:1346
827
+ #: ../custom-contact-forms-admin.php:1521
828
  msgid "Form Width:"
829
  msgstr ""
830
 
831
+ #: ../custom-contact-forms-admin.php:1349
832
  msgid "(ex: 100px or 50%)"
833
  msgstr ""
834
 
835
+ #: ../custom-contact-forms-admin.php:1353
836
  msgid "Form Font Family:"
837
  msgstr ""
838
 
839
+ #: ../custom-contact-forms-admin.php:1356
840
  msgid "(ex: Verdana, Tahoma, Arial)"
841
  msgstr ""
842
 
843
+ #: ../custom-contact-forms-admin.php:1360
844
+ #: ../custom-contact-forms-admin.php:1564
845
  msgid "Button Width:"
846
  msgstr ""
847
 
848
+ #: ../custom-contact-forms-admin.php:1363
849
  msgid "(ex: 100px, 30%, auto)"
850
  msgstr ""
851
 
852
+ #: ../custom-contact-forms-admin.php:1367
853
+ #: ../custom-contact-forms-admin.php:1569
854
  msgid "Button Height:"
855
  msgstr ""
856
 
857
+ #: ../custom-contact-forms-admin.php:1370
858
  msgid "(ex: 100px or 30%)"
859
  msgstr ""
860
 
861
+ #: ../custom-contact-forms-admin.php:1374
862
+ #: ../custom-contact-forms-admin.php:1610
863
  msgid "Button Font Size:"
864
  msgstr ""
865
 
866
+ #: ../custom-contact-forms-admin.php:1381
867
+ #: ../custom-contact-forms-admin.php:1649
868
  msgid "Button Font Color:"
869
  msgstr ""
870
 
871
+ #: ../custom-contact-forms-admin.php:1388
872
+ #: ../custom-contact-forms-admin.php:1574
873
  msgid "Field Background Color:"
874
  msgstr ""
875
 
876
+ #: ../custom-contact-forms-admin.php:1395
877
+ #: ../custom-contact-forms-admin.php:1615
878
  msgid "Form Padding:"
879
  msgstr ""
880
 
881
+ #: ../custom-contact-forms-admin.php:1402
882
+ #: ../custom-contact-forms-admin.php:1579
883
  msgid "Title Margin:"
884
  msgstr ""
885
 
886
+ #: ../custom-contact-forms-admin.php:1409
887
+ #: ../custom-contact-forms-admin.php:1541
888
  msgid "Dropdown Width:"
889
  msgstr ""
890
 
891
+ #: ../custom-contact-forms-admin.php:1412
892
  msgid "(ex: 30px, 20%, or auto)"
893
  msgstr ""
894
 
895
+ #: ../custom-contact-forms-admin.php:1416
896
  msgid "Success Popover Border Color:"
897
  msgstr ""
898
 
899
+ #: ../custom-contact-forms-admin.php:1423
900
  msgid "Success Popover Font Size:"
901
  msgstr ""
902
 
903
+ #: ../custom-contact-forms-admin.php:1430
904
  msgid "Success Popover Height:"
905
  msgstr ""
906
 
907
+ #: ../custom-contact-forms-admin.php:1433
908
  msgid "(ex: 200px, 6em, 50%)"
909
  msgstr ""
910
 
911
+ #: ../custom-contact-forms-admin.php:1437
912
+ #: ../custom-contact-forms-admin.php:1707
913
  msgid "Field Border Roundness:"
914
  msgstr ""
915
 
916
+ #: ../custom-contact-forms-admin.php:1440
917
  msgid "(ex: 6px, or 0px)"
918
  msgstr ""
919
 
920
+ #: ../custom-contact-forms-admin.php:1444
921
+ #: ../custom-contact-forms-admin.php:1514
922
+ #: ../custom-contact-forms-admin.php:1627
923
  msgid "Tooltip"
924
  msgstr ""
925
 
926
+ #: ../custom-contact-forms-admin.php:1445
927
+ #: ../custom-contact-forms-admin.php:1515
928
+ #: ../custom-contact-forms-admin.php:1628
929
  msgid "A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field."
930
  msgstr ""
931
 
932
+ #: ../custom-contact-forms-admin.php:1446
933
+ #: ../custom-contact-forms-admin.php:1622
934
  msgid "Font Size:"
935
  msgstr ""
936
 
937
+ #: ../custom-contact-forms-admin.php:1453
938
  msgid "Tooltip Font Color:"
939
  msgstr ""
940
 
941
+ #: ../custom-contact-forms-admin.php:1456
942
  msgid "(ex: ffffff or white)"
943
  msgstr ""
944
 
945
+ #: ../custom-contact-forms-admin.php:1460
946
  msgid "Create Style"
947
  msgstr ""
948
 
949
+ #: ../custom-contact-forms-admin.php:1468
950
  msgid "Manage Form Styles"
951
  msgstr ""
952
 
953
+ #: ../custom-contact-forms-admin.php:1490
 
 
 
954
  msgid "Slug:"
955
  msgstr ""
956
 
957
+ #: ../custom-contact-forms-admin.php:1495
958
  msgid "Font Family:"
959
  msgstr ""
960
 
961
+ #: ../custom-contact-forms-admin.php:1500
962
  msgid "Textarea Background"
963
  msgstr ""
964
 
965
+ #: ../custom-contact-forms-admin.php:1502
966
  msgid "Color:"
967
  msgstr ""
968
 
969
+ #: ../custom-contact-forms-admin.php:1507
970
+ #: ../custom-contact-forms-admin.php:1551
971
+ #: ../custom-contact-forms-admin.php:1584
972
+ #: ../custom-contact-forms-admin.php:1620
973
+ #: ../custom-contact-forms-admin.php:1659
974
+ #: ../custom-contact-forms-admin.php:1700
975
  msgid "Success Popover"
976
  msgstr ""
977
 
978
+ #: ../custom-contact-forms-admin.php:1509
979
  msgid "Border Color:"
980
  msgstr ""
981
 
982
+ #: ../custom-contact-forms-admin.php:1516
983
+ #: ../custom-contact-forms-admin.php:1661
984
  msgid "Font Color:"
985
  msgstr ""
986
 
987
+ #: ../custom-contact-forms-admin.php:1531
988
  msgid "Textarea Width:"
989
  msgstr ""
990
 
991
+ #: ../custom-contact-forms-admin.php:1536
992
  msgid "Textarea Height:"
993
  msgstr ""
994
 
995
+ #: ../custom-contact-forms-admin.php:1553
996
  msgid "Height:"
997
  msgstr ""
998
 
999
+ #: ../custom-contact-forms-admin.php:1629
1000
  msgid "Background Color:"
1001
  msgstr ""
1002
 
1003
+ #: ../custom-contact-forms-admin.php:1666
1004
  msgid "Tooltip Font Size:"
1005
  msgstr ""
1006
 
1007
+ #: ../custom-contact-forms-admin.php:1740
1008
  msgid "Report a Bug/Suggest a Feature"
1009
  msgstr ""
1010
 
1011
+ #: ../custom-contact-forms-admin.php:1747
1012
  msgid "Your Name:"
1013
  msgstr ""
1014
 
1015
+ #: ../custom-contact-forms-admin.php:1753
1016
  msgid "Your Email:"
1017
  msgstr ""
1018
 
1019
+ #: ../custom-contact-forms-admin.php:1759
1020
  msgid "Who Hosts Your Website?"
1021
  msgstr ""
1022
 
1023
+ #: ../custom-contact-forms-admin.php:1765
1024
  msgid "Your Message:"
1025
  msgstr ""
1026
 
1027
+ #: ../custom-contact-forms-admin.php:1771
1028
  msgid "Purpose of this message:"
1029
  msgstr ""
1030
 
1031
+ #: ../custom-contact-forms-admin.php:1781
1032
  msgid "Plugin Question"
1033
  msgstr ""
1034
 
1035
+ #: ../custom-contact-forms-admin.php:1787
1036
  msgid "Version of Custom Contact Forms?"
1037
  msgstr ""
1038
 
1039
+ #: ../custom-contact-forms-admin.php:1793
1040
  msgid "Version of WordPress?"
1041
  msgstr ""
1042
 
1043
+ #: ../custom-contact-forms-admin.php:1799
1044
  msgid "Send Message"
1045
  msgstr ""
1046
 
1047
+ #: ../custom-contact-forms-admin.php:1807
1048
  msgid "Custom HTML Forms (Advanced)"
1049
  msgstr ""
1050
 
1051
+ #: ../custom-contact-forms-admin.php:1811
1052
  msgid ""
1053
  "If you know HTML and simply want to use this plugin to process form requests, this feature is for you. \n"
1054
  "\t\t\t\t\tThe following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a \n"
1055
  "\t\t\t\t\thidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately."
1056
  msgstr ""
1057
 
1058
+ #: ../custom-contact-forms-admin.php:1818
1059
  msgid "Thank you for filling out our form!"
1060
  msgstr ""
1061
 
1062
+ #: ../custom-contact-forms-admin.php:1823
1063
  msgid ""
1064
  "Paste all this code into a page or post and edit it to your liking. It is recommended you only use this feature if you are experienced with HTML. The destination_email \n"
1065
  "field specifies where emails will be sent on successful submission; you can have the form send to multiple addresses by separating email's with semi-colons (i.e. email@google.com; email2@google.com). \n"
1068
  "the field names you want required by commas. Remember to use underscores instead of spaces in field names!"
1069
  msgstr ""
1070
 
1071
+ #: ../custom-contact-forms-admin.php:1885
 
1072
  msgid "Saved Form Submissions"
1073
  msgstr ""
1074
 
1075
+ #: ../custom-contact-forms-admin.php:1892
1076
+ #: ../custom-contact-forms-admin.php:1946
1077
  msgid "Date Submitted"
1078
  msgstr ""
1079
 
1080
+ #: ../custom-contact-forms-admin.php:1893
1081
+ #: ../custom-contact-forms-admin.php:1947
1082
  msgid "Form Submitted"
1083
  msgstr ""
1084
 
1085
+ #: ../custom-contact-forms-admin.php:1894
1086
+ #: ../custom-contact-forms-admin.php:1948
1087
  msgid "Form Page"
1088
  msgstr ""
1089
 
1090
+ #: ../custom-contact-forms-admin.php:1913
1091
  msgid "Custom HTML Form"
1092
  msgstr ""
1093
 
1094
+ #: ../custom-contact-forms-admin.php:2029
1095
  msgid "General Settings"
1096
  msgstr ""
1097
 
1098
+ #: ../custom-contact-forms-admin.php:2036
1099
  msgid "Email Form Submissions:"
1100
  msgstr ""
1101
 
1102
+ #: ../custom-contact-forms-admin.php:2048
1103
  msgid "When a user fills out one of your forms, the info submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info."
1104
  msgstr ""
1105
 
1106
+ #: ../custom-contact-forms-admin.php:2052
1107
  msgid "Default Email:"
1108
  msgstr ""
1109
 
1110
+ #: ../custom-contact-forms-admin.php:2057
1111
  msgid "Form emails will be sent <span>to</span> this address, if no destination email is specified by the form."
1112
  msgstr ""
1113
 
1114
+ #: ../custom-contact-forms-admin.php:2061
1115
  msgid "Front End JQuery:"
1116
  msgstr ""
1117
 
1118
+ #: ../custom-contact-forms-admin.php:2065
1119
+ #: ../custom-contact-forms-admin.php:2108
1120
+ #: ../custom-contact-forms-admin.php:2187
1121
+ #: ../custom-contact-forms-admin.php:2216
1122
+ #: ../custom-contact-forms-admin.php:2244
1123
  msgid "Enabled"
1124
  msgstr ""
1125
 
1126
+ #: ../custom-contact-forms-admin.php:2068
1127
+ #: ../custom-contact-forms-admin.php:2111
1128
+ #: ../custom-contact-forms-admin.php:2190
1129
+ #: ../custom-contact-forms-admin.php:2219
1130
+ #: ../custom-contact-forms-admin.php:2241
1131
  msgid "Disabled"
1132
  msgstr ""
1133
 
1134
+ #: ../custom-contact-forms-admin.php:2073
1135
  #, php-format
1136
  msgid "Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips."
1137
  msgstr ""
1138
 
1139
+ #: ../custom-contact-forms-admin.php:2077
1140
  msgid "Default From Email:"
1141
  msgstr ""
1142
 
1143
+ #: ../custom-contact-forms-admin.php:2082
1144
  msgid "Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host."
1145
  msgstr ""
1146
 
1147
+ #: ../custom-contact-forms-admin.php:2086
1148
  msgid "Default From Name:"
1149
  msgstr ""
1150
 
1151
+ #: ../custom-contact-forms-admin.php:2091
1152
  msgid "This setting allows you to specify the name under which form emails are sent. The default is 'Custom Contact Forms'."
1153
  msgstr ""
1154
 
1155
+ #: ../custom-contact-forms-admin.php:2095
1156
  msgid "Default Email Subject:"
1157
  msgstr ""
1158
 
1159
+ #: ../custom-contact-forms-admin.php:2100
1160
  msgid "Default subject to be included in all form emails."
1161
  msgstr ""
1162
 
1163
+ #: ../custom-contact-forms-admin.php:2104
1164
  msgid "Enable Dashboard Widget:"
1165
  msgstr ""
1166
 
1167
+ #: ../custom-contact-forms-admin.php:2115
1168
  msgid "Enabling this will display a widget on your dashboard that shows the latest form submissions."
1169
  msgstr ""
1170
 
1171
+ #: ../custom-contact-forms-admin.php:2119
1172
+ msgid "Dashboard Widget Accessibility:"
1173
  msgstr ""
1174
 
1175
+ #: ../custom-contact-forms-admin.php:2123
1176
+ msgid "Only admins can view"
1177
  msgstr ""
1178
 
1179
+ #: ../custom-contact-forms-admin.php:2126
1180
+ msgid "All roles except subscribers can view"
1181
  msgstr ""
1182
 
1183
+ #: ../custom-contact-forms-admin.php:2129
1184
+ msgid "All roles can view"
1185
+ msgstr ""
1186
+
1187
+ #: ../custom-contact-forms-admin.php:2133
1188
+ msgid "If you are using the dashboard widget, this allows you to disallow certain users from viewing it."
1189
  msgstr ""
1190
 
1191
+ #: ../custom-contact-forms-admin.php:2137
1192
+ msgid "Default Form Error Header:"
1193
+ msgstr ""
1194
+
1195
+ #: ../custom-contact-forms-admin.php:2142
1196
+ msgid "When a form is filled out incorrectly, this message will be displayed followed by the individual field error messages."
1197
+ msgstr ""
1198
+
1199
+ #: ../custom-contact-forms-admin.php:2149
1200
  msgid "Default Form Success Message Title:"
1201
  msgstr ""
1202
 
1203
+ #: ../custom-contact-forms-admin.php:2154
1204
  msgid "If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title."
1205
  msgstr ""
1206
 
1207
+ #: ../custom-contact-forms-admin.php:2158
1208
  msgid "Default Form Success Message:"
1209
  msgstr ""
1210
 
1211
+ #: ../custom-contact-forms-admin.php:2163
1212
  msgid "If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message."
1213
  msgstr ""
1214
 
1215
+ #: ../custom-contact-forms-admin.php:2167
1216
  msgid "Remember Field Values:"
1217
  msgstr ""
1218
 
1219
+ #: ../custom-contact-forms-admin.php:2179
1220
  msgid "Selecting yes will make form fields remember how they were last filled out."
1221
  msgstr ""
1222
 
1223
+ #: ../custom-contact-forms-admin.php:2183
1224
  msgid "Tooltips in Widget:"
1225
  msgstr ""
1226
 
1227
+ #: ../custom-contact-forms-admin.php:2195
1228
  msgid "Enabling this shows tooltips containing field instructions on forms in the widget."
1229
  msgstr ""
1230
 
1231
+ #: ../custom-contact-forms-admin.php:2199
1232
  msgid "Hide Plugin Author Link in Code:"
1233
  msgstr ""
1234
 
1235
+ #: ../custom-contact-forms-admin.php:2212
1236
  msgid "Fancy Admin AJAX Abilities:"
1237
  msgstr ""
1238
 
1239
+ #: ../custom-contact-forms-admin.php:2224
1240
  msgid "If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below."
1241
  msgstr ""
1242
 
1243
+ #: ../custom-contact-forms-admin.php:2228
1244
  msgid "Default Permissions Error:"
1245
  msgstr ""
1246
 
1247
+ #: ../custom-contact-forms-admin.php:2233
1248
  msgid "When someone doesn't have the proper permissions to use a form, this message is displayed in place of the form. You control who can view each form with the form access manager which is located inside the form manager."
1249
  msgstr ""
1250
 
1251
+ #: ../custom-contact-forms-admin.php:2237
1252
  msgid "Form Access Capabilities:"
1253
  msgstr ""
1254
 
1255
+ #: ../custom-contact-forms-admin.php:2249
1256
  msgid "The form access manager within each form allows you to control who can view your form. However, that will take effect on any of your forms unless this is enabled."
1257
  msgstr ""
1258
 
1259
+ #: ../custom-contact-forms-admin.php:2252
1260
  msgid "Show Sidebar Widget:"
1261
  msgstr ""
1262
 
1263
+ #: ../custom-contact-forms-admin.php:2257
1264
  msgid "On Homepage"
1265
  msgstr ""
1266
 
1267
+ #: ../custom-contact-forms-admin.php:2261
1268
  msgid "On Pages"
1269
  msgstr ""
1270
 
1271
+ #: ../custom-contact-forms-admin.php:2265
1272
  msgid "On Single Posts"
1273
  msgstr ""
1274
 
1275
+ #: ../custom-contact-forms-admin.php:2270
1276
  msgid "On Categories"
1277
  msgstr ""
1278
 
1279
+ #: ../custom-contact-forms-admin.php:2274
1280
  msgid "On Archives"
1281
  msgstr ""
1282
 
1283
+ #: ../custom-contact-forms-admin.php:2279
1284
+ msgid "Use Code Type:"
1285
+ msgstr ""
1286
+
1287
+ #: ../custom-contact-forms-admin.php:2287
1288
+ msgid "This lets you switch the form code between HTML and XHTML."
1289
+ msgstr ""
1290
+
1291
+ #: ../custom-contact-forms-admin.php:2290
1292
  msgid "Update"
1293
  msgstr ""
1294
 
1295
+ #: ../custom-contact-forms-admin.php:2298
1296
  msgid "Mail Settings"
1297
  msgstr ""
1298
 
1299
+ #: ../custom-contact-forms-admin.php:2302
1300
  msgid "There are two ways you can send emails: using the PHP mail() function or using SMTP (secure/insecure). If you choose to use the PHP mail() function you can ignore all the other options. For some people Wordpress's default way of sending mail does not work; if for some reason your mail is being sent you should try the SMTP option."
1301
  msgstr ""
1302
 
1303
+ #: ../custom-contact-forms-admin.php:2303
1304
  msgid "* Send My Emails Using the Following:"
1305
  msgstr ""
1306
 
1307
+ #: ../custom-contact-forms-admin.php:2305
1308
  msgid "Wordpress Default"
1309
  msgstr ""
1310
 
1311
+ #: ../custom-contact-forms-admin.php:2306
1312
  msgid "SMTP"
1313
  msgstr ""
1314
 
1315
+ #: ../custom-contact-forms-admin.php:2307
1316
  msgid "(If mail isn't sending, try toggling this option.)"
1317
  msgstr ""
1318
 
1319
+ #: ../custom-contact-forms-admin.php:2310
1320
  msgid "SMTP Host:"
1321
  msgstr ""
1322
 
1323
+ #: ../custom-contact-forms-admin.php:2311
1324
  msgid "SMTP Port:"
1325
  msgstr ""
1326
 
1327
+ #: ../custom-contact-forms-admin.php:2312
1328
  msgid "Encryption:"
1329
  msgstr ""
1330
 
1331
+ #: ../custom-contact-forms-admin.php:2314
1332
  msgid "SSL"
1333
  msgstr ""
1334
 
1335
+ #: ../custom-contact-forms-admin.php:2315
1336
  msgid "TLS"
1337
  msgstr ""
1338
 
1339
+ #: ../custom-contact-forms-admin.php:2319
1340
  msgid "SMTP Authentication:"
1341
  msgstr ""
1342
 
1343
+ #: ../custom-contact-forms-admin.php:2319
1344
  msgid "None Needed"
1345
  msgstr ""
1346
 
1347
+ #: ../custom-contact-forms-admin.php:2319
1348
  msgid "Use SMTP Username/Password"
1349
  msgstr ""
1350
 
1351
+ #: ../custom-contact-forms-admin.php:2320
1352
  msgid "SMTP Username:"
1353
  msgstr ""
1354
 
1355
+ #: ../custom-contact-forms-admin.php:2321
1356
  msgid "SMTP Password:"
1357
  msgstr ""
1358
 
1359
+ #: ../custom-contact-forms-admin.php:2324
1360
  msgid "Save Mail Sending Options"
1361
  msgstr ""
1362
 
1363
+ #: ../custom-contact-forms-admin.php:2331
1364
  msgid "Export"
1365
  msgstr ""
1366
 
1367
+ #: ../custom-contact-forms-admin.php:2336
1368
  msgid ""
1369
  "Preforming a Custom Contact Forms export will create a file of the form \n"
1370
  "\t\t\t\t\t\tccf-export-xxxx.sql on your web server. The file created contains SQL that \n"
1371
  "\t\t\t\t\t\twill recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined."
1372
  msgstr ""
1373
 
1374
+ #: ../custom-contact-forms-admin.php:2340
1375
  msgid "Export All CCF Plugin Content"
1376
  msgstr ""
1377
 
1378
+ #: ../custom-contact-forms-admin.php:2346
1379
  msgid "Import"
1380
  msgstr ""
1381
 
1382
+ #: ../custom-contact-forms-admin.php:2352
1383
  msgid "Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one. Pressing the 'Clear and Import' button deletes all current data and then imports the selected file; this will not work for merging to data!. Clearing all CCF data before importing prevents any conflicts from occuring. Before you attempt an import, you should always download a backup, by clicking the 'Export All' button."
1384
  msgstr ""
1385
 
1386
+ #: ../custom-contact-forms-admin.php:2355
1387
  msgid "Choose What You Want to Use from the Import File:"
1388
  msgstr ""
1389
 
1390
+ #: ../custom-contact-forms-admin.php:2361
1391
  msgid "Use General Settings"
1392
  msgstr ""
1393
 
1394
+ #: ../custom-contact-forms-admin.php:2367
1395
+ #: ../custom-contact-forms-admin.php:2385
 
 
1396
  msgid "Forms"
1397
  msgstr ""
1398
 
1399
+ #: ../custom-contact-forms-admin.php:2373
 
1400
  msgid "Form Submissions"
1401
  msgstr ""
1402
 
1403
+ #: ../custom-contact-forms-admin.php:2379
 
 
1404
  msgid "Fields"
1405
  msgstr ""
1406
 
1407
+ #: ../custom-contact-forms-admin.php:2391
 
 
1408
  msgid "Field Options"
1409
  msgstr ""
1410
 
1411
+ #: ../custom-contact-forms-admin.php:2397
 
1412
  msgid "Styles"
1413
  msgstr ""
1414
 
1415
+ #: ../custom-contact-forms-admin.php:2403
1416
  msgid "Choose an Import File:"
1417
  msgstr ""
1418
 
1419
+ #: ../custom-contact-forms-admin.php:2407
1420
  msgid "Clear and Import"
1421
  msgstr ""
1422
 
1423
+ #: ../custom-contact-forms-admin.php:2409
1424
  msgid "Yes, I want to do this and have created a backup."
1425
  msgstr ""
1426
 
1427
+ #: ../modules/usage_popover/custom-contact-forms-quick-start-popover.php:3
1428
+ msgid "If you want to quickly and easily create a form and insert it in to your WordPress site, then follow these simple instructions."
1429
+ msgstr ""
1430
+
1431
+ #: ../modules/usage_popover/custom-contact-forms-quick-start-popover.php:6
1432
+ msgid "First insert some default content by clicking the button below. This will create a standard form automatically that, if you wish, you can be customized later."
1433
+ msgstr ""
1434
+
1435
+ #: ../modules/usage_popover/custom-contact-forms-quick-start-popover.php:8
1436
+ msgid "Insert Default Content"
1437
+ msgstr ""
1438
+
1439
+ #: ../modules/usage_popover/custom-contact-forms-quick-start-popover.php:11
1440
+ msgid "Insert the code, [customcontact form=1], in any page or post. If you want to insert a form in to a theme file, locate the form in the form manager in the admin panel where you will find the theme display code."
1441
+ msgstr ""
1442
+
1443
+ #: ../modules/usage_popover/custom-contact-forms-quick-start-popover.php:12
1444
+ msgid "Done! Pretty simple, huh? Custom Contact Forms allows you to create extremely customizable forms, you just have to familiarize yourself with the plugin; this, however, is a great way to get started quickly."
1445
+ msgstr ""
1446
+
1447
  #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:1
1448
  msgid "Plugin Usage Popover"
1449
  msgstr ""
1475
  msgid "in the instruction area of the admin page."
1476
  msgstr ""
1477
 
 
 
 
 
1478
  #: ../modules/usage_popover/custom-contact-forms-usage-popover.php:44
1479
  msgid "Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Another useful part of the plugin is the 'Custom HTML Feature' which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience. Also explained below is the 'Saved Form Submissions' feature which displays all form submissions in the admin panel."
1480
  msgstr ""
1872
  msgid "More import/export methods will be added in the future. Always create a backup before attempting an import! * Note: If you are having problems getting the importer/exporter to work, try CHMODing the import/ and export/ directories to 0777."
1873
  msgstr ""
1874
 
1875
+ #: ../modules/widget/custom-contact-forms-dashboard.php:90
1876
  msgid "View"
1877
  msgstr ""
1878
 
1879
+ #: ../modules/widget/custom-contact-forms-dashboard.php:91
1880
  msgid "CCF Saved Form Submission"
1881
  msgstr ""
1882
 
1883
+ #: ../modules/widget/custom-contact-forms-dashboard.php:94
1884
  msgid "Form Submitted:"
1885
  msgstr ""
1886
 
1887
+ #: ../modules/widget/custom-contact-forms-dashboard.php:95
1888
  msgid "Form Location:"
1889
  msgstr ""
1890
 
1891
+ #: ../modules/widget/custom-contact-forms-dashboard.php:117
1892
+ #: ../modules/widget/custom-contact-forms-dashboard.php:127
1893
  msgid "View All Submissions"
1894
  msgstr ""
1895
 
modules/db/custom-contact-forms-activate-db.php CHANGED
@@ -1,263 +1,266 @@
1
- <?php
2
- /*
3
- Custom Contact Forms Plugin
4
- By Taylor Lovett - http://www.taylorlovett.com
5
- Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
- */
7
- if (!class_exists('CustomContactFormsActivateDB')) {
8
- class CustomContactFormsActivateDB extends CustomContactFormsDB {
9
- var $cache = array();
10
-
11
- function CustomContactFormsActivateDB($run_activate = true) {
12
- if ($run_activate)
13
- $this->activateDB();
14
- }
15
-
16
- function activateDB() {
17
- $this->createTables();
18
- $this->updateTables();
19
- parent::serializeAllFormFields();
20
- parent::serializeAllFieldOptions();
21
- $this->insertFixedFields();
22
- }
23
-
24
- function fieldsTableExists() {
25
- global $wpdb;
26
- return ($wpdb->get_var("show tables like '". CCF_FIELDS_TABLE . "'") == CCF_FIELDS_TABLE);
27
- }
28
-
29
- function formsTableExists() {
30
- global $wpdb;
31
- return ($wpdb->get_var("show tables like '". CCF_FORMS_TABLE . "'") == CCF_FORMS_TABLE);
32
- }
33
-
34
- function stylesTableExists() {
35
- global $wpdb;
36
- return ($wpdb->get_var("show tables like '". CCF_STYLES_TABLE . "'") == CCF_STYLES_TABLE);
37
- }
38
-
39
- function fieldOptionsTableExists() {
40
- global $wpdb;
41
- return ($wpdb->get_var("show tables like '". CCF_FIELD_OPTIONS_TABLE . "'") == CCF_FIELD_OPTIONS_TABLE);
42
- }
43
-
44
- function userDataTableExists() {
45
- global $wpdb;
46
- return ($wpdb->get_var("show tables like '". CCF_USER_DATA_TABLE . "'") == CCF_USER_DATA_TABLE);
47
- }
48
-
49
- function createTables() {
50
- global $wpdb;
51
- if(!$this->formsTableExists()) {
52
- $sql1 = " CREATE TABLE `".CCF_FORMS_TABLE."` (
53
- `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
54
- `form_slug` VARCHAR( 100 ) NOT NULL ,
55
- `form_title` VARCHAR( 200 ) NOT NULL ,
56
- `form_action` TEXT NOT NULL ,
57
- `form_method` VARCHAR( 4 ) NOT NULL ,
58
- `form_fields` VARCHAR( 200 ) NOT NULL ,
59
- `submit_button_text` VARCHAR( 200 ) NOT NULL ,
60
- `custom_code` TEXT NOT NULL ,
61
- PRIMARY KEY ( `id` )
62
- ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
63
- $wpdb->query($sql1);
64
- } if(!$this->userDataTableExists()) {
65
- $sql7 = " CREATE TABLE `".CCF_USER_DATA_TABLE."` (
66
- `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
67
- `data_time` INT( 11 ) NOT NULL DEFAULT '0',
68
- `data_formid` INT( 11 ) NOT NULL ,
69
- `data_formpage` VARCHAR ( 250 ) NOT NULL ,
70
- `data_value` LONGTEXT NOT NULL ,
71
- PRIMARY KEY ( `id` )
72
- ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
73
- $wpdb->query($sql7);
74
- } if(!$this->fieldOptionsTableExists()) {
75
- $sql5 = " CREATE TABLE `".CCF_FIELD_OPTIONS_TABLE."` (
76
- `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
77
- `option_slug` VARCHAR( 100 ) NOT NULL ,
78
- `option_label` VARCHAR( 200 ) NOT NULL ,
79
- `option_value` VARCHAR( 100 ) NOT NULL ,
80
- PRIMARY KEY ( `id` )
81
- ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
82
- $wpdb->query($sql5);
83
- } if(!$this->fieldsTableExists()) {
84
- $sql2 = "CREATE TABLE `".CCF_FIELDS_TABLE."` (
85
- `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
86
- `field_slug` VARCHAR( 50 ) NOT NULL ,
87
- `field_label` VARCHAR( 100 ) NOT NULL ,
88
- `field_type` VARCHAR( 25 ) NOT NULL ,
89
- `field_value` TEXT NOT NULL ,
90
- `field_maxlength` INT ( 5 ) NOT NULL DEFAULT '0',
91
- `user_field` INT ( 1 ) NOT NULL DEFAULT '1',
92
- PRIMARY KEY ( `id` )
93
- ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
94
- $wpdb->query($sql2);
95
- } if(!$this->stylesTableExists()) {
96
- $sql3 = "CREATE TABLE `".CCF_STYLES_TABLE."` (
97
- `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
98
- `style_slug` VARCHAR( 30 ) NOT NULL ,
99
- `input_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
100
- `textarea_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
101
- `textarea_height` VARCHAR( 10 ) NOT NULL DEFAULT '100px',
102
- `form_borderwidth` VARCHAR( 10 ) NOT NULL DEFAULT '0px',
103
- `label_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
104
- `form_width` VARCHAR( 10 ) NOT NULL DEFAULT '100%',
105
- `submit_width` VARCHAR( 10 ) NOT NULL DEFAULT 'auto',
106
- `submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '40px',
107
- `label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
108
- `title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
109
- `field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.3em',
110
- `submit_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.1em',
111
- `field_bordercolor` VARCHAR( 10 ) NOT NULL DEFAULT '999999',
112
- `form_borderstyle` VARCHAR( 30 ) NOT NULL DEFAULT 'none',
113
- `form_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT '',
114
- `field_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
115
- `label_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
116
- `title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
117
- `submit_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
118
- `form_fontfamily` VARCHAR( 150 ) NOT NULL DEFAULT 'Tahoma, Verdana, Arial',
119
- PRIMARY KEY ( `id` )
120
- ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
121
- $wpdb->query($sql3);
122
- }
123
- return true;
124
- }
125
-
126
- function updateTables() {
127
- global $wpdb;
128
- if (!$this->columnExists('user_field', CCF_FIELDS_TABLE))
129
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `user_field` INT( 1 ) NOT NULL DEFAULT '1'");
130
- if (!$this->columnExists('form_style', CCF_FORMS_TABLE))
131
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_style` INT( 10 ) NOT NULL DEFAULT '0'");
132
- if (!$this->columnExists('form_email', CCF_FORMS_TABLE))
133
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email` VARCHAR( 50 ) NOT NULL");
134
- if (!$this->columnExists('form_success_message', CCF_FORMS_TABLE))
135
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_message` TEXT NOT NULL");
136
- if (!$this->columnExists('form_thank_you_page', CCF_FORMS_TABLE))
137
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_thank_you_page` VARCHAR ( 200 ) NOT NULL");
138
- if (!$this->columnExists('field_backgroundcolor', CCF_STYLES_TABLE))
139
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
140
- if (!$this->columnExists('field_borderstyle', CCF_STYLES_TABLE))
141
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderstyle` VARCHAR( 20 ) NOT NULL DEFAULT 'solid'");
142
- if (!$this->columnExists('form_success_title', CCF_FORMS_TABLE))
143
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_title` VARCHAR( 150 ) NOT NULL DEFAULT '".__('Form Success!', 'custom-contact-forms')."'");
144
- if (!$this->columnExists('form_padding', CCF_STYLES_TABLE))
145
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_padding` VARCHAR( 20 ) NOT NULL DEFAULT '8px'");
146
- if (!$this->columnExists('form_margin', CCF_STYLES_TABLE))
147
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_margin` VARCHAR( 20 ) NOT NULL DEFAULT '7px'");
148
- if (!$this->columnExists('title_margin', CCF_STYLES_TABLE))
149
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `title_margin` VARCHAR( 20 ) NOT NULL DEFAULT '4px'");
150
- if (!$this->columnExists('label_margin', CCF_STYLES_TABLE))
151
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `label_margin` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
152
- if (!$this->columnExists('textarea_backgroundcolor', CCF_STYLES_TABLE))
153
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `textarea_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
154
- if (!$this->columnExists('success_popover_bordercolor', CCF_STYLES_TABLE))
155
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT 'efefef'");
156
- if (!$this->columnExists('dropdown_width', CCF_STYLES_TABLE))
157
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `dropdown_width` VARCHAR( 20 ) NOT NULL DEFAULT 'auto'");
158
- if (!$this->columnExists('success_popover_fontsize', CCF_STYLES_TABLE))
159
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
160
- if (!$this->columnExists('success_popover_title_fontsize', CCF_STYLES_TABLE))
161
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_title_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '1.3em'");
162
- if (!$this->columnExists('success_popover_height', CCF_STYLES_TABLE))
163
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_height` VARCHAR( 20 ) NOT NULL DEFAULT '200px'");
164
- if (!$this->columnExists('success_popover_fontcolor', CCF_STYLES_TABLE))
165
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333'");
166
- if (!$this->columnExists('success_popover_title_fontcolor', CCF_STYLES_TABLE))
167
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333'");
168
- if (!$this->columnExists('field_instructions', CCF_FIELDS_TABLE))
169
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_instructions` TEXT NOT NULL");
170
- if (!$this->columnExists('field_options', CCF_FIELDS_TABLE))
171
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_options` TEXT NOT NULL");
172
- if (!$this->columnExists('field_required', CCF_FIELDS_TABLE))
173
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_required` INT( 1 ) NOT NULL DEFAULT '0'");
174
- if (!$this->columnExists('form_backgroundcolor', CCF_STYLES_TABLE))
175
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
176
- if (!$this->columnExists('field_borderround', CCF_STYLES_TABLE))
177
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderround` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
178
- if (!$this->columnExists('tooltip_backgroundcolor', CCF_STYLES_TABLE))
179
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '000000'");
180
- if (!$this->columnExists('tooltip_fontsize', CCF_STYLES_TABLE))
181
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
182
- if (!$this->columnExists('tooltip_fontcolor', CCF_STYLES_TABLE))
183
- $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
184
- if (!$this->columnExists('field_class', CCF_FIELDS_TABLE))
185
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_class` VARCHAR( 50 ) NOT NULL");
186
- if (!$this->columnExists('field_error', CCF_FIELDS_TABLE))
187
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_error` VARCHAR( 300 ) NOT NULL");
188
- if (!$this->columnExists('form_access', CCF_FORMS_TABLE)) {
189
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_access` TEXT NOT NULL");
190
- // This makes all forms accessible when upgrading from CCF versions older than 4.5.0
191
- $this->makeAllFormsAccessible();
192
- }
193
- if (!$this->columnExists('form_email_subject', CCF_FORMS_TABLE))
194
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email_subject` VARCHAR(250) NOT NULL");
195
- if (!$this->columnExists('form_email_name', CCF_FORMS_TABLE))
196
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email_name` VARCHAR(100) NOT NULL");
197
- if (!$this->columnExists('option_dead', CCF_FIELD_OPTIONS_TABLE))
198
- $wpdb->query("ALTER TABLE `" . CCF_FIELD_OPTIONS_TABLE . "` ADD `option_dead` INT( 1 ) NOT NULL DEFAULT '0'");
199
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` CHANGE `form_email` `form_email` TEXT NOT NULL");
200
- $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` CHANGE `form_fields` `form_fields` TEXT NOT NULL");
201
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` CHANGE `field_label` `field_label` TEXT NOT NULL");
202
- $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` CHANGE `field_options` `field_options` TEXT NOT NULL");
203
- $this->updateTableCharSets();
204
- }
205
-
206
- function updateTableCharSets() {
207
- global $wpdb;
208
- foreach ($GLOBALS['ccf_tables_array'] as $table) {
209
- $wpdb->query("ALTER TABLE `" . $table . "` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
210
- $wpdb->query("ALTER TABLE `" . $table . "` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
211
- }
212
- }
213
-
214
- function insertFixedFields() {
215
- $captcha = array('field_slug' => 'captcha', 'field_label' => __('Type the numbers.', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Type the numbers displayed in the image above.');
216
- $ishuman = array('field_slug' => 'ishuman', 'field_label' => __('Check if you are human.', 'custom-contact-forms'), 'field_type' => 'Checkbox', 'field_value' => '1', 'field_maxlength' => '0', 'user_field' => 0, 'field_instructions' => 'This helps us prevent spam.');
217
- $fixedEmail = array('field_slug' => 'fixedEmail', 'field_required' => 1, 'field_label' => __('Your Email', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Please enter your email address.');
218
- $fixedWebsite = array('field_slug' => 'fixedWebsite', 'field_required' => 1, 'field_label' => __('Your Website', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '200', 'user_field' => 0, 'field_instructions' => 'Please enter your website.');
219
- $emailSubject = array('field_slug' => 'emailSubject', 'field_required' => 1, 'field_label' => __('Email Subject', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '200', 'user_field' => 0, 'field_instructions' => 'Please enter a subject for the email.');
220
- $reset = array('field_slug' => 'resetButton', 'field_type' => 'Reset', 'field_value' => __('Reset Form', 'custom-contact-forms'), 'user_field' => 0);
221
- $states = array('field_slug' => 'usaStates', 'field_label' => __('Select a State', 'custom-contact-forms'), 'field_type' => 'Dropdown', 'user_field' => 0);
222
- $countries = array('field_slug' => 'allCountries', 'field_label' => __('Select a Country', 'custom-contact-forms'), 'field_type' => 'Dropdown', 'user_field' => 0);
223
- if (!$this->fieldSlugExists('captcha'))
224
- $this->insertField($captcha, true);
225
- if (!$this->fieldSlugExists('usaStates'))
226
- $this->insertField($states, true);
227
- if (!$this->fieldSlugExists('allCountries'))
228
- $this->insertField($countries, true);
229
- if (!$this->fieldSlugExists('ishuman'))
230
- $this->insertField($ishuman, true);
231
- if (!$this->fieldSlugExists('fixedEmail'))
232
- $this->insertField($fixedEmail, true);
233
- if (!$this->fieldSlugExists('fixedWebsite'))
234
- $this->insertField($fixedWebsite, true);
235
- if (!$this->fieldSlugExists('emailWebsite'))
236
- $this->insertField($emailSubject, true);
237
- if (!$this->fieldSlugExists('resetButton'))
238
- $this->insertField($reset, true);
239
- }
240
-
241
- function columnExists($column, $table) {
242
- global $wpdb;
243
- if (!is_array($this->cache[$table]))
244
- $this->cache[$table] = array();
245
- if (empty($this->cache[$table]['columns']))
246
- $this->cache[$table]['columns'] = $wpdb->get_results('SHOW COLUMNS FROM ' . $table, ARRAY_A);
247
- $col_array = $this->cache[$table]['columns'];
248
- foreach ($col_array as $col) {
249
- if ($col['Field'] == $column)
250
- return true;
251
- }
252
- return false;
253
- }
254
-
255
- function makeAllFormsAccessible() {
256
- $forms = parent::selectAllForms();
257
- foreach ($forms as $form) {
258
- parent::updateForm(array('form_access_update' => 1, 'form_access' => array_values(parent::getRolesArray())), $form->id);
259
- }
260
- }
261
- }
262
- }
 
 
 
263
  ?>
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('CustomContactFormsActivateDB')) {
8
+ class CustomContactFormsActivateDB extends CustomContactFormsDB {
9
+ var $cache = array();
10
+
11
+ function CustomContactFormsActivateDB($run_activate = true) {
12
+ if ($run_activate)
13
+ $this->activateDB();
14
+ }
15
+
16
+ function activateDB() {
17
+ $this->createTables();
18
+ $this->updateTables();
19
+ parent::serializeAllFormFields();
20
+ parent::serializeAllFieldOptions();
21
+ $this->insertFixedFields();
22
+ }
23
+
24
+ function fieldsTableExists() {
25
+ global $wpdb;
26
+ return ($wpdb->get_var("show tables like '". CCF_FIELDS_TABLE . "'") == CCF_FIELDS_TABLE);
27
+ }
28
+
29
+ function formsTableExists() {
30
+ global $wpdb;
31
+ return ($wpdb->get_var("show tables like '". CCF_FORMS_TABLE . "'") == CCF_FORMS_TABLE);
32
+ }
33
+
34
+ function stylesTableExists() {
35
+ global $wpdb;
36
+ return ($wpdb->get_var("show tables like '". CCF_STYLES_TABLE . "'") == CCF_STYLES_TABLE);
37
+ }
38
+
39
+ function fieldOptionsTableExists() {
40
+ global $wpdb;
41
+ return ($wpdb->get_var("show tables like '". CCF_FIELD_OPTIONS_TABLE . "'") == CCF_FIELD_OPTIONS_TABLE);
42
+ }
43
+
44
+ function userDataTableExists() {
45
+ global $wpdb;
46
+ return ($wpdb->get_var("show tables like '". CCF_USER_DATA_TABLE . "'") == CCF_USER_DATA_TABLE);
47
+ }
48
+
49
+ function createTables() {
50
+ global $wpdb;
51
+ if(!$this->formsTableExists()) {
52
+ $sql1 = " CREATE TABLE `".CCF_FORMS_TABLE."` (
53
+ `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
54
+ `form_slug` VARCHAR( 100 ) NOT NULL ,
55
+ `form_title` VARCHAR( 200 ) NOT NULL ,
56
+ `form_action` TEXT NOT NULL ,
57
+ `form_method` VARCHAR( 4 ) NOT NULL ,
58
+ `form_fields` VARCHAR( 200 ) NOT NULL ,
59
+ `submit_button_text` VARCHAR( 200 ) NOT NULL ,
60
+ `custom_code` TEXT NOT NULL ,
61
+ PRIMARY KEY ( `id` )
62
+ ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
63
+ $wpdb->query($sql1);
64
+ } if(!$this->userDataTableExists()) {
65
+ $sql7 = " CREATE TABLE `".CCF_USER_DATA_TABLE."` (
66
+ `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
67
+ `data_time` INT( 11 ) NOT NULL DEFAULT '0',
68
+ `data_formid` INT( 11 ) NOT NULL ,
69
+ `data_formpage` VARCHAR ( 250 ) NOT NULL ,
70
+ `data_value` LONGTEXT NOT NULL ,
71
+ PRIMARY KEY ( `id` )
72
+ ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
73
+ $wpdb->query($sql7);
74
+ } if(!$this->fieldOptionsTableExists()) {
75
+ $sql5 = " CREATE TABLE `".CCF_FIELD_OPTIONS_TABLE."` (
76
+ `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
77
+ `option_slug` VARCHAR( 100 ) NOT NULL ,
78
+ `option_label` VARCHAR( 200 ) NOT NULL ,
79
+ `option_value` VARCHAR( 100 ) NOT NULL ,
80
+ PRIMARY KEY ( `id` )
81
+ ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
82
+ $wpdb->query($sql5);
83
+ } if(!$this->fieldsTableExists()) {
84
+ $sql2 = "CREATE TABLE `".CCF_FIELDS_TABLE."` (
85
+ `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
86
+ `field_slug` VARCHAR( 50 ) NOT NULL ,
87
+ `field_label` VARCHAR( 100 ) NOT NULL ,
88
+ `field_type` VARCHAR( 25 ) NOT NULL ,
89
+ `field_value` TEXT NOT NULL ,
90
+ `field_maxlength` INT ( 5 ) NOT NULL DEFAULT '0',
91
+ `user_field` INT ( 1 ) NOT NULL DEFAULT '1',
92
+ PRIMARY KEY ( `id` )
93
+ ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
94
+ $wpdb->query($sql2);
95
+ } if(!$this->stylesTableExists()) {
96
+ $sql3 = "CREATE TABLE `".CCF_STYLES_TABLE."` (
97
+ `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
98
+ `style_slug` VARCHAR( 30 ) NOT NULL ,
99
+ `input_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
100
+ `textarea_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
101
+ `textarea_height` VARCHAR( 10 ) NOT NULL DEFAULT '100px',
102
+ `form_borderwidth` VARCHAR( 10 ) NOT NULL DEFAULT '0px',
103
+ `label_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
104
+ `form_width` VARCHAR( 10 ) NOT NULL DEFAULT '100%',
105
+ `submit_width` VARCHAR( 10 ) NOT NULL DEFAULT 'auto',
106
+ `submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '40px',
107
+ `label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
108
+ `title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
109
+ `field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.3em',
110
+ `submit_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.1em',
111
+ `field_bordercolor` VARCHAR( 10 ) NOT NULL DEFAULT '999999',
112
+ `form_borderstyle` VARCHAR( 30 ) NOT NULL DEFAULT 'none',
113
+ `form_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT '',
114
+ `field_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
115
+ `label_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
116
+ `title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
117
+ `submit_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
118
+ `form_fontfamily` VARCHAR( 150 ) NOT NULL DEFAULT 'Tahoma, Verdana, Arial',
119
+ PRIMARY KEY ( `id` )
120
+ ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
121
+ $wpdb->query($sql3);
122
+ }
123
+ return true;
124
+ }
125
+
126
+ function updateTables() {
127
+ global $wpdb;
128
+ if (!$this->columnExists('user_field', CCF_FIELDS_TABLE))
129
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `user_field` INT( 1 ) NOT NULL DEFAULT '1'");
130
+ if (!$this->columnExists('form_style', CCF_FORMS_TABLE))
131
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_style` INT( 10 ) NOT NULL DEFAULT '0'");
132
+ if (!$this->columnExists('form_email', CCF_FORMS_TABLE))
133
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email` VARCHAR( 50 ) NOT NULL");
134
+ if (!$this->columnExists('form_success_message', CCF_FORMS_TABLE))
135
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_message` TEXT NOT NULL");
136
+ if (!$this->columnExists('form_thank_you_page', CCF_FORMS_TABLE))
137
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_thank_you_page` VARCHAR ( 200 ) NOT NULL");
138
+ if (!$this->columnExists('field_backgroundcolor', CCF_STYLES_TABLE))
139
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
140
+ if (!$this->columnExists('field_borderstyle', CCF_STYLES_TABLE))
141
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderstyle` VARCHAR( 20 ) NOT NULL DEFAULT 'solid'");
142
+ if (!$this->columnExists('form_success_title', CCF_FORMS_TABLE))
143
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_title` VARCHAR( 150 ) NOT NULL DEFAULT '".__('Form Success!', 'custom-contact-forms')."'");
144
+ if (!$this->columnExists('form_padding', CCF_STYLES_TABLE))
145
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_padding` VARCHAR( 20 ) NOT NULL DEFAULT '8px'");
146
+ if (!$this->columnExists('form_margin', CCF_STYLES_TABLE))
147
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_margin` VARCHAR( 20 ) NOT NULL DEFAULT '7px'");
148
+ if (!$this->columnExists('title_margin', CCF_STYLES_TABLE))
149
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `title_margin` VARCHAR( 20 ) NOT NULL DEFAULT '4px'");
150
+ if (!$this->columnExists('label_margin', CCF_STYLES_TABLE))
151
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `label_margin` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
152
+ if (!$this->columnExists('textarea_backgroundcolor', CCF_STYLES_TABLE))
153
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `textarea_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
154
+ if (!$this->columnExists('success_popover_bordercolor', CCF_STYLES_TABLE))
155
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT 'efefef'");
156
+ if (!$this->columnExists('dropdown_width', CCF_STYLES_TABLE))
157
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `dropdown_width` VARCHAR( 20 ) NOT NULL DEFAULT 'auto'");
158
+ if (!$this->columnExists('success_popover_fontsize', CCF_STYLES_TABLE))
159
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
160
+ if (!$this->columnExists('success_popover_title_fontsize', CCF_STYLES_TABLE))
161
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_title_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '1.3em'");
162
+ if (!$this->columnExists('success_popover_height', CCF_STYLES_TABLE))
163
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_height` VARCHAR( 20 ) NOT NULL DEFAULT '200px'");
164
+ if (!$this->columnExists('success_popover_fontcolor', CCF_STYLES_TABLE))
165
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333'");
166
+ if (!$this->columnExists('success_popover_title_fontcolor', CCF_STYLES_TABLE))
167
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333'");
168
+ if (!$this->columnExists('field_instructions', CCF_FIELDS_TABLE))
169
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_instructions` TEXT NOT NULL");
170
+ if (!$this->columnExists('field_options', CCF_FIELDS_TABLE))
171
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_options` TEXT NOT NULL");
172
+ if (!$this->columnExists('field_required', CCF_FIELDS_TABLE))
173
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_required` INT( 1 ) NOT NULL DEFAULT '0'");
174
+ if (!$this->columnExists('form_backgroundcolor', CCF_STYLES_TABLE))
175
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
176
+ if (!$this->columnExists('field_borderround', CCF_STYLES_TABLE))
177
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderround` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
178
+ if (!$this->columnExists('tooltip_backgroundcolor', CCF_STYLES_TABLE))
179
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '000000'");
180
+ if (!$this->columnExists('tooltip_fontsize', CCF_STYLES_TABLE))
181
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
182
+ if (!$this->columnExists('tooltip_fontcolor', CCF_STYLES_TABLE))
183
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
184
+ if (!$this->columnExists('field_class', CCF_FIELDS_TABLE))
185
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_class` VARCHAR( 50 ) NOT NULL");
186
+ if (!$this->columnExists('field_error', CCF_FIELDS_TABLE))
187
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_error` VARCHAR( 300 ) NOT NULL");
188
+ if (!$this->columnExists('form_access', CCF_FORMS_TABLE)) {
189
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_access` TEXT NOT NULL");
190
+ // This makes all forms accessible when upgrading from CCF versions older than 4.5.0
191
+ $this->makeAllFormsAccessible();
192
+ }
193
+ if (!$this->columnExists('form_email_subject', CCF_FORMS_TABLE))
194
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email_subject` VARCHAR(250) NOT NULL");
195
+ if (!$this->columnExists('form_email_name', CCF_FORMS_TABLE))
196
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email_name` VARCHAR(100) NOT NULL");
197
+ if (!$this->columnExists('option_dead', CCF_FIELD_OPTIONS_TABLE))
198
+ $wpdb->query("ALTER TABLE `" . CCF_FIELD_OPTIONS_TABLE . "` ADD `option_dead` INT( 1 ) NOT NULL DEFAULT '0'");
199
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` CHANGE `form_email` `form_email` TEXT NOT NULL");
200
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` CHANGE `form_fields` `form_fields` TEXT NOT NULL");
201
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` CHANGE `field_label` `field_label` TEXT NOT NULL");
202
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` CHANGE `field_options` `field_options` TEXT NOT NULL");
203
+ $this->updateTableCharSets();
204
+ }
205
+
206
+ function updateTableCharSets() {
207
+ global $wpdb;
208
+ foreach ($GLOBALS['ccf_tables_array'] as $table) {
209
+ $wpdb->query("ALTER TABLE `" . $table . "` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
210
+ $wpdb->query("ALTER TABLE `" . $table . "` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
211
+ }
212
+ }
213
+
214
+ function insertFixedFields() {
215
+ $captcha = array('field_slug' => 'captcha', 'field_label' => __('Type the numbers.', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Type the numbers displayed in the image above.');
216
+ $ishuman = array('field_slug' => 'ishuman', 'field_label' => __('Check if you are human.', 'custom-contact-forms'), 'field_type' => 'Checkbox', 'field_value' => '1', 'field_maxlength' => '0', 'user_field' => 0, 'field_instructions' => 'This helps us prevent spam.');
217
+ $fixedEmail = array('field_slug' => 'fixedEmail', 'field_required' => 1, 'field_label' => __('Your Email', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Please enter your email address.');
218
+ $fixedWebsite = array('field_slug' => 'fixedWebsite', 'field_required' => 1, 'field_label' => __('Your Website', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '200', 'user_field' => 0, 'field_instructions' => 'Please enter your website.');
219
+ $emailSubject = array('field_slug' => 'emailSubject', 'field_required' => 1, 'field_label' => __('Email Subject', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '200', 'user_field' => 0, 'field_instructions' => 'Please enter a subject for the email.');
220
+ $reset = array('field_slug' => 'resetButton', 'field_type' => 'Reset', 'field_value' => __('Reset Form', 'custom-contact-forms'), 'user_field' => 0);
221
+ $states = array('field_slug' => 'usaStates', 'field_label' => __('Select a State', 'custom-contact-forms'), 'field_type' => 'Dropdown', 'user_field' => 0);
222
+ //$dates = array('field_slug' => 'datePicker', 'field_label' => __('Pick a Date', 'custom-contact-forms'), 'field_type' => 'Text', 'user_field' => 0);
223
+ $countries = array('field_slug' => 'allCountries', 'field_label' => __('Select a Country', 'custom-contact-forms'), 'field_type' => 'Dropdown', 'user_field' => 0);
224
+ if (!$this->fieldSlugExists('captcha'))
225
+ $this->insertField($captcha, true);
226
+ if (!$this->fieldSlugExists('usaStates'))
227
+ $this->insertField($states, true);
228
+ /*if (!$this->fieldSlugExists('datePicker'))
229
+ $this->insertField($dates, true);*/
230
+ if (!$this->fieldSlugExists('allCountries'))
231
+ $this->insertField($countries, true);
232
+ if (!$this->fieldSlugExists('ishuman'))
233
+ $this->insertField($ishuman, true);
234
+ if (!$this->fieldSlugExists('fixedEmail'))
235
+ $this->insertField($fixedEmail, true);
236
+ if (!$this->fieldSlugExists('fixedWebsite'))
237
+ $this->insertField($fixedWebsite, true);
238
+ if (!$this->fieldSlugExists('emailWebsite'))
239
+ $this->insertField($emailSubject, true);
240
+ if (!$this->fieldSlugExists('resetButton'))
241
+ $this->insertField($reset, true);
242
+ }
243
+
244
+ function columnExists($column, $table) {
245
+ global $wpdb;
246
+ if (!is_array($this->cache[$table]))
247
+ $this->cache[$table] = array();
248
+ if (empty($this->cache[$table]['columns']))
249
+ $this->cache[$table]['columns'] = $wpdb->get_results('SHOW COLUMNS FROM ' . $table, ARRAY_A);
250
+ $col_array = $this->cache[$table]['columns'];
251
+ foreach ($col_array as $col) {
252
+ if ($col['Field'] == $column)
253
+ return true;
254
+ }
255
+ return false;
256
+ }
257
+
258
+ function makeAllFormsAccessible() {
259
+ $forms = parent::selectAllForms();
260
+ foreach ($forms as $form) {
261
+ parent::updateForm(array('form_access_update' => 1, 'form_access' => array_values(parent::getRolesArray())), $form->id);
262
+ }
263
+ }
264
+ }
265
+ }
266
  ?>
modules/usage_popover/custom-contact-forms-quick-start-popover.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ccf-popover" id="ccf-quick-start-popover" title="<?php _e('Quick Start Guide', 'custom-contact-forms'); ?>">
2
+ <div class="popover-body">
3
+ <p><?php _e("If you want to quickly and easily create a form and insert it in to your WordPress site, then follow these simple instructions.", 'custom-contact-forms'); ?></p>
4
+ <ol>
5
+ <li>
6
+ <?php _e("First insert some default content by clicking the button below. This will create a standard form automatically that, if you wish, you can be customized later.", 'custom-contact-forms'); ?>
7
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
8
+ <input type="submit" class="insert-default-content-button" value="<?php _e("Insert Default Content", 'custom-contact-forms'); ?>" name="insert_default_content" />
9
+ </form>
10
+ </li>
11
+ <li><?php _e("Insert the code, [customcontact form=1], in any page or post. If you want to insert a form in to a theme file, locate the form in the form manager in the admin panel where you will find the theme display code.", 'custom-contact-forms'); ?></li>
12
+ <li><?php _e("Done! Pretty simple, huh? Custom Contact Forms allows you to create extremely customizable forms, you just have to familiarize yourself with the plugin; this, however, is a great way to get started quickly.", 'custom-contact-forms'); ?></li>
13
+ </ol>
14
+ </div>
15
+ </div>
modules/usage_popover/custom-contact-forms-usage-popover.php CHANGED
@@ -1,379 +1,379 @@
1
- <div id="ccf-usage-popover" title="<?php _e('Plugin Usage Popover', 'custom-contact-forms'); ?>">
2
- <div class="popover-body">
3
- <!--<ul id="popover-tof">
4
- <li><a href="#pop-forms">
5
- <?php _e('Forms', 'custom-contact-forms'); ?>
6
- </a></li>
7
- <li><a href="#pop-fields">
8
- <?php _e('Fields', 'custom-contact-forms'); ?>
9
- </a></li>
10
- <li><a href="#pop-fixed-fields">
11
- <?php _e('Fixed Fields', 'custom-contact-forms'); ?>
12
- </a></li>
13
- <li><a href="#pop-field-options">
14
- <?php _e('Field Options', 'custom-contact-forms'); ?>
15
- </a></li>
16
- <li><a href="#pop-styles">
17
- <?php _e('Styles', 'custom-contact-forms'); ?>
18
- </a></li>
19
- <li><a href="#pop-custom-html">
20
- <?php _e('Custom HTML Forms', 'custom-contact-forms'); ?>
21
- </a></li>
22
- <li><a href="#pop-import-export">
23
- <?php _e('Import/Export', 'custom-contact-forms'); ?>
24
- </a></li>
25
- <li><a href="#pop-form-submissions">
26
- <?php _e('Form Submissions', 'custom-contact-forms'); ?>
27
- </a></li>
28
- </ul>-->
29
- <h3>
30
- <?php _e('Introduction', 'custom-contact-forms'); ?>
31
- </h3>
32
- <p>
33
- <?php _e("CCF is an extremely intuitive plugin allowing you to create any type of contact form you can imagine. CCF is very user friendly but with possibilities comes complexity. It is recommend that you click the button below to create default fields, field options, and forms.
34
- The default content will help you get a feel for the amazing things you can accomplish with this plugin. This popover only shows automatically the first time you visit the admin page;", 'custom-contact-forms'); ?>
35
- <b>
36
- <?php _e("if you want to view this popover again, click the 'Show Plugin Usage Popover'", 'custom-contact-forms'); ?>
37
- </b>
38
- <?php _e("in the instruction area of the admin page.", 'custom-contact-forms'); ?>
39
- </p>
40
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
41
- <input type="submit" class="insert-default-content-button" value="<?php _e("Insert Default Content", 'custom-contact-forms'); ?>" name="insert_default_content" />
42
- </form>
43
- <p>
44
- <?php _e("Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Another useful part of the plugin is the 'Custom HTML Feature' which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience. Also explained below is the 'Saved Form Submissions' feature which displays all form submissions in the admin panel.", 'custom-contact-forms'); ?>
45
- </p>
46
- <ul>
47
- <li>
48
- <h3>
49
- <?php _e("Fields", 'custom-contact-forms'); ?>
50
- <a name="pop-fields"></a></h3>
51
- <p>
52
- <?php _e("Fields are the actual input boxes in which users enter their information. There are six types of fields that you can attach to your forms.!", 'custom-contact-forms'); ?>
53
- </p>
54
- <ul>
55
- <li><span>
56
- <?php _e("Text:", 'custom-contact-forms'); ?>
57
- </span>
58
- <div>
59
- <input type="text" class="ccf-width200" value="<?php _e("This is a text field", 'custom-contact-forms'); ?>" />
60
- </div>
61
- </li>
62
- <li><span>
63
- <?php _e("Textarea:", 'custom-contact-forms'); ?>
64
- </span>
65
- <div>
66
- <textarea class="ccf-width2000"><?php _e("This is a text field", 'custom-contact-forms'); ?></textarea>
67
- </div>
68
- </li>
69
- <li><span>
70
- <?php _e("Dropdown:", 'custom-contact-forms'); ?>
71
- </span>
72
- <div>
73
- <select>
74
- <option>
75
- <?php _e("This is a dropdown field", 'custom-contact-forms'); ?>
76
- </option>
77
- <option>
78
- <?php _e("Field Option 2!", 'custom-contact-forms'); ?>
79
- </option>
80
- <option>
81
- <?php _e("Field Option 3!", 'custom-contact-forms'); ?>
82
- </option>
83
- <option>
84
- <?php _e("Field Option 4!", 'custom-contact-forms'); ?>
85
- </option>
86
- <option>
87
- <?php _e("Unlimited # of options allowed", 'custom-contact-forms'); ?>
88
- </option>
89
- </select>
90
- </div>
91
- </li>
92
- <li><span>
93
- <?php _e("Radio:", 'custom-contact-forms'); ?>
94
- </span>
95
- <div>
96
- <input type="radio" selected="selected" />
97
- <?php _e("A radio field", 'custom-contact-forms'); ?>
98
- <input type="radio" selected="selected" />
99
- <?php _e("Field Option 2", 'custom-contact-forms'); ?>
100
- <input type="radio" selected="selected" />
101
- <?php _e("Field Option 3", 'custom-contact-forms'); ?>
102
- </div>
103
- </li>
104
- <li><span>
105
- <?php _e("Checkbox:", 'custom-contact-forms'); ?>
106
- </span>
107
- <div>
108
- <input type="checkbox" value="1" />
109
- <?php _e("This is a checkbox field", 'custom-contact-forms'); ?>
110
- </div>
111
- </li>
112
- <li><span>
113
- <?php _e("(advanced) Hidden:", 'custom-contact-forms'); ?>
114
- </span>
115
- <?php _e("These fields are hidden (obviously), they allow you to pass hidden information within your forms. Great for using other form processors like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
116
- </li>
117
- </ul>
118
- <p>
119
- <?php _e("There are a variety of different options that you can use when creating a field,", 'custom-contact-forms'); ?>
120
- <span class="red">*</span>
121
- <?php _e("denotes something required:", 'custom-contact-forms'); ?>
122
- </p>
123
- <ul>
124
- <li><span class="red">*</span> <span>
125
- <?php _e("Slug:", 'custom-contact-forms'); ?>
126
- </span>
127
- <?php _e("A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.", 'custom-contact-forms'); ?>
128
- </li>
129
- <li><span>
130
- <?php _e("Field Label:", 'custom-contact-forms'); ?>
131
- </span>
132
- <?php _e("The field label is displayed next to the field and is visible to the user.", 'custom-contact-forms'); ?>
133
- </li>
134
- <li><span class="red">*</span> <span>
135
- <?php _e("Field Type:", 'custom-contact-forms'); ?>
136
- </span>
137
- <?php _e("The six field types you can choose from are explained above.", 'custom-contact-forms'); ?>
138
- </li>
139
- <li><span>
140
- <?php _e("Initial Value:", 'custom-contact-forms'); ?>
141
- </span>
142
- <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox 'Are you human?', I would set the initial value to 'Yes'. If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the field option you would like initially selected (or just leave it blank and the first option attached will be selected).", 'custom-contact-forms'); ?>
143
- </li>
144
- <li><span>
145
- <?php _e("Max Length:", 'custom-contact-forms'); ?>
146
- </span>
147
- <?php _e("This allows you to limit the amount of characters a user can enter in a field (does not apply to textareas as of version 3.5.5)", 'custom-contact-forms'); ?>
148
- </li>
149
- <li><span>
150
- <?php _e("Required Field:", 'custom-contact-forms'); ?>
151
- </span>
152
- <?php _e("If a field is required and a user leaves it blank, the plugin will display an error message explaining the problem. The user will then have to go back and fill in the field properly.", 'custom-contact-forms'); ?>
153
- </li>
154
- <li><span>
155
- <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
156
- </span>
157
- <?php _e("If this is filled out, a stylish tooltip popover displaying this text will show when the field is selected. This will only work if JQuery is enabled in general options.", 'custom-contact-forms'); ?>
158
- </li>
159
- <li><span>
160
- <?php _e("Field Error:", 'custom-contact-forms'); ?>
161
- </span>
162
- <?php _e("If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank.", 'custom-contact-forms'); ?>
163
- </li>
164
- <li><span>
165
- <?php _e("(advanced) Field Class:", 'custom-contact-forms'); ?>
166
- </span>
167
- <?php _e("This allows you to assign a CSS class to an individual field without affecting anything else. This is a great way to take the customization of your form to the next level.", 'custom-contact-forms'); ?>
168
- </li>
169
- <li><span>
170
- <?php _e("Field Options:", 'custom-contact-forms'); ?>
171
- </span>
172
- <?php _e("After you create a field, if it's field type is radio or dropdown, you can attach field options to the field. Field options are explained in the next section.", 'custom-contact-forms'); ?>
173
- </li>
174
- </ul>
175
- </li>
176
- <li>
177
- <h3><?php _e('Fixed Fields', 'custom-contact-forms'); ?>
178
- <a name="pop-fixed-fields"></a></h3>
179
- <p>
180
- <?php _e("The last important thing related to fields are <span>Fixed Fields</span>. Fixed Fields are special fields that come already created within the plugin such as the captcha spam blocker and email field. Fixed Fields do special things that you wouldn't be able to accomplish with normal fields; they cannot be deleted or created. For example, if you use the fixedEmail field, as opposed to creating your own email field. the users email will be checked to make sure it is valid, if it isn't a form error will be displayed. Below is a list of fixed fields and their descriptions.", 'custom-contact-forms'); ?>
181
- </p>
182
- <ul>
183
- <li><span><?php _e('fixedEmail:', 'custom-contact-forms'); ?></span> <?php _e("When attached to a form and set to required, this field will validate a user's email addresses. If a user's email is not valid, an error will be shown.", 'custom-contact-forms'); ?></li>
184
- <li><span><?php _e('captcha:', 'custom-contact-forms'); ?></span> <?php _e('This field helps prevent spam by prompting users to copy numbers displayed on an image. If a user copies the numbers incorrectly, the form will show an error.', 'custom-contact-forms'); ?></li>
185
- <li><span><?php _e('fixedWebsite:', 'custom-contact-forms'); ?></span> <?php _e("When attached to a form and set to required, this field will validate a user's website. If a user's website is not valid, an error will be shown.", 'custom-contact-forms'); ?></li>
186
- <li><span><?php _e('emailSubject:', 'custom-contact-forms'); ?></span> <?php _e("This lets a user enter in an email subject that will carry over as the subject of the email sent to you on form completion", 'custom-contact-forms'); ?></li>
187
- <li><span><?php _e('usaStates:', 'custom-contact-forms'); ?></span> <?php _e("This field displays a dropdown of all the states in the US.", 'custom-contact-forms'); ?></li>
188
- <li><span><?php _e('allCountries:', 'custom-contact-forms'); ?></span> <?php _e("This field displays a dropdown of all the countries in the world.", 'custom-contact-forms'); ?></li>
189
- <li><span><?php _e('resetButton:', 'custom-contact-forms'); ?></span> <?php _e("Attaching this field adds a reset button right next to the submit button in your form.", 'custom-contact-forms'); ?></li>
190
- <li><span><?php _e('ishuman:', 'custom-contact-forms'); ?></span> <?php _e("This field helps prevent spam by prompting users to check a box to verify that they are human. If the box is left unchecked, an error will be displayed and the user will have to go back.", ''); ?></li>
191
- </ul>
192
- </li>
193
- <li>
194
- <h3>
195
- <?php _e('Field Options', 'custom-contact-forms'); ?>
196
- <a name="pop-field-options"></a></h3>
197
- <p>
198
- <?php _e("In the field section above, look at the radio or dropdown fields. See how they have multiple options within the field? Those are called Field Options. Field Options have their own manager. There are only three things you must fill in to create a field option.", 'custom-contact-forms'); ?>
199
- </p>
200
- <ul>
201
- <li><span class="red">*</span> <span>
202
- <?php _e("Slug:", 'custom-contact-forms'); ?>
203
- </span>
204
- <?php _e("Used to identify the field option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'.", 'custom-contact-forms'); ?>
205
- </li>
206
- <li><span class="red">*</span> <span>
207
- <?php _e("Option Label:", 'custom-contact-forms'); ?>
208
- </span>
209
- <?php _e("This is what is shown to the user in the dropdown or radio field.", 'custom-contact-forms'); ?>
210
- </li>
211
- <li><span>
212
- <?php _e("Option Value:", 'custom-contact-forms'); ?>
213
- </span>
214
- <?php _e("This is the actual value of the option which isn't shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'. The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually emailed to you and stored in the database. For dropdown fields the option value is optional, <span>for radio fields it is required</span>.", 'custom-contact-forms'); ?>
215
- </li>
216
- <li><span>
217
- <?php _e("Is Dead Option:", 'custom-contact-forms'); ?>
218
- </span> <select><option><?php _e('Please Select:', 'custom-contact-forms'); ?></option><option><?php _e('Option 1', 'custom-contact-forms'); ?></option><option><?php _e('Option 2', 'custom-contact-forms'); ?></option></select><br />
219
- <?php _e('Dead options are only useful for required dropdown fields. The first field option "Please Select" would be a useful way to encorporate a dead option. Assume the field is required; if a user submitted that field and left it as "Please Select:", then the form would throw an error and the user would have to go back.', 'custom-contact-forms'); ?>
220
- </li>
221
- </ul>
222
- <p>
223
- <?php _e("Once you create field options, you can attach them (in the field manager) to radio and dropdown fields (that are already created). It is important to remember that after you create a dropdown or radio field, they will not work until you attach one or more field options.", 'custom-contact-forms'); ?>
224
- </p>
225
- </li>
226
- <li>
227
- <h3>
228
- <?php _e('Forms', 'custom-contact-forms'); ?>
229
- <a name="pop-forms"></a></h3>
230
- <p>
231
- <?php _e("Forms bring everything together. Each form you create in the form manager shows a code to display that form in posts/pages as well as theme files. The post/page form display code looks like: [customcontact id=FORMID]. There are a number of parameters that you can fill out when creating and managing each of your forms.", 'custom-contact-forms'); ?>
232
- </p>
233
- <ul>
234
- <li><span class="red">*</span> <span>
235
- <?php _e("Slug:", 'custom-contact-forms'); ?>
236
- </span>
237
- <?php _e("A slug is simply a way to identify your form. It can only contain underscores, letters, and numbers and must be unique. Example 'my_contact_form'", 'custom-contact-forms'); ?>
238
- </li>
239
- <li><span>
240
- <?php _e('Form Title:', 'custom-contact-forms'); ?>
241
- </span>
242
- <?php _e("The form title is heading text shown at the top of the form to users. Here's an example: 'My Contact Form'.", 'custom-contact-forms'); ?>
243
- </li>
244
- <li><span class="red">*</span> <span>
245
- <?php _e('Form Method:', 'custom-contact-forms'); ?>
246
- </span>
247
- <?php _e("If you don't know what this is leave it as 'Post'. This allows you to change the way a form sends user information.", 'custom-contact-forms'); ?>
248
- </li>
249
- <li><span>
250
- <?php _e('Form Action:', 'custom-contact-forms'); ?>
251
- </span>
252
- <?php _e("This allows you to process your forms using 3rd party services or your own scripts. If you don't know what this is, then leave it blank. This is useful if you use a service like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
253
- </li>
254
- <li><span>
255
- <?php _e('Form Style:', 'custom-contact-forms'); ?>
256
- </span>
257
- <?php _e("This allows you to apply styles you create in the style manager to your forms. If you haven't created a custom style yet, just choose 'Default'.", 'custom-contact-forms'); ?>
258
- </li>
259
- <li><span>
260
- <?php _e('Submit Button Text:', 'custom-contact-forms'); ?>
261
- </span>
262
- <?php _e("Here, you can specify the text that shows on the submit button.", 'custom-contact-forms'); ?>
263
- </li>
264
- <li><span>
265
- <?php _e("Custom Code:", 'custom-contact-forms'); ?>
266
- </span>
267
- <?php _e("If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.", 'custom-contact-forms'); ?>
268
- </li>
269
- <li><span>
270
- <?php _e('Form Destination Email:', 'custom-contact-forms'); ?>
271
- </span>
272
- <?php _e("Specify the email address(es) that should receive all form submissions. Seperate multiple email addresses with semi-colons (ex: email1@gmail.com;email2@gmail.com;email3@gmail.com). If you leave this blank it will revert to the default specified in general settings. You can set forms not to send email in General Settings.", 'custom-contact-forms'); ?>
273
- </li>
274
- <li><span>
275
- <?php _e('Form Success Message:', 'custom-contact-forms'); ?>
276
- </span>
277
- <?php _e("Will be displayed in a popover after the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
278
- </li>
279
- <li><span>
280
- <?php _e('Form Success Message Title:', 'custom-contact-forms'); ?>
281
- </span>
282
- <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
283
- </li>
284
- <li><span>
285
- <?php _e('Custom Success URL:', 'custom-contact-forms'); ?>
286
- </span>
287
- <?php _e("If this is filled out, users will be sent to this page when they successfully fill out the form. If it is left blank, a popover showing the form's 'success message' will be displayed on successful form submission.", 'custom-contact-forms'); ?>
288
- </li>
289
- <li><span>
290
- <?php _e('Email From Name:', 'custom-contact-forms'); ?>
291
- </span>
292
- <?php _e("The email sent to you on form completion will be from this name. If this is left blank, it will default to the 'Default From Name' provided in General Settings.", 'custom-contact-forms'); ?>
293
- </li>
294
- <li><span>
295
- <?php _e('Email Subject:', 'custom-contact-forms'); ?>
296
- </span>
297
- <?php _e("This is the subject of the email that will be sent to you on form completion. If this is left blank, it will default to the 'Default Email Subject' provided in General Settings.", 'custom-contact-forms'); ?>
298
- </li>
299
- <li><span>
300
- <?php _e('Can View Form:', 'custom-contact-forms'); ?>
301
- </span>
302
- <?php _e("This lets you choose which types of users can view your form. If you want everyone to see the form, check all the boxes. If a user doesn't have access to the form, they will not be able to see it.", 'custom-contact-forms'); ?>
303
- </li>
304
- <li><span>
305
- <?php _e('Attach Fields:', 'custom-contact-forms'); ?>
306
- </span>
307
- <?php _e("After creating a form you are given the option to attach (and detach) fields to that specific form. Forms are useless until you attach fields.", 'custom-contact-forms'); ?>
308
- </li>
309
- </ul>
310
- <p>
311
- <?php _e("The form success message and success title apply to a popover that fades in after someone successfully completes a form (that does not have a custom success URL provided). The image below will help to give you a feel to how the popover will look and where the title and message actually show up.", 'custom-contact-forms'); ?>
312
- </p>
313
- <div class="ccf-success-popover-example"></div>
314
- </li>
315
- <li>
316
- <h3>
317
- <?php _e('Style Manager', 'custom-contact-forms'); ?>
318
- <a name="pop-styles"></a></h3>
319
- <p>
320
- <?php _e("The style manager allows you to customize the appearance of forms without any knowledge of CSS. There are a ton of parameters you can fill out with each style and all of them are pretty self-explanitory. After you create a style, you need to go to the form manager and set the form style to the new style you created (the slug will be what shows in the 'Form Style' dropdown).", 'custom-contact-forms'); ?>
321
- </p>
322
- <p>
323
- <?php _e("The image below will help you better understand how each style option will change your forms.", 'custom-contact-forms'); ?>
324
- </p>
325
- <div class="ccf-style-example"></div>
326
- </li>
327
- <li>
328
- <h3>
329
- <?php _e('Custom HTML Forms Feature (advanced)', 'custom-contact-forms'); ?>
330
- <a name="pop-custom-html"></a></h3>
331
- <p>
332
- <?php _e("If you know HTML and simply want to use this plugin to process form requests, this feature is for you. The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following:", 'custom-contact-forms'); ?>
333
- </p>
334
- <ul>
335
- <li>
336
- <?php _e("Keep the form action/method the same (yes the action is supposed to be empty).", 'custom-contact-forms'); ?>
337
- </li>
338
- <li>
339
- <?php _e("Include all the hidden fields shown below.", 'custom-contact-forms'); ?>
340
- </li>
341
- <li>
342
- <?php _e("Provide a hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately).", 'custom-contact-forms'); ?>
343
- </li>
344
- </ul>
345
- <p>
346
- <?php _e("Just to be clear, you don't edit the code in the Custom HTML Forms feature within the admin panel. Instead, you copy the code in to the page, post, or theme file you want to display a form, then edit the code to look how you want following the guidelines provided above.", 'custom-contact-forms'); ?>
347
- </p>
348
- </li>
349
- <li>
350
- <h3>
351
- <?php _e('Saved Form Submissions', 'custom-contact-forms'); ?>
352
- <a name="pop-form-submissions"></a></h3>
353
- <p>
354
- <?php _e('This features saves each user form submission. All the fields attached to the form along with the time of submission and form URL are saved in the database and displayed in a stylish format in the admin panel.', 'custom-contact-forms'); ?>
355
- </p>
356
- </li>
357
- <li>
358
- <h3>
359
- <?php _e('Import / Export', 'custom-contact-forms'); ?>
360
- <a name="pop-import-export"></a></h3>
361
- <p>
362
- <?php _e('Import/export is a new feature that allows you to transfer forms, fields, field options, styles and everything else saved by the plugin between Wordpress installations. Clicking the Export All button will create a .SQL file for download. With the .SQL export file you can use the importer within the CCF plugin admin page to import the .SQL file. The built-in importer is completely safe as long as you only import files that have been generated by the CCF exporter.
363
- You can also use PHPMyAdmin or any other MySQL database administration tool to run the import file. Importing a .SQL file will never overwrite any existing data.
364
- It is strongly recommended that you import CCF .SQL files using the built-in importer with in the admin panel due to the added complexity of importing using alterative methods.
365
- If you are importing without using the built-in importer (such as PHPMyAdmin), then note the following: You should only run the import file on Wordpress installations that already have Custom Contact Forms installed; also you will need to change the table prefix for each query within the .SQL file.', 'custom-contact-forms'); ?>
366
- </p>
367
- <p><?php _e('Custom Contact Forms allows you to import data in different ways.', 'custom-contact-forms'); ?></p>
368
- <ul>
369
- <li><b><?php _e('Clear and Import:', 'custom-contact-forms'); ?></b> <?php _e("This is the safest way to import because it deletes all current content before importing. This is important because it prevents occurences of conflicting data ID's or slugs.", 'custom-contact-forms'); ?></li>
370
- </ul>
371
- <p><?php _e('You can also export data in different ways.', 'custom-contact-forms'); ?></p>
372
- <ul>
373
- <li><b><?php _e('Export All:', 'custom-contact-forms'); ?></b> <?php _e("This exports all custom contact form data including your general settings in SQL format. This is allows you to easily create backups.", 'custom-contact-forms'); ?></li>
374
- </ul>
375
- <p><?php _e('More import/export methods will be added in the future. Always create a backup before attempting an import! * Note: If you are having problems getting the importer/exporter to work, try CHMODing the import/ and export/ directories to 0777.', 'custom-contact-forms'); ?></p>
376
- </li>
377
- </ul>
378
- </div>
379
- </div>
1
+ <div class="ccf-popover" id="ccf-usage-popover" title="<?php _e('Plugin Usage Popover', 'custom-contact-forms'); ?>">
2
+ <div class="popover-body">
3
+ <!--<ul id="popover-tof">
4
+ <li><a href="#pop-forms">
5
+ <?php _e('Forms', 'custom-contact-forms'); ?>
6
+ </a></li>
7
+ <li><a href="#pop-fields">
8
+ <?php _e('Fields', 'custom-contact-forms'); ?>
9
+ </a></li>
10
+ <li><a href="#pop-fixed-fields">
11
+ <?php _e('Fixed Fields', 'custom-contact-forms'); ?>
12
+ </a></li>
13
+ <li><a href="#pop-field-options">
14
+ <?php _e('Field Options', 'custom-contact-forms'); ?>
15
+ </a></li>
16
+ <li><a href="#pop-styles">
17
+ <?php _e('Styles', 'custom-contact-forms'); ?>
18
+ </a></li>
19
+ <li><a href="#pop-custom-html">
20
+ <?php _e('Custom HTML Forms', 'custom-contact-forms'); ?>
21
+ </a></li>
22
+ <li><a href="#pop-import-export">
23
+ <?php _e('Import/Export', 'custom-contact-forms'); ?>
24
+ </a></li>
25
+ <li><a href="#pop-form-submissions">
26
+ <?php _e('Form Submissions', 'custom-contact-forms'); ?>
27
+ </a></li>
28
+ </ul>-->
29
+ <h3>
30
+ <?php _e('Introduction', 'custom-contact-forms'); ?>
31
+ </h3>
32
+ <p>
33
+ <?php _e("CCF is an extremely intuitive plugin allowing you to create any type of contact form you can imagine. CCF is very user friendly but with possibilities comes complexity. It is recommend that you click the button below to create default fields, field options, and forms.
34
+ The default content will help you get a feel for the amazing things you can accomplish with this plugin. This popover only shows automatically the first time you visit the admin page;", 'custom-contact-forms'); ?>
35
+ <b>
36
+ <?php _e("if you want to view this popover again, click the 'Show Plugin Usage Popover'", 'custom-contact-forms'); ?>
37
+ </b>
38
+ <?php _e("in the instruction area of the admin page.", 'custom-contact-forms'); ?>
39
+ </p>
40
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
41
+ <input type="submit" class="insert-default-content-button" value="<?php _e("Insert Default Content", 'custom-contact-forms'); ?>" name="insert_default_content" />
42
+ </form>
43
+ <p>
44
+ <?php _e("Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Another useful part of the plugin is the 'Custom HTML Feature' which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience. Also explained below is the 'Saved Form Submissions' feature which displays all form submissions in the admin panel.", 'custom-contact-forms'); ?>
45
+ </p>
46
+ <ul>
47
+ <li>
48
+ <h3>
49
+ <?php _e("Fields", 'custom-contact-forms'); ?>
50
+ <a name="pop-fields"></a></h3>
51
+ <p>
52
+ <?php _e("Fields are the actual input boxes in which users enter their information. There are six types of fields that you can attach to your forms.!", 'custom-contact-forms'); ?>
53
+ </p>
54
+ <ul>
55
+ <li><span>
56
+ <?php _e("Text:", 'custom-contact-forms'); ?>
57
+ </span>
58
+ <div>
59
+ <input type="text" class="ccf-width200" value="<?php _e("This is a text field", 'custom-contact-forms'); ?>" />
60
+ </div>
61
+ </li>
62
+ <li><span>
63
+ <?php _e("Textarea:", 'custom-contact-forms'); ?>
64
+ </span>
65
+ <div>
66
+ <textarea class="ccf-width2000"><?php _e("This is a text field", 'custom-contact-forms'); ?></textarea>
67
+ </div>
68
+ </li>
69
+ <li><span>
70
+ <?php _e("Dropdown:", 'custom-contact-forms'); ?>
71
+ </span>
72
+ <div>
73
+ <select>
74
+ <option>
75
+ <?php _e("This is a dropdown field", 'custom-contact-forms'); ?>
76
+ </option>
77
+ <option>
78
+ <?php _e("Field Option 2!", 'custom-contact-forms'); ?>
79
+ </option>
80
+ <option>
81
+ <?php _e("Field Option 3!", 'custom-contact-forms'); ?>
82
+ </option>
83
+ <option>
84
+ <?php _e("Field Option 4!", 'custom-contact-forms'); ?>
85
+ </option>
86
+ <option>
87
+ <?php _e("Unlimited # of options allowed", 'custom-contact-forms'); ?>
88
+ </option>
89
+ </select>
90
+ </div>
91
+ </li>
92
+ <li><span>
93
+ <?php _e("Radio:", 'custom-contact-forms'); ?>
94
+ </span>
95
+ <div>
96
+ <input type="radio" selected="selected" />
97
+ <?php _e("A radio field", 'custom-contact-forms'); ?>
98
+ <input type="radio" selected="selected" />
99
+ <?php _e("Field Option 2", 'custom-contact-forms'); ?>
100
+ <input type="radio" selected="selected" />
101
+ <?php _e("Field Option 3", 'custom-contact-forms'); ?>
102
+ </div>
103
+ </li>
104
+ <li><span>
105
+ <?php _e("Checkbox:", 'custom-contact-forms'); ?>
106
+ </span>
107
+ <div>
108
+ <input type="checkbox" value="1" />
109
+ <?php _e("This is a checkbox field", 'custom-contact-forms'); ?>
110
+ </div>
111
+ </li>
112
+ <li><span>
113
+ <?php _e("(advanced) Hidden:", 'custom-contact-forms'); ?>
114
+ </span>
115
+ <?php _e("These fields are hidden (obviously), they allow you to pass hidden information within your forms. Great for using other form processors like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
116
+ </li>
117
+ </ul>
118
+ <p>
119
+ <?php _e("There are a variety of different options that you can use when creating a field,", 'custom-contact-forms'); ?>
120
+ <span class="red">*</span>
121
+ <?php _e("denotes something required:", 'custom-contact-forms'); ?>
122
+ </p>
123
+ <ul>
124
+ <li><span class="red">*</span> <span>
125
+ <?php _e("Slug:", 'custom-contact-forms'); ?>
126
+ </span>
127
+ <?php _e("A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.", 'custom-contact-forms'); ?>
128
+ </li>
129
+ <li><span>
130
+ <?php _e("Field Label:", 'custom-contact-forms'); ?>
131
+ </span>
132
+ <?php _e("The field label is displayed next to the field and is visible to the user.", 'custom-contact-forms'); ?>
133
+ </li>
134
+ <li><span class="red">*</span> <span>
135
+ <?php _e("Field Type:", 'custom-contact-forms'); ?>
136
+ </span>
137
+ <?php _e("The six field types you can choose from are explained above.", 'custom-contact-forms'); ?>
138
+ </li>
139
+ <li><span>
140
+ <?php _e("Initial Value:", 'custom-contact-forms'); ?>
141
+ </span>
142
+ <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox 'Are you human?', I would set the initial value to 'Yes'. If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the field option you would like initially selected (or just leave it blank and the first option attached will be selected).", 'custom-contact-forms'); ?>
143
+ </li>
144
+ <li><span>
145
+ <?php _e("Max Length:", 'custom-contact-forms'); ?>
146
+ </span>
147
+ <?php _e("This allows you to limit the amount of characters a user can enter in a field (does not apply to textareas as of version 3.5.5)", 'custom-contact-forms'); ?>
148
+ </li>
149
+ <li><span>
150
+ <?php _e("Required Field:", 'custom-contact-forms'); ?>
151
+ </span>
152
+ <?php _e("If a field is required and a user leaves it blank, the plugin will display an error message explaining the problem. The user will then have to go back and fill in the field properly.", 'custom-contact-forms'); ?>
153
+ </li>
154
+ <li><span>
155
+ <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
156
+ </span>
157
+ <?php _e("If this is filled out, a stylish tooltip popover displaying this text will show when the field is selected. This will only work if JQuery is enabled in general options.", 'custom-contact-forms'); ?>
158
+ </li>
159
+ <li><span>
160
+ <?php _e("Field Error:", 'custom-contact-forms'); ?>
161
+ </span>
162
+ <?php _e("If a user leaves this field blank and the field is required, this error message will be shown. A generic default will show if left blank.", 'custom-contact-forms'); ?>
163
+ </li>
164
+ <li><span>
165
+ <?php _e("(advanced) Field Class:", 'custom-contact-forms'); ?>
166
+ </span>
167
+ <?php _e("This allows you to assign a CSS class to an individual field without affecting anything else. This is a great way to take the customization of your form to the next level.", 'custom-contact-forms'); ?>
168
+ </li>
169
+ <li><span>
170
+ <?php _e("Field Options:", 'custom-contact-forms'); ?>
171
+ </span>
172
+ <?php _e("After you create a field, if it's field type is radio or dropdown, you can attach field options to the field. Field options are explained in the next section.", 'custom-contact-forms'); ?>
173
+ </li>
174
+ </ul>
175
+ </li>
176
+ <li>
177
+ <h3><?php _e('Fixed Fields', 'custom-contact-forms'); ?>
178
+ <a name="pop-fixed-fields"></a></h3>
179
+ <p>
180
+ <?php _e("The last important thing related to fields are <span>Fixed Fields</span>. Fixed Fields are special fields that come already created within the plugin such as the captcha spam blocker and email field. Fixed Fields do special things that you wouldn't be able to accomplish with normal fields; they cannot be deleted or created. For example, if you use the fixedEmail field, as opposed to creating your own email field. the users email will be checked to make sure it is valid, if it isn't a form error will be displayed. Below is a list of fixed fields and their descriptions.", 'custom-contact-forms'); ?>
181
+ </p>
182
+ <ul>
183
+ <li><span><?php _e('fixedEmail:', 'custom-contact-forms'); ?></span> <?php _e("When attached to a form and set to required, this field will validate a user's email addresses. If a user's email is not valid, an error will be shown.", 'custom-contact-forms'); ?></li>
184
+ <li><span><?php _e('captcha:', 'custom-contact-forms'); ?></span> <?php _e('This field helps prevent spam by prompting users to copy numbers displayed on an image. If a user copies the numbers incorrectly, the form will show an error.', 'custom-contact-forms'); ?></li>
185
+ <li><span><?php _e('fixedWebsite:', 'custom-contact-forms'); ?></span> <?php _e("When attached to a form and set to required, this field will validate a user's website. If a user's website is not valid, an error will be shown.", 'custom-contact-forms'); ?></li>
186
+ <li><span><?php _e('emailSubject:', 'custom-contact-forms'); ?></span> <?php _e("This lets a user enter in an email subject that will carry over as the subject of the email sent to you on form completion", 'custom-contact-forms'); ?></li>
187
+ <li><span><?php _e('usaStates:', 'custom-contact-forms'); ?></span> <?php _e("This field displays a dropdown of all the states in the US.", 'custom-contact-forms'); ?></li>
188
+ <li><span><?php _e('allCountries:', 'custom-contact-forms'); ?></span> <?php _e("This field displays a dropdown of all the countries in the world.", 'custom-contact-forms'); ?></li>
189
+ <li><span><?php _e('resetButton:', 'custom-contact-forms'); ?></span> <?php _e("Attaching this field adds a reset button right next to the submit button in your form.", 'custom-contact-forms'); ?></li>
190
+ <li><span><?php _e('ishuman:', 'custom-contact-forms'); ?></span> <?php _e("This field helps prevent spam by prompting users to check a box to verify that they are human. If the box is left unchecked, an error will be displayed and the user will have to go back.", ''); ?></li>
191
+ </ul>
192
+ </li>
193
+ <li>
194
+ <h3>
195
+ <?php _e('Field Options', 'custom-contact-forms'); ?>
196
+ <a name="pop-field-options"></a></h3>
197
+ <p>
198
+ <?php _e("In the field section above, look at the radio or dropdown fields. See how they have multiple options within the field? Those are called Field Options. Field Options have their own manager. There are only three things you must fill in to create a field option.", 'custom-contact-forms'); ?>
199
+ </p>
200
+ <ul>
201
+ <li><span class="red">*</span> <span>
202
+ <?php _e("Slug:", 'custom-contact-forms'); ?>
203
+ </span>
204
+ <?php _e("Used to identify the field option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'.", 'custom-contact-forms'); ?>
205
+ </li>
206
+ <li><span class="red">*</span> <span>
207
+ <?php _e("Option Label:", 'custom-contact-forms'); ?>
208
+ </span>
209
+ <?php _e("This is what is shown to the user in the dropdown or radio field.", 'custom-contact-forms'); ?>
210
+ </li>
211
+ <li><span>
212
+ <?php _e("Option Value:", 'custom-contact-forms'); ?>
213
+ </span>
214
+ <?php _e("This is the actual value of the option which isn't shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'. The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually emailed to you and stored in the database. For dropdown fields the option value is optional, <span>for radio fields it is required</span>.", 'custom-contact-forms'); ?>
215
+ </li>
216
+ <li><span>
217
+ <?php _e("Is Dead Option:", 'custom-contact-forms'); ?>
218
+ </span> <select><option><?php _e('Please Select:', 'custom-contact-forms'); ?></option><option><?php _e('Option 1', 'custom-contact-forms'); ?></option><option><?php _e('Option 2', 'custom-contact-forms'); ?></option></select><br />
219
+ <?php _e('Dead options are only useful for required dropdown fields. The first field option "Please Select" would be a useful way to encorporate a dead option. Assume the field is required; if a user submitted that field and left it as "Please Select:", then the form would throw an error and the user would have to go back.', 'custom-contact-forms'); ?>
220
+ </li>
221
+ </ul>
222
+ <p>
223
+ <?php _e("Once you create field options, you can attach them (in the field manager) to radio and dropdown fields (that are already created). It is important to remember that after you create a dropdown or radio field, they will not work until you attach one or more field options.", 'custom-contact-forms'); ?>
224
+ </p>
225
+ </li>
226
+ <li>
227
+ <h3>
228
+ <?php _e('Forms', 'custom-contact-forms'); ?>
229
+ <a name="pop-forms"></a></h3>
230
+ <p>
231
+ <?php _e("Forms bring everything together. Each form you create in the form manager shows a code to display that form in posts/pages as well as theme files. The post/page form display code looks like: [customcontact id=FORMID]. There are a number of parameters that you can fill out when creating and managing each of your forms.", 'custom-contact-forms'); ?>
232
+ </p>
233
+ <ul>
234
+ <li><span class="red">*</span> <span>
235
+ <?php _e("Slug:", 'custom-contact-forms'); ?>
236
+ </span>
237
+ <?php _e("A slug is simply a way to identify your form. It can only contain underscores, letters, and numbers and must be unique. Example 'my_contact_form'", 'custom-contact-forms'); ?>
238
+ </li>
239
+ <li><span>
240
+ <?php _e('Form Title:', 'custom-contact-forms'); ?>
241
+ </span>
242
+ <?php _e("The form title is heading text shown at the top of the form to users. Here's an example: 'My Contact Form'.", 'custom-contact-forms'); ?>
243
+ </li>
244
+ <li><span class="red">*</span> <span>
245
+ <?php _e('Form Method:', 'custom-contact-forms'); ?>
246
+ </span>
247
+ <?php _e("If you don't know what this is leave it as 'Post'. This allows you to change the way a form sends user information.", 'custom-contact-forms'); ?>
248
+ </li>
249
+ <li><span>
250
+ <?php _e('Form Action:', 'custom-contact-forms'); ?>
251
+ </span>
252
+ <?php _e("This allows you to process your forms using 3rd party services or your own scripts. If you don't know what this is, then leave it blank. This is useful if you use a service like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
253
+ </li>
254
+ <li><span>
255
+ <?php _e('Form Style:', 'custom-contact-forms'); ?>
256
+ </span>
257
+ <?php _e("This allows you to apply styles you create in the style manager to your forms. If you haven't created a custom style yet, just choose 'Default'.", 'custom-contact-forms'); ?>
258
+ </li>
259
+ <li><span>
260
+ <?php _e('Submit Button Text:', 'custom-contact-forms'); ?>
261
+ </span>
262
+ <?php _e("Here, you can specify the text that shows on the submit button.", 'custom-contact-forms'); ?>
263
+ </li>
264
+ <li><span>
265
+ <?php _e("Custom Code:", 'custom-contact-forms'); ?>
266
+ </span>
267
+ <?php _e("If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.", 'custom-contact-forms'); ?>
268
+ </li>
269
+ <li><span>
270
+ <?php _e('Form Destination Email:', 'custom-contact-forms'); ?>
271
+ </span>
272
+ <?php _e("Specify the email address(es) that should receive all form submissions. Seperate multiple email addresses with semi-colons (ex: email1@gmail.com;email2@gmail.com;email3@gmail.com). If you leave this blank it will revert to the default specified in general settings. You can set forms not to send email in General Settings.", 'custom-contact-forms'); ?>
273
+ </li>
274
+ <li><span>
275
+ <?php _e('Form Success Message:', 'custom-contact-forms'); ?>
276
+ </span>
277
+ <?php _e("Will be displayed in a popover after the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
278
+ </li>
279
+ <li><span>
280
+ <?php _e('Form Success Message Title:', 'custom-contact-forms'); ?>
281
+ </span>
282
+ <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
283
+ </li>
284
+ <li><span>
285
+ <?php _e('Custom Success URL:', 'custom-contact-forms'); ?>
286
+ </span>
287
+ <?php _e("If this is filled out, users will be sent to this page when they successfully fill out the form. If it is left blank, a popover showing the form's 'success message' will be displayed on successful form submission.", 'custom-contact-forms'); ?>
288
+ </li>
289
+ <li><span>
290
+ <?php _e('Email From Name:', 'custom-contact-forms'); ?>
291
+ </span>
292
+ <?php _e("The email sent to you on form completion will be from this name. If this is left blank, it will default to the 'Default From Name' provided in General Settings.", 'custom-contact-forms'); ?>
293
+ </li>
294
+ <li><span>
295
+ <?php _e('Email Subject:', 'custom-contact-forms'); ?>
296
+ </span>
297
+ <?php _e("This is the subject of the email that will be sent to you on form completion. If this is left blank, it will default to the 'Default Email Subject' provided in General Settings.", 'custom-contact-forms'); ?>
298
+ </li>
299
+ <li><span>
300
+ <?php _e('Can View Form:', 'custom-contact-forms'); ?>
301
+ </span>
302
+ <?php _e("This lets you choose which types of users can view your form. If you want everyone to see the form, check all the boxes. If a user doesn't have access to the form, they will not be able to see it.", 'custom-contact-forms'); ?>
303
+ </li>
304
+ <li><span>
305
+ <?php _e('Attach Fields:', 'custom-contact-forms'); ?>
306
+ </span>
307
+ <?php _e("After creating a form you are given the option to attach (and detach) fields to that specific form. Forms are useless until you attach fields.", 'custom-contact-forms'); ?>
308
+ </li>
309
+ </ul>
310
+ <p>
311
+ <?php _e("The form success message and success title apply to a popover that fades in after someone successfully completes a form (that does not have a custom success URL provided). The image below will help to give you a feel to how the popover will look and where the title and message actually show up.", 'custom-contact-forms'); ?>
312
+ </p>
313
+ <div class="ccf-success-popover-example"></div>
314
+ </li>
315
+ <li>
316
+ <h3>
317
+ <?php _e('Style Manager', 'custom-contact-forms'); ?>
318
+ <a name="pop-styles"></a></h3>
319
+ <p>
320
+ <?php _e("The style manager allows you to customize the appearance of forms without any knowledge of CSS. There are a ton of parameters you can fill out with each style and all of them are pretty self-explanitory. After you create a style, you need to go to the form manager and set the form style to the new style you created (the slug will be what shows in the 'Form Style' dropdown).", 'custom-contact-forms'); ?>
321
+ </p>
322
+ <p>
323
+ <?php _e("The image below will help you better understand how each style option will change your forms.", 'custom-contact-forms'); ?>
324
+ </p>
325
+ <div class="ccf-style-example"></div>
326
+ </li>
327
+ <li>
328
+ <h3>
329
+ <?php _e('Custom HTML Forms Feature (advanced)', 'custom-contact-forms'); ?>
330
+ <a name="pop-custom-html"></a></h3>
331
+ <p>
332
+ <?php _e("If you know HTML and simply want to use this plugin to process form requests, this feature is for you. The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following:", 'custom-contact-forms'); ?>
333
+ </p>
334
+ <ul>
335
+ <li>
336
+ <?php _e("Keep the form action/method the same (yes the action is supposed to be empty).", 'custom-contact-forms'); ?>
337
+ </li>
338
+ <li>
339
+ <?php _e("Include all the hidden fields shown below.", 'custom-contact-forms'); ?>
340
+ </li>
341
+ <li>
342
+ <?php _e("Provide a hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately).", 'custom-contact-forms'); ?>
343
+ </li>
344
+ </ul>
345
+ <p>
346
+ <?php _e("Just to be clear, you don't edit the code in the Custom HTML Forms feature within the admin panel. Instead, you copy the code in to the page, post, or theme file you want to display a form, then edit the code to look how you want following the guidelines provided above.", 'custom-contact-forms'); ?>
347
+ </p>
348
+ </li>
349
+ <li>
350
+ <h3>
351
+ <?php _e('Saved Form Submissions', 'custom-contact-forms'); ?>
352
+ <a name="pop-form-submissions"></a></h3>
353
+ <p>
354
+ <?php _e('This features saves each user form submission. All the fields attached to the form along with the time of submission and form URL are saved in the database and displayed in a stylish format in the admin panel.', 'custom-contact-forms'); ?>
355
+ </p>
356
+ </li>
357
+ <li>
358
+ <h3>
359
+ <?php _e('Import / Export', 'custom-contact-forms'); ?>
360
+ <a name="pop-import-export"></a></h3>
361
+ <p>
362
+ <?php _e('Import/export is a new feature that allows you to transfer forms, fields, field options, styles and everything else saved by the plugin between Wordpress installations. Clicking the Export All button will create a .SQL file for download. With the .SQL export file you can use the importer within the CCF plugin admin page to import the .SQL file. The built-in importer is completely safe as long as you only import files that have been generated by the CCF exporter.
363
+ You can also use PHPMyAdmin or any other MySQL database administration tool to run the import file. Importing a .SQL file will never overwrite any existing data.
364
+ It is strongly recommended that you import CCF .SQL files using the built-in importer with in the admin panel due to the added complexity of importing using alterative methods.
365
+ If you are importing without using the built-in importer (such as PHPMyAdmin), then note the following: You should only run the import file on Wordpress installations that already have Custom Contact Forms installed; also you will need to change the table prefix for each query within the .SQL file.', 'custom-contact-forms'); ?>
366
+ </p>
367
+ <p><?php _e('Custom Contact Forms allows you to import data in different ways.', 'custom-contact-forms'); ?></p>
368
+ <ul>
369
+ <li><b><?php _e('Clear and Import:', 'custom-contact-forms'); ?></b> <?php _e("This is the safest way to import because it deletes all current content before importing. This is important because it prevents occurences of conflicting data ID's or slugs.", 'custom-contact-forms'); ?></li>
370
+ </ul>
371
+ <p><?php _e('You can also export data in different ways.', 'custom-contact-forms'); ?></p>
372
+ <ul>
373
+ <li><b><?php _e('Export All:', 'custom-contact-forms'); ?></b> <?php _e("This exports all custom contact form data including your general settings in SQL format. This is allows you to easily create backups.", 'custom-contact-forms'); ?></li>
374
+ </ul>
375
+ <p><?php _e('More import/export methods will be added in the future. Always create a backup before attempting an import! * Note: If you are having problems getting the importer/exporter to work, try CHMODing the import/ and export/ directories to 0777.', 'custom-contact-forms'); ?></p>
376
+ </li>
377
+ </ul>
378
+ </div>
379
+ </div>
modules/widget/custom-contact-forms-dashboard.php CHANGED
@@ -1,115 +1,132 @@
1
- <?php
2
- /*
3
- Custom Contact Forms Plugin
4
- By Taylor Lovett - http://www.taylorlovett.com
5
- Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
- */
7
- if (!class_exists('CustomContactFormsDashboard')) {
8
- class CustomContactFormsDashboard extends CustomContactFormsAdmin {
9
- function install() {
10
- wp_add_dashboard_widget('custom-contact-forms-dashboard', __('Custom Contact Forms - Saved Form Submissions', 'custom-contact-forms'), array(&$this, 'display'));
11
- }
12
-
13
- function isDashboardPage() {
14
- return (is_admin() && preg_match('/((index\.php)|(wp-admin\/?))$/', $_SERVER['REQUEST_URI']));
15
- }
16
-
17
- function insertDashboardStyles() {
18
- wp_register_style('ccf-dashboard', plugins_url() . '/custom-contact-forms/css/custom-contact-forms-dashboard.css');
19
- wp_register_style('ccf-jquery-ui', plugins_url() . '/custom-contact-forms/css/jquery-ui.css');
20
- wp_enqueue_style('ccf-jquery-ui');
21
- wp_enqueue_style('ccf-dashboard');
22
- }
23
-
24
- function insertDashboardScripts() {
25
- wp_enqueue_script('jquery');
26
- wp_enqueue_script('jquery-ui-core');
27
- wp_enqueue_script('jquery-ui-widget', plugins_url() . '/custom-contact-forms/js/jquery.ui.widget.js');
28
- wp_enqueue_script('jquery-ui-dialog');
29
- wp_register_script('ccf-dashboard', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-dashboard.js', array('jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-dialog'));
30
- wp_enqueue_script('ccf-dashboard');
31
- }
32
-
33
- function display() {
34
- ccf_utils::load_module('export/custom-contact-forms-user-data.php');
35
- $user_data_array = parent::selectAllUserData();
36
- ?>
37
- <table id="ccf-dashboard" cellpadding="0" cellspacing="0">
38
- <thead>
39
- <tr>
40
- <th>Date</th>
41
- <th>Form</th>
42
- <th>Form Location</th>
43
- <th></th>
44
- </tr>
45
- </thead>
46
- <tbody>
47
- <?php
48
- $i = 0;
49
- foreach ($user_data_array as $data_object) {
50
- if ($i > 3) break;
51
- $data = new CustomContactFormsUserData(array('form_id' => $data_object->data_formid, 'data_time' => $data_object->data_time, 'form_page' => $data_object->data_formpage, 'encoded_data' => $data_object->data_value));
52
- ?>
53
- <tr class="<?php if ($i % 2 == 1) echo 'even'; ?>">
54
- <td class="date"><?php echo date('m/d/y', $data->getDataTime()); ?></td>
55
- <td class="slug">
56
- <?php
57
- if ($data->getFormID() > 0) {
58
- $data_form = parent::selectForm($data->getFormID());
59
- $this_form = (!empty($data_form->form_slug)) ? $data_form->form_slug : '-';
60
- } else
61
- $this_form = __('Custom HTML Form', 'custom-contact-forms');
62
- if (strlen($this_form) > 13) echo substr($this_form, 0, 13) . '...';
63
- else echo $this_form;
64
- ?>
65
- </td>
66
- <td class="form-page">
67
- <?php
68
- if (strlen($data->getFormPage()) > 30) echo substr($data->getFormPage(), 0, 30) . '...';
69
- else echo $data->getFormPage();
70
- ?>
71
- </td>
72
- <td>
73
- <input class="ccf-view-submission" type="button" value="<?php _e('View', 'custom-contact-forms'); ?>" />
74
- <div class="ccf-view-submission-popover" title="<?php _e('CCF Saved Form Submission', 'custom-contact-forms'); ?>">
75
- <div class="top">
76
- <div class="left">
77
- <p><?php _e('Form Submitted:', 'custom-contact-forms'); ?> <span><?php echo ($this_form == '-') ? __('Not Found', 'custom-contact-forms') : $this_form; ?></span></p>
78
- <p><?php _e('Form Location:', 'custom-contact-forms'); ?> <span>
79
- <?php
80
- if (strlen($data->getFormPage()) > 70) echo substr($data->getFormPage(), 0, 70) . '...';
81
- else echo $data->getFormPage();
82
- ?></span></p></div>
83
- <div class="right"><span><?php echo date('F j, Y, g:i a', $data->getDataTime()); ?></span></div>
84
- </div>
85
- <div class="separate"></div>
86
- <ul>
87
- <?php
88
- $data_array = $data->getDataArray();
89
- foreach ($data_array as $item_key => $item_value) {
90
- ?>
91
- <li>
92
- <div><?php echo $item_key; ?></div>
93
- <p><?php echo $item_value; ?></p>
94
- </li>
95
- <?php
96
- }
97
- ?>
98
- </ul>
99
- <div class="separate"></div>
100
- <a href="admin.php?page=ccf-saved-form-submissions"><?php _e('View All Submissions', 'custom-contact-forms'); ?></a>
101
- </div>
102
- </td>
103
- </tr>
104
- <?php
105
- $i++;
106
- }
107
- ?>
108
- </tbody>
109
- </table>
110
- <a href="admin.php?page=ccf-saved-form-submissions"><?php _e('View All Submissions', 'custom-contact-forms'); ?></a>
111
- <?php
112
- }
113
- }
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  ?>
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('CustomContactFormsDashboard')) {
8
+ class CustomContactFormsDashboard extends CustomContactFormsAdmin {
9
+ function install() {
10
+ wp_add_dashboard_widget('custom-contact-forms-dashboard', __('Custom Contact Forms - Saved Form Submissions', 'custom-contact-forms'), array(&$this, 'display'));
11
+ }
12
+
13
+ function isDashboardPage() {
14
+ return (is_admin() && preg_match('/((index\.php)|(wp-admin\/?))$/', $_SERVER['REQUEST_URI']));
15
+ }
16
+
17
+ function userCanViewWidget() {
18
+ $perms = parent::getAdminOptions();
19
+ $widget_perms = $perms['dashboard_access'];
20
+ global $current_user;
21
+ $user_roles = $current_user->roles;
22
+ $user_role = array_shift($user_roles);
23
+
24
+ if ($widget_perms == 2) {
25
+ if ($user_role != "Administrator") return false;
26
+ } else if ($widget_perms == 1) {
27
+ if ($user_role == "Subscriber" || !in_array($user_role, parent::getRolesArray())) return false;
28
+ } else {
29
+ /* all roles are allowed so just return true */
30
+ }
31
+ return true;
32
+ }
33
+
34
+ function insertDashboardStyles() {
35
+ wp_register_style('ccf-dashboard', plugins_url() . '/custom-contact-forms/css/custom-contact-forms-dashboard.css');
36
+ wp_register_style('ccf-jquery-ui', plugins_url() . '/custom-contact-forms/css/jquery-ui.css');
37
+ wp_enqueue_style('ccf-jquery-ui');
38
+ wp_enqueue_style('ccf-dashboard');
39
+ }
40
+
41
+ function insertDashboardScripts() {
42
+ wp_enqueue_script('jquery');
43
+ wp_enqueue_script('jquery-ui-core');
44
+ wp_enqueue_script('jquery-ui-widget', plugins_url() . '/custom-contact-forms/js/jquery.ui.widget.js');
45
+ wp_enqueue_script('jquery-ui-dialog');
46
+ wp_register_script('ccf-dashboard', plugins_url() . '/custom-contact-forms/js/custom-contact-forms-dashboard.js', array('jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-dialog'));
47
+ wp_enqueue_script('ccf-dashboard');
48
+ }
49
+
50
+ function display() {
51
+ ccf_utils::load_module('export/custom-contact-forms-user-data.php');
52
+ $user_data_array = parent::selectAllUserData();
53
+ ?>
54
+ <table id="ccf-dashboard" cellpadding="0" cellspacing="0">
55
+ <thead>
56
+ <tr>
57
+ <th>Date</th>
58
+ <th>Form</th>
59
+ <th>Form Location</th>
60
+ <th></th>
61
+ </tr>
62
+ </thead>
63
+ <tbody>
64
+ <?php
65
+ $i = 0;
66
+ foreach ($user_data_array as $data_object) {
67
+ if ($i > 3) break;
68
+ $data = new CustomContactFormsUserData(array('form_id' => $data_object->data_formid, 'data_time' => $data_object->data_time, 'form_page' => $data_object->data_formpage, 'encoded_data' => $data_object->data_value));
69
+ ?>
70
+ <tr class="<?php if ($i % 2 == 1) echo 'even'; ?>">
71
+ <td class="date"><?php echo date('m/d/y', $data->getDataTime()); ?></td>
72
+ <td class="slug">
73
+ <?php
74
+ if ($data->getFormID() > 0) {
75
+ $data_form = parent::selectForm($data->getFormID());
76
+ $this_form = (!empty($data_form->form_slug)) ? $data_form->form_slug : '-';
77
+ } else
78
+ $this_form = __('Custom HTML Form', 'custom-contact-forms');
79
+ if (strlen($this_form) > 13) echo substr($this_form, 0, 13) . '...';
80
+ else echo $this_form;
81
+ ?>
82
+ </td>
83
+ <td class="form-page">
84
+ <?php
85
+ if (strlen($data->getFormPage()) > 30) echo substr($data->getFormPage(), 0, 30) . '...';
86
+ else echo $data->getFormPage();
87
+ ?>
88
+ </td>
89
+ <td>
90
+ <input class="ccf-view-submission" type="button" value="<?php _e('View', 'custom-contact-forms'); ?>" />
91
+ <div class="ccf-view-submission-popover" title="<?php _e('CCF Saved Form Submission', 'custom-contact-forms'); ?>">
92
+ <div class="top">
93
+ <div class="left">
94
+ <p><?php _e('Form Submitted:', 'custom-contact-forms'); ?> <span><?php echo ($this_form == '-') ? __('Not Found', 'custom-contact-forms') : $this_form; ?></span></p>
95
+ <p><?php _e('Form Location:', 'custom-contact-forms'); ?> <span>
96
+ <?php
97
+ if (strlen($data->getFormPage()) > 70) echo substr($data->getFormPage(), 0, 70) . '...';
98
+ else echo $data->getFormPage();
99
+ ?></span></p></div>
100
+ <div class="right"><span><?php echo date('F j, Y, g:i a', $data->getDataTime()); ?></span></div>
101
+ </div>
102
+ <div class="separate"></div>
103
+ <ul>
104
+ <?php
105
+ $data_array = $data->getDataArray();
106
+ foreach ($data_array as $item_key => $item_value) {
107
+ ?>
108
+ <li>
109
+ <div><?php echo $item_key; ?></div>
110
+ <p><?php echo $item_value; ?></p>
111
+ </li>
112
+ <?php
113
+ }
114
+ ?>
115
+ </ul>
116
+ <div class="separate"></div>
117
+ <a href="admin.php?page=ccf-saved-form-submissions"><?php _e('View All Submissions', 'custom-contact-forms'); ?></a>
118
+ </div>
119
+ </td>
120
+ </tr>
121
+ <?php
122
+ $i++;
123
+ }
124
+ ?>
125
+ </tbody>
126
+ </table>
127
+ <a href="admin.php?page=ccf-saved-form-submissions"><?php _e('View All Submissions', 'custom-contact-forms'); ?></a>
128
+ <?php
129
+ }
130
+ }
131
+ }
132
  ?>
readme.txt CHANGED
@@ -1,365 +1,378 @@
1
- === Custom Contact Forms ===
2
- Contributors: Taylor Lovett
3
- Donate link: http://www.taylorlovett.com
4
- Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
- Requires at least: 2.8.1
6
- Tested up to: 3.1
7
- Stable tag: 4.5.2.3
8
-
9
- Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
10
-
11
- == Description ==
12
-
13
- Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, captchas, tooltip popovers, unlimited fields/forms/form styles, use a custom thank you page or built-in popover with a custom success message set for each form.
14
-
15
- Special Features:
16
- ------------------
17
- Custom Contact Forms 4.5.0 will revolutionize the idea of a Wordpress plugin.
18
-
19
- * __NEW__ Saved Form Submission dashboard widget!
20
- * __NEW__ - All form submissions saved and displayed in admin panel as well as emailed to you
21
- * __NEW__ - Instantly attach a dropdown with all the countries or all the US States - new fixed fields
22
- * Import and export forms/fields/styles/etc. with ease!
23
- * This plugin can now be translated in to different languages.
24
- * Error messages can be customized for each field
25
- * Choose between XHTML or HTML. All code is clean and valid!
26
- * Create __unlimited__ forms
27
- * Create __unlimited__ fields
28
- * Required Fields
29
- * __NEW__ - a dashboard widget that displays the latest form submissions
30
- * Custom Contact Forms now uses PHPMailer and thus supports STMP and SSL
31
- * __NEW__ Have your contact forms send mail to multiple email addresses
32
- * Create text fields, textareas, checkboxs, and dropdown fields!
33
- * Custom HTML Forms Feature - if you are a web developer you can write your own form html and __use this plugin simply to process your form requests__. Comes with a few useful features.
34
- * __Displays forms in theme files__ as well as pages and posts.
35
- * Set a different destination email address for each form
36
- * Customize every aspect of fields and forms: titles, labels, maxlength, initial value, form action, form method, form style, and much more
37
- * Create checkboxes, textareas, text fields, etc.
38
- * __Captcha__ and __"Are You Human?"__ spam blockers included and easily attached to any form
39
- * Create __custom styles in the style manager__ to change the appearance of your forms: borders, font sizes, colors, padding, margins, background, and more
40
- * You can create unlimited styles to use on as many forms as you want without any knowledge of css or html.
41
- * Show a stylish JQuery form thank you message or use a custom thank you page.
42
- * Custom error pages for when forms are filled out incorrectly
43
- * Option to have forms remember field values for when users hit the back button after an error
44
- * Easily report bugs and suggest new features
45
- * Script in constant development - new version released every week
46
- * Easily process your forms with 3rd party sites like Infusionsoft or Aweber
47
- * Set a __custom thank you page__ for each form or use the built in thank you page popover with a custom thank you message
48
- * No javascript required
49
- * Detailed guide for using the plugin as well as default content to help you understand how to use Custom COntact Forms
50
- * Stylish field tooltips powered by jquery
51
- * Manage options for your dropdowns and radio fields in an easy to use manager
52
- * Popover forms with Jquery (Coming soon!)
53
- * Free unlimited support
54
- * AJAX enabled admin panel
55
- * Assign different CSS classes to each field.
56
- * Ability to disable JQuery if it is conflicting with other plugins.
57
- * Uses UTF8 character set so non-english characters are easily used!
58
-
59
- Restrictions/Requirements:
60
- -------------------------
61
- * Works with Wordpress 2.8.1+, WPMU, and BuddyPress (Wordpress 3.0+ is highly recommended)
62
- * PHP 5
63
- * PHP register_globals and safe_mode should be set to "Off" (this is done in your php.ini file)
64
- * Your theme must call wp_head() and wp_footer()
65
-
66
- == Installation ==
67
- 1. Upload to /wp-content/plugins
68
- 2. Activate the plugin from your Wordpress Admin Panel
69
- 3. Configure the plugin, create fields, and create forms in the Settings page called Custom Contact Forms
70
- 4. Display those forms in posts and pages by inserting the code: __[customcontact form=FORMID]__
71
- 5. In the instruction section of the plugin. Press the button to insert the default content. The default content contains a very generic form that will help you understand the many ways you can use Custom Contact Forms.
72
-
73
- == Configuring and Using the Plugin ==
74
- 1. Create as many forms as you want.
75
- 2. Create fields and attach those fields to the forms of your choice. Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them.
76
- 3. Display those forms in posts and pages by inserting the code: __[customcontact form=FORMID]__. Replace __FORMID__ with the id listed to the left of the form slug next to the form of your choice above. You can also __display forms in theme files__; the code for this is provided within each forms admin section.
77
- 4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot.
78
- 5. Add a form to your sidebar, by dragging the Custom Contact Form reusable widget in to your sidebar.
79
- 6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!
80
- 7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms.
81
- 8. (advanced) If you are confident in your HTML and CSS skills, you can use the Custom HTML Forms feature as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager.
82
-
83
- Custom Contact Forms is an extremely intuitive plugin allowing you to create any type of contact form you can image. CCF is very user friendly but with possibilities comes complexity. __It is recommend that you click the button in the instructions section of the plugin to add default fields, field options, and forms.__ The default content will help you get a feel for the amazing things you can accomplish with this plugin. __It is also recommended you click the "Show Plugin Usage Popover"__ in the instruction area of the admin page to read in detail about all parts of the plugin.
84
-
85
- == Support ==
86
- For questions, feature requests, and support concerning the Custom Contact Forms plugin, please visit:
87
- http://www.taylorlovett.com/wordpress-plugins
88
-
89
- == Frequently Asked Questions ==
90
-
91
- = Something isn't working. Help! =
92
- * First try deactivating and reactivating the plugin
93
- * If that doesn't fix the problem, try deleting and reinstalling the plugin
94
- * If that doesn't work, you should file a bug report.
95
-
96
- = All my fields and field options got detached. What do I do? Will this happen again?
97
- * Custom Contact Forms changed the way fields and field options are attached in version 4.5. It won't happen again. Just reattach everything and continue using the plugin.
98
-
99
- = I don't know where to start. This is really confusing. =
100
- * Read the Plugin Usage Popover; it explains how to use everything in great detail.
101
- * If you don't want to read or learn anything, simply press the "Insert Default Content" button (in the Plugin Usage Popover). This creates a few basic fields and a form. Then just insert the form in a page, post, or theme file.
102
-
103
- = I can't figure out how to insert a form into a page or post. Help! =
104
- * Find the form in the Form Manager, a snippet of code will be displaed that looks like [customcontact form=1]. Replace 1 with the ID for the specific form you want to use and insert the snippet into a page or post. You're done!
105
-
106
- = I'm not receiving any emails =
107
- * Check that the "Email Form Submissions" option is set to yes in General Settings.
108
- * Try filling out a form with the "Use Wordpress Mail Function" option set to "No".
109
- * Make sure the "Default From" email you are using within General Settings actually exists on your server.
110
- * Try deactivating other plugins to make sure there are no conflicts
111
- * If there is still a problem, contact your host. This plugin utilizes existing mail functionality on your server, it doesn't create any new functions. If there is a problem, then it is with Wordpress or your host.
112
-
113
- = When I activate Custom Contact Forms, the Javascript for another plugin or my theme does not work. =
114
- * Disable the "Frontend jQuery" option in General Settings. Custom Contact Forms will still work without JQuery but won't be as pretty.
115
-
116
- = I need even more customization in my forms. What can I do? =
117
- * Use the Custom HTML Forms Feature (see admin panel) which allows you to write the HTML/CSS for each of your forms.
118
-
119
- = The form success popover is not showing up. =
120
- * The form success popover is included in wp_footer. If your theme does not call wp_footer(), it will not work.
121
-
122
- = Certain characters aren't showing up correctly in my emails. =
123
- * First, make sure you are upgraded to the latest version which uses UTF-8
124
- * If that doesn't fix the problem, try using a different mail client. Sometimes mail clients display certain languages poorly.
125
-
126
- == Upgrade Notice ==
127
- We are planning to add popover forms and file attachments soon.
128
-
129
- == Screenshots ==
130
- Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now all the screenshots are from Version 1, thus are quite out-dated. Install the plugin to see what it looks like. You won't regret it. I promise!
131
-
132
- == Changelog ==
133
-
134
- = 4.5.2.2 =
135
- * custom-contact-forms.php - JQuery plugin conflict fixed
136
-
137
- = 4.5.2.1 =
138
- * js/custom-contact-forms-admin-ajax.js - Save image bug fixed
139
- * custom-contact-forms-admin.php - Minor display change
140
-
141
- = 4.5.2 =
142
- * custom-contact-forms.php - Template form display function fixed
143
- * custom-contact-forms-admin.php - jQuery dialog used for plugin usage popover
144
- * modules/db/custom-contact-forms-activate.php - Field options column changed to text
145
- * modules/widgets/custom-contact-forms-dashboard.php - jQuery dialog used for popovers
146
- * modules/widgets/custom-contact-forms-dashboard.css - jQuery dialog used for popovers
147
-
148
- = 4.5.1.2 =
149
- * modules/widgets/custom-contact-forms-widget.php - Widget form display bug fixed
150
-
151
- = 4.5.1.1 =
152
- * custom-contact-forms-admin.php - Display changes, form submissions non-ajax delete fixed
153
-
154
-
155
- = 4.5.1 =
156
- * custom-contact-forms.php - enable_form_access_manager option added and defaulted to disabled
157
- * custom-contact-forms-admin.php - enable_form_access_manager option added and defaulted to disabled
158
- * custom-contact-forms-front.php - enable_form_access_manager option added and defaulted to disabled
159
-
160
- = 4.5.0 =
161
- * custom-contact-forms.php - Saved form submissions manager, form background color added to style manager, import/export feature
162
- * custom-contact-forms-utils.php - Methods added/removed for efficiency
163
- * custom-contact-forms-admin.php - Admin code seperated in to a different file
164
- * custom-contact-forms-front.php - Admin code seperated in to a different file
165
- * modules/db/custom-contact-forms-db.php - DB methods reorganized for efficiency
166
- * modules/db/custom-contact-forms-activate-db.php - DB methods reorganized for efficiency
167
- * modules/db/custom-contact-forms-default-db.php - DB methods reorganized for efficiency
168
- * modules/usage-popover/custom-contact-forms-popover.php - Popover code seperated in to a different file
169
- * modules/export/custom-contact-forms-export.php - Functions for importing and exporting
170
- * modules/extra_fields/countries_field.php
171
- * modules/extra_fields/date_field.php
172
- * modules/extra_fields/states_field.php
173
- * modules/widget/custom-contact-forms-dashboard.php
174
- * css/custom-contact-forms-admin.css - AJAX abilities added
175
- * css/custom-contact-forms-standard.css - Classes renamed
176
- * css/custom-contact-forms.css - Classes renamed
177
- * css/custom-contact-forms-dashboard.css - Classes renamed
178
- * js/custom-contact-forms-dashboard.js - AJAX abilities added to admin panel
179
- * lang/custom-contact-forms.po - Allows for translation to different languages
180
- * lang/custom-contact-forms.mo - Allows for translation to different languages
181
-
182
- = 4.0.9.2 =
183
- * css/custom-contact-forms-admin.css - Minor display changes
184
- * js/custom-contact-forms.js - JQuery conflict issue fixed
185
-
186
- = 4.0.9.1 =
187
- * custom-contact-forms-admin.php - Minor display changes
188
- * css/custom-contact-forms-admin.css - Minor display changes to field options
189
-
190
- = 4.0.9 =
191
- * js/custom-contact-forms.js - JQuery conflict issue fixed
192
- * js/custom-contact-forms-admin.js - JQuery conflict issue fixed
193
- * js/custom-contact-forms-admin-inc.js - JQuery conflict issue fixed
194
- * js/custom-contact-forms-admin-ajax.js - JQuery conflict issue fixed
195
- * custom-contact-forms-admin.php - JQuery conflict issue fixed
196
- * custom-contact-forms-front.php - Unnecessary JQuery dependencies removed
197
-
198
- = 4.0.8.1 =
199
- * custom-contact-forms-admin.php - Email charset set to UTF-8
200
- * css/custom-contact-forms-admin.css - Usage Popover z-index set to 10000 and Usage button styled.
201
- * custom-contact-forms-front.php - Email charset set to UTF-8
202
-
203
- = 4.0.8 =
204
- * custom-contact-forms-admin.php - Admin panel updated, WP_PLUGIN_URL to plugins_url()
205
- * custom-contact-forms-front.php - WP_PLUGIN_URL to plugins_url()
206
-
207
- = 4.0.7 =
208
- * custom-contact-forms-admin.php - Admin panel updated
209
-
210
- = 4.0.6 =
211
- * modules/widgets/custom-contact-forms-widget.php - Form title added via widget
212
-
213
- = 4.0.5 =
214
- * modules/db/custom-contact-forms-db.php - Form email cutoff bug fixed
215
-
216
- = 4.0.4 =
217
- * custom-contact-forms-admin.php - Bug reporting mail error fixed
218
-
219
- = 4.0.3 =
220
- * custom-contact-forms-front.php - PHPMailer bug fixed, form redirect fixed
221
- * custom-contact-forms-static.php - Form redirect function added
222
- * custom-contact-forms-admin.php - redirects fixed, phpmailer bug fixed
223
- * widget/phpmailer - deleted
224
- * widget/db/custom-contact-forms-db.php - table charsets changed to UTF8
225
-
226
- = 4.0.2 =
227
- * custom-contact-forms-front.php - Field instructions bug fixed
228
- * custom-contact-forms-admin.php - Display change
229
-
230
- = 4.0.1 =
231
- * custom-contact-forms.php
232
- * custom-contact-forms-admin.php - support for multiple form destination emails added
233
- * custom-contact-forms-front.php - Mail bug fixed, email validation bug fixed
234
- * lang/custom-contact-forms.php - Phrases deleted/added
235
-
236
-
237
- = 4.0.0 =
238
- * custom-contact-forms.php - Saved form submissions manager, form background color added to style manager, import/export feature
239
- * custom-contact-forms-user-data.php - Saved form submission
240
- * custom-contact-forms-db.php - DB methods reorganized for efficiency
241
- * custom-contact-forms-static.php - Methods added/removed for efficiency
242
- * custom-contact-forms-admin.php - Admin code seperated in to a different file
243
- * custom-contact-forms-popover.php - Popover code seperated in to a different file
244
- * custom-contact-forms-export.php - Functions for importing and exporting
245
- * css/custom-contact-forms-admin.css - AJAX abilities added
246
- * css/custom-contact-forms-standard.css - Classes renamed
247
- * js/custom-contact-forms-admin.js - AJAX abilities added to admin panel
248
- * download.php - Allows export file to be downloaded
249
- * lang/custom-contact-forms.po - Allows for translation to different languages
250
- * lang/custom-contact-forms.mo - Allows for translation to different languages
251
-
252
- = 3.5.5 =
253
- * custom-contact-forms.php - Plugin usage popover reworded
254
- * css/custom-contact-forms-admin.css - Admin panel display problem fixed
255
-
256
- = 3.5.4 =
257
- * custom-contact-forms.php - custom thank you redirect fix
258
- * custom-contact-forms-db.php - Style insert bug fixed, Unexpected header output bug fixed
259
-
260
- = 3.5.3 =
261
- * custom-contact-forms.php - Style popover height option added to style manager. Form title heading not shown if left blank.
262
- * custom-contact-forms-db.php - New success popover height column added to styles table
263
-
264
- = 3.5.2 =
265
- * custom-contact-forms.php - Plugin Usage popover added, insert default content button
266
- * custom-contact-forms-db.php - Insert default content function
267
-
268
- = 3.5.1 =
269
- * custom-contact-forms.php - Style options added, color picker added, success popover styling bugs fixed
270
- * custom-contact-forms-db.php - Style format changed, new style fields added to tables
271
- * Lots of javascript files
272
- * Lots of images for the colorpicker
273
-
274
- = 3.5.0 =
275
- * custom-contact-forms.php - Radio and dropdowns added via the field option manager
276
- * custom-contact-forms-mailer.php - Email body changed
277
- * custom-contact-forms-db.php - Field option methods added
278
- * custom-contact-forms.css - Form styles reorganized, file removed
279
- * css/custom-contact-forms.css - Form styles reorganized
280
- * css/custom-contact-forms-standards.css - Form styles reorganized
281
- * css/custom-contact-forms-admin.css - Form styles reorganized
282
-
283
- = 3.1.0 =
284
- * custom-contact-forms.php - Success message title, disable jquery, choose between xhmtl and html, and more
285
- * custom-contact-forms-db.php - Success message title added
286
- * custom-contact-forms.css - Form styles rewritten
287
-
288
- = 3.0.2 =
289
- * custom-contact-forms.php - Bugs fixed
290
-
291
- = 3.0.1 =
292
- * custom-contact-forms.php - Php tags added to theme form display code
293
-
294
- = 3.0.0 =
295
- * custom-contact-forms.php - Required fields, admin panel changed, style manager bugs fixed, custom html feature added, much more
296
- * custom-contact-forms-db.php - New functions added and old ones fixed
297
- * custom-contact-forms.css - New styles added and old ones modified
298
-
299
- = 2.2.5 =
300
- * custom-contact-forms.php - Fixed field insert bug fixed
301
-
302
- = 2.2.4 =
303
- * custom-contact-forms.php - Textarea field instruction bug fixed
304
-
305
- = 2.2.3 =
306
- * custom-contact-forms.php - Remember fields bug fixed, init rearranged, field instructions
307
- * custom-contact-forms.css
308
- * custom-contact-forms-db.php
309
-
310
- = 2.2.0 =
311
- * custom-contact-forms.php - Plugin nav, hide plugin author link, bug reporting, suggest a feature
312
- * custom-contact-forms.css - New styles added and style bugs fixed
313
-
314
- = 2.1.0 =
315
- * custom-contact-forms.php - New fixed field added, plugin news, bug fixes
316
- * custom-contact-forms.css - New styles added and style bugs fixed
317
- * custom-contact-forms-db.php - New fixed field added
318
-
319
- = 2.0.3 =
320
- * custom-contact-forms.php - custom style checkbox display:block error fixed
321
- * custom-contact-forms.css - li's converted to p's
322
-
323
- = 2.0.2 =
324
- * custom-contact-forms.php - Form li's changed to p's
325
- * images/ - folder readded to correct captcha error
326
-
327
- = 2.0.1 =
328
- * custom-contact-forms.php - Duplicate form slug bug fixed, default style values added, stripslahses on form messages
329
- * custom-contact-forms-db.php - default style values added
330
-
331
- = 2.0.0 =
332
- * custom-contact-forms.php - Style manager added
333
- * custom-contact-forms.css - style manager styles added
334
- * custom-contact-forms-db.php - Style manager db functions added
335
-
336
- = 1.2.1 =
337
- * custom-contact-forms.php - Upgrade options changed
338
- * custom-contact-forms-css.php - CSS bug corrected
339
-
340
- = 1.2.0 =
341
- * custom-contact-forms.php - Option to update to Custom Contact Forms Pro
342
-
343
- = 1.1.3 =
344
- * custom-contact-forms.php - Captcha label bug fixed
345
- * custom-contact-forms-db.php - Default captcha label changed
346
-
347
- = 1.1.2 =
348
- * custom-contact-forms-db.php - create_tables function edited to work for Wordpress MU due to error in wp-admin/includes/upgrade.php
349
-
350
- = 1.1.1 =
351
- * custom-contact-forms.css - Label styles changed
352
- * custom-contact-forms.php - Admin option added to remember field values
353
-
354
- = 1.1.0 =
355
- * custom-contact-forms-db.php - Table upgrade functions added
356
- * custom-contact-forms.php - New functions for error handling and captcha
357
- * custom-contact-forms.css - Forms restyled
358
- * custom-contact-forms-images.php - Image handling class added
359
- * image.php, images/ - Image for captcha displaying
360
-
361
- = 1.0.1 =
362
- * custom-contact-forms.css - Form style changes
363
-
364
- = 1.0.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
365
  * Plugin Release
1
+ === Custom Contact Forms ===
2
+ Contributors: Taylor Lovett
3
+ Donate link: http://www.taylorlovett.com
4
+ Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
+ Requires at least: 2.8.1
6
+ Tested up to: 3.1.2
7
+ Stable tag: 4.5.3.0
8
+
9
+ Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
10
+
11
+ == Description ==
12
+
13
+ Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, captchas, tooltip popovers, unlimited fields/forms/form styles, use a custom thank you page or built-in popover with a custom success message set for each form.
14
+
15
+ Special Features:
16
+ ------------------
17
+ Custom Contact Forms 4.5.3 will revolutionize the idea of a Wordpress plugin.
18
+
19
+ * __NEW__ Saved Form Submission dashboard widget!
20
+ * __NEW__ - All form submissions saved and displayed in admin panel as well as emailed to you
21
+ * __NEW__ - Instantly attach a dropdown with all the countries or all the US States - new fixed fields
22
+ * Import and export forms/fields/styles/etc. with ease!
23
+ * This plugin can now be translated in to different languages.
24
+ * Error messages can be customized for each field
25
+ * Choose between XHTML or HTML. All code is clean and valid!
26
+ * Create __unlimited__ forms
27
+ * Create __unlimited__ fields
28
+ * Required Fields
29
+ * __NEW__ - a dashboard widget that displays the latest form submissions
30
+ * Custom Contact Forms now uses PHPMailer and thus supports STMP and SSL
31
+ * __NEW__ Have your contact forms send mail to multiple email addresses
32
+ * Create text fields, textareas, checkboxs, and dropdown fields!
33
+ * Custom HTML Forms Feature - if you are a web developer you can write your own form html and __use this plugin simply to process your form requests__. Comes with a few useful features.
34
+ * __Displays forms in theme files__ as well as pages and posts.
35
+ * Set a different destination email address for each form
36
+ * Customize every aspect of fields and forms: titles, labels, maxlength, initial value, form action, form method, form style, and much more
37
+ * Create checkboxes, textareas, text fields, etc.
38
+ * __Captcha__ and __"Are You Human?"__ spam blockers included and easily attached to any form
39
+ * Create __custom styles in the style manager__ to change the appearance of your forms: borders, font sizes, colors, padding, margins, background, and more
40
+ * You can create unlimited styles to use on as many forms as you want without any knowledge of css or html.
41
+ * Show a stylish JQuery form thank you message or use a custom thank you page.
42
+ * Custom error pages for when forms are filled out incorrectly
43
+ * Option to have forms remember field values for when users hit the back button after an error
44
+ * Easily report bugs and suggest new features
45
+ * Script in constant development - new version released every week
46
+ * Easily process your forms with 3rd party sites like Infusionsoft or Aweber
47
+ * Set a __custom thank you page__ for each form or use the built in thank you page popover with a custom thank you message
48
+ * No javascript required
49
+ * Detailed guide for using the plugin as well as default content to help you understand how to use Custom COntact Forms
50
+ * Stylish field tooltips powered by jquery
51
+ * Manage options for your dropdowns and radio fields in an easy to use manager
52
+ * Popover forms with Jquery (Coming soon!)
53
+ * Free unlimited support
54
+ * AJAX enabled admin panel
55
+ * Assign different CSS classes to each field.
56
+ * Ability to disable JQuery if it is conflicting with other plugins.
57
+ * Uses UTF8 character set so non-english characters are easily used!
58
+
59
+ Restrictions/Requirements:
60
+ -------------------------
61
+ * Works with Wordpress 2.8.1+, WPMU, and BuddyPress (Wordpress 3.0+ is highly recommended)
62
+ * PHP 5
63
+ * PHP register_globals and safe_mode should be set to "Off" (this is done in your php.ini file)
64
+ * Your theme must call wp_head() and wp_footer()
65
+
66
+ == Installation ==
67
+ 1. Upload to /wp-content/plugins
68
+ 2. Activate the plugin from your Wordpress Admin Panel
69
+ 3. Configure the plugin, create fields, and create forms in the Settings page called Custom Contact Forms
70
+ 4. Display those forms in posts and pages by inserting the code: __[customcontact form=FORMID]__
71
+ 5. In the instruction section of the plugin. Press the button to insert the default content. The default content contains a very generic form that will help you understand the many ways you can use Custom Contact Forms.
72
+
73
+ == Configuring and Using the Plugin ==
74
+ 1. Create as many forms as you want.
75
+ 2. Create fields and attach those fields to the forms of your choice. Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them.
76
+ 3. Display those forms in posts and pages by inserting the code: __[customcontact form=FORMID]__. Replace __FORMID__ with the id listed to the left of the form slug next to the form of your choice above. You can also __display forms in theme files__; the code for this is provided within each forms admin section.
77
+ 4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot.
78
+ 5. Add a form to your sidebar, by dragging the Custom Contact Form reusable widget in to your sidebar.
79
+ 6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!
80
+ 7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms.
81
+ 8. (advanced) If you are confident in your HTML and CSS skills, you can use the Custom HTML Forms feature as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager.
82
+
83
+ Custom Contact Forms is an extremely intuitive plugin allowing you to create any type of contact form you can image. CCF is very user friendly but with possibilities comes complexity. __It is recommend that you click the button in the instructions section of the plugin to add default fields, field options, and forms.__ The default content will help you get a feel for the amazing things you can accomplish with this plugin. __It is also recommended you click the "Show Plugin Usage Popover"__ in the instruction area of the admin page to read in detail about all parts of the plugin.
84
+
85
+ == Support ==
86
+ For questions, feature requests, and support concerning the Custom Contact Forms plugin, please visit:
87
+ http://www.taylorlovett.com/wordpress-plugins
88
+
89
+ == Frequently Asked Questions ==
90
+
91
+ = Something isn't working. Help! =
92
+ * First try deactivating and reactivating the plugin
93
+ * If that doesn't fix the problem, try deleting and reinstalling the plugin
94
+ * If that doesn't work, you should file a bug report.
95
+
96
+ = When I try to do something in the admin panel, all I get is a new page with a -1. =
97
+ * This is a bug we are currently trying to fix that usually happens in Internet Explorer 8. If you are having this problem, please try using Firefox.
98
+
99
+ = All my fields and field options got detached. What do I do? Will this happen again?
100
+ * Custom Contact Forms changed the way fields and field options are attached in version 4.5. It won't happen again. Just reattach everything and continue using the plugin.
101
+
102
+ = I don't know where to start. This is really confusing. =
103
+ * Read the Plugin Usage Popover; it explains how to use everything in great detail.
104
+ * If you don't want to read or learn anything, simply press the "Insert Default Content" button (in the Plugin Usage Popover). This creates a few basic fields and a form. Then just insert the form in a page, post, or theme file.
105
+
106
+ = I can't figure out how to insert a form into a page or post. Help! =
107
+ * Find the form in the Form Manager, a snippet of code will be displaed that looks like [customcontact form=1]. Replace 1 with the ID for the specific form you want to use and insert the snippet into a page or post. You're done!
108
+
109
+ = I'm not receiving any emails =
110
+ * Check that the "Email Form Submissions" option is set to yes in General Settings.
111
+ * Try filling out a form with the "Use Wordpress Mail Function" option set to "No".
112
+ * Make sure the "Default From" email you are using within General Settings actually exists on your server.
113
+ * Try deactivating other plugins to make sure there are no conflicts
114
+ * If there is still a problem, contact your host. This plugin utilizes existing mail functionality on your server, it doesn't create any new functions. If there is a problem, then it is with Wordpress or your host.
115
+
116
+ = When I activate Custom Contact Forms, the Javascript for another plugin or my theme does not work. =
117
+ * Disable the "Frontend jQuery" option in General Settings. Custom Contact Forms will still work without JQuery but won't be as pretty.
118
+
119
+ = I need even more customization in my forms. What can I do? =
120
+ * Use the Custom HTML Forms Feature (see admin panel) which allows you to write the HTML/CSS for each of your forms.
121
+
122
+ = The form success popover is not showing up. =
123
+ * The form success popover is included in wp_footer. If your theme does not call wp_footer(), it will not work.
124
+
125
+ = Certain characters aren't showing up correctly in my emails. =
126
+ * First, make sure you are upgraded to the latest version which uses UTF-8
127
+ * If that doesn't fix the problem, try using a different mail client. Sometimes mail clients display certain languages poorly.
128
+
129
+ == Upgrade Notice ==
130
+ We are planning to add popover forms and file attachments soon.
131
+
132
+ == Screenshots ==
133
+ Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now all the screenshots are from Version 1, thus are quite out-dated. Install the plugin to see what it looks like. You won't regret it. I promise!
134
+
135
+ == Changelog ==
136
+
137
+ = 4.5.3.0 =
138
+ * custom-contact-forms-admin.php - Dashboard widget security bug fixed. Now you can limit which users can see the dashboard widget. Also a quick start guide has been added.
139
+ * custom-contact-forms.php - Dashboard widget security bug fixed.
140
+ * modules/widgets/custom-contact-forms-dashboard.php - Dashboard widget security bug fixed. Now you can limit which users can see the dashboard widget.
141
+ * modules/usage_popover/custom-contact-forms-usage-popover.php - Minor display changes made
142
+ * modules/usage_popover/custom-contact-forms-quick-start-popover.php - Minor display changes made
143
+ * js/custom-contact-forms-admin.js - Quick start guide added
144
+ * css/custom-contact-forms-admin.css - Quick start guide added
145
+
146
+
147
+ = 4.5.2.2 =
148
+ * custom-contact-forms.php - JQuery plugin conflict fixed
149
+
150
+ = 4.5.2.1 =
151
+ * js/custom-contact-forms-admin-ajax.js - Save image bug fixed
152
+ * custom-contact-forms-admin.php - Minor display change
153
+
154
+ = 4.5.2 =
155
+ * custom-contact-forms.php - Template form display function fixed
156
+ * custom-contact-forms-admin.php - jQuery dialog used for plugin usage popover
157
+ * modules/db/custom-contact-forms-activate.php - Field options column changed to text
158
+ * modules/widgets/custom-contact-forms-dashboard.php - jQuery dialog used for popovers
159
+ * modules/widgets/custom-contact-forms-dashboard.css - jQuery dialog used for popovers
160
+
161
+ = 4.5.1.2 =
162
+ * modules/widgets/custom-contact-forms-widget.php - Widget form display bug fixed
163
+
164
+ = 4.5.1.1 =
165
+ * custom-contact-forms-admin.php - Display changes, form submissions non-ajax delete fixed
166
+
167
+
168
+ = 4.5.1 =
169
+ * custom-contact-forms.php - enable_form_access_manager option added and defaulted to disabled
170
+ * custom-contact-forms-admin.php - enable_form_access_manager option added and defaulted to disabled
171
+ * custom-contact-forms-front.php - enable_form_access_manager option added and defaulted to disabled
172
+
173
+ = 4.5.0 =
174
+ * custom-contact-forms.php - Saved form submissions manager, form background color added to style manager, import/export feature
175
+ * custom-contact-forms-utils.php - Methods added/removed for efficiency
176
+ * custom-contact-forms-admin.php - Admin code seperated in to a different file
177
+ * custom-contact-forms-front.php - Admin code seperated in to a different file
178
+ * modules/db/custom-contact-forms-db.php - DB methods reorganized for efficiency
179
+ * modules/db/custom-contact-forms-activate-db.php - DB methods reorganized for efficiency
180
+ * modules/db/custom-contact-forms-default-db.php - DB methods reorganized for efficiency
181
+ * modules/usage-popover/custom-contact-forms-popover.php - Popover code seperated in to a different file
182
+ * modules/export/custom-contact-forms-export.php - Functions for importing and exporting
183
+ * modules/extra_fields/countries_field.php
184
+ * modules/extra_fields/date_field.php
185
+ * modules/extra_fields/states_field.php
186
+ * modules/widget/custom-contact-forms-dashboard.php
187
+ * css/custom-contact-forms-admin.css - AJAX abilities added
188
+ * css/custom-contact-forms-standard.css - Classes renamed
189
+ * css/custom-contact-forms.css - Classes renamed
190
+ * css/custom-contact-forms-dashboard.css - Classes renamed
191
+ * js/custom-contact-forms-dashboard.js - AJAX abilities added to admin panel
192
+ * lang/custom-contact-forms.po - Allows for translation to different languages
193
+ * lang/custom-contact-forms.mo - Allows for translation to different languages
194
+
195
+ = 4.0.9.2 =
196
+ * css/custom-contact-forms-admin.css - Minor display changes
197
+ * js/custom-contact-forms.js - JQuery conflict issue fixed
198
+
199
+ = 4.0.9.1 =
200
+ * custom-contact-forms-admin.php - Minor display changes
201
+ * css/custom-contact-forms-admin.css - Minor display changes to field options
202
+
203
+ = 4.0.9 =
204
+ * js/custom-contact-forms.js - JQuery conflict issue fixed
205
+ * js/custom-contact-forms-admin.js - JQuery conflict issue fixed
206
+ * js/custom-contact-forms-admin-inc.js - JQuery conflict issue fixed
207
+ * js/custom-contact-forms-admin-ajax.js - JQuery conflict issue fixed
208
+ * custom-contact-forms-admin.php - JQuery conflict issue fixed
209
+ * custom-contact-forms-front.php - Unnecessary JQuery dependencies removed
210
+
211
+ = 4.0.8.1 =
212
+ * custom-contact-forms-admin.php - Email charset set to UTF-8
213
+ * css/custom-contact-forms-admin.css - Usage Popover z-index set to 10000 and Usage button styled.
214
+ * custom-contact-forms-front.php - Email charset set to UTF-8
215
+
216
+ = 4.0.8 =
217
+ * custom-contact-forms-admin.php - Admin panel updated, WP_PLUGIN_URL to plugins_url()
218
+ * custom-contact-forms-front.php - WP_PLUGIN_URL to plugins_url()
219
+
220
+ = 4.0.7 =
221
+ * custom-contact-forms-admin.php - Admin panel updated
222
+
223
+ = 4.0.6 =
224
+ * modules/widgets/custom-contact-forms-widget.php - Form title added via widget
225
+
226
+ = 4.0.5 =
227
+ * modules/db/custom-contact-forms-db.php - Form email cutoff bug fixed
228
+
229
+ = 4.0.4 =
230
+ * custom-contact-forms-admin.php - Bug reporting mail error fixed
231
+
232
+ = 4.0.3 =
233
+ * custom-contact-forms-front.php - PHPMailer bug fixed, form redirect fixed
234
+ * custom-contact-forms-static.php - Form redirect function added
235
+ * custom-contact-forms-admin.php - redirects fixed, phpmailer bug fixed
236
+ * widget/phpmailer - deleted
237
+ * widget/db/custom-contact-forms-db.php - table charsets changed to UTF8
238
+
239
+ = 4.0.2 =
240
+ * custom-contact-forms-front.php - Field instructions bug fixed
241
+ * custom-contact-forms-admin.php - Display change
242
+
243
+ = 4.0.1 =
244
+ * custom-contact-forms.php
245
+ * custom-contact-forms-admin.php - support for multiple form destination emails added
246
+ * custom-contact-forms-front.php - Mail bug fixed, email validation bug fixed
247
+ * lang/custom-contact-forms.php - Phrases deleted/added
248
+
249
+
250
+ = 4.0.0 =
251
+ * custom-contact-forms.php - Saved form submissions manager, form background color added to style manager, import/export feature
252
+ * custom-contact-forms-user-data.php - Saved form submission
253
+ * custom-contact-forms-db.php - DB methods reorganized for efficiency
254
+ * custom-contact-forms-static.php - Methods added/removed for efficiency
255
+ * custom-contact-forms-admin.php - Admin code seperated in to a different file
256
+ * custom-contact-forms-popover.php - Popover code seperated in to a different file
257
+ * custom-contact-forms-export.php - Functions for importing and exporting
258
+ * css/custom-contact-forms-admin.css - AJAX abilities added
259
+ * css/custom-contact-forms-standard.css - Classes renamed
260
+ * js/custom-contact-forms-admin.js - AJAX abilities added to admin panel
261
+ * download.php - Allows export file to be downloaded
262
+ * lang/custom-contact-forms.po - Allows for translation to different languages
263
+ * lang/custom-contact-forms.mo - Allows for translation to different languages
264
+
265
+ = 3.5.5 =
266
+ * custom-contact-forms.php - Plugin usage popover reworded
267
+ * css/custom-contact-forms-admin.css - Admin panel display problem fixed
268
+
269
+ = 3.5.4 =
270
+ * custom-contact-forms.php - custom thank you redirect fix
271
+ * custom-contact-forms-db.php - Style insert bug fixed, Unexpected header output bug fixed
272
+
273
+ = 3.5.3 =
274
+ * custom-contact-forms.php - Style popover height option added to style manager. Form title heading not shown if left blank.
275
+ * custom-contact-forms-db.php - New success popover height column added to styles table
276
+
277
+ = 3.5.2 =
278
+ * custom-contact-forms.php - Plugin Usage popover added, insert default content button
279
+ * custom-contact-forms-db.php - Insert default content function
280
+
281
+ = 3.5.1 =
282
+ * custom-contact-forms.php - Style options added, color picker added, success popover styling bugs fixed
283
+ * custom-contact-forms-db.php - Style format changed, new style fields added to tables
284
+ * Lots of javascript files
285
+ * Lots of images for the colorpicker
286
+
287
+ = 3.5.0 =
288
+ * custom-contact-forms.php - Radio and dropdowns added via the field option manager
289
+ * custom-contact-forms-mailer.php - Email body changed
290
+ * custom-contact-forms-db.php - Field option methods added
291
+ * custom-contact-forms.css - Form styles reorganized, file removed
292
+ * css/custom-contact-forms.css - Form styles reorganized
293
+ * css/custom-contact-forms-standards.css - Form styles reorganized
294
+ * css/custom-contact-forms-admin.css - Form styles reorganized
295
+
296
+ = 3.1.0 =
297
+ * custom-contact-forms.php - Success message title, disable jquery, choose between xhmtl and html, and more
298
+ * custom-contact-forms-db.php - Success message title added
299
+ * custom-contact-forms.css - Form styles rewritten
300
+
301
+ = 3.0.2 =
302
+ * custom-contact-forms.php - Bugs fixed
303
+
304
+ = 3.0.1 =
305
+ * custom-contact-forms.php - Php tags added to theme form display code
306
+
307
+ = 3.0.0 =
308
+ * custom-contact-forms.php - Required fields, admin panel changed, style manager bugs fixed, custom html feature added, much more
309
+ * custom-contact-forms-db.php - New functions added and old ones fixed
310
+ * custom-contact-forms.css - New styles added and old ones modified
311
+
312
+ = 2.2.5 =
313
+ * custom-contact-forms.php - Fixed field insert bug fixed
314
+
315
+ = 2.2.4 =
316
+ * custom-contact-forms.php - Textarea field instruction bug fixed
317
+
318
+ = 2.2.3 =
319
+ * custom-contact-forms.php - Remember fields bug fixed, init rearranged, field instructions
320
+ * custom-contact-forms.css
321
+ * custom-contact-forms-db.php
322
+
323
+ = 2.2.0 =
324
+ * custom-contact-forms.php - Plugin nav, hide plugin author link, bug reporting, suggest a feature
325
+ * custom-contact-forms.css - New styles added and style bugs fixed
326
+
327
+ = 2.1.0 =
328
+ * custom-contact-forms.php - New fixed field added, plugin news, bug fixes
329
+ * custom-contact-forms.css - New styles added and style bugs fixed
330
+ * custom-contact-forms-db.php - New fixed field added
331
+
332
+ = 2.0.3 =
333
+ * custom-contact-forms.php - custom style checkbox display:block error fixed
334
+ * custom-contact-forms.css - li's converted to p's
335
+
336
+ = 2.0.2 =
337
+ * custom-contact-forms.php - Form li's changed to p's
338
+ * images/ - folder readded to correct captcha error
339
+
340
+ = 2.0.1 =
341
+ * custom-contact-forms.php - Duplicate form slug bug fixed, default style values added, stripslahses on form messages
342
+ * custom-contact-forms-db.php - default style values added
343
+
344
+ = 2.0.0 =
345
+ * custom-contact-forms.php - Style manager added
346
+ * custom-contact-forms.css - style manager styles added
347
+ * custom-contact-forms-db.php - Style manager db functions added
348
+
349
+ = 1.2.1 =
350
+ * custom-contact-forms.php - Upgrade options changed
351
+ * custom-contact-forms-css.php - CSS bug corrected
352
+
353
+ = 1.2.0 =
354
+ * custom-contact-forms.php - Option to update to Custom Contact Forms Pro
355
+
356
+ = 1.1.3 =
357
+ * custom-contact-forms.php - Captcha label bug fixed
358
+ * custom-contact-forms-db.php - Default captcha label changed
359
+
360
+ = 1.1.2 =
361
+ * custom-contact-forms-db.php - create_tables function edited to work for Wordpress MU due to error in wp-admin/includes/upgrade.php
362
+
363
+ = 1.1.1 =
364
+ * custom-contact-forms.css - Label styles changed
365
+ * custom-contact-forms.php - Admin option added to remember field values
366
+
367
+ = 1.1.0 =
368
+ * custom-contact-forms-db.php - Table upgrade functions added
369
+ * custom-contact-forms.php - New functions for error handling and captcha
370
+ * custom-contact-forms.css - Forms restyled
371
+ * custom-contact-forms-images.php - Image handling class added
372
+ * image.php, images/ - Image for captcha displaying
373
+
374
+ = 1.0.1 =
375
+ * custom-contact-forms.css - Form style changes
376
+
377
+ = 1.0.0 =
378
  * Plugin Release