Form Maker by WD – user-friendly drag & drop Form Builder plugin - Version 1.12.28

Version Description

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Form Maker by WD – user-friendly drag & drop Form Builder plugin
Version 1.12.28
Comparing to
See all releases

Code changes from version 1.12.27 to 1.12.28

Files changed (84) hide show
  1. WDFM.php +8 -0
  2. admin/controllers/Addons_fm.php +53 -53
  3. admin/controllers/Blocked_ips_fm.php +30 -30
  4. admin/controllers/Checkpaypal.php +29 -29
  5. admin/controllers/FMShortocde.php +4 -4
  6. admin/controllers/FormMakerEditCountryinPopup.php +3 -3
  7. admin/controllers/FormMakerIpinfoinPopup.php +4 -4
  8. admin/controllers/FormMakerMapEditinPopup.php +5 -5
  9. admin/controllers/FormMakerSQLMapping.php +7 -7
  10. admin/controllers/FormMakerSubmits.php +3 -3
  11. admin/controllers/Formmakerwdcaptcha.php +2 -2
  12. admin/controllers/Formmakerwdmathcaptcha.php +2 -2
  13. admin/controllers/Generete_csv.php +4 -4
  14. admin/controllers/Generete_xml.php +2 -2
  15. admin/controllers/Manage_fm.php +182 -174
  16. admin/controllers/Options_fm.php +9 -9
  17. admin/controllers/Paypal_info.php +4 -4
  18. admin/controllers/Pricing_fm.php +6 -6
  19. admin/controllers/Product_option.php +5 -5
  20. admin/controllers/Select_data_from_db.php +9 -9
  21. admin/controllers/Show_matrix.php +2 -2
  22. admin/controllers/Submissions_fm.php +34 -34
  23. admin/controllers/Themes_fm.php +470 -470
  24. admin/controllers/Uninstall_fm.php +8 -8
  25. admin/controllers/Widget.php +15 -10
  26. admin/controllers/controller.php +10 -0
  27. admin/models/Blocked_ips_fm.php +4 -4
  28. admin/models/Checkpaypal.php +1 -1
  29. admin/models/FMPaypalInfo.php +1 -1
  30. admin/models/FMSelectDataFromDb.php +12 -12
  31. admin/models/FMShortocde.php +2 -2
  32. admin/models/FMSqlMapping.php +13 -13
  33. admin/models/FormMakerSubmits.php +1 -1
  34. admin/models/Manage_fm.php +23 -23
  35. admin/models/Options_fm.php +6 -6
  36. admin/models/Submissions_fm.php +6 -6
  37. admin/models/Themes_fm.php +1 -1
  38. admin/models/Uninstall_fm.php +5 -5
  39. admin/models/Widget.php +7 -2
  40. admin/models/model.php +10 -0
  41. admin/views/Addons_fm.php +12 -12
  42. admin/views/Blocked_ips_fm.php +17 -17
  43. admin/views/Checkpaypal.php +19 -19
  44. admin/views/FMCaptcha.php +3 -3
  45. admin/views/FMEditCountryinPopup.php +5 -5
  46. admin/views/FMIpinfoinPopup.php +8 -8
  47. admin/views/FMMapEditinPopup.php +5 -5
  48. admin/views/FMMathCaptcha.php +3 -3
  49. admin/views/FMPaypalInfo.php +1 -1
  50. admin/views/FMProductOption.php +4 -4
  51. admin/views/FMSelectDataFromDb.php +9 -9
  52. admin/views/FMShortocde.php +38 -38
  53. admin/views/FMShowMatrix.php +1 -1
  54. admin/views/FMSqlMapping.php +21 -21
  55. admin/views/FormMakerSubmits.php +1 -1
  56. admin/views/Manage_fm.php +450 -450
  57. admin/views/Options_fm.php +24 -24
  58. admin/views/Pricing_fm.php +68 -68
  59. admin/views/Submissions_fm.php +127 -127
  60. admin/views/Themes_fm.php +63 -63
  61. admin/views/Uninstall_fm.php +16 -16
  62. admin/views/view.php +64 -60
  63. css/form_maker_tables.css +6 -3
  64. form-maker.php +176 -129
  65. form_maker_insert.php +13 -7
  66. framework/WDW_FM_Library.php +315 -290
  67. frontend/controllers/form_maker.php +9 -4
  68. frontend/controllers/verify_email.php +9 -4
  69. frontend/models/form_maker.php +95 -95
  70. frontend/models/verify_email.php +9 -4
  71. frontend/views/form_maker.php +66 -58
  72. frontend/views/verify_email.php +6 -1
  73. js/form_maker_admin.js +1 -1
  74. js/main_div_front_end.js +5 -0
  75. readme.txt +7 -1
  76. wd/README.md +1 -1
  77. wd/assets/css/deactivate_popup.css +22 -1
  78. wd/assets/js/deactivate_popup.js +62 -10
  79. wd/config.php +5 -1
  80. wd/includes/overview.php +3 -0
  81. wd/templates/display_deactivation_popup.php +3 -2
  82. wd/templates/display_overview_support.php +18 -2
  83. wd/templates/display_subscribe.php +4 -1
  84. wd/wd.php +1 -1
WDFM.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function WDFM( $version = 0 ) {
4
+ if ( $version == 2 ) {
5
+ return WDCFM::instance();
6
+ }
7
+ return WDFM::instance();
8
+ }
admin/controllers/Addons_fm.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Class FMControllerAddons_fm
4
  */
5
- class FMControllerAddons_fm {
6
  /**
7
  * @var $model
8
  */
@@ -17,13 +17,13 @@ class FMControllerAddons_fm {
17
  private $page;
18
 
19
  public function __construct() {
20
- $this->page = WDW_FM_Library::get('page');
21
  $this->page_url = add_query_arg( array (
22
  'page' => $this->page,
23
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
24
  ), admin_url('admin.php')
25
  );
26
- require_once WDFM()->plugin_dir . "/admin/views/Addons_fm.php";
27
  $this->view = new FMViewAddons_fm();
28
  }
29
 
@@ -31,8 +31,8 @@ class FMControllerAddons_fm {
31
  * Execute.
32
  */
33
  public function execute() {
34
- $task = WDW_FM_Library::get('task');
35
- $id = (int) WDW_FM_Library::get('current_id', 0);
36
  if (method_exists($this, $task)) {
37
  $this->$task($id);
38
  }
@@ -52,101 +52,101 @@ class FMControllerAddons_fm {
52
  $params['addons'] = array(
53
  'Form Maker Add-ons' => array(
54
  'imp_exp' => array(
55
- 'pro' => false,
56
  'dir' => 'form-maker-export-import/fm_exp_imp.php',
57
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
58
- 'icon' => WDFM()->plugin_url . '/images/addons/import_export.svg',
59
- 'name' => __('Import/Export', WDFM()->prefix),
60
- 'description' => __('Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.', WDFM()->prefix)
61
  ),
62
  'mailchimp' => array(
63
- 'pro' => false,
64
  'dir' => 'form-maker-mailchimp/fm_mailchimp.php',
65
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
66
- 'icon' => WDFM()->plugin_url . '/images/addons/mailchimp.svg',
67
- 'name' => __('MailChimp', WDFM()->prefix),
68
- 'description' => __('This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.', WDFM()->prefix)
69
  ),
70
  'registration' => array(
71
- 'pro' => false,
72
  'dir' => 'form-maker-reg/fm_reg.php',
73
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
74
- 'icon' => WDFM()->plugin_url . '/images/addons/registration.svg',
75
- 'name' => __('Registration', WDFM()->prefix),
76
- 'description' => __('User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.', WDFM()->prefix)
77
  ),
78
  'post_generation' => array(
79
- 'pro' => false,
80
  'dir' => 'form-maker-post-generation/fm_post_generation.php',
81
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
82
- 'icon' => WDFM()->plugin_url . '/images/addons/post_generation.svg',
83
- 'name' => __('Post Generation', WDFM()->prefix),
84
  'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
85
  ),
86
  'conditional_emails' => array(
87
- 'pro' => false,
88
  'dir' => 'form-maker-conditional-emails/fm_conditional_emails.php',
89
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
90
- 'icon' => WDFM()->plugin_url . '/images/addons/conditional_emails.svg',
91
- 'name' => __('Conditional Emails', WDFM()->prefix),
92
- 'description' => __('Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .', WDFM()->prefix)
93
  ),
94
  'dropbox_integration' => array(
95
- 'pro' => true,
96
  'dir' => 'form-maker-dropbox-integration/fm_dropbox_integration.php',
97
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
98
- 'icon' => WDFM()->plugin_url . '/images/addons/dropbox_integration.svg',
99
- 'name' => __('Dropbox Integration', WDFM()->prefix),
100
- 'description' => __('The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.', WDFM()->prefix)
101
  ),
102
  'gdrive_integration' => array(
103
- 'pro' => true,
104
  'dir' => 'form-maker-gdrive-integration/fm_gdrive_integration.php',
105
  'name' => 'Google Drive Integration',
106
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
107
- 'icon' => WDFM()->plugin_url . '/images/addons/gdrive_integration.svg',
108
- 'name' => __('Google Drive Integration', WDFM()->prefix),
109
- 'description' => __('The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive', WDFM()->prefix)
110
  ),
111
  'pdf_integration' => array(
112
- 'pro' => false,
113
  'dir' => 'form-maker-pdf-integration/fm_pdf_integration.php',
114
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
115
- 'icon' => WDFM()->plugin_url . '/images/addons/pdf_integration.svg',
116
- 'name' => __('PDF Integration', WDFM()->prefix),
117
- 'description' => __('The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.', WDFM()->prefix)
118
  ),
119
  'pushover' => array(
120
- 'pro' => false,
121
  'dir' => 'form-maker-pushover/fm_pushover.php',
122
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
123
- 'icon' => WDFM()->plugin_url . '/images/addons/pushover.svg',
124
- 'name' => __('Pushover', WDFM()->prefix),
125
- 'description' => __('Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.', WDFM()->prefix)
126
  ),
127
  'form-maker-save-progress' => array(
128
- 'pro' => false,
129
  'dir' => 'form-maker-save-progress/fm_save.php',
130
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
131
- 'icon' => WDFM()->plugin_url . '/images/addons/save_progress.svg',
132
- 'name' => __('Save Progress', WDFM()->prefix),
133
- 'description' => __('The add-on allows to save filled in forms as draft and continue editing them subsequently.', WDFM()->prefix)
134
  ),
135
  'stripe' => array(
136
- 'pro' => true,
137
  'dir' => 'form-maker-stripe/fm_stripe.php',
138
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
139
- 'icon' => WDFM()->plugin_url . '/images/addons/stripe.svg',
140
- 'name' => __('Stripe', WDFM()->prefix),
141
- 'description' => __('Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.', WDFM()->prefix)
142
  ),
143
  'calculator' => array(
144
- 'pro' => false,
145
  'dir' => 'form-maker-calculator/fm_calculator.php',
146
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/calculator.html',
147
- 'icon' => WDFM()->plugin_url . '/images/addons/calculator.svg',
148
- 'name' => __('Calculator', WDFM()->prefix),
149
- 'description' => __('The Form Maker Calculator add-on allows creating forms with dynamically calculated fields.', WDFM()->prefix)
150
  )
151
  )
152
  );
2
  /**
3
  * Class FMControllerAddons_fm
4
  */
5
+ class FMControllerAddons_fm extends FMAdminController {
6
  /**
7
  * @var $model
8
  */
17
  private $page;
18
 
19
  public function __construct() {
20
+ $this->page = WDW_FM_Library(self::PLUGIN)->get('page');
21
  $this->page_url = add_query_arg( array (
22
  'page' => $this->page,
23
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
24
  ), admin_url('admin.php')
25
  );
26
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Addons_fm.php";
27
  $this->view = new FMViewAddons_fm();
28
  }
29
 
31
  * Execute.
32
  */
33
  public function execute() {
34
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
35
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
36
  if (method_exists($this, $task)) {
37
  $this->$task($id);
38
  }
52
  $params['addons'] = array(
53
  'Form Maker Add-ons' => array(
54
  'imp_exp' => array(
55
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
56
  'dir' => 'form-maker-export-import/fm_exp_imp.php',
57
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
58
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/import_export.svg',
59
+ 'name' => __('Import/Export', WDFMInstance(self::PLUGIN)->prefix),
60
+ 'description' => __('Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.', WDFMInstance(self::PLUGIN)->prefix)
61
  ),
62
  'mailchimp' => array(
63
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
64
  'dir' => 'form-maker-mailchimp/fm_mailchimp.php',
65
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
66
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/mailchimp.svg',
67
+ 'name' => __('MailChimp', WDFMInstance(self::PLUGIN)->prefix),
68
+ 'description' => __('This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.', WDFMInstance(self::PLUGIN)->prefix)
69
  ),
70
  'registration' => array(
71
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
72
  'dir' => 'form-maker-reg/fm_reg.php',
73
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
74
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/registration.svg',
75
+ 'name' => __('Registration', WDFMInstance(self::PLUGIN)->prefix),
76
+ 'description' => __('User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.', WDFMInstance(self::PLUGIN)->prefix)
77
  ),
78
  'post_generation' => array(
79
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
80
  'dir' => 'form-maker-post-generation/fm_post_generation.php',
81
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
82
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/post_generation.svg',
83
+ 'name' => __('Post Generation', WDFMInstance(self::PLUGIN)->prefix),
84
  'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
85
  ),
86
  'conditional_emails' => array(
87
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
88
  'dir' => 'form-maker-conditional-emails/fm_conditional_emails.php',
89
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
90
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/conditional_emails.svg',
91
+ 'name' => __('Conditional Emails', WDFMInstance(self::PLUGIN)->prefix),
92
+ 'description' => __('Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .', WDFMInstance(self::PLUGIN)->prefix)
93
  ),
94
  'dropbox_integration' => array(
95
+ 'pro' => WDFMInstance(self::PLUGIN)->is_free,
96
  'dir' => 'form-maker-dropbox-integration/fm_dropbox_integration.php',
97
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
98
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/dropbox_integration.svg',
99
+ 'name' => __('Dropbox Integration', WDFMInstance(self::PLUGIN)->prefix),
100
+ 'description' => __('The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.', WDFMInstance(self::PLUGIN)->prefix)
101
  ),
102
  'gdrive_integration' => array(
103
+ 'pro' => WDFMInstance(self::PLUGIN)->is_free,
104
  'dir' => 'form-maker-gdrive-integration/fm_gdrive_integration.php',
105
  'name' => 'Google Drive Integration',
106
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
107
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/gdrive_integration.svg',
108
+ 'name' => __('Google Drive Integration', WDFMInstance(self::PLUGIN)->prefix),
109
+ 'description' => __('The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive', WDFMInstance(self::PLUGIN)->prefix)
110
  ),
111
  'pdf_integration' => array(
112
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
113
  'dir' => 'form-maker-pdf-integration/fm_pdf_integration.php',
114
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
115
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/pdf_integration.svg',
116
+ 'name' => __('PDF Integration', WDFMInstance(self::PLUGIN)->prefix),
117
+ 'description' => __('The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.', WDFMInstance(self::PLUGIN)->prefix)
118
  ),
119
  'pushover' => array(
120
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
121
  'dir' => 'form-maker-pushover/fm_pushover.php',
122
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
123
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/pushover.svg',
124
+ 'name' => __('Pushover', WDFMInstance(self::PLUGIN)->prefix),
125
+ 'description' => __('Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.', WDFMInstance(self::PLUGIN)->prefix)
126
  ),
127
  'form-maker-save-progress' => array(
128
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
129
  'dir' => 'form-maker-save-progress/fm_save.php',
130
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
131
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/save_progress.svg',
132
+ 'name' => __('Save Progress', WDFMInstance(self::PLUGIN)->prefix),
133
+ 'description' => __('The add-on allows to save filled in forms as draft and continue editing them subsequently.', WDFMInstance(self::PLUGIN)->prefix)
134
  ),
135
  'stripe' => array(
136
+ 'pro' => WDFMInstance(self::PLUGIN)->is_free,
137
  'dir' => 'form-maker-stripe/fm_stripe.php',
138
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
139
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/stripe.svg',
140
+ 'name' => __('Stripe', WDFMInstance(self::PLUGIN)->prefix),
141
+ 'description' => __('Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.', WDFMInstance(self::PLUGIN)->prefix)
142
  ),
143
  'calculator' => array(
144
+ 'pro' => (WDFMInstance(self::PLUGIN)->is_free == 2),
145
  'dir' => 'form-maker-calculator/fm_calculator.php',
146
  'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/calculator.html',
147
+ 'icon' => WDFMInstance(self::PLUGIN)->plugin_url . '/images/addons/calculator.svg',
148
+ 'name' => __('Calculator', WDFMInstance(self::PLUGIN)->prefix),
149
+ 'description' => __('The Form Maker Calculator add-on allows creating forms with dynamically calculated fields.', WDFMInstance(self::PLUGIN)->prefix)
150
  )
151
  )
152
  );
admin/controllers/Blocked_ips_fm.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerBlocked_ips_fm
5
  */
6
- class FMControllerBlocked_ips_fm {
7
  private $model;
8
  private $view;
9
  private $bulk_action_name = '';
@@ -11,31 +11,31 @@ class FMControllerBlocked_ips_fm {
11
  private $actions = array();
12
 
13
  public function __construct() {
14
- require_once WDFM()->plugin_dir . "/admin/models/Blocked_ips_fm.php";
15
- require_once WDFM()->plugin_dir . "/admin/views/Blocked_ips_fm.php";
16
  $this->model = new FMModelBlocked_ips_fm();
17
  $this->view = new FMViewBlocked_ips_fm();
18
 
19
- $this->page = WDW_FM_Library::get('page');
20
 
21
  $this->bulk_action_name = 'bulk_action';
22
 
23
  $this->actions = array(
24
  'delete' => array(
25
- 'title' => __('Delete', WDFM()->prefix),
26
- $this->bulk_action_name => __('deleted', WDFM()->prefix),
27
  ),
28
  );
29
  }
30
 
31
  public function execute() {
32
- $task = WDW_FM_Library::get('task');
33
- $id = (int) WDW_FM_Library::get('current_id', 0);
34
 
35
  if ( method_exists($this, $task) ) {
36
- check_admin_referer(WDFM()->nonce, WDFM()->nonce);
37
  $block_action = $this->bulk_action_name;
38
- $action = WDW_FM_Library::get( $block_action, -1 );
39
  if ( $action != -1 ) {
40
  $this->$block_action($action);
41
  }
@@ -50,8 +50,8 @@ class FMControllerBlocked_ips_fm {
50
 
51
  public function display() {
52
  $params = array();
53
- $params['order'] = WDW_FM_Library::get('order', 'desc');
54
- $params['orderby'] = WDW_FM_Library::get('orderby', 'id');
55
  // To prevent SQL injections.
56
  if ( !in_array($params['orderby'], array( 'id', 'ip' )) ) {
57
  $params['orderby'] = 'id';
@@ -78,7 +78,7 @@ class FMControllerBlocked_ips_fm {
78
  public function bulk_action($task) {
79
  $message = 0;
80
  $successfully_updated = 0;
81
- $check = WDW_FM_Library::get('check', '');
82
  if ( $check ) {
83
  foreach ( $check as $id => $item ) {
84
  if ( method_exists($this, $task) ) {
@@ -91,10 +91,10 @@ class FMControllerBlocked_ips_fm {
91
  }
92
  if ( $successfully_updated ) {
93
  $block_action = $this->bulk_action_name;
94
- $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFM()->prefix), $successfully_updated, $this->actions[$task][$block_action]);
95
  }
96
  }
97
- WDW_FM_Library::fm_redirect(add_query_arg(array(
98
  'page' => $this->page,
99
  'task' => 'display',
100
  ($message === 2 ? 'message' : 'msg') => $message,
@@ -103,14 +103,14 @@ class FMControllerBlocked_ips_fm {
103
 
104
  public function insert_blocked_ip() {
105
 
106
- $page = WDW_FM_Library::get('page');
107
 
108
- $ip = WDW_FM_Library::get('ip','');
109
 
110
  $insert = $this->model->insert_fm_blocked(array('ip' => $ip,), array('%s',));
111
  if( !$insert ){
112
  $message = 2;
113
- WDW_FM_Library::fm_redirect(add_query_arg(array(
114
  'page' => $page,
115
  'task' => 'display',
116
  'message' => $message,
@@ -119,7 +119,7 @@ class FMControllerBlocked_ips_fm {
119
  }
120
 
121
  public function delete_blocked_ip( $id ) {
122
- $page = WDW_FM_Library::get('page');
123
  // check id for db
124
  if(isset($id) && $id != "") {
125
  $id = intval($id);
@@ -127,7 +127,7 @@ class FMControllerBlocked_ips_fm {
127
 
128
  if( !$delete ){
129
  $message = 2;
130
- WDW_FM_Library::fm_redirect(add_query_arg(array(
131
  'page' => $page,
132
  'task' => 'display',
133
  'message' => $message,
@@ -137,7 +137,7 @@ class FMControllerBlocked_ips_fm {
137
  }
138
  else { // return message Failed
139
  $message = 2;
140
- WDW_FM_Library::fm_redirect(add_query_arg(array(
141
  'page' => $page,
142
  'task' => 'display',
143
  'message' => $message,
@@ -154,17 +154,17 @@ class FMControllerBlocked_ips_fm {
154
  }
155
 
156
  public function update_blocked_ip( $id ) {
157
- $page = WDW_FM_Library::get('page');
158
 
159
  // check id for db
160
  if(isset($id) && $id != "") {
161
  $id = intval($id);
162
- $ip = WDW_FM_Library::get('ip', '');
163
  $update = $this->model->update_fm_blocked(array('ip' => $ip,), array('id' => $id));
164
 
165
  if( !$update ){
166
  $message = 2;
167
- WDW_FM_Library::fm_redirect(add_query_arg(array(
168
  'page' => $page,
169
  'task' => 'display',
170
  'message' => $message,
@@ -174,7 +174,7 @@ class FMControllerBlocked_ips_fm {
174
  }
175
  else { // return message Failed
176
  $message = 2;
177
- WDW_FM_Library::fm_redirect(add_query_arg(array(
178
  'page' => $page,
179
  'task' => 'display',
180
  'message' => $message,
@@ -195,7 +195,7 @@ class FMControllerBlocked_ips_fm {
195
  return $message;
196
  }
197
  else {
198
- WDW_FM_Library::fm_redirect(add_query_arg(array(
199
  'page' => $this->page,
200
  'task' => 'display',
201
  'message' => $message,
@@ -205,8 +205,8 @@ class FMControllerBlocked_ips_fm {
205
 
206
  public function save() {
207
  $message = $this->save_db();
208
- $page = WDW_FM_Library::get('page');
209
- WDW_FM_Library::fm_redirect(add_query_arg(array(
210
  'page' => $page,
211
  'task' => 'display',
212
  'message' => $message,
@@ -260,8 +260,8 @@ class FMControllerBlocked_ips_fm {
260
  else {
261
  $message = 0;
262
  }
263
- $page = WDW_FM_Library::get('page');
264
- WDW_FM_Library::fm_redirect(add_query_arg(array(
265
  'page' => $page,
266
  'task' => 'display',
267
  'message' => $message,
3
  /**
4
  * Class FMControllerBlocked_ips_fm
5
  */
6
+ class FMControllerBlocked_ips_fm extends FMAdminController {
7
  private $model;
8
  private $view;
9
  private $bulk_action_name = '';
11
  private $actions = array();
12
 
13
  public function __construct() {
14
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Blocked_ips_fm.php";
15
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Blocked_ips_fm.php";
16
  $this->model = new FMModelBlocked_ips_fm();
17
  $this->view = new FMViewBlocked_ips_fm();
18
 
19
+ $this->page = WDW_FM_Library(self::PLUGIN)->get('page');
20
 
21
  $this->bulk_action_name = 'bulk_action';
22
 
23
  $this->actions = array(
24
  'delete' => array(
25
+ 'title' => __('Delete', WDFMInstance(self::PLUGIN)->prefix),
26
+ $this->bulk_action_name => __('deleted', WDFMInstance(self::PLUGIN)->prefix),
27
  ),
28
  );
29
  }
30
 
31
  public function execute() {
32
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
33
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
34
 
35
  if ( method_exists($this, $task) ) {
36
+ check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
37
  $block_action = $this->bulk_action_name;
38
+ $action = WDW_FM_Library(self::PLUGIN)->get( $block_action, -1 );
39
  if ( $action != -1 ) {
40
  $this->$block_action($action);
41
  }
50
 
51
  public function display() {
52
  $params = array();
53
+ $params['order'] = WDW_FM_Library(self::PLUGIN)->get('order', 'desc');
54
+ $params['orderby'] = WDW_FM_Library(self::PLUGIN)->get('orderby', 'id');
55
  // To prevent SQL injections.
56
  if ( !in_array($params['orderby'], array( 'id', 'ip' )) ) {
57
  $params['orderby'] = 'id';
78
  public function bulk_action($task) {
79
  $message = 0;
80
  $successfully_updated = 0;
81
+ $check = WDW_FM_Library(self::PLUGIN)->get('check', '');
82
  if ( $check ) {
83
  foreach ( $check as $id => $item ) {
84
  if ( method_exists($this, $task) ) {
91
  }
92
  if ( $successfully_updated ) {
93
  $block_action = $this->bulk_action_name;
94
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
95
  }
96
  }
97
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
98
  'page' => $this->page,
99
  'task' => 'display',
100
  ($message === 2 ? 'message' : 'msg') => $message,
103
 
104
  public function insert_blocked_ip() {
105
 
106
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
107
 
108
+ $ip = WDW_FM_Library(self::PLUGIN)->get('ip','');
109
 
110
  $insert = $this->model->insert_fm_blocked(array('ip' => $ip,), array('%s',));
111
  if( !$insert ){
112
  $message = 2;
113
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
114
  'page' => $page,
115
  'task' => 'display',
116
  'message' => $message,
119
  }
120
 
121
  public function delete_blocked_ip( $id ) {
122
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
123
  // check id for db
124
  if(isset($id) && $id != "") {
125
  $id = intval($id);
127
 
128
  if( !$delete ){
129
  $message = 2;
130
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
131
  'page' => $page,
132
  'task' => 'display',
133
  'message' => $message,
137
  }
138
  else { // return message Failed
139
  $message = 2;
140
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
141
  'page' => $page,
142
  'task' => 'display',
143
  'message' => $message,
154
  }
155
 
156
  public function update_blocked_ip( $id ) {
157
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
158
 
159
  // check id for db
160
  if(isset($id) && $id != "") {
161
  $id = intval($id);
162
+ $ip = WDW_FM_Library(self::PLUGIN)->get('ip', '');
163
  $update = $this->model->update_fm_blocked(array('ip' => $ip,), array('id' => $id));
164
 
165
  if( !$update ){
166
  $message = 2;
167
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
168
  'page' => $page,
169
  'task' => 'display',
170
  'message' => $message,
174
  }
175
  else { // return message Failed
176
  $message = 2;
177
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
178
  'page' => $page,
179
  'task' => 'display',
180
  'message' => $message,
195
  return $message;
196
  }
197
  else {
198
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
199
  'page' => $this->page,
200
  'task' => 'display',
201
  'message' => $message,
205
 
206
  public function save() {
207
  $message = $this->save_db();
208
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
209
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
210
  'page' => $page,
211
  'task' => 'display',
212
  'message' => $message,
260
  else {
261
  $message = 0;
262
  }
263
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
264
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
265
  'page' => $page,
266
  'task' => 'display',
267
  'message' => $message,
admin/controllers/Checkpaypal.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerCheckpaypal
5
  */
6
- class FMControllerCheckpaypal {
7
  /**
8
  * @var $model
9
  */
@@ -18,10 +18,10 @@ class FMControllerCheckpaypal {
18
  */
19
  public function __construct() {
20
  // Load FMModelCheckpaypal class.
21
- require_once WDFM()->plugin_dir . "/admin/models/Checkpaypal.php";
22
  $this->model = new FMModelCheckpaypal();
23
  // Load FMViewCheckpaypal class.
24
- require_once WDFM()->plugin_dir . "/admin/views/Checkpaypal.php";
25
  $this->view = new FMViewCheckpaypal();
26
  }
27
 
@@ -37,10 +37,10 @@ class FMControllerCheckpaypal {
37
  */
38
  public function display() {
39
  // Get form by id.
40
- $form_id = WDW_FM_Library::get('form_id', 0);
41
  $form = $this->model->get_form_by_id($form_id);
42
  // Get form session by group id.
43
- $group_id = WDW_FM_Library::get('group_id', 0);
44
  $form_session = $this->model->get_form_session_by_group_id($group_id);
45
  // Connect to paypal.
46
  $post_fields = '';
@@ -52,10 +52,10 @@ class FMControllerCheckpaypal {
52
  $post_fields .= 'cmd=_notify-validate';
53
  $paypal_params = array( 'checkout_mode' => $form->checkout_mode, 'post_fields' => $post_fields );
54
  $response = $this->model->connect_to_paypal($paypal_params);
55
- $tax = WDW_FM_Library::get('tax', 0);
56
- $total = WDW_FM_Library::get('mc_gross', 0);
57
- $shipping = WDW_FM_Library::get('mc_shipping', 0);
58
- $payment_status = WDW_FM_Library::get('payment_status', 0);
59
  // Update payment status for formmaker_submits table.
60
  $this->model->update_submission_status($payment_status, $group_id);
61
  $form_currency = '$';
@@ -115,28 +115,28 @@ class FMControllerCheckpaypal {
115
  $form_currency = $currency_sign[array_search($payment_currency, $currency_code)];
116
  }
117
  $currency = $payment_currency . $form_currency;
118
- $email = WDW_FM_Library::get('payer_email', '');
119
- $first_name = WDW_FM_Library::get('first_name', '');
120
- $last_name = WDW_FM_Library::get('last_name', '');
121
  $full_name = (($first_name != '') ? $first_name : '') . (($last_name != '') ? ' ' . $last_name : '');
122
- $phone_a = WDW_FM_Library::get('night_phone_a', '');
123
- $phone_b = WDW_FM_Library::get('night_phone_b', '');
124
- $phone_c = WDW_FM_Library::get('night_phone_c', '');
125
  $phone = (($phone_a != '') ? $phone_a : '') . (($phone_b != '') ? ' - ' . $phone_b : '') . (($phone_c != '') ? ' - ' . $phone_c : '');
126
  $address = '';
127
- $address .= (WDW_FM_Library::get('address_country', '') != '') ? "Country: " . WDW_FM_Library::get('address_country', '') : '';
128
- $address .= (WDW_FM_Library::get('address_state', '') != '') ? "<br>State: " . WDW_FM_Library::get('address_state', '') : '';
129
- $address .= (WDW_FM_Library::get('address_city', '') != '') ? "<br>City: " . WDW_FM_Library::get('address_city', '') : '';
130
- $address .= (WDW_FM_Library::get('address_street', '') != '') ? "<br>Street: " . WDW_FM_Library::get('address_street', '') : '';
131
- $address .= (WDW_FM_Library::get('address_zip', '') != '') ? "<br>Zip Code: " . WDW_FM_Library::get('address_zip', '') : '';
132
- $address .= (WDW_FM_Library::get('address_status', '') != '') ? "<br>Address Status: " . WDW_FM_Library::get('address_status', '') : '';
133
- $address .= (WDW_FM_Library::get('address_name', '') != '') ? "<br>Name: " . WDW_FM_Library::get('address_name', '') : '';
134
  $paypal_info = "";
135
- $paypal_info .= (WDW_FM_Library::get('payer_status', '') != '') ? "<br>Payer Status - " . WDW_FM_Library::get('payer_status', '') : '';
136
- $paypal_info .= (WDW_FM_Library::get('payer_email', '') != '') ? "<br>Payer Email - " . WDW_FM_Library::get('payer_email', '') : '';
137
- $paypal_info .= (WDW_FM_Library::get('txn_id', '') != '') ? "<br>Transaction - " . WDW_FM_Library::get('txn_id', '') : '';
138
- $paypal_info .= (WDW_FM_Library::get('payment_type', '') != '') ? "<br>Payment Type - " . WDW_FM_Library::get('payment_type', '') : '';
139
- $paypal_info .= (WDW_FM_Library::get('residence_country', '') != '') ? "<br>Residence Country - " . WDW_FM_Library::get('residence_country', '') : '';
140
  $post = array(
141
  'form_id' => $form_id,
142
  'group_id' => $group_id,
@@ -165,14 +165,14 @@ class FMControllerCheckpaypal {
165
  if ( !empty($form_session) ) {
166
  $recipient = $form->mail ? $form->mail : '';
167
  if ( $recipient ) {
168
- $subject = __("Payment information", WDFM()->prefix);
169
  // Get template for payment information.
170
  $template_params = array( 'form_session' => $form_session, 'data' => $post );
171
  $message = $this->view->payment_information_template($template_params);
172
  $header_arr = array();
173
  $header_arr['content_type'] = "text/html";
174
  $header_arr['charset'] = 'UTF-8';
175
- WDW_FM_Library::mail($recipient, $subject, $message, $header_arr);
176
  }
177
  }
178
 
3
  /**
4
  * Class FMControllerCheckpaypal
5
  */
6
+ class FMControllerCheckpaypal extends FMAdminController {
7
  /**
8
  * @var $model
9
  */
18
  */
19
  public function __construct() {
20
  // Load FMModelCheckpaypal class.
21
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Checkpaypal.php";
22
  $this->model = new FMModelCheckpaypal();
23
  // Load FMViewCheckpaypal class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Checkpaypal.php";
25
  $this->view = new FMViewCheckpaypal();
26
  }
27
 
37
  */
38
  public function display() {
39
  // Get form by id.
40
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
41
  $form = $this->model->get_form_by_id($form_id);
42
  // Get form session by group id.
43
+ $group_id = WDW_FM_Library(self::PLUGIN)->get('group_id', 0);
44
  $form_session = $this->model->get_form_session_by_group_id($group_id);
45
  // Connect to paypal.
46
  $post_fields = '';
52
  $post_fields .= 'cmd=_notify-validate';
53
  $paypal_params = array( 'checkout_mode' => $form->checkout_mode, 'post_fields' => $post_fields );
54
  $response = $this->model->connect_to_paypal($paypal_params);
55
+ $tax = WDW_FM_Library(self::PLUGIN)->get('tax', 0);
56
+ $total = WDW_FM_Library(self::PLUGIN)->get('mc_gross', 0);
57
+ $shipping = WDW_FM_Library(self::PLUGIN)->get('mc_shipping', 0);
58
+ $payment_status = WDW_FM_Library(self::PLUGIN)->get('payment_status', 0);
59
  // Update payment status for formmaker_submits table.
60
  $this->model->update_submission_status($payment_status, $group_id);
61
  $form_currency = '$';
115
  $form_currency = $currency_sign[array_search($payment_currency, $currency_code)];
116
  }
117
  $currency = $payment_currency . $form_currency;
118
+ $email = WDW_FM_Library(self::PLUGIN)->get('payer_email', '');
119
+ $first_name = WDW_FM_Library(self::PLUGIN)->get('first_name', '');
120
+ $last_name = WDW_FM_Library(self::PLUGIN)->get('last_name', '');
121
  $full_name = (($first_name != '') ? $first_name : '') . (($last_name != '') ? ' ' . $last_name : '');
122
+ $phone_a = WDW_FM_Library(self::PLUGIN)->get('night_phone_a', '');
123
+ $phone_b = WDW_FM_Library(self::PLUGIN)->get('night_phone_b', '');
124
+ $phone_c = WDW_FM_Library(self::PLUGIN)->get('night_phone_c', '');
125
  $phone = (($phone_a != '') ? $phone_a : '') . (($phone_b != '') ? ' - ' . $phone_b : '') . (($phone_c != '') ? ' - ' . $phone_c : '');
126
  $address = '';
127
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_country', '') != '') ? "Country: " . WDW_FM_Library(self::PLUGIN)->get('address_country', '') : '';
128
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_state', '') != '') ? "<br>State: " . WDW_FM_Library(self::PLUGIN)->get('address_state', '') : '';
129
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_city', '') != '') ? "<br>City: " . WDW_FM_Library(self::PLUGIN)->get('address_city', '') : '';
130
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_street', '') != '') ? "<br>Street: " . WDW_FM_Library(self::PLUGIN)->get('address_street', '') : '';
131
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_zip', '') != '') ? "<br>Zip Code: " . WDW_FM_Library(self::PLUGIN)->get('address_zip', '') : '';
132
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_status', '') != '') ? "<br>Address Status: " . WDW_FM_Library(self::PLUGIN)->get('address_status', '') : '';
133
+ $address .= (WDW_FM_Library(self::PLUGIN)->get('address_name', '') != '') ? "<br>Name: " . WDW_FM_Library(self::PLUGIN)->get('address_name', '') : '';
134
  $paypal_info = "";
135
+ $paypal_info .= (WDW_FM_Library(self::PLUGIN)->get('payer_status', '') != '') ? "<br>Payer Status - " . WDW_FM_Library(self::PLUGIN)->get('payer_status', '') : '';
136
+ $paypal_info .= (WDW_FM_Library(self::PLUGIN)->get('payer_email', '') != '') ? "<br>Payer Email - " . WDW_FM_Library(self::PLUGIN)->get('payer_email', '') : '';
137
+ $paypal_info .= (WDW_FM_Library(self::PLUGIN)->get('txn_id', '') != '') ? "<br>Transaction - " . WDW_FM_Library(self::PLUGIN)->get('txn_id', '') : '';
138
+ $paypal_info .= (WDW_FM_Library(self::PLUGIN)->get('payment_type', '') != '') ? "<br>Payment Type - " . WDW_FM_Library(self::PLUGIN)->get('payment_type', '') : '';
139
+ $paypal_info .= (WDW_FM_Library(self::PLUGIN)->get('residence_country', '') != '') ? "<br>Residence Country - " . WDW_FM_Library(self::PLUGIN)->get('residence_country', '') : '';
140
  $post = array(
141
  'form_id' => $form_id,
142
  'group_id' => $group_id,
165
  if ( !empty($form_session) ) {
166
  $recipient = $form->mail ? $form->mail : '';
167
  if ( $recipient ) {
168
+ $subject = __("Payment information", WDFMInstance(self::PLUGIN)->prefix);
169
  // Get template for payment information.
170
  $template_params = array( 'form_session' => $form_session, 'data' => $post );
171
  $message = $this->view->payment_information_template($template_params);
172
  $header_arr = array();
173
  $header_arr['content_type'] = "text/html";
174
  $header_arr['charset'] = 'UTF-8';
175
+ WDW_FM_Library(self::PLUGIN)->mail($recipient, $subject, $message, $header_arr);
176
  }
177
  }
178
 
admin/controllers/FMShortocde.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerFMShortocde
5
  */
6
- class FMControllerFMShortocde {
7
  private $model;
8
  private $view;
9
 
@@ -11,10 +11,10 @@ class FMControllerFMShortocde {
11
  * FMControllerFMShortocde constructor.
12
  */
13
  public function __construct() {
14
- require_once WDFM()->plugin_dir . "/admin/models/FMShortocde.php";
15
  $this->model = new FMModelFMShortocde();
16
 
17
- require_once WDFM()->plugin_dir . "/admin/views/FMShortocde.php";
18
  $this->view = new FMViewFMShortocde();
19
  }
20
 
@@ -22,7 +22,7 @@ class FMControllerFMShortocde {
22
  * Execute.
23
  */
24
  public function execute() {
25
- $task = WDW_FM_Library::get('task');
26
  $this->display($task);
27
  }
28
 
3
  /**
4
  * Class FMControllerFMShortocde
5
  */
6
+ class FMControllerFMShortocde extends FMAdminController {
7
  private $model;
8
  private $view;
9
 
11
  * FMControllerFMShortocde constructor.
12
  */
13
  public function __construct() {
14
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/FMShortocde.php";
15
  $this->model = new FMModelFMShortocde();
16
 
17
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMShortocde.php";
18
  $this->view = new FMViewFMShortocde();
19
  }
20
 
22
  * Execute.
23
  */
24
  public function execute() {
25
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
26
  $this->display($task);
27
  }
28
 
admin/controllers/FormMakerEditCountryinPopup.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerFormmakereditcountryinpopup
5
  */
6
- class FMControllerFormmakereditcountryinpopup {
7
  /**
8
  * @var $view
9
  */
@@ -21,11 +21,11 @@ class FMControllerFormmakereditcountryinpopup {
21
  */
22
  public function display() {
23
  // Load FMViewFromeditcountryinpopup class.
24
- require_once WDFM()->plugin_dir . "/admin/views/FMEditCountryinPopup.php";
25
  $this->view = new FMViewFromeditcountryinpopup();
26
  // Set params for view.
27
  $params = array();
28
- $params['field_id'] = WDW_FM_Library::get('field_id', 0);
29
  $this->view->display($params);
30
  }
31
  }
3
  /**
4
  * Class FMControllerFormmakereditcountryinpopup
5
  */
6
+ class FMControllerFormmakereditcountryinpopup extends FMAdminController {
7
  /**
8
  * @var $view
9
  */
21
  */
22
  public function display() {
23
  // Load FMViewFromeditcountryinpopup class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMEditCountryinPopup.php";
25
  $this->view = new FMViewFromeditcountryinpopup();
26
  // Set params for view.
27
  $params = array();
28
+ $params['field_id'] = WDW_FM_Library(self::PLUGIN)->get('field_id', 0);
29
  $this->view->display($params);
30
  }
31
  }
admin/controllers/FormMakerIpinfoinPopup.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerFormmakeripinfoinpopup
5
  */
6
- class FMControllerFormmakeripinfoinpopup {
7
  /**
8
  * @var view
9
  */
@@ -21,10 +21,10 @@ class FMControllerFormmakeripinfoinpopup {
21
  */
22
  public function display() {
23
  // Load FMViewFromipinfoinpopup class.
24
- require_once WDFM()->plugin_dir . "/admin/views/FMIpinfoinPopup.php";
25
  $this->view = new FMViewFromipinfoinpopup();
26
  // Get IP
27
- $ip = WDW_FM_Library::get('data_ip', '');
28
  // Connect to IP api service and get IP info.
29
  $ipinfo = @unserialize(file_get_contents('http://ip-api.com/php/' . $ip));
30
  $city = '-';
@@ -38,7 +38,7 @@ class FMControllerFormmakeripinfoinpopup {
38
  $city = $ipinfo['city'];
39
  $country = $ipinfo['country'];
40
  $countryCode = $ipinfo['countryCode'];
41
- $country_flag = '<img width="16px" src="' . WDFM()->plugin_url . '/images/flags/' . strtolower($ipinfo['countryCode']) . '.png" class="sub-align" alt="' . $ipinfo['country'] . '" title="' . $ipinfo['country'] . '" />';
42
  $timezone = $ipinfo['timezone'];
43
  $lat = $ipinfo['lat'];
44
  $lon = $ipinfo['lon'];
3
  /**
4
  * Class FMControllerFormmakeripinfoinpopup
5
  */
6
+ class FMControllerFormmakeripinfoinpopup extends FMAdminController {
7
  /**
8
  * @var view
9
  */
21
  */
22
  public function display() {
23
  // Load FMViewFromipinfoinpopup class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMIpinfoinPopup.php";
25
  $this->view = new FMViewFromipinfoinpopup();
26
  // Get IP
27
+ $ip = WDW_FM_Library(self::PLUGIN)->get('data_ip', '');
28
  // Connect to IP api service and get IP info.
29
  $ipinfo = @unserialize(file_get_contents('http://ip-api.com/php/' . $ip));
30
  $city = '-';
38
  $city = $ipinfo['city'];
39
  $country = $ipinfo['country'];
40
  $countryCode = $ipinfo['countryCode'];
41
+ $country_flag = '<img width="16px" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/flags/' . strtolower($ipinfo['countryCode']) . '.png" class="sub-align" alt="' . $ipinfo['country'] . '" title="' . $ipinfo['country'] . '" />';
42
  $timezone = $ipinfo['timezone'];
43
  $lat = $ipinfo['lat'];
44
  $lon = $ipinfo['lon'];
admin/controllers/FormMakerMapEditinPopup.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerFormmakermapeditinpopup
5
  */
6
- class FMControllerFormmakermapeditinpopup {
7
  /**
8
  * @var view
9
  */
@@ -21,15 +21,15 @@ class FMControllerFormmakermapeditinpopup {
21
  */
22
  public function display() {
23
  // Load FMViewFrommapeditinpopup class.
24
- require_once WDFM()->plugin_dir . "/admin/views/FMMapEditinPopup.php";
25
  $this->view = new FMViewFrommapeditinpopup();
26
  // Get form maker settings.
27
- $fm_settings = get_option('fm_settings');
28
  // Set params for view.
29
  $params = array();
30
  $params['map_key'] = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
31
- $params['long'] = WDW_FM_Library::get('long', 0);
32
- $params['lat'] = WDW_FM_Library::get('lat', 0);
33
  $this->view->display($params);
34
  }
35
  }
3
  /**
4
  * Class FMControllerFormmakermapeditinpopup
5
  */
6
+ class FMControllerFormmakermapeditinpopup extends FMAdminController {
7
  /**
8
  * @var view
9
  */
21
  */
22
  public function display() {
23
  // Load FMViewFrommapeditinpopup class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMMapEditinPopup.php";
25
  $this->view = new FMViewFrommapeditinpopup();
26
  // Get form maker settings.
27
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
28
  // Set params for view.
29
  $params = array();
30
  $params['map_key'] = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
31
+ $params['long'] = WDW_FM_Library(self::PLUGIN)->get('long', 0);
32
+ $params['lat'] = WDW_FM_Library(self::PLUGIN)->get('lat', 0);
33
  $this->view->display($params);
34
  }
35
  }
admin/controllers/FormMakerSQLMapping.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerFormMakerSQLMapping
5
  */
6
- class FMControllerFormMakerSQLMapping {
7
  /**
8
  * @var $model
9
  */
@@ -18,10 +18,10 @@ class FMControllerFormMakerSQLMapping {
18
  */
19
  public function __construct() {
20
  // Load FMModelFormMakerSQLMapping class.
21
- require_once WDFM()->plugin_dir . "/admin/models/FMSqlMapping.php";
22
  $this->model = new FMModelFormMakerSQLMapping();
23
  // Load FMViewFormMakerSQLMapping class.
24
- require_once WDFM()->plugin_dir . "/admin/views/FMSqlMapping.php";
25
  $this->view = new FMViewFormMakerSQLMapping();
26
  }
27
 
@@ -29,9 +29,9 @@ class FMControllerFormMakerSQLMapping {
29
  * Execute.
30
  */
31
  public function execute() {
32
- $id = WDW_FM_Library::get('id', '');
33
- $form_id = WDW_FM_Library::get('form_id', '');
34
- $task = WDW_FM_Library::get('task', '');
35
  if ( $task && method_exists($this, $task) ) {
36
  $this->$task($form_id);
37
  }
@@ -122,7 +122,7 @@ class FMControllerFormMakerSQLMapping {
122
  * @param int $form_id
123
  */
124
  public function db_table_struct( $form_id ) {
125
- $con_method = WDW_FM_Library::get('con_method', '');
126
  // Get labels by form id.
127
  $label = $this->model->get_labels($form_id);
128
  // Get table struct.
3
  /**
4
  * Class FMControllerFormMakerSQLMapping
5
  */
6
+ class FMControllerFormMakerSQLMapping extends FMAdminController {
7
  /**
8
  * @var $model
9
  */
18
  */
19
  public function __construct() {
20
  // Load FMModelFormMakerSQLMapping class.
21
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/FMSqlMapping.php";
22
  $this->model = new FMModelFormMakerSQLMapping();
23
  // Load FMViewFormMakerSQLMapping class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMSqlMapping.php";
25
  $this->view = new FMViewFormMakerSQLMapping();
26
  }
27
 
29
  * Execute.
30
  */
31
  public function execute() {
32
+ $id = WDW_FM_Library(self::PLUGIN)->get('id', '');
33
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', '');
34
+ $task = WDW_FM_Library(self::PLUGIN)->get('task', '');
35
  if ( $task && method_exists($this, $task) ) {
36
  $this->$task($form_id);
37
  }
122
  * @param int $form_id
123
  */
124
  public function db_table_struct( $form_id ) {
125
+ $con_method = WDW_FM_Library(self::PLUGIN)->get('con_method', '');
126
  // Get labels by form id.
127
  $label = $this->model->get_labels($form_id);
128
  // Get table struct.
admin/controllers/FormMakerSubmits.php CHANGED
@@ -3,14 +3,14 @@
3
  /**
4
  * Class FMControllerFormMakerSubmits
5
  */
6
- class FMControllerFormMakerSubmits {
7
  private $model;
8
  private $view;
9
 
10
  public function __construct() {
11
- require_once WDFM()->plugin_dir . "/admin/models/FormMakerSubmits.php";
12
  $this->model = new FMModelFormMakerSubmits();
13
- require_once WDFM()->plugin_dir . "/admin/views/FormMakerSubmits.php";
14
  $this->view = new FMViewFormMakerSubmits();
15
  }
16
 
3
  /**
4
  * Class FMControllerFormMakerSubmits
5
  */
6
+ class FMControllerFormMakerSubmits extends FMAdminController {
7
  private $model;
8
  private $view;
9
 
10
  public function __construct() {
11
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/FormMakerSubmits.php";
12
  $this->model = new FMModelFormMakerSubmits();
13
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FormMakerSubmits.php";
14
  $this->view = new FMViewFormMakerSubmits();
15
  }
16
 
admin/controllers/Formmakerwdcaptcha.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Class FMControllerFormmakerwdcaptcha
4
  */
5
- class FMControllerFormmakerwdcaptcha {
6
  /**
7
  * @var view
8
  */
@@ -20,7 +20,7 @@ class FMControllerFormmakerwdcaptcha {
20
  */
21
  public function display() {
22
  // Load FMViewFormmakerwdcaptcha class.
23
- require_once WDFM()->plugin_dir . "/admin/views/FMCaptcha.php";
24
  $this->view = new FMViewFormmakerwdcaptcha();
25
  // Set params for view.
26
  $params = array();
2
  /**
3
  * Class FMControllerFormmakerwdcaptcha
4
  */
5
+ class FMControllerFormmakerwdcaptcha extends FMAdminController {
6
  /**
7
  * @var view
8
  */
20
  */
21
  public function display() {
22
  // Load FMViewFormmakerwdcaptcha class.
23
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMCaptcha.php";
24
  $this->view = new FMViewFormmakerwdcaptcha();
25
  // Set params for view.
26
  $params = array();
admin/controllers/Formmakerwdmathcaptcha.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerFormmakerwdmathcaptcha
5
  */
6
- class FMControllerFormmakerwdmathcaptcha {
7
  /**
8
  * @var $view
9
  */
@@ -21,7 +21,7 @@ class FMControllerFormmakerwdmathcaptcha {
21
  */
22
  public function display() {
23
  // Load FMViewFormmakerwdmathcaptcha class.
24
- require_once WDFM()->plugin_dir . "/admin/views/FMMathCaptcha.php";
25
  $this->view = new FMViewFormmakerwdmathcaptcha();
26
  // Set params for view.
27
  $params = array();
3
  /**
4
  * Class FMControllerFormmakerwdmathcaptcha
5
  */
6
+ class FMControllerFormmakerwdmathcaptcha extends FMAdminController {
7
  /**
8
  * @var $view
9
  */
21
  */
22
  public function display() {
23
  // Load FMViewFormmakerwdmathcaptcha class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMMathCaptcha.php";
25
  $this->view = new FMViewFormmakerwdmathcaptcha();
26
  // Set params for view.
27
  $params = array();
admin/controllers/Generete_csv.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerGenerete_csv
5
  */
6
- class FMControllerGenerete_csv {
7
  /**
8
  * Execute.
9
  */
@@ -16,16 +16,16 @@ class FMControllerGenerete_csv {
16
  */
17
  public function display() {
18
  // Get form maker settings
19
- $fm_settings = get_option('fm_settings');
20
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
21
  $form_id = (int) $_REQUEST['form_id'];
22
  $limitstart = (int) $_REQUEST['limitstart'];
23
  $send_header = (int) $_REQUEST['send_header'];
24
- $params = WDW_FM_Library::get_submissions_to_export();
25
  $data = $params[0];
26
  $title = $params[1];
27
 
28
- $labels_parameters = WDW_FM_Library::get_labels_parameters( $form_id );
29
 
30
  $sorted_label_names_original = $labels_parameters[4];
31
  $sorted_label_names_original = array_merge(array(
3
  /**
4
  * Class FMControllerGenerete_csv
5
  */
6
+ class FMControllerGenerete_csv extends FMAdminController {
7
  /**
8
  * Execute.
9
  */
16
  */
17
  public function display() {
18
  // Get form maker settings
19
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
20
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
21
  $form_id = (int) $_REQUEST['form_id'];
22
  $limitstart = (int) $_REQUEST['limitstart'];
23
  $send_header = (int) $_REQUEST['send_header'];
24
+ $params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
25
  $data = $params[0];
26
  $title = $params[1];
27
 
28
+ $labels_parameters = WDW_FM_Library(self::PLUGIN)->get_labels_parameters( $form_id );
29
 
30
  $sorted_label_names_original = $labels_parameters[4];
31
  $sorted_label_names_original = array_merge(array(
admin/controllers/Generete_xml.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerGenerete_xml
5
  */
6
- class FMControllerGenerete_xml {
7
  /**
8
  * Execute.
9
  */
@@ -15,7 +15,7 @@ class FMControllerGenerete_xml {
15
  $form_id = (int) $_REQUEST['form_id'];
16
  $limitstart = (int) $_REQUEST['limitstart'];
17
  $send_header = (int) $_REQUEST['send_header'];
18
- $params = WDW_FM_Library::get_submissions_to_export();
19
  $data = $params[0];
20
  $title = $params[1];
21
  define('PHP_TAB', "\t");
3
  /**
4
  * Class FMControllerGenerete_xml
5
  */
6
+ class FMControllerGenerete_xml extends FMAdminController {
7
  /**
8
  * Execute.
9
  */
15
  $form_id = (int) $_REQUEST['form_id'];
16
  $limitstart = (int) $_REQUEST['limitstart'];
17
  $send_header = (int) $_REQUEST['send_header'];
18
+ $params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
19
  $data = $params[0];
20
  $title = $params[1];
21
  define('PHP_TAB', "\t");
admin/controllers/Manage_fm.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- class FMControllerManage_fm {
3
  private $model;
4
  private $view;
5
  private $page;
@@ -10,35 +10,35 @@ class FMControllerManage_fm {
10
  private $actions = array();
11
 
12
  function __construct() {
13
- require_once WDFM()->plugin_dir . "/admin/models/Manage_fm.php";
14
- require_once WDFM()->plugin_dir . "/admin/views/Manage_fm.php";
15
  $this->model = new FMModelManage_fm();
16
  $this->view = new FMViewManage_fm();
17
 
18
- $this->page = WDW_FM_Library::get('page');
19
  $this->page_url = add_query_arg(array(
20
  'page' => $this->page,
21
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
22
  ), admin_url('admin.php')
23
  );
24
  $this->bulk_action_name = 'bulk_action';
25
 
26
  $this->actions = array(
27
  'publish' => array(
28
- 'title' => __('Publish', WDFM()->prefix),
29
- $this->bulk_action_name => __('published', WDFM()->prefix),
30
  ),
31
  'unpublish' => array(
32
- 'title' => __('Unpublish', WDFM()->prefix),
33
- $this->bulk_action_name => __('unpublished', WDFM()->prefix),
34
  ),
35
  'duplicate' => array(
36
- 'title' => __('Duplicate', WDFM()->prefix),
37
- $this->bulk_action_name => __('duplicated', WDFM()->prefix),
38
  ),
39
  'delete' => array(
40
- 'title' => __('Delete', WDFM()->prefix),
41
- $this->bulk_action_name => __('deleted', WDFM()->prefix),
42
  ),
43
  );
44
 
@@ -86,14 +86,14 @@ class FMControllerManage_fm {
86
  }
87
 
88
  public function execute() {
89
- $task = WDW_FM_Library::get('task');
90
- $id = (int) WDW_FM_Library::get('current_id', 0);
91
  if ( method_exists($this, $task) ) {
92
  if ( $task != 'add' && $task != 'edit' && $task != 'display' ) {
93
- check_admin_referer(WDFM()->nonce, WDFM()->nonce);
94
  }
95
  $block_action = $this->bulk_action_name;
96
- $action = WDW_FM_Library::get( $block_action, -1 );
97
  if ( $action != -1 ) {
98
  $this->$block_action($action);
99
  }
@@ -108,8 +108,8 @@ class FMControllerManage_fm {
108
 
109
  public function display() {
110
  $params = array();
111
- $params['order'] = WDW_FM_Library::get('order', 'asc');
112
- $params['orderby'] = WDW_FM_Library::get('orderby', 'id');
113
  // To prevent SQL injections.
114
  if ( !in_array($params['orderby'], array( 'id', 'title', 'type' )) ) {
115
  $params['orderby'] = 'id';
@@ -138,7 +138,7 @@ class FMControllerManage_fm {
138
  $message = 0;
139
  $successfully_updated = 0;
140
 
141
- $check = WDW_FM_Library::get('check', '');
142
 
143
  if ( $check ) {
144
  foreach ( $check as $id => $item ) {
@@ -152,11 +152,11 @@ class FMControllerManage_fm {
152
  }
153
  if ( $successfully_updated ) {
154
  $block_action = $this->bulk_action_name;
155
- $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFM()->prefix), $successfully_updated, $this->actions[$task][$block_action]);
156
  }
157
  }
158
 
159
- WDW_FM_Library::fm_redirect(add_query_arg(array(
160
  'page' => $this->page,
161
  'task' => 'display',
162
  ($message === 2 ? 'message' : 'msg') => $message,
@@ -179,14 +179,14 @@ class FMControllerManage_fm {
179
  $this->model->delete_rows(array( "table" => "formmaker_sessions", "where" => "form_id = " . $id ));
180
  $this->model->delete_rows(array( "table" => "formmaker_backup", "where" => "id = " . $id ));
181
  $this->model->delete_rows(array( "table" => "formmaker_display_options", "where" => "form_id = " . $id ));
182
- if (WDFM()->is_free == 2) {
183
  $arr = explode(',', get_option('contact_form_forms'));
184
  $arr = array_diff($arr, array($id));
185
  $arr = implode(',', $arr);
186
  update_option('contact_form_forms', $arr);
187
  }
188
  // To delete DB rows with form ids from add-ons.
189
- if (WDFM()->is_free != 2) {
190
  do_action('fm_delete_addon_init', $id);
191
  }
192
  $message = 3;
@@ -199,7 +199,7 @@ class FMControllerManage_fm {
199
  return $message;
200
  }
201
  else {
202
- WDW_FM_Library::fm_redirect(add_query_arg(array(
203
  'page' => $this->page,
204
  'task' => 'display',
205
  'message' => $message,
@@ -228,7 +228,7 @@ class FMControllerManage_fm {
228
  return $message;
229
  }
230
  else {
231
- WDW_FM_Library::fm_redirect(add_query_arg(array(
232
  'page' => $this->page,
233
  'task' => 'display',
234
  'message' => $message,
@@ -257,7 +257,7 @@ class FMControllerManage_fm {
257
  return $message;
258
  }
259
  else {
260
- WDW_FM_Library::fm_redirect(add_query_arg(array(
261
  'page' => $this->page,
262
  'task' => 'display',
263
  'message' => $message,
@@ -286,7 +286,7 @@ class FMControllerManage_fm {
286
  unset($row['id']);
287
  $inserted = $this->model->insert_data_to_db("formmaker", (array) $row);
288
  $id = (int) $this->model->get_max_row('formmaker', 'id');
289
- if (WDFM()->is_free == 2) {
290
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
291
  }
292
  if ( $inserted !== FALSE ) {
@@ -298,7 +298,7 @@ class FMControllerManage_fm {
298
  return $message;
299
  }
300
  else {
301
- WDW_FM_Library::fm_redirect(add_query_arg(array(
302
  'page' => $this->page,
303
  'task' => 'display',
304
  'message' => $message,
@@ -344,14 +344,14 @@ class FMControllerManage_fm {
344
  $labels['type'] = '"' . implode('","', $label_type) . '"';
345
  $params['labels'] = $labels;
346
 
347
- $params['page_title'] = __('Create new form', WDFM()->prefix);
348
  $params['animation_effects'] = $this->animation_effects;
349
 
350
  $this->view->edit($params);
351
  }
352
 
353
  public function edit($id = 0, $backup_id = 0) {
354
- $fm_settings = get_option('fm_settings');
355
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? 1 : 0;
356
  if ( $id && !$fm_advanced_layout ) {
357
  $fm_advanced_layout = !$this->model->get_autogen_layout($id);
@@ -379,7 +379,7 @@ class FMControllerManage_fm {
379
  $params['id'] = $id;
380
  $params['row'] = $this->model->get_row_data_new($backup_id);
381
  if ( empty($params['row']) ) {
382
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
383
  }
384
 
385
  // Check stripe add-on is active.
@@ -435,15 +435,15 @@ class FMControllerManage_fm {
435
  }
436
 
437
  public function undo() {
438
- $backup_id = (int) WDW_FM_Library::get('backup_id');
439
- $id = (int) WDW_FM_Library::get('id');
440
  $backup_id = $this->model->get_undo_redo_id($backup_id, $id, 0);
441
  $this->edit($id, $backup_id);
442
  }
443
 
444
  public function redo() {
445
- $backup_id = (int) WDW_FM_Library::get('backup_id');
446
- $id = (int) WDW_FM_Library::get('id');
447
  $backup_id = $this->model->get_undo_redo_id($backup_id, $id, 1);
448
  $this->edit($id, $backup_id);
449
  }
@@ -461,25 +461,25 @@ class FMControllerManage_fm {
461
  $params[ 'page_url' ] = $this->page_url;
462
 
463
  $params[ 'back_url' ] = add_query_arg( array(
464
- 'page' => 'manage' . WDFM()->menu_postfix,
465
  'task' => 'edit',
466
  'current_id' => $id,
467
 
468
  ), admin_url( 'admin.php' )
469
  );
470
 
471
- $params[ 'fieldset_id' ] = WDW_FM_Library::get( 'fieldset_id', 'general' );
472
 
473
  $params[ 'row' ] = $this->model->get_row_data( $id );
474
  if ( empty( $params[ 'row' ] ) ) {
475
- WDW_FM_Library::fm_redirect( add_query_arg( array( 'page' => $this->page ), admin_url( 'admin.php' ) ) );
476
  }
477
 
478
  $params[ 'themes' ] = $this->model->get_theme_rows_data();
479
  $params[ 'default_theme' ] = $this->model->get_default_theme_id();
480
  $params[ 'queries' ] = $this->model->get_queries_rows_data( $id );
481
  $params[ 'userGroups' ] = get_editable_roles();
482
- $params[ 'page_title' ] = '"' . $params[ 'row' ]->title . '" ' . __( 'options', WDFM()->prefix );
483
 
484
  $label_id = array();
485
  $label_label = array();
@@ -521,7 +521,7 @@ class FMControllerManage_fm {
521
  }
522
 
523
  $params[ 'payment_method' ] = $payment_method;
524
- $params[ 'label_label' ] = WDW_FM_Library::create_email_options_placeholders( $labelIds );
525
  $params[ 'label_type' ] = $label_type;
526
  $params[ 'labels_for_submissions' ] = $this->model->get_labels( $id );
527
  $params[ 'payment_info' ] = $this->model->is_paypal( $id );
@@ -583,7 +583,7 @@ class FMControllerManage_fm {
583
  */
584
  private function get_addon_tabs( $params ) {
585
  $addons = array('tabs' => array(), 'html' => array());
586
- if (WDFM()->is_free != 2) {
587
  $addons = apply_filters('fm_get_addon_init', $addons, $params);
588
  }
589
  return $addons;
@@ -595,9 +595,9 @@ class FMControllerManage_fm {
595
  * @param int $id
596
  */
597
  public function apply_form_options( $id ) {
598
- $fieldset_id = WDW_FM_Library::get('fieldset_id', 'general');
599
  $message = $this->save_db_form_options( $id );
600
- WDW_FM_Library::fm_redirect(add_query_arg(array(
601
  'page' => $this->page,
602
  'task' => 'form_options',
603
  'current_id' => $id,
@@ -617,65 +617,69 @@ class FMControllerManage_fm {
617
  $javascript = "// Occurs before the form is loaded
618
  function before_load() {
619
 
620
- }
621
  // Occurs just before submitting the form
622
  function before_submit() {
623
  // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don't need to return any value if you don't want to stop the submission.
624
- }
625
  // Occurs just before resetting the form
626
  function before_reset() {
627
 
 
 
 
 
628
  }";
629
 
630
- $published = stripslashes(WDW_FM_Library::get('published', ''));
631
- $savedb = stripslashes(WDW_FM_Library::get('savedb', ''));
632
- $theme = (int) WDW_FM_Library::get('theme', 0);
633
  $theme = ($theme) ? $theme : $this->model->get_default_theme_id();
634
- $requiredmark = stripslashes(WDW_FM_Library::get('requiredmark', '*'));
635
- $sendemail = stripslashes(WDW_FM_Library::get('sendemail', ''));
636
- $save_uploads = stripslashes(WDW_FM_Library::get('save_uploads', ''));
637
- $mail = stripslashes(WDW_FM_Library::get('mail', ''));
638
  if ( isset($_POST['mailToAdd']) && esc_html(stripslashes($_POST['mailToAdd'])) != '' ) {
639
  $mail .= esc_html(stripslashes($_POST['mailToAdd'])) . ',';
640
  }
641
- $from_mail = stripslashes(WDW_FM_Library::get('from_mail', ''));
642
- $from_name = stripslashes(WDW_FM_Library::get('from_name', ''));
643
- $reply_to = stripslashes(WDW_FM_Library::get('reply_to', ''));
644
  if ( $from_mail == "other" ) {
645
- $from_mail = stripslashes(WDW_FM_Library::get('mail_from_other', ''));
646
  }
647
  if ( $reply_to == "other" ) {
648
- $reply_to = stripslashes(WDW_FM_Library::get('reply_to_other', ''));
649
  }
650
- $script_mail = WDW_FM_Library::get('script_mail', '{all}', FALSE);
651
  if ( $script_mail == '' ) {
652
  $script_mail = '{all}';
653
  }
654
- $mail_from_user = WDW_FM_Library::get('mail_from_user', '');
655
- $mail_from_name_user = WDW_FM_Library::get('mail_from_name_user', '');
656
- $reply_to_user = WDW_FM_Library::get('reply_to_user', '');
657
- $condition = WDW_FM_Library::get('condition', '');
658
- $mail_cc = WDW_FM_Library::get('mail_cc', '');
659
- $mail_cc_user = WDW_FM_Library::get('mail_cc_user', '');
660
- $mail_bcc = WDW_FM_Library::get('mail_bcc', '');
661
- $mail_bcc_user = WDW_FM_Library::get('mail_bcc_user', '');
662
- $mail_subject = WDW_FM_Library::get('mail_subject', '');
663
- $mail_subject_user = WDW_FM_Library::get('mail_subject_user', '');
664
- $mail_mode = WDW_FM_Library::get('mail_mode', '');
665
- $mail_mode_user = WDW_FM_Library::get('mail_mode_user', '');
666
- $mail_attachment = WDW_FM_Library::get('mail_attachment', '');
667
- $mail_attachment_user = WDW_FM_Library::get('mail_attachment_user', '');
668
- $script_mail_user = WDW_FM_Library::get('script_mail_user', '{all}', FALSE);
669
  if ( $script_mail_user == '' ) {
670
  $script_mail_user = '{all}';
671
  }
672
- $submit_text = WDW_FM_Library::get('submit_text', '', FALSE);
673
- $url = WDW_FM_Library::get('url', '');
674
- $tax = WDW_FM_Library::get('tax', 0);
675
- $payment_currency = WDW_FM_Library::get('payment_currency', '');
676
- $paypal_email = WDW_FM_Library::get('paypal_email', '');
677
- $checkout_mode = WDW_FM_Library::get('checkout_mode', 'testmode');
678
- $paypal_mode = WDW_FM_Library::get('paypal_mode', 0);
679
 
680
  // TODO Seclude payment method and payment status.
681
  if ( $paypal_mode == 'paypal' ) {
@@ -685,26 +689,26 @@ function before_reset() {
685
  $paypal_mode = 2;
686
  }
687
 
688
- $javascript = stripslashes(WDW_FM_Library::get('javascript', $javascript, false));
689
- $user_id_wd = stripslashes(WDW_FM_Library::get('user_id_wd', 'administrator,'));
690
- $frontend_submit_fields = stripslashes(WDW_FM_Library::get('frontend_submit_fields', ''));
691
- $frontend_submit_stat_fields = stripslashes(WDW_FM_Library::get('frontend_submit_stat_fields', ''));
692
- $mail_emptyfields = stripslashes(WDW_FM_Library::get('mail_emptyfields', 0));
693
- $mail_verify = stripslashes(WDW_FM_Library::get('mail_verify', 0));
694
- $mail_verify_expiretime = stripslashes(WDW_FM_Library::get('mail_verify_expiretime', ''));
695
  $send_to = '';
696
  for ( $i = 0; $i < 20; $i++ ) {
697
- if ( WDW_FM_Library::get('send_to' . $i, 0) ) {
698
- $send_to .= '*' . WDW_FM_Library::get('send_to' . $i, 0) . '*';
699
  }
700
  }
701
- if ( WDW_FM_Library::get('submit_text_type', 0) ) {
702
- $submit_text_type = WDW_FM_Library::get('submit_text_type', 0);
703
  if ( $submit_text_type == 5 ) {
704
- $article_id = WDW_FM_Library::get('page_name', 0);
705
  }
706
  else {
707
- $article_id = WDW_FM_Library::get('post_name', 0);
708
  }
709
  }
710
  else {
@@ -779,7 +783,7 @@ function before_reset() {
779
  'theme' => $theme,
780
  ), array( 'id' => $id )); //save theme in backup
781
  $this->model->create_js($id);
782
- if (WDFM()->is_free != 2) {
783
  $save_addon = do_action('fm_save_addon_init', $id);
784
  }
785
  $message_id = 8;
@@ -799,7 +803,7 @@ function before_reset() {
799
 
800
  $row = $this->model->get_row_data( $id );
801
  if ( empty($row) ) {
802
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
803
  }
804
  $fields = explode('*:*new_field*:*', $row->form_fields);
805
  $fields = array_slice($fields, 0, count($fields) - 1);
@@ -818,8 +822,8 @@ function before_reset() {
818
  $params['row'] = $row;
819
  $params['page'] = $this->page;
820
  $params['page_url'] = $this->page_url;
821
- $params['page_title'] = '"'. $row->title . '" ' . __('layout', WDFM()->prefix);
822
- $params['back_url'] = add_query_arg( array ('page' => 'manage' . WDFM()->menu_postfix,'task' => 'edit','current_id' => $id ), admin_url('admin.php'));
823
  $params['ids'] = $ids;
824
  $params['types'] = $types;
825
  $params['labels'] = $labels;
@@ -828,7 +832,7 @@ function before_reset() {
828
 
829
  public function apply_layout( $id ) {
830
  $message = $this->save_db_layout( $id );
831
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'form_layout', 'current_id' => $id, 'message' => $message), admin_url('admin.php') ) );
832
  }
833
 
834
  /**
@@ -839,8 +843,8 @@ function before_reset() {
839
  * @return int $id_message
840
  */
841
  public function save_db_layout( $id ) {
842
- $custom_front = WDW_FM_Library::get('custom_front', '', false);
843
- $autogen_layout = WDW_FM_Library::get('autogen_layout', '');
844
 
845
  $update = $this->model->update_data('formmaker', array(
846
  'custom_front' => $custom_front,
@@ -855,14 +859,14 @@ function before_reset() {
855
  }
856
 
857
  public function display_options() {
858
- $id = (int) WDW_FM_Library::get('current_id', $this->model->get_max_row("formmaker", "id"));
859
  $params = array();
860
  $params['row_form'] = $this->model->get_row_data($id);
861
  if ( empty($params['row_form']) ) {
862
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
863
  }
864
  $params['row'] = $this->model->get_display_options($id);
865
- $params['page_title'] = '"'. $params['row_form']->title . '" ' . __('display options', WDFM()->prefix);
866
  $params['animation_effects'] = $this->animation_effects;
867
  $params['posts_and_pages'] = $this->model->fm_posts_query();
868
  $params['categories'] = $this->model->fm_categories_query();
@@ -872,22 +876,22 @@ function before_reset() {
872
  $params['page'] = $this->page;
873
  $params['page_url'] = $this->page_url;
874
  $params['back_url'] = add_query_arg( array (
875
- 'page' => 'manage' . WDFM()->menu_postfix,
876
  'task' => 'edit',
877
  'current_id' => $id,
878
  ), admin_url('admin.php')
879
  );
880
 
881
- $params['fieldset_id'] = WDW_FM_Library::get('fieldset_id', 'embedded');
882
  $this->view->display_options($params);
883
  }
884
 
885
  public function save_display_options() {
886
  $message = $this->save_dis_options();
887
- $page = WDW_FM_Library::get('page');
888
 
889
- $current_id = (int) WDW_FM_Library::get('current_id', 0);
890
- WDW_FM_Library::fm_redirect(add_query_arg(array(
891
  'page' => $page,
892
  'task' => 'edit',
893
  'current_id' => $current_id,
@@ -897,10 +901,10 @@ function before_reset() {
897
 
898
  public function apply_display_options() {
899
  $message = $this->save_dis_options();
900
- $page = WDW_FM_Library::get('page');
901
- $fieldset_id = WDW_FM_Library::get('fieldset_id', 'embedded');
902
- $current_id = (int) WDW_FM_Library::get('current_id', 0);
903
- WDW_FM_Library::fm_redirect(add_query_arg(array(
904
  'page' => $page,
905
  'task' => 'display_options',
906
  'current_id' => $current_id,
@@ -914,14 +918,14 @@ function before_reset() {
914
  * @param int $id
915
  */
916
  public function remove_query( $id ) {
917
- $fieldset_id = WDW_FM_Library::get('fieldset_id', 'general');
918
- $query_id = WDW_FM_Library::get('query_id',0);
919
  $message = 2;
920
  if( $this->model->delete_formmaker_query( $query_id ) ) {
921
  $message = 3;
922
  }
923
 
924
- WDW_FM_Library::fm_redirect(add_query_arg(array(
925
  'page' => $this->page,
926
  'task' => 'form_options',
927
  'current_id' => $id,
@@ -944,30 +948,30 @@ function before_reset() {
944
 
945
  public function save_dis_options() {
946
  $option_data = array(
947
- 'form_id' => (int) WDW_FM_Library::get('current_id', 0),
948
- 'scrollbox_loading_delay' => $this->set_delay_freq_positive_val( WDW_FM_Library::get('scrollbox_loading_delay', 0) ),
949
- 'popover_animate_effect' => WDW_FM_Library::get('popover_animate_effect', ''),
950
- 'popover_loading_delay' => $this->set_delay_freq_positive_val( WDW_FM_Library::get('popover_loading_delay', 0) ),
951
- 'popover_frequency' => $this->set_delay_freq_positive_val( WDW_FM_Library::get('popover_frequency', 0) ),
952
- 'topbar_position' => WDW_FM_Library::get('topbar_position', 1),
953
- 'topbar_remain_top' => WDW_FM_Library::get('topbar_remain_top', 1),
954
- 'topbar_closing' => WDW_FM_Library::get('topbar_closing', 1),
955
- 'topbar_hide_duration' => $this->set_delay_freq_positive_val( WDW_FM_Library::get('topbar_hide_duration', 0) ),
956
- 'scrollbox_position' => WDW_FM_Library::get('scrollbox_position', 1),
957
- 'scrollbox_trigger_point' => WDW_FM_Library::get('scrollbox_trigger_point', 20),
958
- 'scrollbox_hide_duration' => $this->set_delay_freq_positive_val( WDW_FM_Library::get('scrollbox_hide_duration', 0)),
959
- 'scrollbox_auto_hide' => WDW_FM_Library::get('scrollbox_auto_hide', 1),
960
- 'hide_mobile' => WDW_FM_Library::get('hide_mobile', 0),
961
- 'scrollbox_closing' => WDW_FM_Library::get('scrollbox_closing', 1),
962
- 'scrollbox_minimize' => WDW_FM_Library::get('scrollbox_minimize', 1),
963
- 'scrollbox_minimize_text' => WDW_FM_Library::get('scrollbox_minimize_text', ''),
964
- 'type' => WDW_FM_Library::get('form_type', 'embadded'),
965
- 'display_on' => implode(',', WDW_FM_Library::get('display_on', array())),
966
- 'posts_include' => WDW_FM_Library::get('posts_include', ''),
967
- 'pages_include' => WDW_FM_Library::get('pages_include', ''),
968
- 'display_on_categories' => implode(',', WDW_FM_Library::get('display_on_categories', array())),
969
- 'current_categories' => WDW_FM_Library::get('current_categories', ''),
970
- 'show_for_admin' => WDW_FM_Library::get('show_for_admin', 0),
971
  );
972
 
973
  $save = $this->model->replace_display_options($option_data);
@@ -990,8 +994,8 @@ function before_reset() {
990
  // TODO: remove this function.
991
  public function save_as_copy() {
992
  $message = $this->save_db_as_copy();
993
- $page = WDW_FM_Library::get('page');
994
- WDW_FM_Library::fm_redirect(add_query_arg(array(
995
  'page' => $page,
996
  'task' => 'display',
997
  'message' => $message,
@@ -1000,8 +1004,8 @@ function before_reset() {
1000
 
1001
  public function save() {
1002
  $message = $this->save_db();
1003
- $page = WDW_FM_Library::get('page');
1004
- WDW_FM_Library::fm_redirect(add_query_arg(array(
1005
  'page' => $page,
1006
  'task' => 'display',
1007
  'message' => $message,
@@ -1010,12 +1014,12 @@ function before_reset() {
1010
 
1011
  public function apply() {
1012
  $message = $this->save_db();
1013
- $current_id = (int) WDW_FM_Library::get('current_id', 0);
1014
  if ( !$current_id ) {
1015
  $current_id = (int) $this->model->get_max_row('formmaker', 'id');
1016
  }
1017
- $page = WDW_FM_Library::get('page');
1018
- WDW_FM_Library::fm_redirect(add_query_arg(array(
1019
  'page' => $page,
1020
  'task' => 'edit',
1021
  'current_id' => $current_id,
@@ -1033,29 +1037,33 @@ function before_submit() {
1033
  }
1034
  // Occurs just before resetting the form
1035
  function before_reset() {
 
 
 
 
1036
  }";
1037
- $id = (int) WDW_FM_Library::get('current_id', 0);
1038
- $title = WDW_FM_Library::get('title', '');
1039
- $theme = (int) WDW_FM_Library::get('theme', 0);
1040
  $theme = ($theme) ? $theme : $this->model->get_default_theme_id();
1041
- $form_front = WDW_FM_Library::get('form_front', '', false);
1042
- $sortable = WDW_FM_Library::get('sortable', 0);
1043
- $counter = WDW_FM_Library::get('counter', 0);
1044
- $label_order = WDW_FM_Library::get('label_order', '');
1045
- $pagination = WDW_FM_Library::get('pagination', '');
1046
- $show_title = WDW_FM_Library::get('show_title', '');
1047
- $show_numbers = WDW_FM_Library::get('show_numbers', '');
1048
- $public_key = WDW_FM_Library::get('public_key', '');
1049
- $private_key = WDW_FM_Library::get('private_key', '');
1050
- $recaptcha_theme = WDW_FM_Library::get('recaptcha_theme', '');
1051
- $label_order_current = WDW_FM_Library::get('label_order_current', '');
1052
- $form_fields = WDW_FM_Library::get('form_fields', '', false);
1053
- $header_title = WDW_FM_Library::get('header_title', '');
1054
- $header_description = WDW_FM_Library::get('header_description', '', FALSE);
1055
- $header_image_url = WDW_FM_Library::get('header_image_url', '');
1056
- $header_image_animation = WDW_FM_Library::get('header_image_animation', '');
1057
- $header_hide_image = WDW_FM_Library::get('header_hide_image', 0);
1058
- $type = WDW_FM_Library::get('form_type', 'embedded');
1059
  $scrollbox_minimize_text = $header_title ? $header_title : 'The form is minimized.';
1060
  if ( $id != 0 ) {
1061
  $save = $this->model->update_data('formmaker', array(
@@ -1145,7 +1153,7 @@ function before_reset() {
1145
  'header_hide_image' => $header_hide_image,
1146
  ));
1147
  $id = (int) $this->model->get_max_row('formmaker', 'id');
1148
- if (WDFM()->is_free == 2) {
1149
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
1150
  }
1151
  $this->model->insert_data_to_db('formmaker_display_options', array(
@@ -1179,7 +1187,7 @@ function before_reset() {
1179
  'views' => 0,
1180
  ));
1181
  }
1182
- $backup_id = (int) WDW_FM_Library::get('backup_id', '');
1183
  if ( $backup_id ) {
1184
  if ( $this->model->get_backup_id($backup_id, $id) ) {
1185
  $this->model->delete_rows(array(
@@ -1381,8 +1389,8 @@ function before_reset() {
1381
  }
1382
 
1383
  public function update_form_title( $id ) {
1384
- $page = WDW_FM_Library::get('page');
1385
- $form_name = WDW_FM_Library::get('form_name', '');
1386
 
1387
  // check id for db
1388
  if(isset($id) && $id != "") {
@@ -1390,7 +1398,7 @@ function before_reset() {
1390
  $update = $this->model->update_data( "forms", array('title' => $form_name,), array('id' => $id) );
1391
  if( !$update ){
1392
  $message = 2;
1393
- WDW_FM_Library::fm_redirect(add_query_arg(array(
1394
  'page' => $page,
1395
  'task' => 'display',
1396
  'message' => $message,
@@ -1400,7 +1408,7 @@ function before_reset() {
1400
  }
1401
  else { // return message Failed
1402
  $message = 2;
1403
- WDW_FM_Library::fm_redirect(add_query_arg(array(
1404
  'page' => $page,
1405
  'task' => 'display',
1406
  'message' => $message,
1
  <?php
2
+ class FMControllerManage_fm extends FMAdminController {
3
  private $model;
4
  private $view;
5
  private $page;
10
  private $actions = array();
11
 
12
  function __construct() {
13
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Manage_fm.php";
14
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Manage_fm.php";
15
  $this->model = new FMModelManage_fm();
16
  $this->view = new FMViewManage_fm();
17
 
18
+ $this->page = WDW_FM_Library(self::PLUGIN)->get('page');
19
  $this->page_url = add_query_arg(array(
20
  'page' => $this->page,
21
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
22
  ), admin_url('admin.php')
23
  );
24
  $this->bulk_action_name = 'bulk_action';
25
 
26
  $this->actions = array(
27
  'publish' => array(
28
+ 'title' => __('Publish', WDFMInstance(self::PLUGIN)->prefix),
29
+ $this->bulk_action_name => __('published', WDFMInstance(self::PLUGIN)->prefix),
30
  ),
31
  'unpublish' => array(
32
+ 'title' => __('Unpublish', WDFMInstance(self::PLUGIN)->prefix),
33
+ $this->bulk_action_name => __('unpublished', WDFMInstance(self::PLUGIN)->prefix),
34
  ),
35
  'duplicate' => array(
36
+ 'title' => __('Duplicate', WDFMInstance(self::PLUGIN)->prefix),
37
+ $this->bulk_action_name => __('duplicated', WDFMInstance(self::PLUGIN)->prefix),
38
  ),
39
  'delete' => array(
40
+ 'title' => __('Delete', WDFMInstance(self::PLUGIN)->prefix),
41
+ $this->bulk_action_name => __('deleted', WDFMInstance(self::PLUGIN)->prefix),
42
  ),
43
  );
44
 
86
  }
87
 
88
  public function execute() {
89
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
90
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
91
  if ( method_exists($this, $task) ) {
92
  if ( $task != 'add' && $task != 'edit' && $task != 'display' ) {
93
+ check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
94
  }
95
  $block_action = $this->bulk_action_name;
96
+ $action = WDW_FM_Library(self::PLUGIN)->get( $block_action, -1 );
97
  if ( $action != -1 ) {
98
  $this->$block_action($action);
99
  }
108
 
109
  public function display() {
110
  $params = array();
111
+ $params['order'] = WDW_FM_Library(self::PLUGIN)->get('order', 'asc');
112
+ $params['orderby'] = WDW_FM_Library(self::PLUGIN)->get('orderby', 'id');
113
  // To prevent SQL injections.
114
  if ( !in_array($params['orderby'], array( 'id', 'title', 'type' )) ) {
115
  $params['orderby'] = 'id';
138
  $message = 0;
139
  $successfully_updated = 0;
140
 
141
+ $check = WDW_FM_Library(self::PLUGIN)->get('check', '');
142
 
143
  if ( $check ) {
144
  foreach ( $check as $id => $item ) {
152
  }
153
  if ( $successfully_updated ) {
154
  $block_action = $this->bulk_action_name;
155
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
156
  }
157
  }
158
 
159
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
160
  'page' => $this->page,
161
  'task' => 'display',
162
  ($message === 2 ? 'message' : 'msg') => $message,
179
  $this->model->delete_rows(array( "table" => "formmaker_sessions", "where" => "form_id = " . $id ));
180
  $this->model->delete_rows(array( "table" => "formmaker_backup", "where" => "id = " . $id ));
181
  $this->model->delete_rows(array( "table" => "formmaker_display_options", "where" => "form_id = " . $id ));
182
+ if (WDFMInstance(self::PLUGIN)->is_free == 2) {
183
  $arr = explode(',', get_option('contact_form_forms'));
184
  $arr = array_diff($arr, array($id));
185
  $arr = implode(',', $arr);
186
  update_option('contact_form_forms', $arr);
187
  }
188
  // To delete DB rows with form ids from add-ons.
189
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
190
  do_action('fm_delete_addon_init', $id);
191
  }
192
  $message = 3;
199
  return $message;
200
  }
201
  else {
202
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
203
  'page' => $this->page,
204
  'task' => 'display',
205
  'message' => $message,
228
  return $message;
229
  }
230
  else {
231
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
232
  'page' => $this->page,
233
  'task' => 'display',
234
  'message' => $message,
257
  return $message;
258
  }
259
  else {
260
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
261
  'page' => $this->page,
262
  'task' => 'display',
263
  'message' => $message,
286
  unset($row['id']);
287
  $inserted = $this->model->insert_data_to_db("formmaker", (array) $row);
288
  $id = (int) $this->model->get_max_row('formmaker', 'id');
289
+ if (WDFMInstance(self::PLUGIN)->is_free == 2) {
290
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
291
  }
292
  if ( $inserted !== FALSE ) {
298
  return $message;
299
  }
300
  else {
301
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
302
  'page' => $this->page,
303
  'task' => 'display',
304
  'message' => $message,
344
  $labels['type'] = '"' . implode('","', $label_type) . '"';
345
  $params['labels'] = $labels;
346
 
347
+ $params['page_title'] = __('Create new form', WDFMInstance(self::PLUGIN)->prefix);
348
  $params['animation_effects'] = $this->animation_effects;
349
 
350
  $this->view->edit($params);
351
  }
352
 
353
  public function edit($id = 0, $backup_id = 0) {
354
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
355
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? 1 : 0;
356
  if ( $id && !$fm_advanced_layout ) {
357
  $fm_advanced_layout = !$this->model->get_autogen_layout($id);
379
  $params['id'] = $id;
380
  $params['row'] = $this->model->get_row_data_new($backup_id);
381
  if ( empty($params['row']) ) {
382
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
383
  }
384
 
385
  // Check stripe add-on is active.
435
  }
436
 
437
  public function undo() {
438
+ $backup_id = (int) WDW_FM_Library(self::PLUGIN)->get('backup_id');
439
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('id');
440
  $backup_id = $this->model->get_undo_redo_id($backup_id, $id, 0);
441
  $this->edit($id, $backup_id);
442
  }
443
 
444
  public function redo() {
445
+ $backup_id = (int) WDW_FM_Library(self::PLUGIN)->get('backup_id');
446
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('id');
447
  $backup_id = $this->model->get_undo_redo_id($backup_id, $id, 1);
448
  $this->edit($id, $backup_id);
449
  }
461
  $params[ 'page_url' ] = $this->page_url;
462
 
463
  $params[ 'back_url' ] = add_query_arg( array(
464
+ 'page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix,
465
  'task' => 'edit',
466
  'current_id' => $id,
467
 
468
  ), admin_url( 'admin.php' )
469
  );
470
 
471
+ $params[ 'fieldset_id' ] = WDW_FM_Library(self::PLUGIN)->get( 'fieldset_id', 'general' );
472
 
473
  $params[ 'row' ] = $this->model->get_row_data( $id );
474
  if ( empty( $params[ 'row' ] ) ) {
475
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array( 'page' => $this->page ), admin_url( 'admin.php' ) ) );
476
  }
477
 
478
  $params[ 'themes' ] = $this->model->get_theme_rows_data();
479
  $params[ 'default_theme' ] = $this->model->get_default_theme_id();
480
  $params[ 'queries' ] = $this->model->get_queries_rows_data( $id );
481
  $params[ 'userGroups' ] = get_editable_roles();
482
+ $params[ 'page_title' ] = '"' . $params[ 'row' ]->title . '" ' . __( 'options', WDFMInstance(self::PLUGIN)->prefix );
483
 
484
  $label_id = array();
485
  $label_label = array();
521
  }
522
 
523
  $params[ 'payment_method' ] = $payment_method;
524
+ $params[ 'label_label' ] = WDW_FM_Library(self::PLUGIN)->create_email_options_placeholders( $labelIds );
525
  $params[ 'label_type' ] = $label_type;
526
  $params[ 'labels_for_submissions' ] = $this->model->get_labels( $id );
527
  $params[ 'payment_info' ] = $this->model->is_paypal( $id );
583
  */
584
  private function get_addon_tabs( $params ) {
585
  $addons = array('tabs' => array(), 'html' => array());
586
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
587
  $addons = apply_filters('fm_get_addon_init', $addons, $params);
588
  }
589
  return $addons;
595
  * @param int $id
596
  */
597
  public function apply_form_options( $id ) {
598
+ $fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'general');
599
  $message = $this->save_db_form_options( $id );
600
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
601
  'page' => $this->page,
602
  'task' => 'form_options',
603
  'current_id' => $id,
617
  $javascript = "// Occurs before the form is loaded
618
  function before_load() {
619
 
620
+ }
621
  // Occurs just before submitting the form
622
  function before_submit() {
623
  // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don't need to return any value if you don't want to stop the submission.
624
+ }
625
  // Occurs just before resetting the form
626
  function before_reset() {
627
 
628
+ }
629
+ // Occurs after form is submitted and reloaded
630
+ function after_submit() {
631
+
632
  }";
633
 
634
+ $published = stripslashes(WDW_FM_Library(self::PLUGIN)->get('published', ''));
635
+ $savedb = stripslashes(WDW_FM_Library(self::PLUGIN)->get('savedb', ''));
636
+ $theme = (int) WDW_FM_Library(self::PLUGIN)->get('theme', 0);
637
  $theme = ($theme) ? $theme : $this->model->get_default_theme_id();
638
+ $requiredmark = stripslashes(WDW_FM_Library(self::PLUGIN)->get('requiredmark', '*'));
639
+ $sendemail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('sendemail', ''));
640
+ $save_uploads = stripslashes(WDW_FM_Library(self::PLUGIN)->get('save_uploads', ''));
641
+ $mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail', ''));
642
  if ( isset($_POST['mailToAdd']) && esc_html(stripslashes($_POST['mailToAdd'])) != '' ) {
643
  $mail .= esc_html(stripslashes($_POST['mailToAdd'])) . ',';
644
  }
645
+ $from_mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('from_mail', ''));
646
+ $from_name = stripslashes(WDW_FM_Library(self::PLUGIN)->get('from_name', ''));
647
+ $reply_to = stripslashes(WDW_FM_Library(self::PLUGIN)->get('reply_to', ''));
648
  if ( $from_mail == "other" ) {
649
+ $from_mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail_from_other', ''));
650
  }
651
  if ( $reply_to == "other" ) {
652
+ $reply_to = stripslashes(WDW_FM_Library(self::PLUGIN)->get('reply_to_other', ''));
653
  }
654
+ $script_mail = WDW_FM_Library(self::PLUGIN)->get('script_mail', '{all}', FALSE);
655
  if ( $script_mail == '' ) {
656
  $script_mail = '{all}';
657
  }
658
+ $mail_from_user = WDW_FM_Library(self::PLUGIN)->get('mail_from_user', '');
659
+ $mail_from_name_user = WDW_FM_Library(self::PLUGIN)->get('mail_from_name_user', '');
660
+ $reply_to_user = WDW_FM_Library(self::PLUGIN)->get('reply_to_user', '');
661
+ $condition = WDW_FM_Library(self::PLUGIN)->get('condition', '');
662
+ $mail_cc = WDW_FM_Library(self::PLUGIN)->get('mail_cc', '');
663
+ $mail_cc_user = WDW_FM_Library(self::PLUGIN)->get('mail_cc_user', '');
664
+ $mail_bcc = WDW_FM_Library(self::PLUGIN)->get('mail_bcc', '');
665
+ $mail_bcc_user = WDW_FM_Library(self::PLUGIN)->get('mail_bcc_user', '');
666
+ $mail_subject = WDW_FM_Library(self::PLUGIN)->get('mail_subject', '');
667
+ $mail_subject_user = WDW_FM_Library(self::PLUGIN)->get('mail_subject_user', '');
668
+ $mail_mode = WDW_FM_Library(self::PLUGIN)->get('mail_mode', '');
669
+ $mail_mode_user = WDW_FM_Library(self::PLUGIN)->get('mail_mode_user', '');
670
+ $mail_attachment = WDW_FM_Library(self::PLUGIN)->get('mail_attachment', '');
671
+ $mail_attachment_user = WDW_FM_Library(self::PLUGIN)->get('mail_attachment_user', '');
672
+ $script_mail_user = WDW_FM_Library(self::PLUGIN)->get('script_mail_user', '{all}', FALSE);
673
  if ( $script_mail_user == '' ) {
674
  $script_mail_user = '{all}';
675
  }
676
+ $submit_text = WDW_FM_Library(self::PLUGIN)->get('submit_text', '', FALSE);
677
+ $url = WDW_FM_Library(self::PLUGIN)->get('url', '');
678
+ $tax = WDW_FM_Library(self::PLUGIN)->get('tax', 0);
679
+ $payment_currency = WDW_FM_Library(self::PLUGIN)->get('payment_currency', '');
680
+ $paypal_email = WDW_FM_Library(self::PLUGIN)->get('paypal_email', '');
681
+ $checkout_mode = WDW_FM_Library(self::PLUGIN)->get('checkout_mode', 'testmode');
682
+ $paypal_mode = WDW_FM_Library(self::PLUGIN)->get('paypal_mode', 0);
683
 
684
  // TODO Seclude payment method and payment status.
685
  if ( $paypal_mode == 'paypal' ) {
689
  $paypal_mode = 2;
690
  }
691
 
692
+ $javascript = stripslashes(WDW_FM_Library(self::PLUGIN)->get('javascript', $javascript, false));
693
+ $user_id_wd = stripslashes(WDW_FM_Library(self::PLUGIN)->get('user_id_wd', 'administrator,'));
694
+ $frontend_submit_fields = stripslashes(WDW_FM_Library(self::PLUGIN)->get('frontend_submit_fields', ''));
695
+ $frontend_submit_stat_fields = stripslashes(WDW_FM_Library(self::PLUGIN)->get('frontend_submit_stat_fields', ''));
696
+ $mail_emptyfields = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail_emptyfields', 0));
697
+ $mail_verify = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail_verify', 0));
698
+ $mail_verify_expiretime = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail_verify_expiretime', ''));
699
  $send_to = '';
700
  for ( $i = 0; $i < 20; $i++ ) {
701
+ if ( WDW_FM_Library(self::PLUGIN)->get('send_to' . $i, 0) ) {
702
+ $send_to .= '*' . WDW_FM_Library(self::PLUGIN)->get('send_to' . $i, 0) . '*';
703
  }
704
  }
705
+ if ( WDW_FM_Library(self::PLUGIN)->get('submit_text_type', 0) ) {
706
+ $submit_text_type = WDW_FM_Library(self::PLUGIN)->get('submit_text_type', 0);
707
  if ( $submit_text_type == 5 ) {
708
+ $article_id = WDW_FM_Library(self::PLUGIN)->get('page_name', 0);
709
  }
710
  else {
711
+ $article_id = WDW_FM_Library(self::PLUGIN)->get('post_name', 0);
712
  }
713
  }
714
  else {
783
  'theme' => $theme,
784
  ), array( 'id' => $id )); //save theme in backup
785
  $this->model->create_js($id);
786
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
787
  $save_addon = do_action('fm_save_addon_init', $id);
788
  }
789
  $message_id = 8;
803
 
804
  $row = $this->model->get_row_data( $id );
805
  if ( empty($row) ) {
806
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
807
  }
808
  $fields = explode('*:*new_field*:*', $row->form_fields);
809
  $fields = array_slice($fields, 0, count($fields) - 1);
822
  $params['row'] = $row;
823
  $params['page'] = $this->page;
824
  $params['page_url'] = $this->page_url;
825
+ $params['page_title'] = '"'. $row->title . '" ' . __('layout', WDFMInstance(self::PLUGIN)->prefix);
826
+ $params['back_url'] = add_query_arg( array ('page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix,'task' => 'edit','current_id' => $id ), admin_url('admin.php'));
827
  $params['ids'] = $ids;
828
  $params['types'] = $types;
829
  $params['labels'] = $labels;
832
 
833
  public function apply_layout( $id ) {
834
  $message = $this->save_db_layout( $id );
835
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'form_layout', 'current_id' => $id, 'message' => $message), admin_url('admin.php') ) );
836
  }
837
 
838
  /**
843
  * @return int $id_message
844
  */
845
  public function save_db_layout( $id ) {
846
+ $custom_front = WDW_FM_Library(self::PLUGIN)->get('custom_front', '', false);
847
+ $autogen_layout = WDW_FM_Library(self::PLUGIN)->get('autogen_layout', '');
848
 
849
  $update = $this->model->update_data('formmaker', array(
850
  'custom_front' => $custom_front,
859
  }
860
 
861
  public function display_options() {
862
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', $this->model->get_max_row("formmaker", "id"));
863
  $params = array();
864
  $params['row_form'] = $this->model->get_row_data($id);
865
  if ( empty($params['row_form']) ) {
866
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
867
  }
868
  $params['row'] = $this->model->get_display_options($id);
869
+ $params['page_title'] = '"'. $params['row_form']->title . '" ' . __('display options', WDFMInstance(self::PLUGIN)->prefix);
870
  $params['animation_effects'] = $this->animation_effects;
871
  $params['posts_and_pages'] = $this->model->fm_posts_query();
872
  $params['categories'] = $this->model->fm_categories_query();
876
  $params['page'] = $this->page;
877
  $params['page_url'] = $this->page_url;
878
  $params['back_url'] = add_query_arg( array (
879
+ 'page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix,
880
  'task' => 'edit',
881
  'current_id' => $id,
882
  ), admin_url('admin.php')
883
  );
884
 
885
+ $params['fieldset_id'] = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'embedded');
886
  $this->view->display_options($params);
887
  }
888
 
889
  public function save_display_options() {
890
  $message = $this->save_dis_options();
891
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
892
 
893
+ $current_id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
894
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
895
  'page' => $page,
896
  'task' => 'edit',
897
  'current_id' => $current_id,
901
 
902
  public function apply_display_options() {
903
  $message = $this->save_dis_options();
904
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
905
+ $fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'embedded');
906
+ $current_id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
907
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
908
  'page' => $page,
909
  'task' => 'display_options',
910
  'current_id' => $current_id,
918
  * @param int $id
919
  */
920
  public function remove_query( $id ) {
921
+ $fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'general');
922
+ $query_id = WDW_FM_Library(self::PLUGIN)->get('query_id',0);
923
  $message = 2;
924
  if( $this->model->delete_formmaker_query( $query_id ) ) {
925
  $message = 3;
926
  }
927
 
928
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
929
  'page' => $this->page,
930
  'task' => 'form_options',
931
  'current_id' => $id,
948
 
949
  public function save_dis_options() {
950
  $option_data = array(
951
+ 'form_id' => (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0),
952
+ 'scrollbox_loading_delay' => $this->set_delay_freq_positive_val( WDW_FM_Library(self::PLUGIN)->get('scrollbox_loading_delay', 0) ),
953
+ 'popover_animate_effect' => WDW_FM_Library(self::PLUGIN)->get('popover_animate_effect', ''),
954
+ 'popover_loading_delay' => $this->set_delay_freq_positive_val( WDW_FM_Library(self::PLUGIN)->get('popover_loading_delay', 0) ),
955
+ 'popover_frequency' => $this->set_delay_freq_positive_val( WDW_FM_Library(self::PLUGIN)->get('popover_frequency', 0) ),
956
+ 'topbar_position' => WDW_FM_Library(self::PLUGIN)->get('topbar_position', 1),
957
+ 'topbar_remain_top' => WDW_FM_Library(self::PLUGIN)->get('topbar_remain_top', 1),
958
+ 'topbar_closing' => WDW_FM_Library(self::PLUGIN)->get('topbar_closing', 1),
959
+ 'topbar_hide_duration' => $this->set_delay_freq_positive_val( WDW_FM_Library(self::PLUGIN)->get('topbar_hide_duration', 0) ),
960
+ 'scrollbox_position' => WDW_FM_Library(self::PLUGIN)->get('scrollbox_position', 1),
961
+ 'scrollbox_trigger_point' => WDW_FM_Library(self::PLUGIN)->get('scrollbox_trigger_point', 20),
962
+ 'scrollbox_hide_duration' => $this->set_delay_freq_positive_val( WDW_FM_Library(self::PLUGIN)->get('scrollbox_hide_duration', 0)),
963
+ 'scrollbox_auto_hide' => WDW_FM_Library(self::PLUGIN)->get('scrollbox_auto_hide', 1),
964
+ 'hide_mobile' => WDW_FM_Library(self::PLUGIN)->get('hide_mobile', 0),
965
+ 'scrollbox_closing' => WDW_FM_Library(self::PLUGIN)->get('scrollbox_closing', 1),
966
+ 'scrollbox_minimize' => WDW_FM_Library(self::PLUGIN)->get('scrollbox_minimize', 1),
967
+ 'scrollbox_minimize_text' => WDW_FM_Library(self::PLUGIN)->get('scrollbox_minimize_text', ''),
968
+ 'type' => WDW_FM_Library(self::PLUGIN)->get('form_type', 'embadded'),
969
+ 'display_on' => implode(',', WDW_FM_Library(self::PLUGIN)->get('display_on', array())),
970
+ 'posts_include' => WDW_FM_Library(self::PLUGIN)->get('posts_include', ''),
971
+ 'pages_include' => WDW_FM_Library(self::PLUGIN)->get('pages_include', ''),
972
+ 'display_on_categories' => implode(',', WDW_FM_Library(self::PLUGIN)->get('display_on_categories', array())),
973
+ 'current_categories' => WDW_FM_Library(self::PLUGIN)->get('current_categories', ''),
974
+ 'show_for_admin' => WDW_FM_Library(self::PLUGIN)->get('show_for_admin', 0),
975
  );
976
 
977
  $save = $this->model->replace_display_options($option_data);
994
  // TODO: remove this function.
995
  public function save_as_copy() {
996
  $message = $this->save_db_as_copy();
997
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
998
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
999
  'page' => $page,
1000
  'task' => 'display',
1001
  'message' => $message,
1004
 
1005
  public function save() {
1006
  $message = $this->save_db();
1007
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
1008
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
1009
  'page' => $page,
1010
  'task' => 'display',
1011
  'message' => $message,
1014
 
1015
  public function apply() {
1016
  $message = $this->save_db();
1017
+ $current_id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
1018
  if ( !$current_id ) {
1019
  $current_id = (int) $this->model->get_max_row('formmaker', 'id');
1020
  }
1021
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
1022
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
1023
  'page' => $page,
1024
  'task' => 'edit',
1025
  'current_id' => $current_id,
1037
  }
1038
  // Occurs just before resetting the form
1039
  function before_reset() {
1040
+ }
1041
+ // Occurs after form is submitted and reloaded
1042
+ function after_submit() {
1043
+
1044
  }";
1045
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
1046
+ $title = WDW_FM_Library(self::PLUGIN)->get('title', '');
1047
+ $theme = (int) WDW_FM_Library(self::PLUGIN)->get('theme', 0);
1048
  $theme = ($theme) ? $theme : $this->model->get_default_theme_id();
1049
+ $form_front = WDW_FM_Library(self::PLUGIN)->get('form_front', '', false);
1050
+ $sortable = WDW_FM_Library(self::PLUGIN)->get('sortable', 0);
1051
+ $counter = WDW_FM_Library(self::PLUGIN)->get('counter', 0);
1052
+ $label_order = WDW_FM_Library(self::PLUGIN)->get('label_order', '');
1053
+ $pagination = WDW_FM_Library(self::PLUGIN)->get('pagination', '');
1054
+ $show_title = WDW_FM_Library(self::PLUGIN)->get('show_title', '');
1055
+ $show_numbers = WDW_FM_Library(self::PLUGIN)->get('show_numbers', '');
1056
+ $public_key = WDW_FM_Library(self::PLUGIN)->get('public_key', '');
1057
+ $private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
1058
+ $recaptcha_theme = WDW_FM_Library(self::PLUGIN)->get('recaptcha_theme', '');
1059
+ $label_order_current = WDW_FM_Library(self::PLUGIN)->get('label_order_current', '');
1060
+ $form_fields = WDW_FM_Library(self::PLUGIN)->get('form_fields', '', false);
1061
+ $header_title = WDW_FM_Library(self::PLUGIN)->get('header_title', '');
1062
+ $header_description = WDW_FM_Library(self::PLUGIN)->get('header_description', '', FALSE);
1063
+ $header_image_url = WDW_FM_Library(self::PLUGIN)->get('header_image_url', '');
1064
+ $header_image_animation = WDW_FM_Library(self::PLUGIN)->get('header_image_animation', '');
1065
+ $header_hide_image = WDW_FM_Library(self::PLUGIN)->get('header_hide_image', 0);
1066
+ $type = WDW_FM_Library(self::PLUGIN)->get('form_type', 'embedded');
1067
  $scrollbox_minimize_text = $header_title ? $header_title : 'The form is minimized.';
1068
  if ( $id != 0 ) {
1069
  $save = $this->model->update_data('formmaker', array(
1153
  'header_hide_image' => $header_hide_image,
1154
  ));
1155
  $id = (int) $this->model->get_max_row('formmaker', 'id');
1156
+ if (WDFMInstance(self::PLUGIN)->is_free == 2) {
1157
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
1158
  }
1159
  $this->model->insert_data_to_db('formmaker_display_options', array(
1187
  'views' => 0,
1188
  ));
1189
  }
1190
+ $backup_id = (int) WDW_FM_Library(self::PLUGIN)->get('backup_id', '');
1191
  if ( $backup_id ) {
1192
  if ( $this->model->get_backup_id($backup_id, $id) ) {
1193
  $this->model->delete_rows(array(
1389
  }
1390
 
1391
  public function update_form_title( $id ) {
1392
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
1393
+ $form_name = WDW_FM_Library(self::PLUGIN)->get('form_name', '');
1394
 
1395
  // check id for db
1396
  if(isset($id) && $id != "") {
1398
  $update = $this->model->update_data( "forms", array('title' => $form_name,), array('id' => $id) );
1399
  if( !$update ){
1400
  $message = 2;
1401
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
1402
  'page' => $page,
1403
  'task' => 'display',
1404
  'message' => $message,
1408
  }
1409
  else { // return message Failed
1410
  $message = 2;
1411
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
1412
  'page' => $page,
1413
  'task' => 'display',
1414
  'message' => $message,
admin/controllers/Options_fm.php CHANGED
@@ -3,22 +3,22 @@
3
  /**
4
  * Class FMControllerOptions_fm
5
  */
6
- class FMControllerOptions_fm {
7
  private $model;
8
  private $view;
9
 
10
  public function __construct() {
11
- require_once WDFM()->plugin_dir . "/admin/models/Options_fm.php";
12
  $this->model = new FMModelOptions_fm();
13
- require_once WDFM()->plugin_dir . "/admin/views/Options_fm.php";
14
  $this->view = new FMViewOptions_fm();
15
  }
16
 
17
  public function execute() {
18
- $task = WDW_FM_Library::get('task');
19
- $id = (int) WDW_FM_Library::get('current_id', 0);
20
  if ( method_exists($this, $task) ) {
21
- check_admin_referer(WDFM()->nonce, WDFM()->nonce);
22
  $this->$task($id);
23
  }
24
  else {
@@ -27,14 +27,14 @@ class FMControllerOptions_fm {
27
  }
28
 
29
  public function display() {
30
- $fm_settings = get_option('fm_settings');
31
  $this->view->display($fm_settings);
32
  }
33
 
34
  public function save() {
35
  $message = $this->model->save_db();
36
- $page = WDW_FM_Library::get('page');
37
- WDW_FM_Library::fm_redirect(add_query_arg(array(
38
  'page' => $page,
39
  'task' => 'display',
40
  'message' => $message,
3
  /**
4
  * Class FMControllerOptions_fm
5
  */
6
+ class FMControllerOptions_fm extends FMAdminController {
7
  private $model;
8
  private $view;
9
 
10
  public function __construct() {
11
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Options_fm.php";
12
  $this->model = new FMModelOptions_fm();
13
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Options_fm.php";
14
  $this->view = new FMViewOptions_fm();
15
  }
16
 
17
  public function execute() {
18
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
19
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
20
  if ( method_exists($this, $task) ) {
21
+ check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
22
  $this->$task($id);
23
  }
24
  else {
27
  }
28
 
29
  public function display() {
30
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
31
  $this->view->display($fm_settings);
32
  }
33
 
34
  public function save() {
35
  $message = $this->model->save_db();
36
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
37
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
38
  'page' => $page,
39
  'task' => 'display',
40
  'message' => $message,
admin/controllers/Paypal_info.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class FMControllerPaypal_info {
4
  /**
5
  * @var $model
6
  */
@@ -22,12 +22,12 @@ class FMControllerPaypal_info {
22
  */
23
  public function display() {
24
  // Load FMModelPaypal_info class.
25
- require_once WDFM()->plugin_dir . "/admin/models/FMPaypalInfo.php";
26
  $this->model = new FMModelPaypal_info();
27
  // Load FMViewPaypal_info class.
28
- require_once WDFM()->plugin_dir . "/admin/views/FMPaypalInfo.php";
29
  $this->view = new FMViewPaypal_info();
30
- $id = WDW_FM_Library::get('id', 0);
31
  // Get form session by id.
32
  $row = $this->model->get_form_session($id);
33
  // Set params for view.
1
  <?php
2
 
3
+ class FMControllerPaypal_info extends FMAdminController {
4
  /**
5
  * @var $model
6
  */
22
  */
23
  public function display() {
24
  // Load FMModelPaypal_info class.
25
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/FMPaypalInfo.php";
26
  $this->model = new FMModelPaypal_info();
27
  // Load FMViewPaypal_info class.
28
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMPaypalInfo.php";
29
  $this->view = new FMViewPaypal_info();
30
+ $id = WDW_FM_Library(self::PLUGIN)->get('id', 0);
31
  // Get form session by id.
32
  $row = $this->model->get_form_session($id);
33
  // Set params for view.
admin/controllers/Pricing_fm.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Class FMControllerPricing_fm
4
  */
5
- class FMControllerPricing_fm {
6
  /**
7
  * @var $model
8
  */
@@ -17,13 +17,13 @@ class FMControllerPricing_fm {
17
  private $page;
18
 
19
  public function __construct() {
20
- $this->page = WDW_FM_Library::get('page');
21
  $this->page_url = add_query_arg( array (
22
  'page' => $this->page,
23
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
24
  ), admin_url('admin.php')
25
  );
26
- require_once WDFM()->plugin_dir . "/admin/views/Pricing_fm.php";
27
  $this->view = new FMViewpricing_fm();
28
  }
29
 
@@ -31,8 +31,8 @@ class FMControllerPricing_fm {
31
  * Execute.
32
  */
33
  public function execute() {
34
- $task = WDW_FM_Library::get('task');
35
- $id = (int) WDW_FM_Library::get('current_id', 0);
36
  if (method_exists($this, $task)) {
37
  $this->$task($id);
38
  }
2
  /**
3
  * Class FMControllerPricing_fm
4
  */
5
+ class FMControllerPricing_fm extends FMAdminController {
6
  /**
7
  * @var $model
8
  */
17
  private $page;
18
 
19
  public function __construct() {
20
+ $this->page = WDW_FM_Library(self::PLUGIN)->get('page');
21
  $this->page_url = add_query_arg( array (
22
  'page' => $this->page,
23
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
24
  ), admin_url('admin.php')
25
  );
26
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Pricing_fm.php";
27
  $this->view = new FMViewpricing_fm();
28
  }
29
 
31
  * Execute.
32
  */
33
  public function execute() {
34
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
35
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
36
  if (method_exists($this, $task)) {
37
  $this->$task($id);
38
  }
admin/controllers/Product_option.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerProduct_option
5
  */
6
- class FMControllerProduct_option {
7
  /**
8
  * @var $view
9
  */
@@ -21,11 +21,11 @@ class FMControllerProduct_option {
21
  */
22
  public function display() {
23
  // Load FMViewProduct_option class.
24
- require_once WDFM()->plugin_dir . "/admin/views/FMProductOption.php";
25
  $this->view = new FMViewProduct_option();
26
- $field_id = WDW_FM_Library::get('field_id', 0);
27
- $property_id = WDW_FM_Library::get('property_id', '-1');
28
- $url_for_ajax = WDW_FM_Library::get('url_for_ajax', '');
29
  // Set params for view.
30
  $params = array();
31
  $params['field_id'] = $field_id;
3
  /**
4
  * Class FMControllerProduct_option
5
  */
6
+ class FMControllerProduct_option extends FMAdminController {
7
  /**
8
  * @var $view
9
  */
21
  */
22
  public function display() {
23
  // Load FMViewProduct_option class.
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMProductOption.php";
25
  $this->view = new FMViewProduct_option();
26
+ $field_id = WDW_FM_Library(self::PLUGIN)->get('field_id', 0);
27
+ $property_id = WDW_FM_Library(self::PLUGIN)->get('property_id', '-1');
28
+ $url_for_ajax = WDW_FM_Library(self::PLUGIN)->get('url_for_ajax', '');
29
  // Set params for view.
30
  $params = array();
31
  $params['field_id'] = $field_id;
admin/controllers/Select_data_from_db.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerSelect_data_from_db
5
  */
6
- class FMControllerSelect_data_from_db {
7
  /**
8
  * @var $model
9
  */
@@ -15,10 +15,10 @@ class FMControllerSelect_data_from_db {
15
 
16
  public function __construct() {
17
  // Load FMModelSelect_data_from_db class.
18
- require_once WDFM()->plugin_dir . "/admin/models/FMSelectDataFromDb.php";
19
  $this->model = new FMModelSelect_data_from_db();
20
  // Load FMViewSelect_data_from_db class.
21
- require_once WDFM()->plugin_dir . "/admin/views/FMSelectDataFromDb.php";
22
  $this->view = new FMViewSelect_data_from_db();
23
  }
24
 
@@ -26,12 +26,12 @@ class FMControllerSelect_data_from_db {
26
  * Execute.
27
  */
28
  public function execute() {
29
- $task = WDW_FM_Library::get('task', 0);
30
- $id = WDW_FM_Library::get('id', 0);
31
- $form_id = WDW_FM_Library::get('form_id', 0);
32
- $field_id = WDW_FM_Library::get('field_id', 0);
33
- $value_disabled = WDW_FM_Library::get('value_disabled', 0);
34
- $field_type = WDW_FM_Library::get('field_type', '');
35
  if ( $task && method_exists($this, $task) ) {
36
  $this->$task($form_id, $field_type = "");
37
  }
3
  /**
4
  * Class FMControllerSelect_data_from_db
5
  */
6
+ class FMControllerSelect_data_from_db extends FMAdminController {
7
  /**
8
  * @var $model
9
  */
15
 
16
  public function __construct() {
17
  // Load FMModelSelect_data_from_db class.
18
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/FMSelectDataFromDb.php";
19
  $this->model = new FMModelSelect_data_from_db();
20
  // Load FMViewSelect_data_from_db class.
21
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMSelectDataFromDb.php";
22
  $this->view = new FMViewSelect_data_from_db();
23
  }
24
 
26
  * Execute.
27
  */
28
  public function execute() {
29
+ $task = WDW_FM_Library(self::PLUGIN)->get('task', 0);
30
+ $id = WDW_FM_Library(self::PLUGIN)->get('id', 0);
31
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
32
+ $field_id = WDW_FM_Library(self::PLUGIN)->get('field_id', 0);
33
+ $value_disabled = WDW_FM_Library(self::PLUGIN)->get('value_disabled', 0);
34
+ $field_type = WDW_FM_Library(self::PLUGIN)->get('field_type', '');
35
  if ( $task && method_exists($this, $task) ) {
36
  $this->$task($form_id, $field_type = "");
37
  }
admin/controllers/Show_matrix.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class FMControllerShow_matrix {
4
  /**
5
  * @var $view
6
  */
@@ -18,7 +18,7 @@ class FMControllerShow_matrix {
18
  */
19
  public function display() {
20
  // Load FMViewShow_matrix class.
21
- require_once WDFM()->plugin_dir . "/admin/views/FMShowMatrix.php";
22
  $this->view = new FMViewShow_matrix();
23
  // Set params for view.
24
  $params = array();
1
  <?php
2
 
3
+ class FMControllerShow_matrix extends FMAdminController {
4
  /**
5
  * @var $view
6
  */
18
  */
19
  public function display() {
20
  // Load FMViewShow_matrix class.
21
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/FMShowMatrix.php";
22
  $this->view = new FMViewShow_matrix();
23
  // Set params for view.
24
  $params = array();
admin/controllers/Submissions_fm.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Class FMControllerSubmissions_fm
4
  */
5
- class FMControllerSubmissions_fm {
6
  /**
7
  * @var $model
8
  */
@@ -34,32 +34,32 @@ class FMControllerSubmissions_fm {
34
 
35
  public function __construct() {
36
  // Load FMModelSubmissions_fm class.
37
- require_once WDFM()->plugin_dir . "/admin/models/Submissions_fm.php";
38
  $this->model = new FMModelSubmissions_fm();
39
  // Load FMViewSubmissions_fm class.
40
- require_once WDFM()->plugin_dir . "/admin/views/Submissions_fm.php";
41
  $this->view = new FMViewSubmissions_fm($this->model);
42
 
43
- $this->page = WDW_FM_Library::get('page');
44
  $this->page_url = add_query_arg( array (
45
  'page' => $this->page,
46
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
47
  ), admin_url('admin.php')
48
  );
49
 
50
  $this->bulk_action_name = 'bulk_action';
51
  $this->actions = array(
52
  'block_ip' => array(
53
- 'title' => __('Block IPs', WDFM()->prefix),
54
- $this->bulk_action_name => __('Blocked', WDFM()->prefix),
55
  ),
56
  'unblock_ip' => array(
57
- 'title' => __('Unblock IPs', WDFM()->prefix),
58
- $this->bulk_action_name => __('Unblocked', WDFM()->prefix),
59
  ),
60
  'delete' => array(
61
- 'title' => __('Delete', WDFM()->prefix),
62
- $this->bulk_action_name => __('Deleted', WDFM()->prefix),
63
  ),
64
  );
65
 
@@ -78,14 +78,14 @@ class FMControllerSubmissions_fm {
78
  * Execute.
79
  */
80
  public function execute() {
81
- $task = WDW_FM_Library::get('task');
82
- $id = (int) WDW_FM_Library::get('current_id', 0);
83
  if ( method_exists($this, $task) ) {
84
  if ( $task != 'display' ) {
85
- check_admin_referer(WDFM()->nonce, WDFM()->nonce);
86
  }
87
  $block_action = $this->bulk_action_name;
88
- $action = WDW_FM_Library::get( $block_action , -1 );
89
  if ( $action != -1 ) {
90
  $this->$block_action($action);
91
  }
@@ -104,8 +104,8 @@ class FMControllerSubmissions_fm {
104
  * @param $task
105
  */
106
  public function bulk_action($task) {
107
- $form_id = WDW_FM_Library::get('form_id', 0);
108
- $check = WDW_FM_Library::get('check', '');
109
 
110
  $message = 0;
111
  $successfully_updated = 0;
@@ -122,10 +122,10 @@ class FMControllerSubmissions_fm {
122
  }
123
  if ( $successfully_updated ) {
124
  $block_action = $this->bulk_action_name;
125
- $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFM()->prefix), $successfully_updated, $this->actions[$task][$block_action]);
126
  }
127
  }
128
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $form_id, ($message === 2 ? 'message' : 'msg') => $message), admin_url('admin.php') ) );
129
  }
130
 
131
  /**
@@ -138,7 +138,7 @@ class FMControllerSubmissions_fm {
138
  $params['id'] = $id;
139
  $params['page'] = $this->page;
140
  $params['page_url'] = $this->page_url;
141
- $params['page_title'] = __('Submissions', WDFM()->prefix);
142
  $params['forms'] = $this->model->get_forms();
143
 
144
  $this->view->forms($params);
@@ -154,13 +154,13 @@ class FMControllerSubmissions_fm {
154
  $params['id'] = $id;
155
  $params['page'] = $this->page;
156
  $params['page_url'] = $this->page_url;
157
- $params['page_title'] = __('Submissions', WDFM()->prefix);
158
  $params['actions'] = $this->actions;
159
 
160
  // Set pagination params.
161
  $params['pagination_url'] = add_query_arg( array( 'task' => 'display', 'current_id' => $id ), $this->page_url );
162
  $params['page_per_num'] = $this->page_per_num;
163
- $page = (int) WDW_FM_Library::get('paged', 1);
164
  $page_num = $page ? ($page - 1) * $params['page_per_num'] : 0;
165
 
166
  $params['forms'] = $this->model->get_forms();
@@ -228,9 +228,9 @@ class FMControllerSubmissions_fm {
228
  */
229
  public function show_stats( $id = 0 ) {
230
  ob_clean();
231
- $key = (int) WDW_FM_Library::get('sorted_label_key', '');
232
 
233
- $page = (int) WDW_FM_Library::get('paged', 1);
234
  $page_num = $page ? ($page - 1) * $this->page_per_num : 0;
235
 
236
  $labels_parameters = $this->model->get_labels_parameters( $id, $page_num, $this->page_per_num);
@@ -277,10 +277,10 @@ class FMControllerSubmissions_fm {
277
  * @param int $id
278
  */
279
  public function edit( $id=0 ) {
280
- $form_id = WDW_FM_Library::get('form_id', 0);
281
  $data = $this->model->get_data_of_group_id( $id );
282
  if ( empty($data[0]) ) {
283
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $id ), admin_url('admin.php') ) );
284
  }
285
 
286
  $labels_id = '';
@@ -321,7 +321,7 @@ class FMControllerSubmissions_fm {
321
  * @param int $id
322
  */
323
  public function save( $id = 0 ) {
324
- $form_id = WDW_FM_Library::get('form_id', 0);
325
  $this->save_db( $id, $form_id );
326
  }
327
 
@@ -450,7 +450,7 @@ class FMControllerSubmissions_fm {
450
  'message' => $message,
451
  );
452
 
453
- WDW_FM_Library::fm_redirect(add_query_arg( $args, admin_url('admin.php')) );
454
  }
455
 
456
  /**
@@ -462,7 +462,7 @@ class FMControllerSubmissions_fm {
462
  * @return int
463
  */
464
  public function delete( $id, $bulk = FALSE ) {
465
- $form_id = (int) WDW_FM_Library::get('form_id', 0);
466
  $delete = $this->model->delete_row($id);
467
  $message = 2;
468
  if ( $delete ) {
@@ -473,7 +473,7 @@ class FMControllerSubmissions_fm {
473
  return $message;
474
  }
475
 
476
- WDW_FM_Library::fm_redirect(add_query_arg(array(
477
  'page' => $this->page,
478
  'task' => 'display',
479
  'current_id'=> $form_id,
@@ -492,7 +492,7 @@ class FMControllerSubmissions_fm {
492
  public function block_ip( $id, $bulk = FALSE ) {
493
  global $wpdb;
494
 
495
- $form_id = (int) WDW_FM_Library::get('form_id', 0);
496
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
497
  $row = $wpdb->get_row($q);
498
  $message = 2;
@@ -510,7 +510,7 @@ class FMControllerSubmissions_fm {
510
  return $message;
511
  }
512
 
513
- WDW_FM_Library::fm_redirect(add_query_arg( array(
514
  'page' => $this->page,
515
  'task' => 'display',
516
  'current_id'=> $form_id,
@@ -529,7 +529,7 @@ class FMControllerSubmissions_fm {
529
  public function unblock_ip( $id, $bulk = FALSE ) {
530
  global $wpdb;
531
 
532
- $form_id = (int) WDW_FM_Library::get('form_id', 0);
533
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
534
  $row = $wpdb->get_row($q);
535
  $message = 2;
@@ -547,7 +547,7 @@ class FMControllerSubmissions_fm {
547
  return $message;
548
  }
549
 
550
- WDW_FM_Library::fm_redirect(add_query_arg( array(
551
  'page' => $this->page,
552
  'task' => 'display',
553
  'current_id'=> $form_id,
2
  /**
3
  * Class FMControllerSubmissions_fm
4
  */
5
+ class FMControllerSubmissions_fm extends FMAdminController {
6
  /**
7
  * @var $model
8
  */
34
 
35
  public function __construct() {
36
  // Load FMModelSubmissions_fm class.
37
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Submissions_fm.php";
38
  $this->model = new FMModelSubmissions_fm();
39
  // Load FMViewSubmissions_fm class.
40
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Submissions_fm.php";
41
  $this->view = new FMViewSubmissions_fm($this->model);
42
 
43
+ $this->page = WDW_FM_Library(self::PLUGIN)->get('page');
44
  $this->page_url = add_query_arg( array (
45
  'page' => $this->page,
46
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
47
  ), admin_url('admin.php')
48
  );
49
 
50
  $this->bulk_action_name = 'bulk_action';
51
  $this->actions = array(
52
  'block_ip' => array(
53
+ 'title' => __('Block IPs', WDFMInstance(self::PLUGIN)->prefix),
54
+ $this->bulk_action_name => __('Blocked', WDFMInstance(self::PLUGIN)->prefix),
55
  ),
56
  'unblock_ip' => array(
57
+ 'title' => __('Unblock IPs', WDFMInstance(self::PLUGIN)->prefix),
58
+ $this->bulk_action_name => __('Unblocked', WDFMInstance(self::PLUGIN)->prefix),
59
  ),
60
  'delete' => array(
61
+ 'title' => __('Delete', WDFMInstance(self::PLUGIN)->prefix),
62
+ $this->bulk_action_name => __('Deleted', WDFMInstance(self::PLUGIN)->prefix),
63
  ),
64
  );
65
 
78
  * Execute.
79
  */
80
  public function execute() {
81
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
82
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
83
  if ( method_exists($this, $task) ) {
84
  if ( $task != 'display' ) {
85
+ check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
86
  }
87
  $block_action = $this->bulk_action_name;
88
+ $action = WDW_FM_Library(self::PLUGIN)->get( $block_action , -1 );
89
  if ( $action != -1 ) {
90
  $this->$block_action($action);
91
  }
104
  * @param $task
105
  */
106
  public function bulk_action($task) {
107
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
108
+ $check = WDW_FM_Library(self::PLUGIN)->get('check', '');
109
 
110
  $message = 0;
111
  $successfully_updated = 0;
122
  }
123
  if ( $successfully_updated ) {
124
  $block_action = $this->bulk_action_name;
125
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
126
  }
127
  }
128
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $form_id, ($message === 2 ? 'message' : 'msg') => $message), admin_url('admin.php') ) );
129
  }
130
 
131
  /**
138
  $params['id'] = $id;
139
  $params['page'] = $this->page;
140
  $params['page_url'] = $this->page_url;
141
+ $params['page_title'] = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
142
  $params['forms'] = $this->model->get_forms();
143
 
144
  $this->view->forms($params);
154
  $params['id'] = $id;
155
  $params['page'] = $this->page;
156
  $params['page_url'] = $this->page_url;
157
+ $params['page_title'] = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
158
  $params['actions'] = $this->actions;
159
 
160
  // Set pagination params.
161
  $params['pagination_url'] = add_query_arg( array( 'task' => 'display', 'current_id' => $id ), $this->page_url );
162
  $params['page_per_num'] = $this->page_per_num;
163
+ $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
164
  $page_num = $page ? ($page - 1) * $params['page_per_num'] : 0;
165
 
166
  $params['forms'] = $this->model->get_forms();
228
  */
229
  public function show_stats( $id = 0 ) {
230
  ob_clean();
231
+ $key = (int) WDW_FM_Library(self::PLUGIN)->get('sorted_label_key', '');
232
 
233
+ $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
234
  $page_num = $page ? ($page - 1) * $this->page_per_num : 0;
235
 
236
  $labels_parameters = $this->model->get_labels_parameters( $id, $page_num, $this->page_per_num);
277
  * @param int $id
278
  */
279
  public function edit( $id=0 ) {
280
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
281
  $data = $this->model->get_data_of_group_id( $id );
282
  if ( empty($data[0]) ) {
283
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $id ), admin_url('admin.php') ) );
284
  }
285
 
286
  $labels_id = '';
321
  * @param int $id
322
  */
323
  public function save( $id = 0 ) {
324
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
325
  $this->save_db( $id, $form_id );
326
  }
327
 
450
  'message' => $message,
451
  );
452
 
453
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg( $args, admin_url('admin.php')) );
454
  }
455
 
456
  /**
462
  * @return int
463
  */
464
  public function delete( $id, $bulk = FALSE ) {
465
+ $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
466
  $delete = $this->model->delete_row($id);
467
  $message = 2;
468
  if ( $delete ) {
473
  return $message;
474
  }
475
 
476
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
477
  'page' => $this->page,
478
  'task' => 'display',
479
  'current_id'=> $form_id,
492
  public function block_ip( $id, $bulk = FALSE ) {
493
  global $wpdb;
494
 
495
+ $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
496
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
497
  $row = $wpdb->get_row($q);
498
  $message = 2;
510
  return $message;
511
  }
512
 
513
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg( array(
514
  'page' => $this->page,
515
  'task' => 'display',
516
  'current_id'=> $form_id,
529
  public function unblock_ip( $id, $bulk = FALSE ) {
530
  global $wpdb;
531
 
532
+ $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
533
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
534
  $row = $wpdb->get_row($q);
535
  $message = 2;
547
  return $message;
548
  }
549
 
550
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg( array(
551
  'page' => $this->page,
552
  'task' => 'display',
553
  'current_id'=> $form_id,
admin/controllers/Themes_fm.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMControllerThemes_fm
5
  */
6
- class FMControllerThemes_fm {
7
  /**
8
  * @var $model
9
  */
@@ -30,21 +30,21 @@ class FMControllerThemes_fm {
30
  private $actions = array();
31
 
32
  public function __construct() {
33
- require_once WDFM()->plugin_dir . "/admin/models/Themes_fm.php";
34
  $this->model = new FMModelThemes_fm();
35
- require_once WDFM()->plugin_dir . "/admin/views/Themes_fm.php";
36
  $this->view = new FMViewThemes_fm();
37
- $this->page = WDW_FM_Library::get('page');
38
  $this->bulk_action_name = 'bulk_action';
39
 
40
  $this->actions = array(
41
  'duplicate' => array(
42
- 'title' => __('Duplicate', WDFM()->prefix),
43
- $this->bulk_action_name => __('duplicated', WDFM()->prefix),
44
  ),
45
  'delete' => array(
46
- 'title' => __('Delete', WDFM()->prefix),
47
- $this->bulk_action_name => __('deleted', WDFM()->prefix),
48
  ),
49
  );
50
  }
@@ -53,14 +53,14 @@ class FMControllerThemes_fm {
53
  * Execute.
54
  */
55
  public function execute() {
56
- $task = WDW_FM_Library::get('task');
57
- $id = (int) WDW_FM_Library::get('current_id', 0);
58
  if ( method_exists($this, $task) ) {
59
  if ( $task != 'add' && $task != 'edit' && $task != 'display' ) {
60
- check_admin_referer(WDFM()->nonce, WDFM()->nonce);
61
  }
62
  $block_action = $this->bulk_action_name;
63
- $action = WDW_FM_Library::get($block_action, -1);
64
  if ( $action != -1 ) {
65
  $this->$block_action($action);
66
  }
@@ -80,20 +80,20 @@ class FMControllerThemes_fm {
80
  // Set params for view.
81
  $params = array();
82
  $params['page'] = $this->page;
83
- $params['page_title'] = __('Themes', WDFM()->prefix);
84
  $params['actions'] = $this->actions;
85
- $params['order'] = WDW_FM_Library::get('order', 'desc');
86
- $params['orderby'] = WDW_FM_Library::get('orderby', 'default');
87
  // To prevent SQL injections.
88
  $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
89
  if ( !in_array($params['orderby'], array( 'title', 'default' )) ) {
90
  $params['orderby'] = 'default';
91
  }
92
  $params['items_per_page'] = $this->items_per_page;
93
- $page = (int) WDW_FM_Library::get('paged', 1);
94
  $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
95
  $params['page_num'] = $page_num;
96
- $params['search'] = WDW_FM_Library::get('s', '');;
97
  $params['total'] = $this->model->total();
98
  $params['rows_data'] = $this->model->get_rows_data($params);
99
  $this->view->display($params);
@@ -108,7 +108,7 @@ class FMControllerThemes_fm {
108
  $message = 0;
109
  $successfully_updated = 0;
110
 
111
- $check = WDW_FM_Library::get('check', '');
112
 
113
  if ( $check ) {
114
  foreach ( $check as $form_id => $item ) {
@@ -122,11 +122,11 @@ class FMControllerThemes_fm {
122
  }
123
  if ( $successfully_updated ) {
124
  $block_action = $this->bulk_action_name;
125
- $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFM()->prefix), $successfully_updated, $this->actions[$task][$block_action]);
126
  }
127
  }
128
 
129
- WDW_FM_Library::fm_redirect(add_query_arg(array(
130
  'page' => $this->page,
131
  'task' => 'display',
132
  ($message === 2 ? 'message' : 'msg') => $message,
@@ -163,7 +163,7 @@ class FMControllerThemes_fm {
163
  if ( $bulk ) {
164
  return $message;
165
  }
166
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'message' => $message), admin_url('admin.php') ) );
167
  }
168
 
169
  /**
@@ -195,7 +195,7 @@ class FMControllerThemes_fm {
195
  return $message;
196
  }
197
  else {
198
- WDW_FM_Library::fm_redirect(add_query_arg(array(
199
  'page' => $this->page,
200
  'task' => 'display',
201
  'message' => $message,
@@ -214,23 +214,23 @@ class FMControllerThemes_fm {
214
  $params['row'] = $this->model->get_row_data($params['id'], FALSE);
215
 
216
  if ( $id != 0 && empty($params['row']) ) {
217
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
218
  }
219
  $params['page_title'] = $params['row']->title;
220
  $params['param_values'] = $params['row']->css;
221
  $params['tabs'] = array(
222
- 'global' => __('Global Parameters', WDFM()->prefix),
223
- 'header' => __('Header', WDFM()->prefix),
224
- 'content' => __('Content', WDFM()->prefix),
225
- 'input_select' => __('Inputbox', WDFM()->prefix),
226
- 'choices' => __('Choices', WDFM()->prefix),
227
- 'subscribe' => __('General Buttons', WDFM()->prefix),
228
- 'paigination' => __('Pagination', WDFM()->prefix),
229
- 'buttons' => __('Buttons', WDFM()->prefix),
230
- 'close_button' => __('Close(Minimize) Button', WDFM()->prefix),
231
- 'minimize' => __('Minimize Text', WDFM()->prefix),
232
- 'other' => __('Other', WDFM()->prefix),
233
- 'custom_css' => __('Custom CSS', WDFM()->prefix),
234
  );
235
  $border_types = array(
236
  '' => '',
@@ -249,10 +249,10 @@ class FMControllerThemes_fm {
249
  );
250
  $borders = array(
251
  '' => '',
252
- 'top' => __('Top', WDFM()->prefix),
253
- 'right' => __('Right', WDFM()->prefix),
254
- 'bottom' => __('Bottom', WDFM()->prefix),
255
- 'left' => __('Left', WDFM()->prefix)
256
  );
257
  $position_types = array(
258
  '' => '',
@@ -269,7 +269,7 @@ class FMControllerThemes_fm {
269
  'lighter' => 'Lighter',
270
  'initial' => 'Initial',
271
  );
272
- $aligns = array( '' => '', 'left' => __('Left', WDFM()->prefix), 'center' => __('Center', WDFM()->prefix), 'right' => __('Right', WDFM()->prefix) );
273
  $basic_fonts = array(
274
  '' => '',
275
  'arial' => 'Arial',
@@ -292,7 +292,7 @@ class FMControllerThemes_fm {
292
  'initial' => 'initial',
293
  'inherit' => 'inherit',
294
  );
295
- $google_fonts = WDW_FM_Library::get_google_fonts();
296
  $font_families = $basic_fonts + $google_fonts;
297
  $params['fonts'] = implode("|", str_replace(' ', '+', $google_fonts));
298
  $params['all_params'] = $this->all_params($params['param_values'], $borders, $border_types, $font_weights, $position_types, $aligns, $bg_repeats, $font_families);
@@ -312,7 +312,7 @@ class FMControllerThemes_fm {
312
  'after' => '',
313
  ),
314
  array(
315
- 'label' => __('Font Family', WDFM()->prefix),
316
  'name' => 'GPFontFamily',
317
  'type' => 'select',
318
  'options' => $font_families,
@@ -321,7 +321,7 @@ class FMControllerThemes_fm {
321
  'after' => '',
322
  ),
323
  array(
324
- 'label' => __('Width', WDFM()->prefix),
325
  'name' => 'AGPWidth',
326
  'type' => 'text',
327
  'class' => '',
@@ -329,7 +329,7 @@ class FMControllerThemes_fm {
329
  'after' => '%',
330
  ),
331
  array(
332
- 'label' => __('Width (for scrollbox, popup form types)', WDFM()->prefix),
333
  'name' => 'AGPSPWidth',
334
  'type' => 'text',
335
  'class' => '',
@@ -337,25 +337,25 @@ class FMControllerThemes_fm {
337
  'after' => '%',
338
  ),
339
  array(
340
- 'label' => __('Padding', WDFM()->prefix),
341
  'name' => 'AGPPadding',
342
  'type' => 'text',
343
  'class' => '',
344
- 'placeholder' => __('e.g. 3px 5px or 3% 5%', WDFM()->prefix),
345
  'value' => isset($param_values->AGPPadding) ? $param_values->AGPPadding : '',
346
  'after' => '',
347
  ),
348
  array(
349
- 'label' => __('Margin', WDFM()->prefix),
350
  'name' => 'AGPMargin',
351
  'type' => 'text',
352
  'class' => '',
353
  'value' => isset($param_values->AGPMargin) ? $param_values->AGPMargin : '',
354
- 'placeholder' => __('e.g. 5px 10px or 5% 10%', WDFM()->prefix),
355
  'after' => '',
356
  ),
357
  array(
358
- 'label' => __('Border', WDFM()->prefix),
359
  'name' => 'AGPBorder',
360
  'type' => 'checkbox',
361
  'options' => $borders,
@@ -363,16 +363,16 @@ class FMControllerThemes_fm {
363
  'after' => '',
364
  ),
365
  array(
366
- 'label' => __('Border Color', WDFM()->prefix),
367
  'name' => 'AGPBorderColor',
368
  'type' => 'text',
369
  'class' => 'color',
370
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #e5e5e5',
371
  'value' => isset($param_values->AGPBorderColor) ? $param_values->AGPBorderColor : '',
372
  'after' => '',
373
  ),
374
  array(
375
- 'label' => __('Border Type', WDFM()->prefix),
376
  'name' => 'AGPBorderType',
377
  'type' => 'select',
378
  'options' => $border_types,
@@ -381,7 +381,7 @@ class FMControllerThemes_fm {
381
  'after' => '',
382
  ),
383
  array(
384
- 'label' => __('Border Width', WDFM()->prefix),
385
  'name' => 'AGPBorderWidth',
386
  'type' => 'text',
387
  'class' => '',
@@ -389,7 +389,7 @@ class FMControllerThemes_fm {
389
  'after' => 'px',
390
  ),
391
  array(
392
- 'label' => __('Border Radius', WDFM()->prefix),
393
  'name' => 'AGPBorderRadius',
394
  'type' => 'text',
395
  'class' => '',
@@ -397,25 +397,25 @@ class FMControllerThemes_fm {
397
  'after' => 'px',
398
  ),
399
  array(
400
- 'label' => __('Box Shadow', WDFM()->prefix),
401
  'name' => 'AGPBoxShadow',
402
  'type' => 'text',
403
  'class' => '',
404
  'value' => isset($param_values->AGPBoxShadow) ? $param_values->AGPBoxShadow : '',
405
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 5px 2px #888888',
406
  'after' => '</div>',
407
  ),
408
  ),
409
  'header' => array(
410
  array(
411
- 'label' => __('General Parameters', WDFM()->prefix),
412
  'type' => 'panel',
413
  'class' => 'col-md-12',
414
  'label_class' => 'fm-mini-title',
415
  'after' => '<br/>',
416
  ),
417
  array(
418
- 'label' => __('Alignment', WDFM()->prefix),
419
  'name' => 'HPAlign',
420
  'type' => 'select',
421
  'options' => $borders,
@@ -424,16 +424,16 @@ class FMControllerThemes_fm {
424
  'after' => '',
425
  ),
426
  array(
427
- 'label' => __('Background Color', WDFM()->prefix),
428
  'name' => 'HPBGColor',
429
  'type' => 'text',
430
  'class' => 'color',
431
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
432
  'value' => isset($param_values->HPBGColor) ? $param_values->HPBGColor : '',
433
  'after' => '',
434
  ),
435
  array(
436
- 'label' => __('Width', WDFM()->prefix),
437
  'name' => 'HPWidth',
438
  'type' => 'text',
439
  'class' => '',
@@ -441,7 +441,7 @@ class FMControllerThemes_fm {
441
  'after' => '%',
442
  ),
443
  array(
444
- 'label' => __('Width (for topbar form type)', WDFM()->prefix),
445
  'name' => 'HTPWidth',
446
  'type' => 'text',
447
  'class' => '',
@@ -449,25 +449,25 @@ class FMControllerThemes_fm {
449
  'after' => '%',
450
  ),
451
  array(
452
- 'label' => __('Padding', WDFM()->prefix),
453
  'name' => 'HPPadding',
454
  'type' => 'text',
455
  'class' => '',
456
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
457
  'value' => isset($param_values->HPPadding) ? $param_values->HPPadding : '',
458
  'after' => '',
459
  ),
460
  array(
461
- 'label' => __('Margin', WDFM()->prefix),
462
  'name' => 'HPMargin',
463
  'type' => 'text',
464
  'class' => '',
465
  'value' => isset($param_values->HPMargin) ? $param_values->HPMargin : '',
466
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
467
  'after' => '',
468
  ),
469
  array(
470
- 'label' => __('Text Align', WDFM()->prefix),
471
  'name' => 'HPTextAlign',
472
  'type' => 'select',
473
  'options' => $aligns,
@@ -476,7 +476,7 @@ class FMControllerThemes_fm {
476
  'after' => '',
477
  ),
478
  array(
479
- 'label' => __('Border', WDFM()->prefix),
480
  'name' => 'HPBorder',
481
  'type' => 'checkbox',
482
  'options' => $borders,
@@ -484,16 +484,16 @@ class FMControllerThemes_fm {
484
  'after' => '',
485
  ),
486
  array(
487
- 'label' => __('Border Color', WDFM()->prefix),
488
  'name' => 'HPBorderColor',
489
  'type' => 'text',
490
  'class' => 'color',
491
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
492
  'value' => isset($param_values->HPBorderColor) ? $param_values->HPBorderColor : '',
493
  'after' => '',
494
  ),
495
  array(
496
- 'label' => __('Border Type', WDFM()->prefix),
497
  'name' => 'HPBorderType',
498
  'type' => 'select',
499
  'options' => $border_types,
@@ -502,7 +502,7 @@ class FMControllerThemes_fm {
502
  'after' => '',
503
  ),
504
  array(
505
- 'label' => __('Border Width', WDFM()->prefix),
506
  'name' => 'HPBorderWidth',
507
  'type' => 'text',
508
  'class' => '',
@@ -510,7 +510,7 @@ class FMControllerThemes_fm {
510
  'after' => 'px',
511
  ),
512
  array(
513
- 'label' => __('Border Radius', WDFM()->prefix),
514
  'name' => 'HPBorderRadius',
515
  'type' => 'text',
516
  'class' => '',
@@ -518,14 +518,14 @@ class FMControllerThemes_fm {
518
  'after' => 'px</div>',
519
  ),
520
  array(
521
- 'label' => __('Title Parameters', WDFM()->prefix),
522
  'type' => 'panel',
523
  'class' => 'col-md-12',
524
  'label_class' => 'fm-mini-title',
525
  'after' => '<br/>',
526
  ),
527
  array(
528
- 'label' => __('Font Size', WDFM()->prefix),
529
  'name' => 'HTPFontSize',
530
  'type' => 'text',
531
  'class' => '',
@@ -533,7 +533,7 @@ class FMControllerThemes_fm {
533
  'after' => 'px',
534
  ),
535
  array(
536
- 'label' => __('Font Weight', WDFM()->prefix),
537
  'name' => 'HTPWeight',
538
  'type' => 'select',
539
  'options' => $font_weights,
@@ -542,22 +542,22 @@ class FMControllerThemes_fm {
542
  'after' => '',
543
  ),
544
  array(
545
- 'label' => __('Color', WDFM()->prefix),
546
  'name' => 'HTPColor',
547
  'type' => 'text',
548
  'class' => 'color',
549
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
550
  'value' => isset($param_values->HTPColor) ? $param_values->HTPColor : '',
551
  'after' => '',
552
  ),
553
  array(
554
- 'label' => __('Description Parameters', WDFM()->prefix),
555
  'type' => 'label',
556
  'class' => 'fm-mini-title',
557
  'after' => '<br/>',
558
  ),
559
  array(
560
- 'label' => __('Font Size', WDFM()->prefix),
561
  'name' => 'HDPFontSize',
562
  'type' => 'text',
563
  'class' => '',
@@ -565,22 +565,22 @@ class FMControllerThemes_fm {
565
  'after' => 'px',
566
  ),
567
  array(
568
- 'label' => __('Color', WDFM()->prefix),
569
  'name' => 'HDPColor',
570
  'type' => 'text',
571
  'class' => 'color',
572
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
573
  'value' => isset($param_values->HDPColor) ? $param_values->HDPColor : '',
574
  'after' => '',
575
  ),
576
  array(
577
- 'label' => __('Image Parameters', WDFM()->prefix),
578
  'type' => 'label',
579
  'class' => 'fm-mini-title',
580
  'after' => '<br/>',
581
  ),
582
  array(
583
- 'label' => __('Alignment', WDFM()->prefix),
584
  'name' => 'HIPAlign',
585
  'type' => 'select',
586
  'options' => $borders,
@@ -589,7 +589,7 @@ class FMControllerThemes_fm {
589
  'after' => '',
590
  ),
591
  array(
592
- 'label' => __('Width', WDFM()->prefix),
593
  'name' => 'HIPWidth',
594
  'type' => 'text',
595
  'class' => '',
@@ -597,7 +597,7 @@ class FMControllerThemes_fm {
597
  'after' => 'px',
598
  ),
599
  array(
600
- 'label' => __('Height', WDFM()->prefix),
601
  'name' => 'HIPHeight',
602
  'type' => 'text',
603
  'class' => '',
@@ -607,23 +607,23 @@ class FMControllerThemes_fm {
607
  ),
608
  'content' => array(
609
  array(
610
- 'label' => __('General Parameters', WDFM()->prefix),
611
  'type' => 'panel',
612
  'class' => 'col-md-12',
613
  'label_class' => 'fm-mini-title',
614
  'after' => '<br/>',
615
  ),
616
  array(
617
- 'label' => __('Background Color', WDFM()->prefix),
618
  'name' => 'GPBGColor',
619
  'type' => 'text',
620
  'class' => 'color',
621
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
622
  'value' => isset($param_values->GPBGColor) ? $param_values->GPBGColor : '',
623
  'after' => '',
624
  ),
625
  array(
626
- 'label' => __('Font Size', WDFM()->prefix),
627
  'name' => 'GPFontSize',
628
  'type' => 'text',
629
  'class' => '',
@@ -631,7 +631,7 @@ class FMControllerThemes_fm {
631
  'after' => 'px',
632
  ),
633
  array(
634
- 'label' => __('Font Weight', WDFM()->prefix),
635
  'name' => 'GPFontWeight',
636
  'type' => 'select',
637
  'options' => $font_weights,
@@ -640,7 +640,7 @@ class FMControllerThemes_fm {
640
  'after' => '',
641
  ),
642
  array(
643
- 'label' => __('Width', WDFM()->prefix),
644
  'name' => 'GPWidth',
645
  'type' => 'text',
646
  'class' => '',
@@ -648,7 +648,7 @@ class FMControllerThemes_fm {
648
  'after' => '%',
649
  ),
650
  array(
651
- 'label' => __('Width (for topbar form type)', WDFM()->prefix),
652
  'name' => 'GTPWidth',
653
  'type' => 'text',
654
  'class' => '',
@@ -656,7 +656,7 @@ class FMControllerThemes_fm {
656
  'after' => '%',
657
  ),
658
  array(
659
- 'label' => __('Alignment', WDFM()->prefix),
660
  'name' => 'GPAlign',
661
  'type' => 'select',
662
  'options' => $aligns,
@@ -665,16 +665,16 @@ class FMControllerThemes_fm {
665
  'after' => '',
666
  ),
667
  array(
668
- 'label' => __('Background URL', WDFM()->prefix),
669
  'name' => 'GPBackground',
670
  'type' => 'text',
671
  'class' => '',
672
- // 'placeholder' => __('e.g. http:// or https://', WDFM()->prefix),
673
  'value' => isset($param_values->GPBackground) ? $param_values->GPBackground : '',
674
  'after' => '',
675
  ),
676
  array(
677
- 'label' => __('Background Repeat', WDFM()->prefix),
678
  'name' => 'GPBackgroundRepeat',
679
  'type' => 'select',
680
  'options' => $bg_repeats,
@@ -683,12 +683,12 @@ class FMControllerThemes_fm {
683
  'after' => '',
684
  ),
685
  array(
686
- 'label' => __('Background Position', WDFM()->prefix),
687
  'name1' => 'GPBGPosition1',
688
  'name2' => 'GPBGPosition2',
689
  'type' => '2text',
690
  'class' => 'fm-2text',
691
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' px|%, top|bottom|left|right|center',
692
  'value1' => isset($param_values->GPBGPosition1) ? $param_values->GPBGPosition1 : '',
693
  'value2' => isset($param_values->GPBGPosition2) ? $param_values->GPBGPosition2 : '',
694
  'before1' => '',
@@ -696,12 +696,12 @@ class FMControllerThemes_fm {
696
  'after' => '',
697
  ),
698
  array(
699
- 'label' => __('Background Size', WDFM()->prefix),
700
  'name1' => 'GPBGSize1',
701
  'name2' => 'GPBGSize2',
702
  'type' => '2text',
703
  'class' => 'fm-2text',
704
- 'placeholder' => __('e.g.', WDFM()->prefix) .' px|%, auto|cover|contain',
705
  'value1' => isset($param_values->GPBGSize1) ? $param_values->GPBGSize1 : '',
706
  'value2' => isset($param_values->GPBGSize2) ? $param_values->GPBGSize2 : '',
707
  'before1' => '',
@@ -709,7 +709,7 @@ class FMControllerThemes_fm {
709
  'after' => '',
710
  ),
711
  array(
712
- 'label' => __('Color', WDFM()->prefix),
713
  'name' => 'GPColor',
714
  'type' => 'text',
715
  'class' => 'color',
@@ -717,25 +717,25 @@ class FMControllerThemes_fm {
717
  'after' => '',
718
  ),
719
  array(
720
- 'label' => __('Padding', WDFM()->prefix),
721
  'name' => 'GPPadding',
722
  'type' => 'text',
723
  'class' => '',
724
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
725
  'value' => isset($param_values->GPPadding) ? $param_values->GPPadding : '',
726
  'after' => '',
727
  ),
728
  array(
729
- 'label' => __('Margin', WDFM()->prefix),
730
  'name' => 'GPMargin',
731
  'type' => 'text',
732
  'class' => '',
733
  'value' => isset($param_values->GPMargin) ? $param_values->GPMargin : '',
734
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
735
  'after' => '',
736
  ),
737
  array(
738
- 'label' => __('Border', WDFM()->prefix),
739
  'name' => 'GPBorder',
740
  'type' => 'checkbox',
741
  'options' => $borders,
@@ -743,7 +743,7 @@ class FMControllerThemes_fm {
743
  'after' => '',
744
  ),
745
  array(
746
- 'label' => __('Border Color', WDFM()->prefix),
747
  'name' => 'GPBorderColor',
748
  'type' => 'text',
749
  'class' => 'color',
@@ -751,7 +751,7 @@ class FMControllerThemes_fm {
751
  'after' => '',
752
  ),
753
  array(
754
- 'label' => __('Border Type', WDFM()->prefix),
755
  'name' => 'GPBorderType',
756
  'type' => 'select',
757
  'options' => $border_types,
@@ -760,7 +760,7 @@ class FMControllerThemes_fm {
760
  'after' => '',
761
  ),
762
  array(
763
- 'label' => __('Border Width', WDFM()->prefix),
764
  'name' => 'GPBorderWidth',
765
  'type' => 'text',
766
  'class' => '',
@@ -768,7 +768,7 @@ class FMControllerThemes_fm {
768
  'after' => 'px',
769
  ),
770
  array(
771
- 'label' => __('Border Radius', WDFM()->prefix),
772
  'name' => 'GPBorderRadius',
773
  'type' => 'text',
774
  'class' => '',
@@ -776,14 +776,14 @@ class FMControllerThemes_fm {
776
  'after' => 'px</div>',
777
  ),
778
  array(
779
- 'label' => __('Mini labels (name, phone, address, checkbox, radio) Parameters', WDFM()->prefix),
780
  'type' => 'panel',
781
  'class' => 'col-md-12',
782
  'label_class' => 'fm-mini-title',
783
  'after' => '<br/>',
784
  ),
785
  array(
786
- 'label' => __('Font Size', WDFM()->prefix),
787
  'name' => 'GPMLFontSize',
788
  'type' => 'text',
789
  'class' => '',
@@ -791,7 +791,7 @@ class FMControllerThemes_fm {
791
  'after' => 'px',
792
  ),
793
  array(
794
- 'label' => __('Font Weight', WDFM()->prefix),
795
  'name' => 'GPMLFontWeight',
796
  'type' => 'select',
797
  'options' => $font_weights,
@@ -800,97 +800,97 @@ class FMControllerThemes_fm {
800
  'after' => '',
801
  ),
802
  array(
803
- 'label' => __('Color', WDFM()->prefix),
804
  'name' => 'GPMLColor',
805
  'type' => 'text',
806
  'class' => 'color',
807
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
808
  'value' => isset($param_values->GPMLColor) ? $param_values->GPMLColor : '',
809
  'after' => '',
810
  ),
811
  array(
812
- 'label' => __('Padding', WDFM()->prefix),
813
  'name' => 'GPMLPadding',
814
  'type' => 'text',
815
  'class' => '',
816
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
817
  'value' => isset($param_values->GPMLPadding) ? $param_values->GPMLPadding : '',
818
  'after' => '',
819
  ),
820
  array(
821
- 'label' => __('Margin', WDFM()->prefix),
822
  'name' => 'GPMLMargin',
823
  'type' => 'text',
824
  'class' => '',
825
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
826
  'value' => isset($param_values->GPMLMargin) ? $param_values->GPMLMargin : '',
827
  'after' => '',
828
  ),
829
  array(
830
- 'label' => __('Section Parameters', WDFM()->prefix),
831
  'type' => 'label',
832
  'class' => 'fm-mini-title',
833
  'after' => '<br/>',
834
  ),
835
  array(
836
- 'label' => __('Background Color', WDFM()->prefix),
837
  'name' => 'SEPBGColor',
838
  'type' => 'text',
839
  'class' => 'color',
840
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
841
  'value' => isset($param_values->SEPBGColor) ? $param_values->SEPBGColor : '',
842
  'after' => '',
843
  ),
844
  array(
845
- 'label' => __('Padding', WDFM()->prefix),
846
  'name' => 'SEPPadding',
847
  'type' => 'text',
848
  'class' => '',
849
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
850
  'value' => isset($param_values->SEPPadding) ? $param_values->SEPPadding : '',
851
  'after' => '',
852
  ),
853
  array(
854
- 'label' => __('Margin', WDFM()->prefix),
855
  'name' => 'SEPMargin',
856
  'type' => 'text',
857
  'class' => '',
858
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
859
  'value' => isset($param_values->SEPMargin) ? $param_values->SEPMargin : '',
860
  'after' => '',
861
  ),
862
  array(
863
- 'label' => __('Section Column Parameters', WDFM()->prefix),
864
  'type' => 'label',
865
  'class' => 'fm-mini-title',
866
  'after' => '<br/>',
867
  ),
868
  array(
869
- 'label' => __('Padding', WDFM()->prefix),
870
  'name' => 'COPPadding',
871
  'type' => 'text',
872
  'class' => '',
873
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
874
  'value' => isset($param_values->COPPadding) ? $param_values->COPPadding : '',
875
  'after' => '',
876
  ),
877
  array(
878
- 'label' => __('Margin', WDFM()->prefix),
879
  'name' => 'COPMargin',
880
  'type' => 'text',
881
  'class' => '',
882
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
883
  'value' => isset($param_values->COPMargin) ? $param_values->COPMargin : '',
884
  'after' => '',
885
  ),
886
  array(
887
- 'label' => __('Footer Parameters', WDFM()->prefix),
888
  'type' => 'label',
889
  'class' => 'fm-mini-title',
890
  'after' => '<br/>',
891
  ),
892
  array(
893
- 'label' => __('Width', WDFM()->prefix),
894
  'name' => 'FPWidth',
895
  'type' => 'text',
896
  'class' => '',
@@ -898,20 +898,20 @@ class FMControllerThemes_fm {
898
  'after' => '%',
899
  ),
900
  array(
901
- 'label' => __('Padding', WDFM()->prefix),
902
  'name' => 'FPPadding',
903
  'type' => 'text',
904
  'class' => '',
905
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
906
  'value' => isset($param_values->FPPadding) ? $param_values->FPPadding : '',
907
  'after' => '',
908
  ),
909
  array(
910
- 'label' => __('Margin', WDFM()->prefix),
911
  'name' => 'FPMargin',
912
  'type' => 'text',
913
  'class' => '',
914
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
915
  'value' => isset($param_values->FPMargin) ? $param_values->FPMargin : '',
916
  'after' => '</div>',
917
  ),
@@ -925,7 +925,7 @@ class FMControllerThemes_fm {
925
  'after' => '',
926
  ),
927
  array(
928
- 'label' => __('Height', WDFM()->prefix),
929
  'name' => 'IPHeight',
930
  'type' => 'text',
931
  'class' => '',
@@ -933,7 +933,7 @@ class FMControllerThemes_fm {
933
  'after' => 'px',
934
  ),
935
  array(
936
- 'label' => __('Font Size', WDFM()->prefix),
937
  'name' => 'IPFontSize',
938
  'type' => 'text',
939
  'class' => '',
@@ -941,7 +941,7 @@ class FMControllerThemes_fm {
941
  'after' => 'px',
942
  ),
943
  array(
944
- 'label' => __('Font Weight', WDFM()->prefix),
945
  'name' => 'IPFontWeight',
946
  'type' => 'select',
947
  'options' => $font_weights,
@@ -950,43 +950,43 @@ class FMControllerThemes_fm {
950
  'after' => '',
951
  ),
952
  array(
953
- 'label' => __('Background Color', WDFM()->prefix),
954
  'name' => 'IPBGColor',
955
  'type' => 'text',
956
  'class' => 'color',
957
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
958
  'value' => isset($param_values->IPBGColor) ? $param_values->IPBGColor : '',
959
  'after' => '',
960
  ),
961
  array(
962
- 'label' => __('Color', WDFM()->prefix),
963
  'name' => 'IPColor',
964
  'type' => 'text',
965
  'class' => 'color',
966
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
967
  'value' => isset($param_values->IPColor) ? $param_values->IPColor : '',
968
  'after' => '',
969
  ),
970
  array(
971
- 'label' => __('Padding', WDFM()->prefix),
972
  'name' => 'IPPadding',
973
  'type' => 'text',
974
  'class' => '',
975
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 3px 5px or 3% 5%',
976
  'value' => isset($param_values->IPPadding) ? $param_values->IPPadding : '',
977
  'after' => '',
978
  ),
979
  array(
980
- 'label' => __('Margin', WDFM()->prefix),
981
  'name' => 'IPMargin',
982
  'type' => 'text',
983
  'class' => '',
984
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
985
  'value' => isset($param_values->IPMargin) ? $param_values->IPMargin : '',
986
  'after' => '',
987
  ),
988
  array(
989
- 'label' => __('Border', WDFM()->prefix),
990
  'name' => 'IPBorder',
991
  'type' => 'checkbox',
992
  'options' => $borders,
@@ -994,16 +994,16 @@ class FMControllerThemes_fm {
994
  'after' => '',
995
  ),
996
  array(
997
- 'label' => __('Border Color', WDFM()->prefix),
998
  'name' => 'IPBorderColor',
999
  'type' => 'text',
1000
  'class' => 'color',
1001
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
1002
  'value' => isset($param_values->IPBorderColor) ? $param_values->IPBorderColor : '',
1003
  'after' => '',
1004
  ),
1005
  array(
1006
- 'label' => __('Border Type', WDFM()->prefix),
1007
  'name' => 'IPBorderType',
1008
  'type' => 'select',
1009
  'options' => $border_types,
@@ -1012,7 +1012,7 @@ class FMControllerThemes_fm {
1012
  'after' => '',
1013
  ),
1014
  array(
1015
- 'label' => __('Border Width', WDFM()->prefix),
1016
  'name' => 'IPBorderWidth',
1017
  'type' => 'text',
1018
  'class' => '',
@@ -1020,7 +1020,7 @@ class FMControllerThemes_fm {
1020
  'after' => 'px',
1021
  ),
1022
  array(
1023
- 'label' => __('Border Radius', WDFM()->prefix),
1024
  'name' => 'IPBorderRadius',
1025
  'type' => 'text',
1026
  'class' => '',
@@ -1028,41 +1028,41 @@ class FMControllerThemes_fm {
1028
  'after' => 'px',
1029
  ),
1030
  array(
1031
- 'label' => __('Box Shadow', WDFM()->prefix),
1032
  'name' => 'IPBoxShadow',
1033
  'type' => 'text',
1034
  'class' => '',
1035
  'value' => isset($param_values->IPBoxShadow) ? $param_values->IPBoxShadow : '',
1036
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 5px 2px #888888',
1037
  'after' => '</div>',
1038
  ),
1039
  array(
1040
- 'label' => __('Dropdown additional', WDFM()->prefix),
1041
  'type' => 'panel',
1042
  'class' => 'col-md-12',
1043
  'label_class' => 'fm-mini-title',
1044
  'after' => '<br/>',
1045
  ),
1046
  array(
1047
- 'label' => __('Appearance', WDFM()->prefix),
1048
  'name' => 'SBPAppearance',
1049
  'type' => 'text',
1050
  'class' => '',
1051
- 'placeholder' => __('e.g.', WDFM()->prefix) .' normal, icon, window, button, menu, field',
1052
  'value' => isset($param_values->SBPAppearance) ? $param_values->SBPAppearance : '',
1053
  'after' => '',
1054
  ),
1055
  array(
1056
- 'label' => __('Background URL', WDFM()->prefix),
1057
  'name' => 'SBPBackground',
1058
  'type' => 'text',
1059
  'class' => '',
1060
- // 'placeholder' => __('e.g. http:// or https://', WDFM()->prefix),
1061
  'value' => isset($param_values->SBPBackground) ? $param_values->SBPBackground : '',
1062
  'after' => '',
1063
  ),
1064
  array(
1065
- 'label' => __('Background Repeat', WDFM()->prefix),
1066
  'name' => 'SBPBGRepeat',
1067
  'type' => 'select',
1068
  'options' => $bg_repeats,
@@ -1079,23 +1079,23 @@ class FMControllerThemes_fm {
1079
  ),
1080
  'choices' => array(
1081
  array(
1082
- 'label' => __('Single Choice', WDFM()->prefix),
1083
  'type' => 'panel',
1084
  'class' => 'col-md-12',
1085
  'label_class' => 'fm-mini-title',
1086
  'after' => '<br/>',
1087
  ),
1088
  array(
1089
- 'label' => __('Background Color', WDFM()->prefix),
1090
  'name' => 'SCPBGColor',
1091
  'type' => 'text',
1092
  'class' => 'color',
1093
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
1094
  'value' => isset($param_values->SCPBGColor) ? $param_values->SCPBGColor : '',
1095
  'after' => '',
1096
  ),
1097
  array(
1098
- 'label' => __('Width', WDFM()->prefix),
1099
  'name' => 'SCPWidth',
1100
  'type' => 'text',
1101
  'class' => '',
@@ -1103,7 +1103,7 @@ class FMControllerThemes_fm {
1103
  'after' => 'px',
1104
  ),
1105
  array(
1106
- 'label' => __('Height', WDFM()->prefix),
1107
  'name' => 'SCPHeight',
1108
  'type' => 'text',
1109
  'class' => '',
@@ -1111,16 +1111,16 @@ class FMControllerThemes_fm {
1111
  'after' => 'px',
1112
  ),
1113
  array(
1114
- 'label' => __('Margin', WDFM()->prefix),
1115
  'name' => 'SCPMargin',
1116
  'type' => 'text',
1117
  'class' => '5px',
1118
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
1119
  'value' => isset($param_values->SCPMargin) ? $param_values->SCPMargin : '',
1120
  'after' => '',
1121
  ),
1122
  array(
1123
- 'label' => __('Border', WDFM()->prefix),
1124
  'name' => 'SCPBorder',
1125
  'type' => 'checkbox',
1126
  'options' => $borders,
@@ -1128,16 +1128,16 @@ class FMControllerThemes_fm {
1128
  'after' => '',
1129
  ),
1130
  array(
1131
- 'label' => __('Border Color', WDFM()->prefix),
1132
  'name' => 'SCPBorderColor',
1133
  'type' => 'text',
1134
  'class' => 'color',
1135
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
1136
  'value' => isset($param_values->SCPBorderColor) ? $param_values->SCPBorderColor : '',
1137
  'after' => '',
1138
  ),
1139
  array(
1140
- 'label' => __('Border Type', WDFM()->prefix),
1141
  'name' => 'SCPBorderType',
1142
  'type' => 'select',
1143
  'options' => $border_types,
@@ -1146,7 +1146,7 @@ class FMControllerThemes_fm {
1146
  'after' => '',
1147
  ),
1148
  array(
1149
- 'label' => __('Border Width', WDFM()->prefix),
1150
  'name' => 'SCPBorderWidth',
1151
  'type' => 'text',
1152
  'class' => '',
@@ -1154,7 +1154,7 @@ class FMControllerThemes_fm {
1154
  'after' => 'px',
1155
  ),
1156
  array(
1157
- 'label' => __('Border Radius', WDFM()->prefix),
1158
  'name' => 'SCPBorderRadius',
1159
  'type' => 'text',
1160
  'class' => '',
@@ -1162,31 +1162,31 @@ class FMControllerThemes_fm {
1162
  'after' => 'px',
1163
  ),
1164
  array(
1165
- 'label' => __('Box Shadow', WDFM()->prefix),
1166
  'name' => 'SCPBoxShadow',
1167
  'type' => 'text',
1168
  'class' => '',
1169
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 5px 2px #888888',
1170
  'value' => isset($param_values->SCPBoxShadow) ? $param_values->SCPBoxShadow : '',
1171
  'after' => '',
1172
  ),
1173
  array(
1174
- 'label' => __('Checked Parameters', WDFM()->prefix),
1175
  'type' => 'label',
1176
  'class' => 'fm-mini-title',
1177
  'after' => '<br/>',
1178
  ),
1179
  array(
1180
- 'label' => __('Background Color', WDFM()->prefix),
1181
  'name' => 'SCCPBGColor',
1182
  'type' => 'text',
1183
  'class' => 'color',
1184
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
1185
  'value' => isset($param_values->SCCPBGColor) ? $param_values->SCCPBGColor : '',
1186
  'after' => '',
1187
  ),
1188
  array(
1189
- 'label' => __('Width', WDFM()->prefix),
1190
  'name' => 'SCCPWidth',
1191
  'type' => 'text',
1192
  'class' => '',
@@ -1194,7 +1194,7 @@ class FMControllerThemes_fm {
1194
  'after' => 'px',
1195
  ),
1196
  array(
1197
- 'label' => __('Height', WDFM()->prefix),
1198
  'name' => 'SCCPHeight',
1199
  'type' => 'text',
1200
  'class' => '',
@@ -1202,16 +1202,16 @@ class FMControllerThemes_fm {
1202
  'after' => 'px',
1203
  ),
1204
  array(
1205
- 'label' => __('Margin', WDFM()->prefix),
1206
  'name' => 'SCCPMargin',
1207
  'type' => 'text',
1208
  'class' => '',
1209
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
1210
  'value' => isset($param_values->SCCPMargin) ? $param_values->SCCPMargin : '',
1211
  'after' => '',
1212
  ),
1213
  array(
1214
- 'label' => __('Border Radius', WDFM()->prefix),
1215
  'name' => 'SCCPBorderRadius',
1216
  'type' => 'text',
1217
  'class' => '',
@@ -1219,23 +1219,23 @@ class FMControllerThemes_fm {
1219
  'after' => 'px</div>',
1220
  ),
1221
  array(
1222
- 'label' => __('Multiple Choice', WDFM()->prefix),
1223
  'type' => 'panel',
1224
  'class' => 'col-md-12',
1225
  'label_class' => 'fm-mini-title',
1226
  'after' => '<br/>',
1227
  ),
1228
  array(
1229
- 'label' => __('Background Color', WDFM()->prefix),
1230
  'name' => 'MCPBGColor',
1231
  'type' => 'text',
1232
  'class' => 'color',
1233
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
1234
  'value' => isset($param_values->MCPBGColor) ? $param_values->MCPBGColor : '',
1235
  'after' => '',
1236
  ),
1237
  array(
1238
- 'label' => __('Width', WDFM()->prefix),
1239
  'name' => 'MCPWidth',
1240
  'type' => 'text',
1241
  'class' => '',
@@ -1243,7 +1243,7 @@ class FMControllerThemes_fm {
1243
  'after' => 'px',
1244
  ),
1245
  array(
1246
- 'label' => __('Height', WDFM()->prefix),
1247
  'name' => 'MCPHeight',
1248
  'type' => 'text',
1249
  'class' => '',
@@ -1251,16 +1251,16 @@ class FMControllerThemes_fm {
1251
  'after' => 'px',
1252
  ),
1253
  array(
1254
- 'label' => __('Margin', WDFM()->prefix),
1255
  'name' => 'MCPMargin',
1256
  'type' => 'text',
1257
  'class' => '5px',
1258
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 10px or 5% 10%',
1259
  'value' => isset($param_values->MCPMargin) ? $param_values->MCPMargin : '',
1260
  'after' => '',
1261
  ),
1262
  array(
1263
- 'label' => __('Border', WDFM()->prefix),
1264
  'name' => 'MCPBorder',
1265
  'type' => 'checkbox',
1266
  'options' => $borders,
@@ -1268,16 +1268,16 @@ class FMControllerThemes_fm {
1268
  'after' => '',
1269
  ),
1270
  array(
1271
- 'label' => __('Border Color', WDFM()->prefix),
1272
  'name' => 'MCPBorderColor',
1273
  'type' => 'text',
1274
  'class' => 'color',
1275
- 'placeholder' => __('e.g.', WDFM()->prefix) .' #efefef',
1276
  'value' => isset($param_values->MCPBorderColor) ? $param_values->MCPBorderColor : '',
1277
  'after' => '',
1278
  ),
1279
  array(
1280
- 'label' => __('Border Type', WDFM()->prefix),
1281
  'name' => 'MCPBorderType',
1282
  'type' => 'select',
1283
  'options' => $border_types,
@@ -1286,7 +1286,7 @@ class FMControllerThemes_fm {
1286
  'after' => '',
1287
  ),
1288
  array(
1289
- 'label' => __('Border Width', WDFM()->prefix),
1290
  'name' => 'MCPBorderWidth',
1291
  'type' => 'text',
1292
  'class' => '',
@@ -1295,7 +1295,7 @@ class FMControllerThemes_fm {
1295
  ),
1296
 
1297
  array(
1298
- 'label' => __('Border Radius', WDFM()->prefix),
1299
  'name' => 'MCPBorderRadius',
1300
  'type' => 'text',
1301
  'class' => '',
@@ -1303,40 +1303,40 @@ class FMControllerThemes_fm {
1303
  'after' => 'px',
1304
  ),
1305
  array(
1306
- 'label' => __('Box Shadow', WDFM()->prefix),
1307
  'name' => 'MCPBoxShadow',
1308
  'type' => 'text',
1309
  'class' => '',
1310
- 'placeholder' => __('e.g.', WDFM()->prefix) .' 5px 5px 2px #888888',
1311
  'value' => isset($param_values->MCPBoxShadow) ? $param_values->MCPBoxShadow : '',
1312
  'after' => '',
1313
  ),
1314
  array(
1315
- 'label' => __('Checked Parameters', WDFM()->prefix),
1316
  'type' => 'label',
1317
  'class' => 'fm-mini-title',
1318
  'after' => '<br/>',
1319
  ),
1320
  array(
1321
- 'label' => __('Background Color', WDFM()->prefix),
1322
  'name' => 'MCCPBGColor',
1323
  'type' => 'text',
1324
  'class' => 'color',
1325
- 'placeholder' => __('e.g.', WDFM()->prefix) .'#efefef',
1326
  'value' => isset($param_values->MCCPBGColor) ? $param_values->MCCPBGColor : '',
1327
  'after' => '',
1328
  ),
1329
  array(
1330
- 'label' => __('Background URL', WDFM()->prefix),
1331
  'name' => 'MCCPBackground',
1332
  'type' => 'text',
1333
  'class' => '',
1334
- // 'placeholder' => __('e.g. http:// or https://', WDFM()->prefix),
1335
  'value' => isset($param_values->MCCPBackground) ? $param_values->MCCPBackground : '',
1336
  'after' => '',
1337
  ),
1338
  array(
1339
- 'label' => __('Background Repeat', WDFM()->prefix),
1340
  'name' => 'MCCPBGRepeat',
1341
  'type' => 'select',
1342
  'options' => $bg_repeats,
@@ -1345,12 +1345,12 @@ class FMControllerThemes_fm {
1345
  'after' => '',
1346
  ),
1347
  array(
1348
- 'label' => __('Background Position', WDFM()->prefix),
1349
  'name1' => 'MCCPBGPos1',
1350
  'name2' => 'MCCPBGPos2',
1351
  'type' => '2text',
1352
  'class' => 'fm-2text',
1353
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' px|%, top|bottom|left|right|center',
1354
  'value1' => isset($param_values->MCCPBGPos1) ? $param_values->MCCPBGPos1 : '',
1355
  'value2' => isset($param_values->MCCPBGPos2) ? $param_values->MCCPBGPos2 : '',
1356
  'before1' => '',
@@ -1358,7 +1358,7 @@ class FMControllerThemes_fm {
1358
  'after' => '',
1359
  ),
1360
  array(
1361
- 'label' => __('Width', WDFM()->prefix),
1362
  'name' => 'MCCPWidth',
1363
  'type' => 'text',
1364
  'class' => '',
@@ -1366,7 +1366,7 @@ class FMControllerThemes_fm {
1366
  'after' => 'px',
1367
  ),
1368
  array(
1369
- 'label' => __('Height', WDFM()->prefix),
1370
  'name' => 'MCCPHeight',
1371
  'type' => 'text',
1372
  'class' => '',
@@ -1374,16 +1374,16 @@ class FMControllerThemes_fm {
1374
  'after' => 'px',
1375
  ),
1376
  array(
1377
- 'label' => __('Margin', WDFM()->prefix),
1378
  'name' => 'MCCPMargin',
1379
  'type' => 'text',
1380
  'class' => '',
1381
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
1382
  'value' => isset($param_values->MCCPMargin) ? $param_values->MCCPMargin : '',
1383
  'after' => '',
1384
  ),
1385
  array(
1386
- 'label' => __('Border Radius', WDFM()->prefix),
1387
  'name' => 'MCCPBorderRadius',
1388
  'type' => 'text',
1389
  'class' => '',
@@ -1393,14 +1393,14 @@ class FMControllerThemes_fm {
1393
  ),
1394
  'subscribe' => array(
1395
  array(
1396
- 'label' => __('Global Parameters', WDFM()->prefix),
1397
  'type' => 'panel',
1398
  'class' => 'col-md-12',
1399
  'label_class' => 'fm-mini-title',
1400
  'after' => '<br/>',
1401
  ),
1402
  array(
1403
- 'label' => __('Alignment', WDFM()->prefix),
1404
  'name' => 'SPAlign',
1405
  'type' => 'select',
1406
  'options' => $aligns,
@@ -1409,23 +1409,23 @@ class FMControllerThemes_fm {
1409
  'after' => '</div>',
1410
  ),
1411
  array(
1412
- 'label' => __('Submit', WDFM()->prefix),
1413
  'type' => 'panel',
1414
  'class' => 'col-md-12',
1415
  'label_class' => 'fm-mini-title',
1416
  'after' => '<br/>',
1417
  ),
1418
  array(
1419
- 'label' => __('Background Color', WDFM()->prefix),
1420
  'name' => 'SPBGColor',
1421
  'type' => 'text',
1422
  'class' => 'color',
1423
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1424
  'value' => isset($param_values->SPBGColor) ? $param_values->SPBGColor : '',
1425
  'after' => '',
1426
  ),
1427
  array(
1428
- 'label' => __('Width', WDFM()->prefix),
1429
  'name' => 'SPWidth',
1430
  'type' => 'text',
1431
  'class' => '',
@@ -1433,7 +1433,7 @@ class FMControllerThemes_fm {
1433
  'after' => 'px',
1434
  ),
1435
  array(
1436
- 'label' => __('Height', WDFM()->prefix),
1437
  'name' => 'SPHeight',
1438
  'type' => 'text',
1439
  'class' => '',
@@ -1441,7 +1441,7 @@ class FMControllerThemes_fm {
1441
  'after' => 'px',
1442
  ),
1443
  array(
1444
- 'label' => __('Font Size', WDFM()->prefix),
1445
  'name' => 'SPFontSize',
1446
  'type' => 'text',
1447
  'class' => '',
@@ -1449,7 +1449,7 @@ class FMControllerThemes_fm {
1449
  'after' => 'px',
1450
  ),
1451
  array(
1452
- 'label' => __('Font Weight', WDFM()->prefix),
1453
  'name' => 'SPFontWeight',
1454
  'type' => 'select',
1455
  'options' => $font_weights,
@@ -1458,34 +1458,34 @@ class FMControllerThemes_fm {
1458
  'after' => '',
1459
  ),
1460
  array(
1461
- 'label' => __('Color', WDFM()->prefix),
1462
  'name' => 'SPColor',
1463
  'type' => 'text',
1464
  'class' => 'color',
1465
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1466
  'value' => isset($param_values->SPColor) ? $param_values->SPColor : '',
1467
  'after' => '',
1468
  ),
1469
  array(
1470
- 'label' => __('Padding', WDFM()->prefix),
1471
  'name' => 'SPPadding',
1472
  'type' => 'text',
1473
  'class' => '',
1474
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
1475
  'value' => isset($param_values->SPPadding) ? $param_values->SPPadding : '',
1476
  'after' => '',
1477
  ),
1478
  array(
1479
- 'label' => __('Margin', WDFM()->prefix),
1480
  'name' => 'SPMargin',
1481
  'type' => 'text',
1482
  'class' => '',
1483
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
1484
  'value' => isset($param_values->SPMargin) ? $param_values->SPMargin : '',
1485
  'after' => '',
1486
  ),
1487
  array(
1488
- 'label' => __('Border', WDFM()->prefix),
1489
  'name' => 'SPBorder',
1490
  'type' => 'checkbox',
1491
  'options' => $borders,
@@ -1493,16 +1493,16 @@ class FMControllerThemes_fm {
1493
  'after' => '',
1494
  ),
1495
  array(
1496
- 'label' => __('Border Color', WDFM()->prefix),
1497
  'name' => 'SPBorderColor',
1498
  'type' => 'text',
1499
  'class' => 'color',
1500
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1501
  'value' => isset($param_values->SPBorderColor) ? $param_values->SPBorderColor : '',
1502
  'after' => '',
1503
  ),
1504
  array(
1505
- 'label' => __('Border Type', WDFM()->prefix),
1506
  'name' => 'SPBorderType',
1507
  'type' => 'select',
1508
  'options' => $border_types,
@@ -1511,7 +1511,7 @@ class FMControllerThemes_fm {
1511
  'after' => '',
1512
  ),
1513
  array(
1514
- 'label' => __('Border Width', WDFM()->prefix),
1515
  'name' => 'SPBorderWidth',
1516
  'type' => 'text',
1517
  'class' => '',
@@ -1519,7 +1519,7 @@ class FMControllerThemes_fm {
1519
  'after' => 'px',
1520
  ),
1521
  array(
1522
- 'label' => __('Border Radius', WDFM()->prefix),
1523
  'name' => 'SPBorderRadius',
1524
  'type' => 'text',
1525
  'class' => '',
@@ -1527,40 +1527,40 @@ class FMControllerThemes_fm {
1527
  'after' => 'px',
1528
  ),
1529
  array(
1530
- 'label' => __('Box Shadow', WDFM()->prefix),
1531
  'name' => 'SPBoxShadow',
1532
  'type' => 'text',
1533
  'class' => '',
1534
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 5px 2px #888888',
1535
  'value' => isset($param_values->SPBoxShadow) ? $param_values->SPBoxShadow : '',
1536
  'after' => '',
1537
  ),
1538
  array(
1539
- 'label' => __('Hover Parameters', WDFM()->prefix),
1540
  'type' => 'label',
1541
  'class' => 'fm-mini-title',
1542
  'after' => '<br/>',
1543
  ),
1544
  array(
1545
- 'label' => __('Background Color', WDFM()->prefix),
1546
  'name' => 'SHPBGColor',
1547
  'type' => 'text',
1548
  'class' => 'color',
1549
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1550
  'value' => isset($param_values->SHPBGColor) ? $param_values->SHPBGColor : '',
1551
  'after' => '',
1552
  ),
1553
  array(
1554
- 'label' => __('Color', WDFM()->prefix),
1555
  'name' => 'SHPColor',
1556
  'type' => 'text',
1557
  'class' => 'color',
1558
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1559
  'value' => isset($param_values->SHPColor) ? $param_values->SHPColor : '',
1560
  'after' => '',
1561
  ),
1562
  array(
1563
- 'label' => __('Border', WDFM()->prefix),
1564
  'name' => 'SHPBorder',
1565
  'type' => 'checkbox',
1566
  'options' => $borders,
@@ -1568,16 +1568,16 @@ class FMControllerThemes_fm {
1568
  'after' => '',
1569
  ),
1570
  array(
1571
- 'label' => __('Border Color', WDFM()->prefix),
1572
  'name' => 'SHPBorderColor',
1573
  'type' => 'text',
1574
  'class' => 'color',
1575
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1576
  'value' => isset($param_values->SHPBorderColor) ? $param_values->SHPBorderColor : '',
1577
  'after' => '',
1578
  ),
1579
  array(
1580
- 'label' => __('Border Type', WDFM()->prefix),
1581
  'name' => 'SHPBorderType',
1582
  'type' => 'select',
1583
  'options' => $border_types,
@@ -1586,7 +1586,7 @@ class FMControllerThemes_fm {
1586
  'after' => '',
1587
  ),
1588
  array(
1589
- 'label' => __('Border Width', WDFM()->prefix),
1590
  'name' => 'SHPBorderWidth',
1591
  'type' => 'text',
1592
  'class' => '',
@@ -1594,23 +1594,23 @@ class FMControllerThemes_fm {
1594
  'after' => 'px</div>',
1595
  ),
1596
  array(
1597
- 'label' => __('Reset', WDFM()->prefix),
1598
  'type' => 'panel',
1599
  'class' => 'col-md-12',
1600
  'label_class' => 'fm-mini-title',
1601
  'after' => '<br/>',
1602
  ),
1603
  array(
1604
- 'label' => __('Background Color', WDFM()->prefix),
1605
  'name' => 'BPBGColor',
1606
  'type' => 'text',
1607
  'class' => 'color',
1608
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1609
  'value' => isset($param_values->BPBGColor) ? $param_values->BPBGColor : '',
1610
  'after' => '',
1611
  ),
1612
  array(
1613
- 'label' => __('Width', WDFM()->prefix),
1614
  'name' => 'BPWidth',
1615
  'type' => 'text',
1616
  'class' => '',
@@ -1618,7 +1618,7 @@ class FMControllerThemes_fm {
1618
  'after' => 'px',
1619
  ),
1620
  array(
1621
- 'label' => __('Height', WDFM()->prefix),
1622
  'name' => 'BPHeight',
1623
  'type' => 'text',
1624
  'class' => '',
@@ -1626,7 +1626,7 @@ class FMControllerThemes_fm {
1626
  'after' => 'px',
1627
  ),
1628
  array(
1629
- 'label' => __('Font Size', WDFM()->prefix),
1630
  'name' => 'BPFontSize',
1631
  'type' => 'text',
1632
  'class' => '',
@@ -1634,7 +1634,7 @@ class FMControllerThemes_fm {
1634
  'after' => 'px',
1635
  ),
1636
  array(
1637
- 'label' => __('Font Weight', WDFM()->prefix),
1638
  'name' => 'BPFontWeight',
1639
  'type' => 'select',
1640
  'options' => $font_weights,
@@ -1643,34 +1643,34 @@ class FMControllerThemes_fm {
1643
  'after' => '',
1644
  ),
1645
  array(
1646
- 'label' => __('Color', WDFM()->prefix),
1647
  'name' => 'BPColor',
1648
  'type' => 'text',
1649
  'class' => 'color',
1650
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1651
  'value' => isset($param_values->BPColor) ? $param_values->BPColor : '',
1652
  'after' => '',
1653
  ),
1654
  array(
1655
- 'label' => __('Padding', WDFM()->prefix),
1656
  'name' => 'BPPadding',
1657
  'type' => 'text',
1658
  'class' => '',
1659
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5xp or 3% 5%',
1660
  'value' => isset($param_values->BPPadding) ? $param_values->BPPadding : '',
1661
  'after' => '',
1662
  ),
1663
  array(
1664
- 'label' => __('Margin', WDFM()->prefix),
1665
  'name' => 'BPMargin',
1666
  'type' => 'text',
1667
  'class' => '',
1668
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10xp or 5% 10%',
1669
  'value' => isset($param_values->BPMargin) ? $param_values->BPMargin : '',
1670
  'after' => '',
1671
  ),
1672
  array(
1673
- 'label' => __('Border', WDFM()->prefix),
1674
  'name' => 'BPBorder',
1675
  'type' => 'checkbox',
1676
  'options' => $borders,
@@ -1678,16 +1678,16 @@ class FMControllerThemes_fm {
1678
  'after' => '',
1679
  ),
1680
  array(
1681
- 'label' => __('Border Color', WDFM()->prefix),
1682
  'name' => 'BPBorderColor',
1683
  'type' => 'text',
1684
  'class' => 'color',
1685
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1686
  'value' => isset($param_values->BPBorderColor) ? $param_values->BPBorderColor : '',
1687
  'after' => '',
1688
  ),
1689
  array(
1690
- 'label' => __('Border Type', WDFM()->prefix),
1691
  'name' => 'BPBorderType',
1692
  'type' => 'select',
1693
  'options' => $border_types,
@@ -1696,7 +1696,7 @@ class FMControllerThemes_fm {
1696
  'after' => '',
1697
  ),
1698
  array(
1699
- 'label' => __('Border Width', WDFM()->prefix),
1700
  'name' => 'BPBorderWidth',
1701
  'type' => 'text',
1702
  'class' => '',
@@ -1704,7 +1704,7 @@ class FMControllerThemes_fm {
1704
  'after' => 'px',
1705
  ),
1706
  array(
1707
- 'label' => __('Border Radius', WDFM()->prefix),
1708
  'name' => 'BPBorderRadius',
1709
  'type' => 'text',
1710
  'class' => '',
@@ -1712,40 +1712,40 @@ class FMControllerThemes_fm {
1712
  'after' => 'px',
1713
  ),
1714
  array(
1715
- 'label' => __('Box Shadow', WDFM()->prefix),
1716
  'name' => 'BPBoxShadow',
1717
  'type' => 'text',
1718
  'class' => '',
1719
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 5px 2px #888888',
1720
  'value' => isset($param_values->BPBoxShadow) ? $param_values->BPBoxShadow : '',
1721
  'after' => '',
1722
  ),
1723
  array(
1724
- 'label' => __('Hover Parameters', WDFM()->prefix),
1725
  'type' => 'label',
1726
  'class' => 'fm-mini-title',
1727
  'after' => '<br/>',
1728
  ),
1729
  array(
1730
- 'label' => __('Background Color', WDFM()->prefix),
1731
  'name' => 'BHPBGColor',
1732
  'type' => 'text',
1733
  'class' => 'color',
1734
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1735
  'value' => isset($param_values->BHPBGColor) ? $param_values->BHPBGColor : '',
1736
  'after' => '',
1737
  ),
1738
  array(
1739
- 'label' => __('Color', WDFM()->prefix),
1740
  'name' => 'BHPColor',
1741
  'type' => 'text',
1742
  'class' => 'color',
1743
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1744
  'value' => isset($param_values->BHPColor) ? $param_values->BHPColor : '',
1745
  'after' => '',
1746
  ),
1747
  array(
1748
- 'label' => __('Border', WDFM()->prefix),
1749
  'name' => 'BHPBorder',
1750
  'type' => 'checkbox',
1751
  'options' => $borders,
@@ -1753,16 +1753,16 @@ class FMControllerThemes_fm {
1753
  'after' => '',
1754
  ),
1755
  array(
1756
- 'label' => __('Border Color', WDFM()->prefix),
1757
  'name' => 'BHPBorderColor',
1758
  'type' => 'text',
1759
  'class' => 'color',
1760
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1761
  'value' => isset($param_values->BHPBorderColor) ? $param_values->BHPBorderColor : '',
1762
  'after' => '',
1763
  ),
1764
  array(
1765
- 'label' => __('Border Type', WDFM()->prefix),
1766
  'name' => 'BHPBorderType',
1767
  'type' => 'select',
1768
  'options' => $border_types,
@@ -1771,7 +1771,7 @@ class FMControllerThemes_fm {
1771
  'after' => '',
1772
  ),
1773
  array(
1774
- 'label' => __('Border Width', WDFM()->prefix),
1775
  'name' => 'BHPBorderWidth',
1776
  'type' => 'text',
1777
  'class' => '',
@@ -1781,23 +1781,23 @@ class FMControllerThemes_fm {
1781
  ),
1782
  'paigination' => array(
1783
  array(
1784
- 'label' => __('Active', WDFM()->prefix),
1785
  'type' => 'panel',
1786
  'class' => 'col-md-12',
1787
  'label_class' => 'fm-mini-title',
1788
  'after' => '',
1789
  ),
1790
  array(
1791
- 'label' => __('Background Color', WDFM()->prefix),
1792
  'name' => 'PSAPBGColor',
1793
  'type' => 'text',
1794
  'class' => 'color',
1795
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1796
  'value' => isset($param_values->PSAPBGColor) ? $param_values->PSAPBGColor : '',
1797
  'after' => '',
1798
  ),
1799
  array(
1800
- 'label' => __('Font Size', WDFM()->prefix),
1801
  'name' => 'PSAPFontSize',
1802
  'type' => 'text',
1803
  'class' => '',
@@ -1805,7 +1805,7 @@ class FMControllerThemes_fm {
1805
  'after' => 'px',
1806
  ),
1807
  array(
1808
- 'label' => __('Font Weight', WDFM()->prefix),
1809
  'name' => 'PSAPFontWeight',
1810
  'type' => 'select',
1811
  'options' => $font_weights,
@@ -1814,16 +1814,16 @@ class FMControllerThemes_fm {
1814
  'after' => '',
1815
  ),
1816
  array(
1817
- 'label' => __('Color', WDFM()->prefix),
1818
  'name' => 'PSAPColor',
1819
  'type' => 'text',
1820
  'class' => 'color',
1821
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1822
  'value' => isset($param_values->PSAPColor) ? $param_values->PSAPColor : '',
1823
  'after' => '',
1824
  ),
1825
  array(
1826
- 'label' => __('Height', WDFM()->prefix),
1827
  'name' => 'PSAPHeight',
1828
  'type' => 'text',
1829
  'class' => '',
@@ -1831,7 +1831,7 @@ class FMControllerThemes_fm {
1831
  'after' => 'px',
1832
  ),
1833
  array(
1834
- 'label' => __('Line Height', WDFM()->prefix),
1835
  'name' => 'PSAPLineHeight',
1836
  'type' => 'text',
1837
  'class' => '',
@@ -1839,25 +1839,25 @@ class FMControllerThemes_fm {
1839
  'after' => 'px',
1840
  ),
1841
  array(
1842
- 'label' => __('Padding', WDFM()->prefix),
1843
  'name' => 'PSAPPadding',
1844
  'type' => 'text',
1845
  'class' => '',
1846
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
1847
  'value' => isset($param_values->PSAPPadding) ? $param_values->PSAPPadding : '',
1848
  'after' => '',
1849
  ),
1850
  array(
1851
- 'label' => __('Margin', WDFM()->prefix),
1852
  'name' => 'PSAPMargin',
1853
  'type' => 'text',
1854
  'class' => '',
1855
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
1856
  'value' => isset($param_values->PSAPMargin) ? $param_values->PSAPMargin : '',
1857
  'after' => '',
1858
  ),
1859
  array(
1860
- 'label' => __('Border', WDFM()->prefix),
1861
  'name' => 'PSAPBorder',
1862
  'type' => 'checkbox',
1863
  'options' => $borders,
@@ -1865,16 +1865,16 @@ class FMControllerThemes_fm {
1865
  'after' => '',
1866
  ),
1867
  array(
1868
- 'label' => __('Border Color', WDFM()->prefix),
1869
  'name' => 'PSAPBorderColor',
1870
  'type' => 'text',
1871
  'class' => 'color',
1872
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1873
  'value' => isset($param_values->PSAPBorderColor) ? $param_values->PSAPBorderColor : '',
1874
  'after' => '',
1875
  ),
1876
  array(
1877
- 'label' => __('Border Type', WDFM()->prefix),
1878
  'name' => 'PSAPBorderType',
1879
  'type' => 'select',
1880
  'options' => $border_types,
@@ -1883,7 +1883,7 @@ class FMControllerThemes_fm {
1883
  'after' => '',
1884
  ),
1885
  array(
1886
- 'label' => __('Border Width', WDFM()->prefix),
1887
  'name' => 'PSAPBorderWidth',
1888
  'type' => 'text',
1889
  'class' => '',
@@ -1891,7 +1891,7 @@ class FMControllerThemes_fm {
1891
  'after' => 'px',
1892
  ),
1893
  array(
1894
- 'label' => __('Border Radius', WDFM()->prefix),
1895
  'name' => 'PSAPBorderRadius',
1896
  'type' => 'text',
1897
  'class' => '',
@@ -1899,23 +1899,23 @@ class FMControllerThemes_fm {
1899
  'after' => 'px</div>',
1900
  ),
1901
  array(
1902
- 'label' => __('Inactive', WDFM()->prefix),
1903
  'type' => 'panel',
1904
  'class' => 'col-md-12',
1905
  'label_class' => 'fm-mini-title',
1906
  'after' => '',
1907
  ),
1908
  array(
1909
- 'label' => __('Background Color', WDFM()->prefix),
1910
  'name' => 'PSDPBGColor',
1911
  'type' => 'text',
1912
  'class' => 'color',
1913
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1914
  'value' => isset($param_values->PSDPBGColor) ? $param_values->PSDPBGColor : '',
1915
  'after' => '',
1916
  ),
1917
  array(
1918
- 'label' => __('Font Size', WDFM()->prefix),
1919
  'name' => 'PSDPFontSize',
1920
  'type' => 'text',
1921
  'class' => '',
@@ -1923,7 +1923,7 @@ class FMControllerThemes_fm {
1923
  'after' => 'px',
1924
  ),
1925
  array(
1926
- 'label' => __('Font Weight', WDFM()->prefix),
1927
  'name' => 'PSDPFontWeight',
1928
  'type' => 'select',
1929
  'options' => $font_weights,
@@ -1932,16 +1932,16 @@ class FMControllerThemes_fm {
1932
  'after' => '',
1933
  ),
1934
  array(
1935
- 'label' => __('Color', WDFM()->prefix),
1936
  'name' => 'PSDPColor',
1937
  'type' => 'text',
1938
  'class' => 'color',
1939
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1940
  'value' => isset($param_values->PSDPColor) ? $param_values->PSDPColor : '',
1941
  'after' => '',
1942
  ),
1943
  array(
1944
- 'label' => __('Height', WDFM()->prefix),
1945
  'name' => 'PSDPHeight',
1946
  'type' => 'text',
1947
  'class' => '',
@@ -1949,7 +1949,7 @@ class FMControllerThemes_fm {
1949
  'after' => 'px',
1950
  ),
1951
  array(
1952
- 'label' => __('Line Height', WDFM()->prefix),
1953
  'name' => 'PSDPLineHeight',
1954
  'type' => 'text',
1955
  'class' => '',
@@ -1957,25 +1957,25 @@ class FMControllerThemes_fm {
1957
  'after' => 'px',
1958
  ),
1959
  array(
1960
- 'label' => __('Padding', WDFM()->prefix),
1961
  'name' => 'PSDPPadding',
1962
  'type' => 'text',
1963
  'class' => '',
1964
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
1965
  'value' => isset($param_values->PSDPPadding) ? $param_values->PSDPPadding : '',
1966
  'after' => '',
1967
  ),
1968
  array(
1969
- 'label' => __('Margin', WDFM()->prefix),
1970
  'name' => 'PSDPMargin',
1971
  'type' => 'text',
1972
  'class' => '',
1973
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
1974
  'value' => isset($param_values->PSDPMargin) ? $param_values->PSDPMargin : '',
1975
  'after' => '',
1976
  ),
1977
  array(
1978
- 'label' => __('Border', WDFM()->prefix),
1979
  'name' => 'PSDPBorder',
1980
  'type' => 'checkbox',
1981
  'options' => $borders,
@@ -1983,16 +1983,16 @@ class FMControllerThemes_fm {
1983
  'after' => '',
1984
  ),
1985
  array(
1986
- 'label' => __('Border Color', WDFM()->prefix),
1987
  'name' => 'PSDPBorderColor',
1988
  'type' => 'text',
1989
  'class' => 'color',
1990
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
1991
  'value' => isset($param_values->PSDPBorderColor) ? $param_values->PSDPBorderColor : '',
1992
  'after' => '',
1993
  ),
1994
  array(
1995
- 'label' => __('Border Type', WDFM()->prefix),
1996
  'name' => 'PSDPBorderType',
1997
  'type' => 'select',
1998
  'options' => $border_types,
@@ -2001,7 +2001,7 @@ class FMControllerThemes_fm {
2001
  'after' => '',
2002
  ),
2003
  array(
2004
- 'label' => __('Border Width', WDFM()->prefix),
2005
  'name' => 'PSDPBorderWidth',
2006
  'type' => 'text',
2007
  'class' => '',
@@ -2009,7 +2009,7 @@ class FMControllerThemes_fm {
2009
  'after' => 'px',
2010
  ),
2011
  array(
2012
- 'label' => __('Border Radius', WDFM()->prefix),
2013
  'name' => 'PSDPBorderRadius',
2014
  'type' => 'text',
2015
  'class' => '',
@@ -2017,14 +2017,14 @@ class FMControllerThemes_fm {
2017
  'after' => 'px</div>',
2018
  ),
2019
  array(
2020
- 'label' => __('Steps', WDFM()->prefix),
2021
  'type' => 'panel',
2022
  'class' => 'col-md-12',
2023
  'label_class' => 'fm-mini-title',
2024
  'after' => '',
2025
  ),
2026
  array(
2027
- 'label' => __('Alignment', WDFM()->prefix),
2028
  'name' => 'PSAPAlign',
2029
  'type' => 'select',
2030
  'options' => $aligns,
@@ -2033,7 +2033,7 @@ class FMControllerThemes_fm {
2033
  'after' => '',
2034
  ),
2035
  array(
2036
- 'label' => __('Width', WDFM()->prefix),
2037
  'name' => 'PSAPWidth',
2038
  'type' => 'text',
2039
  'class' => '',
@@ -2041,32 +2041,32 @@ class FMControllerThemes_fm {
2041
  'after' => 'px</div>',
2042
  ),
2043
  array(
2044
- 'label' => __('Percentage', WDFM()->prefix),
2045
  'type' => 'panel',
2046
  'class' => 'col-md-12',
2047
  'label_class' => 'fm-mini-title',
2048
  'after' => '',
2049
  ),
2050
  array(
2051
- 'label' => __('Width', WDFM()->prefix),
2052
  'name' => 'PPAPWidth',
2053
  'type' => 'text',
2054
  'class' => '',
2055
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 500px or 50%',
2056
  'value' => isset($param_values->PPAPWidth) ? $param_values->PPAPWidth : '',
2057
  'after' => '</div>',
2058
  ),
2059
  ),
2060
  'buttons' => array(
2061
  array(
2062
- 'label' => __('Global Parameters', WDFM()->prefix),
2063
  'type' => 'panel',
2064
  'class' => 'col-md-12',
2065
  'label_class' => 'fm-mini-title',
2066
  'after' => '<br/>',
2067
  ),
2068
  array(
2069
- 'label' => __('Font Size', WDFM()->prefix),
2070
  'name' => 'BPFontSize',
2071
  'type' => 'text',
2072
  'class' => '',
@@ -2074,7 +2074,7 @@ class FMControllerThemes_fm {
2074
  'after' => 'px',
2075
  ),
2076
  array(
2077
- 'label' => __('Font Weight', WDFM()->prefix),
2078
  'name' => 'BPFontWeight',
2079
  'type' => 'select',
2080
  'options' => $font_weights,
@@ -2083,23 +2083,23 @@ class FMControllerThemes_fm {
2083
  'after' => '</div>',
2084
  ),
2085
  array(
2086
- 'label' => __('Next Button Parameters', WDFM()->prefix),
2087
  'type' => 'panel',
2088
  'class' => 'col-md-12',
2089
  'label_class' => 'fm-mini-title',
2090
  'after' => '<br/>',
2091
  ),
2092
  array(
2093
- 'label' => __('Background Color', WDFM()->prefix),
2094
  'name' => 'NBPBGColor',
2095
  'type' => 'text',
2096
  'class' => 'color',
2097
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2098
  'value' => isset($param_values->NBPBGColor) ? $param_values->NBPBGColor : '',
2099
  'after' => '',
2100
  ),
2101
  array(
2102
- 'label' => __('Width', WDFM()->prefix),
2103
  'name' => 'NBPWidth',
2104
  'type' => 'text',
2105
  'class' => '',
@@ -2107,7 +2107,7 @@ class FMControllerThemes_fm {
2107
  'after' => 'px',
2108
  ),
2109
  array(
2110
- 'label' => __('Height', WDFM()->prefix),
2111
  'name' => 'NBPHeight',
2112
  'type' => 'text',
2113
  'class' => '',
@@ -2115,7 +2115,7 @@ class FMControllerThemes_fm {
2115
  'after' => 'px',
2116
  ),
2117
  array(
2118
- 'label' => __('Line Height', WDFM()->prefix),
2119
  'name' => 'NBPLineHeight',
2120
  'type' => 'text',
2121
  'class' => '',
@@ -2123,34 +2123,34 @@ class FMControllerThemes_fm {
2123
  'after' => 'px',
2124
  ),
2125
  array(
2126
- 'label' => __('Color', WDFM()->prefix),
2127
  'name' => 'NBPColor',
2128
  'type' => 'text',
2129
  'class' => 'color',
2130
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2131
  'value' => isset($param_values->NBPColor) ? $param_values->NBPColor : '',
2132
  'after' => '',
2133
  ),
2134
  array(
2135
- 'label' => __('Padding', WDFM()->prefix),
2136
  'name' => 'NBPPadding',
2137
  'type' => 'text',
2138
  'class' => '',
2139
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
2140
  'value' => isset($param_values->NBPPadding) ? $param_values->NBPPadding : '',
2141
  'after' => '',
2142
  ),
2143
  array(
2144
- 'label' => __('Margin', WDFM()->prefix),
2145
  'name' => 'NBPMargin',
2146
  'type' => 'text',
2147
  'class' => '',
2148
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
2149
  'value' => isset($param_values->NBPMargin) ? $param_values->NBPMargin : '',
2150
  'after' => '',
2151
  ),
2152
  array(
2153
- 'label' => __('Border', WDFM()->prefix),
2154
  'name' => 'NBPBorder',
2155
  'type' => 'checkbox',
2156
  'options' => $borders,
@@ -2158,16 +2158,16 @@ class FMControllerThemes_fm {
2158
  'after' => '',
2159
  ),
2160
  array(
2161
- 'label' => __('Border Color', WDFM()->prefix),
2162
  'name' => 'NBPBorderColor',
2163
  'type' => 'text',
2164
  'class' => 'color',
2165
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2166
  'value' => isset($param_values->NBPBorderColor) ? $param_values->NBPBorderColor : '',
2167
  'after' => '',
2168
  ),
2169
  array(
2170
- 'label' => __('Border Type', WDFM()->prefix),
2171
  'name' => 'NBPBorderType',
2172
  'type' => 'select',
2173
  'options' => $border_types,
@@ -2176,7 +2176,7 @@ class FMControllerThemes_fm {
2176
  'after' => '',
2177
  ),
2178
  array(
2179
- 'label' => __('Border Width', WDFM()->prefix),
2180
  'name' => 'NBPBorderWidth',
2181
  'type' => 'text',
2182
  'class' => '',
@@ -2184,7 +2184,7 @@ class FMControllerThemes_fm {
2184
  'after' => 'px',
2185
  ),
2186
  array(
2187
- 'label' => __('Border Radius', WDFM()->prefix),
2188
  'name' => 'NBPBorderRadius',
2189
  'type' => 'text',
2190
  'class' => '',
@@ -2192,40 +2192,40 @@ class FMControllerThemes_fm {
2192
  'after' => 'px',
2193
  ),
2194
  array(
2195
- 'label' => __('Box Shadow', WDFM()->prefix),
2196
  'name' => 'NBPBoxShadow',
2197
  'type' => 'text',
2198
  'class' => '',
2199
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 5px 2px #888888',
2200
  'value' => isset($param_values->NBPBoxShadow) ? $param_values->NBPBoxShadow : '',
2201
  'after' => '',
2202
  ),
2203
  array(
2204
- 'label' => __('Hover Parameters', WDFM()->prefix),
2205
  'type' => 'label',
2206
  'class' => 'fm-mini-title',
2207
  'after' => '<br/>',
2208
  ),
2209
  array(
2210
- 'label' => __('Background Color', WDFM()->prefix),
2211
  'name' => 'NBHPBGColor',
2212
  'type' => 'text',
2213
  'class' => 'color',
2214
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2215
  'value' => isset($param_values->NBHPBGColor) ? $param_values->NBHPBGColor : '',
2216
  'after' => '',
2217
  ),
2218
  array(
2219
- 'label' => __('Color', WDFM()->prefix),
2220
  'name' => 'NBHPColor',
2221
  'type' => 'text',
2222
  'class' => 'color',
2223
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2224
  'value' => isset($param_values->NBHPColor) ? $param_values->NBHPColor : '',
2225
  'after' => '',
2226
  ),
2227
  array(
2228
- 'label' => __('Border', WDFM()->prefix),
2229
  'name' => 'NBHPBorder',
2230
  'type' => 'checkbox',
2231
  'options' => $borders,
@@ -2233,16 +2233,16 @@ class FMControllerThemes_fm {
2233
  'after' => '',
2234
  ),
2235
  array(
2236
- 'label' => __('Border Color', WDFM()->prefix),
2237
  'name' => 'NBHPBorderColor',
2238
  'type' => 'text',
2239
  'class' => 'color',
2240
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2241
  'value' => isset($param_values->NBHPBorderColor) ? $param_values->NBHPBorderColor : '',
2242
  'after' => '',
2243
  ),
2244
  array(
2245
- 'label' => __('Border Type', WDFM()->prefix),
2246
  'name' => 'NBHPBorderType',
2247
  'type' => 'select',
2248
  'options' => $border_types,
@@ -2251,7 +2251,7 @@ class FMControllerThemes_fm {
2251
  'after' => '',
2252
  ),
2253
  array(
2254
- 'label' => __('Border Width', WDFM()->prefix),
2255
  'name' => 'NBHPBorderWidth',
2256
  'type' => 'text',
2257
  'class' => '',
@@ -2259,23 +2259,23 @@ class FMControllerThemes_fm {
2259
  'after' => 'px</div>',
2260
  ),
2261
  array(
2262
- 'label' => __('Previous Button Parameters', WDFM()->prefix),
2263
  'type' => 'panel',
2264
  'class' => 'col-md-12',
2265
  'label_class' => 'fm-mini-title',
2266
  'after' => '<br/>',
2267
  ),
2268
  array(
2269
- 'label' => __('Background Color', WDFM()->prefix),
2270
  'name' => 'PBPBGColor',
2271
  'type' => 'text',
2272
  'class' => 'color',
2273
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2274
  'value' => isset($param_values->PBPBGColor) ? $param_values->PBPBGColor : '',
2275
  'after' => '',
2276
  ),
2277
  array(
2278
- 'label' => __('Width', WDFM()->prefix),
2279
  'name' => 'PBPWidth',
2280
  'type' => 'text',
2281
  'class' => '',
@@ -2283,7 +2283,7 @@ class FMControllerThemes_fm {
2283
  'after' => 'px',
2284
  ),
2285
  array(
2286
- 'label' => __('Height', WDFM()->prefix),
2287
  'name' => 'PBPHeight',
2288
  'type' => 'text',
2289
  'class' => '',
@@ -2291,7 +2291,7 @@ class FMControllerThemes_fm {
2291
  'after' => 'px',
2292
  ),
2293
  array(
2294
- 'label' => __('Line Height', WDFM()->prefix),
2295
  'name' => 'PBPLineHeight',
2296
  'type' => 'text',
2297
  'class' => '',
@@ -2299,34 +2299,34 @@ class FMControllerThemes_fm {
2299
  'after' => 'px',
2300
  ),
2301
  array(
2302
- 'label' => __('Color', WDFM()->prefix),
2303
  'name' => 'PBPColor',
2304
  'type' => 'text',
2305
  'class' => 'color',
2306
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2307
  'value' => isset($param_values->PBPColor) ? $param_values->PBPColor : '',
2308
  'after' => '',
2309
  ),
2310
  array(
2311
- 'label' => __('Padding', WDFM()->prefix),
2312
  'name' => 'PBPPadding',
2313
  'type' => 'text',
2314
  'class' => '',
2315
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
2316
  'value' => isset($param_values->PBPPadding) ? $param_values->PBPPadding : '',
2317
  'after' => '',
2318
  ),
2319
  array(
2320
- 'label' => __('Margin', WDFM()->prefix),
2321
  'name' => 'PBPMargin',
2322
  'type' => 'text',
2323
  'class' => '',
2324
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
2325
  'value' => isset($param_values->PBPMargin) ? $param_values->PBPMargin : '',
2326
  'after' => '',
2327
  ),
2328
  array(
2329
- 'label' => __('Border', WDFM()->prefix),
2330
  'name' => 'PBPBorder',
2331
  'type' => 'checkbox',
2332
  'options' => $borders,
@@ -2334,16 +2334,16 @@ class FMControllerThemes_fm {
2334
  'after' => '',
2335
  ),
2336
  array(
2337
- 'label' => __('Border Color', WDFM()->prefix),
2338
  'name' => 'PBPBorderColor',
2339
  'type' => 'text',
2340
  'class' => 'color',
2341
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2342
  'value' => isset($param_values->PBPBorderColor) ? $param_values->PBPBorderColor : '',
2343
  'after' => '',
2344
  ),
2345
  array(
2346
- 'label' => __('Border Type', WDFM()->prefix),
2347
  'name' => 'PBPBorderType',
2348
  'type' => 'select',
2349
  'options' => $border_types,
@@ -2352,7 +2352,7 @@ class FMControllerThemes_fm {
2352
  'after' => '',
2353
  ),
2354
  array(
2355
- 'label' => __('Border Width', WDFM()->prefix),
2356
  'name' => 'PBPBorderWidth',
2357
  'type' => 'text',
2358
  'class' => '',
@@ -2360,7 +2360,7 @@ class FMControllerThemes_fm {
2360
  'after' => 'px',
2361
  ),
2362
  array(
2363
- 'label' => __('Border Radius', WDFM()->prefix),
2364
  'name' => 'PBPBorderRadius',
2365
  'type' => 'text',
2366
  'class' => '',
@@ -2368,40 +2368,40 @@ class FMControllerThemes_fm {
2368
  'after' => 'px',
2369
  ),
2370
  array(
2371
- 'label' => __('Box Shadow', WDFM()->prefix),
2372
  'name' => 'PBPBoxShadow',
2373
  'type' => 'text',
2374
  'class' => '',
2375
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 5px 2px #888888',
2376
  'value' => isset($param_values->PBPBoxShadow) ? $param_values->PBPBoxShadow : '',
2377
  'after' => '',
2378
  ),
2379
  array(
2380
- 'label' => __('Hover Parameters', WDFM()->prefix),
2381
  'type' => 'label',
2382
  'class' => 'fm-mini-title',
2383
  'after' => '<br/>',
2384
  ),
2385
  array(
2386
- 'label' => __('Background Color', WDFM()->prefix),
2387
  'name' => 'PBHPBGColor',
2388
  'type' => 'text',
2389
  'class' => 'color',
2390
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2391
  'value' => isset($param_values->PBHPBGColor) ? $param_values->PBHPBGColor : '',
2392
  'after' => '',
2393
  ),
2394
  array(
2395
- 'label' => __('Color', WDFM()->prefix),
2396
  'name' => 'PBHPColor',
2397
  'type' => 'text',
2398
  'class' => 'color',
2399
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2400
  'value' => isset($param_values->PBHPColor) ? $param_values->PBHPColor : '',
2401
  'after' => '',
2402
  ),
2403
  array(
2404
- 'label' => __('Border', WDFM()->prefix),
2405
  'name' => 'PBHPBorder',
2406
  'type' => 'checkbox',
2407
  'options' => $borders,
@@ -2409,16 +2409,16 @@ class FMControllerThemes_fm {
2409
  'after' => '',
2410
  ),
2411
  array(
2412
- 'label' => __('Border Color', WDFM()->prefix),
2413
  'name' => 'PBHPBorderColor',
2414
  'type' => 'text',
2415
  'class' => 'color',
2416
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2417
  'value' => isset($param_values->PBHPBorderColor) ? $param_values->PBHPBorderColor : '',
2418
  'after' => '',
2419
  ),
2420
  array(
2421
- 'label' => __('Border Type', WDFM()->prefix),
2422
  'name' => 'PBHPBorderType',
2423
  'type' => 'select',
2424
  'options' => $border_types,
@@ -2427,7 +2427,7 @@ class FMControllerThemes_fm {
2427
  'after' => '',
2428
  ),
2429
  array(
2430
- 'label' => __('Border Width', WDFM()->prefix),
2431
  'name' => 'PBHPBorderWidth',
2432
  'type' => 'text',
2433
  'class' => '',
@@ -2444,7 +2444,7 @@ class FMControllerThemes_fm {
2444
  'after' => '',
2445
  ),
2446
  array(
2447
- 'label' => __('Position', WDFM()->prefix),
2448
  'name' => 'CBPPosition',
2449
  'type' => 'select',
2450
  'options' => $position_types,
@@ -2453,52 +2453,52 @@ class FMControllerThemes_fm {
2453
  'after' => '',
2454
  ),
2455
  array(
2456
- 'label' => __('Top', WDFM()->prefix),
2457
  'name' => 'CBPTop',
2458
  'type' => 'text',
2459
  'class' => '',
2460
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 100px or 10%',
2461
  'value' => isset($param_values->CBPTop) ? $param_values->CBPTop : '',
2462
  'after' => '',
2463
  ),
2464
  array(
2465
- 'label' => __('Right', WDFM()->prefix),
2466
  'name' => 'CBPRight',
2467
  'type' => 'text',
2468
  'class' => '',
2469
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 100px or 10%',
2470
  'value' => isset($param_values->CBPRight) ? $param_values->CBPRight : '',
2471
  'after' => '',
2472
  ),
2473
  array(
2474
- 'label' => __('Bottom', WDFM()->prefix),
2475
  'name' => 'CBPBottom',
2476
  'type' => 'text',
2477
  'class' => '',
2478
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 100px or 10%',
2479
  'value' => isset($param_values->CBPBottom) ? $param_values->CBPBottom : '',
2480
  'after' => '',
2481
  ),
2482
  array(
2483
- 'label' => __('Left', WDFM()->prefix),
2484
  'name' => 'CBPLeft',
2485
  'type' => 'text',
2486
  'class' => '',
2487
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 100px or 10%',
2488
  'value' => isset($param_values->CBPLeft) ? $param_values->CBPLeft : '',
2489
  'after' => '',
2490
  ),
2491
  array(
2492
- 'label' => __('Background Color', WDFM()->prefix),
2493
  'name' => 'CBPBGColor',
2494
  'type' => 'text',
2495
  'class' => 'color',
2496
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2497
  'value' => isset($param_values->CBPBGColor) ? $param_values->CBPBGColor : '',
2498
  'after' => '',
2499
  ),
2500
  array(
2501
- 'label' => __('Font Size', WDFM()->prefix),
2502
  'name' => 'CBPFontSize',
2503
  'type' => 'text',
2504
  'class' => '13',
@@ -2506,7 +2506,7 @@ class FMControllerThemes_fm {
2506
  'after' => 'px',
2507
  ),
2508
  array(
2509
- 'label' => __('Font Weight', WDFM()->prefix),
2510
  'name' => 'CBPFontWeight',
2511
  'type' => 'select',
2512
  'options' => $font_weights,
@@ -2515,34 +2515,34 @@ class FMControllerThemes_fm {
2515
  'after' => '',
2516
  ),
2517
  array(
2518
- 'label' => __('Color', WDFM()->prefix),
2519
  'name' => 'CBPColor',
2520
  'type' => 'text',
2521
  'class' => 'color',
2522
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2523
  'value' => isset($param_values->CBPColor) ? $param_values->CBPColor : '',
2524
  'after' => '',
2525
  ),
2526
  array(
2527
- 'label' => __('Padding', WDFM()->prefix),
2528
  'name' => 'CBPPadding',
2529
  'type' => 'text',
2530
  'class' => '',
2531
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
2532
  'value' => isset($param_values->CBPPadding) ? $param_values->CBPPadding : '',
2533
  'after' => '',
2534
  ),
2535
  array(
2536
- 'label' => __('Margin', WDFM()->prefix),
2537
  'name' => 'CBPMargin',
2538
  'type' => 'text',
2539
  'class' => '',
2540
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
2541
  'value' => isset($param_values->CBPMargin) ? $param_values->CBPMargin : '',
2542
  'after' => '',
2543
  ),
2544
  array(
2545
- 'label' => __('Border', WDFM()->prefix),
2546
  'name' => 'CBPBorder',
2547
  'type' => 'checkbox',
2548
  'options' => $borders,
@@ -2550,16 +2550,16 @@ class FMControllerThemes_fm {
2550
  'after' => '',
2551
  ),
2552
  array(
2553
- 'label' => __('Border Color', WDFM()->prefix),
2554
  'name' => 'CBPBorderColor',
2555
  'type' => 'text',
2556
  'class' => 'color',
2557
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2558
  'value' => isset($param_values->CBPBorderColor) ? $param_values->CBPBorderColor : '',
2559
  'after' => '',
2560
  ),
2561
  array(
2562
- 'label' => __('Border Type', WDFM()->prefix),
2563
  'name' => 'CBPBorderType',
2564
  'type' => 'select',
2565
  'options' => $border_types,
@@ -2568,7 +2568,7 @@ class FMControllerThemes_fm {
2568
  'after' => '',
2569
  ),
2570
  array(
2571
- 'label' => __('Border Width', WDFM()->prefix),
2572
  'name' => 'CBPBorderWidth',
2573
  'type' => 'text',
2574
  'class' => '',
@@ -2576,7 +2576,7 @@ class FMControllerThemes_fm {
2576
  'after' => 'px',
2577
  ),
2578
  array(
2579
- 'label' => __('Border Radius', WDFM()->prefix),
2580
  'name' => 'CBPBorderRadius',
2581
  'type' => 'text',
2582
  'class' => '',
@@ -2584,31 +2584,31 @@ class FMControllerThemes_fm {
2584
  'after' => 'px',
2585
  ),
2586
  array(
2587
- 'label' => __('Hover Parameters', WDFM()->prefix),
2588
  'type' => 'label',
2589
  'class' => 'fm-mini-title',
2590
  'after' => '<br/>',
2591
  ),
2592
  array(
2593
- 'label' => __('Background Color', WDFM()->prefix),
2594
  'name' => 'CBHPBGColor',
2595
  'type' => 'text',
2596
  'class' => 'color',
2597
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2598
  'value' => isset($param_values->CBHPBGColor) ? $param_values->CBHPBGColor : '',
2599
  'after' => '',
2600
  ),
2601
  array(
2602
- 'label' => __('Color', WDFM()->prefix),
2603
  'name' => 'CBHPColor',
2604
  'type' => 'text',
2605
  'class' => 'color',
2606
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2607
  'value' => isset($param_values->CBHPColor) ? $param_values->CBHPColor : '',
2608
  'after' => '',
2609
  ),
2610
  array(
2611
- 'label' => __('Border', WDFM()->prefix),
2612
  'name' => 'CBHPBorder',
2613
  'type' => 'checkbox',
2614
  'options' => $borders,
@@ -2616,16 +2616,16 @@ class FMControllerThemes_fm {
2616
  'after' => '',
2617
  ),
2618
  array(
2619
- 'label' => __('Border Color', WDFM()->prefix),
2620
  'name' => 'CBHPBorderColor',
2621
  'type' => 'text',
2622
  'class' => 'color',
2623
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2624
  'value' => isset($param_values->CBHPBorderColor) ? $param_values->CBHPBorderColor : '',
2625
  'after' => '',
2626
  ),
2627
  array(
2628
- 'label' => __('Border Type', WDFM()->prefix),
2629
  'name' => 'CBHPBorderType',
2630
  'type' => 'select',
2631
  'options' => $border_types,
@@ -2634,7 +2634,7 @@ class FMControllerThemes_fm {
2634
  'after' => '',
2635
  ),
2636
  array(
2637
- 'label' => __('Border Width', WDFM()->prefix),
2638
  'name' => 'CBHPBorderWidth',
2639
  'type' => 'text',
2640
  'class' => '',
@@ -2651,16 +2651,16 @@ class FMControllerThemes_fm {
2651
  'after' => '',
2652
  ),
2653
  array(
2654
- 'label' => __('Background Color', WDFM()->prefix),
2655
  'name' => 'MBPBGColor',
2656
  'type' => 'text',
2657
  'class' => 'color',
2658
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2659
  'value' => isset($param_values->MBPBGColor) ? $param_values->MBPBGColor : '',
2660
  'after' => '',
2661
  ),
2662
  array(
2663
- 'label' => __('Font Size', WDFM()->prefix),
2664
  'name' => 'MBPFontSize',
2665
  'type' => 'text',
2666
  'class' => '13',
@@ -2668,7 +2668,7 @@ class FMControllerThemes_fm {
2668
  'after' => 'px',
2669
  ),
2670
  array(
2671
- 'label' => __('Font Weight', WDFM()->prefix),
2672
  'name' => 'MBPFontWeight',
2673
  'type' => 'select',
2674
  'options' => $font_weights,
@@ -2677,16 +2677,16 @@ class FMControllerThemes_fm {
2677
  'after' => '',
2678
  ),
2679
  array(
2680
- 'label' => __('Color', WDFM()->prefix),
2681
  'name' => 'MBPColor',
2682
  'type' => 'text',
2683
  'class' => 'color',
2684
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2685
  'value' => isset($param_values->MBPColor) ? $param_values->MBPColor : '',
2686
  'after' => '',
2687
  ),
2688
  array(
2689
- 'label' => __('Text Align', WDFM()->prefix),
2690
  'name' => 'MBPTextAlign',
2691
  'type' => 'select',
2692
  'options' => $aligns,
@@ -2695,25 +2695,25 @@ class FMControllerThemes_fm {
2695
  'after' => '',
2696
  ),
2697
  array(
2698
- 'label' => __('Padding', WDFM()->prefix),
2699
  'name' => 'MBPPadding',
2700
  'type' => 'text',
2701
  'class' => '',
2702
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 3px 5px or 3% 5%',
2703
  'value' => isset($param_values->MBPPadding) ? $param_values->MBPPadding : '',
2704
  'after' => 'px|%',
2705
  ),
2706
  array(
2707
- 'label' => __('Margin', WDFM()->prefix),
2708
  'name' => 'MBPMargin',
2709
  'type' => 'text',
2710
  'class' => '',
2711
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' 5px 10px or 5% 10%',
2712
  'value' => isset($param_values->MBPMargin) ? $param_values->MBPMargin : '',
2713
  'after' => 'px|%',
2714
  ),
2715
  array(
2716
- 'label' => __('Border', WDFM()->prefix),
2717
  'name' => 'MBPBorder',
2718
  'type' => 'checkbox',
2719
  'options' => $borders,
@@ -2721,16 +2721,16 @@ class FMControllerThemes_fm {
2721
  'after' => '',
2722
  ),
2723
  array(
2724
- 'label' => __('Border Color', WDFM()->prefix),
2725
  'name' => 'MBPBorderColor',
2726
  'type' => 'text',
2727
  'class' => 'color',
2728
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2729
  'value' => isset($param_values->MBPBorderColor) ? $param_values->MBPBorderColor : '',
2730
  'after' => '',
2731
  ),
2732
  array(
2733
- 'label' => __('Border Type', WDFM()->prefix),
2734
  'name' => 'MBPBorderType',
2735
  'type' => 'select',
2736
  'options' => $border_types,
@@ -2739,7 +2739,7 @@ class FMControllerThemes_fm {
2739
  'after' => '',
2740
  ),
2741
  array(
2742
- 'label' => __('Border Width', WDFM()->prefix),
2743
  'name' => 'MBPBorderWidth',
2744
  'type' => 'text',
2745
  'class' => '',
@@ -2747,7 +2747,7 @@ class FMControllerThemes_fm {
2747
  'after' => 'px',
2748
  ),
2749
  array(
2750
- 'label' => __('Border Radius', WDFM()->prefix),
2751
  'name' => 'MBPBorderRadius',
2752
  'type' => 'text',
2753
  'class' => '',
@@ -2755,31 +2755,31 @@ class FMControllerThemes_fm {
2755
  'after' => 'px',
2756
  ),
2757
  array(
2758
- 'label' => __('Hover Parameters', WDFM()->prefix),
2759
  'type' => 'label',
2760
  'class' => 'fm-mini-title',
2761
  'after' => '<br/>',
2762
  ),
2763
  array(
2764
- 'label' => __('Background Color', WDFM()->prefix),
2765
  'name' => 'MBHPBGColor',
2766
  'type' => 'text',
2767
  'class' => 'color',
2768
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2769
  'value' => isset($param_values->MBHPBGColor) ? $param_values->MBHPBGColor : '',
2770
  'after' => '',
2771
  ),
2772
  array(
2773
- 'label' => __('Color', WDFM()->prefix),
2774
  'name' => 'MBHPColor',
2775
  'type' => 'text',
2776
  'class' => 'color',
2777
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2778
  'value' => isset($param_values->MBHPColor) ? $param_values->MBHPColor : '',
2779
  'after' => '',
2780
  ),
2781
  array(
2782
- 'label' => __('Border', WDFM()->prefix),
2783
  'name' => 'MBHPBorder',
2784
  'type' => 'checkbox',
2785
  'options' => $borders,
@@ -2787,7 +2787,7 @@ class FMControllerThemes_fm {
2787
  'after' => '',
2788
  ),
2789
  array(
2790
- 'label' => __('Border Color', WDFM()->prefix),
2791
  'name' => 'MBHPBorderColor',
2792
  'type' => 'text',
2793
  'class' => 'color',
@@ -2795,7 +2795,7 @@ class FMControllerThemes_fm {
2795
  'after' => '',
2796
  ),
2797
  array(
2798
- 'label' => __('Border Type', WDFM()->prefix),
2799
  'name' => 'MBHPBorderType',
2800
  'type' => 'select',
2801
  'options' => $border_types,
@@ -2804,7 +2804,7 @@ class FMControllerThemes_fm {
2804
  'after' => '',
2805
  ),
2806
  array(
2807
- 'label' => __('Border Width', WDFM()->prefix),
2808
  'name' => 'MBHPBorderWidth',
2809
  'type' => 'text',
2810
  'class' => '',
@@ -2814,23 +2814,23 @@ class FMControllerThemes_fm {
2814
  ),
2815
  'other' => array(
2816
  array(
2817
- 'label' => __('Inactive Text', WDFM()->prefix),
2818
  'type' => 'panel',
2819
  'class' => 'col-md-12',
2820
  'label_class' => 'fm-mini-title',
2821
  'after' => '<br/>',
2822
  ),
2823
  array(
2824
- 'label' => __('Color', WDFM()->prefix),
2825
  'name' => 'OPDeInputColor',
2826
  'type' => 'text',
2827
  'class' => 'color',
2828
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' #efefef',
2829
  'value' => isset($param_values->OPDeInputColor) ? $param_values->OPDeInputColor : '',
2830
  'after' => '',
2831
  ),
2832
  array(
2833
- 'label' => __('Font Style', WDFM()->prefix),
2834
  'name' => 'OPFontStyle',
2835
  'type' => 'text',
2836
  'class' => '',
@@ -2838,13 +2838,13 @@ class FMControllerThemes_fm {
2838
  'after' => '',
2839
  ),
2840
  array(
2841
- 'label' => __('Required', WDFM()->prefix),
2842
  'type' => 'label',
2843
  'class' => 'fm-mini-title',
2844
  'after' => '<br/>',
2845
  ),
2846
  array(
2847
- 'label' => __('Color', WDFM()->prefix),
2848
  'name' => 'OPRColor',
2849
  'type' => 'text',
2850
  'class' => 'color',
@@ -2852,22 +2852,22 @@ class FMControllerThemes_fm {
2852
  'after' => '',
2853
  ),
2854
  array(
2855
- 'label' => __('File Upload', WDFM()->prefix),
2856
  'type' => 'label',
2857
  'class' => 'fm-mini-title',
2858
  'after' => '<br/>',
2859
  ),
2860
  array(
2861
- 'label' => __('Background URL', WDFM()->prefix),
2862
  'name' => 'OPFBgUrl',
2863
  'type' => 'text',
2864
  'class' => '',
2865
- // 'placeholder' => __('e.g. http:// or https://', WDFM()->prefix),
2866
  'value' => isset($param_values->OPFBgUrl) ? $param_values->OPFBgUrl : '',
2867
  'after' => '',
2868
  ),
2869
  array(
2870
- 'label' => __('Background Repeat', WDFM()->prefix),
2871
  'name' => 'OPFBGRepeat',
2872
  'type' => 'select',
2873
  'options' => $bg_repeats,
@@ -2876,12 +2876,12 @@ class FMControllerThemes_fm {
2876
  'after' => '',
2877
  ),
2878
  array(
2879
- 'label' => __('Background Position', WDFM()->prefix),
2880
  'name1' => 'OPFPos1',
2881
  'name2' => 'OPFPos2',
2882
  'type' => '2text',
2883
  'class' => 'fm-2text',
2884
- 'placeholder' => __('e.g.', WDFM()->prefix) . ' px|%, top|bottom|left|right|center',
2885
  'value1' => isset($param_values->OPFPos1) ? $param_values->OPFPos1 : '',
2886
  'value2' => isset($param_values->OPFPos2) ? $param_values->OPFPos2 : '',
2887
  'before1' => '',
@@ -2889,13 +2889,13 @@ class FMControllerThemes_fm {
2889
  'after' => '',
2890
  ),
2891
  array(
2892
- 'label' => __('Grading', WDFM()->prefix),
2893
  'type' => 'label',
2894
  'class' => 'fm-mini-title',
2895
  'after' => '<br/>',
2896
  ),
2897
  array(
2898
- 'label' => __('Text Width', WDFM()->prefix),
2899
  'name' => 'OPGWidth',
2900
  'type' => 'text',
2901
  'class' => '',
@@ -2912,7 +2912,7 @@ class FMControllerThemes_fm {
2912
  'after' => '',
2913
  ),
2914
  array(
2915
- 'label' => __('Custom CSS', WDFM()->prefix),
2916
  'name' => 'CUPCSS',
2917
  'type' => 'textarea',
2918
  'class' => '',
@@ -2930,11 +2930,11 @@ class FMControllerThemes_fm {
2930
  */
2931
  public function apply() {
2932
  $data = $this->save_db();
2933
- $page = WDW_FM_Library::get('page');
2934
- $active_tab = WDW_FM_Library::get('active_tab');
2935
- $pagination = WDW_FM_Library::get('pagination-type');
2936
- $form_type = WDW_FM_Library::get('form_type');
2937
- WDW_FM_Library::fm_redirect(add_query_arg(array(
2938
  'page' => $page,
2939
  'task' => 'edit',
2940
  'current_id' => $data['id'],
@@ -2952,7 +2952,7 @@ class FMControllerThemes_fm {
2952
  */
2953
  public function save_db() {
2954
  global $wpdb;
2955
- $id = (int) WDW_FM_Library::get('current_id', 0);
2956
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
2957
  $version = 2;
2958
  $params = (isset($_POST['params']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['params'])) : '');
@@ -2975,7 +2975,7 @@ class FMControllerThemes_fm {
2975
  $id = $wpdb->insert_id;
2976
  }
2977
  if ( $save !== FALSE ) {
2978
- require_once WDFM()->plugin_dir . "/frontend/models/form_maker.php";
2979
  $model_frontend = new FMModelForm_maker();
2980
  $form_theme = json_decode(html_entity_decode($params), TRUE);
2981
  $model_frontend->create_css($id, $form_theme, $version == 1, TRUE);
@@ -3002,8 +3002,8 @@ class FMControllerThemes_fm {
3002
  else {
3003
  $message = 2;
3004
  }
3005
- $page = WDW_FM_Library::get('page');
3006
- WDW_FM_Library::fm_redirect(add_query_arg(array(
3007
  'page' => $page,
3008
  'task' => 'display',
3009
  'message' => $message,
3
  /**
4
  * Class FMControllerThemes_fm
5
  */
6
+ class FMControllerThemes_fm extends FMAdminController {
7
  /**
8
  * @var $model
9
  */
30
  private $actions = array();
31
 
32
  public function __construct() {
33
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Themes_fm.php";
34
  $this->model = new FMModelThemes_fm();
35
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Themes_fm.php";
36
  $this->view = new FMViewThemes_fm();
37
+ $this->page = WDW_FM_Library(self::PLUGIN)->get('page');
38
  $this->bulk_action_name = 'bulk_action';
39
 
40
  $this->actions = array(
41
  'duplicate' => array(
42
+ 'title' => __('Duplicate', WDFMInstance(self::PLUGIN)->prefix),
43
+ $this->bulk_action_name => __('duplicated', WDFMInstance(self::PLUGIN)->prefix),
44
  ),
45
  'delete' => array(
46
+ 'title' => __('Delete', WDFMInstance(self::PLUGIN)->prefix),
47
+ $this->bulk_action_name => __('deleted', WDFMInstance(self::PLUGIN)->prefix),
48
  ),
49
  );
50
  }
53
  * Execute.
54
  */
55
  public function execute() {
56
+ $task = WDW_FM_Library(self::PLUGIN)->get('task');
57
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
58
  if ( method_exists($this, $task) ) {
59
  if ( $task != 'add' && $task != 'edit' && $task != 'display' ) {
60
+ check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
61
  }
62
  $block_action = $this->bulk_action_name;
63
+ $action = WDW_FM_Library(self::PLUGIN)->get($block_action, -1);
64
  if ( $action != -1 ) {
65
  $this->$block_action($action);
66
  }
80
  // Set params for view.
81
  $params = array();
82
  $params['page'] = $this->page;
83
+ $params['page_title'] = __('Themes', WDFMInstance(self::PLUGIN)->prefix);
84
  $params['actions'] = $this->actions;
85
+ $params['order'] = WDW_FM_Library(self::PLUGIN)->get('order', 'desc');
86
+ $params['orderby'] = WDW_FM_Library(self::PLUGIN)->get('orderby', 'default');
87
  // To prevent SQL injections.
88
  $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
89
  if ( !in_array($params['orderby'], array( 'title', 'default' )) ) {
90
  $params['orderby'] = 'default';
91
  }
92
  $params['items_per_page'] = $this->items_per_page;
93
+ $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
94
  $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
95
  $params['page_num'] = $page_num;
96
+ $params['search'] = WDW_FM_Library(self::PLUGIN)->get('s', '');;
97
  $params['total'] = $this->model->total();
98
  $params['rows_data'] = $this->model->get_rows_data($params);
99
  $this->view->display($params);
108
  $message = 0;
109
  $successfully_updated = 0;
110
 
111
+ $check = WDW_FM_Library(self::PLUGIN)->get('check', '');
112
 
113
  if ( $check ) {
114
  foreach ( $check as $form_id => $item ) {
122
  }
123
  if ( $successfully_updated ) {
124
  $block_action = $this->bulk_action_name;
125
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
126
  }
127
  }
128
 
129
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
130
  'page' => $this->page,
131
  'task' => 'display',
132
  ($message === 2 ? 'message' : 'msg') => $message,
163
  if ( $bulk ) {
164
  return $message;
165
  }
166
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'message' => $message), admin_url('admin.php') ) );
167
  }
168
 
169
  /**
195
  return $message;
196
  }
197
  else {
198
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
199
  'page' => $this->page,
200
  'task' => 'display',
201
  'message' => $message,
214
  $params['row'] = $this->model->get_row_data($params['id'], FALSE);
215
 
216
  if ( $id != 0 && empty($params['row']) ) {
217
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
218
  }
219
  $params['page_title'] = $params['row']->title;
220
  $params['param_values'] = $params['row']->css;
221
  $params['tabs'] = array(
222
+ 'global' => __('Global Parameters', WDFMInstance(self::PLUGIN)->prefix),
223
+ 'header' => __('Header', WDFMInstance(self::PLUGIN)->prefix),
224
+ 'content' => __('Content', WDFMInstance(self::PLUGIN)->prefix),
225
+ 'input_select' => __('Inputbox', WDFMInstance(self::PLUGIN)->prefix),
226
+ 'choices' => __('Choices', WDFMInstance(self::PLUGIN)->prefix),
227
+ 'subscribe' => __('General Buttons', WDFMInstance(self::PLUGIN)->prefix),
228
+ 'paigination' => __('Pagination', WDFMInstance(self::PLUGIN)->prefix),
229
+ 'buttons' => __('Buttons', WDFMInstance(self::PLUGIN)->prefix),
230
+ 'close_button' => __('Close(Minimize) Button', WDFMInstance(self::PLUGIN)->prefix),
231
+ 'minimize' => __('Minimize Text', WDFMInstance(self::PLUGIN)->prefix),
232
+ 'other' => __('Other', WDFMInstance(self::PLUGIN)->prefix),
233
+ 'custom_css' => __('Custom CSS', WDFMInstance(self::PLUGIN)->prefix),
234
  );
235
  $border_types = array(
236
  '' => '',
249
  );
250
  $borders = array(
251
  '' => '',
252
+ 'top' => __('Top', WDFMInstance(self::PLUGIN)->prefix),
253
+ 'right' => __('Right', WDFMInstance(self::PLUGIN)->prefix),
254
+ 'bottom' => __('Bottom', WDFMInstance(self::PLUGIN)->prefix),
255
+ 'left' => __('Left', WDFMInstance(self::PLUGIN)->prefix)
256
  );
257
  $position_types = array(
258
  '' => '',
269
  'lighter' => 'Lighter',
270
  'initial' => 'Initial',
271
  );
272
+ $aligns = array( '' => '', 'left' => __('Left', WDFMInstance(self::PLUGIN)->prefix), 'center' => __('Center', WDFMInstance(self::PLUGIN)->prefix), 'right' => __('Right', WDFMInstance(self::PLUGIN)->prefix) );
273
  $basic_fonts = array(
274
  '' => '',
275
  'arial' => 'Arial',
292
  'initial' => 'initial',
293
  'inherit' => 'inherit',
294
  );
295
+ $google_fonts = WDW_FM_Library(self::PLUGIN)->get_google_fonts();
296
  $font_families = $basic_fonts + $google_fonts;
297
  $params['fonts'] = implode("|", str_replace(' ', '+', $google_fonts));
298
  $params['all_params'] = $this->all_params($params['param_values'], $borders, $border_types, $font_weights, $position_types, $aligns, $bg_repeats, $font_families);
312
  'after' => '',
313
  ),
314
  array(
315
+ 'label' => __('Font Family', WDFMInstance(self::PLUGIN)->prefix),
316
  'name' => 'GPFontFamily',
317
  'type' => 'select',
318
  'options' => $font_families,
321
  'after' => '',
322
  ),
323
  array(
324
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
325
  'name' => 'AGPWidth',
326
  'type' => 'text',
327
  'class' => '',
329
  'after' => '%',
330
  ),
331
  array(
332
+ 'label' => __('Width (for scrollbox, popup form types)', WDFMInstance(self::PLUGIN)->prefix),
333
  'name' => 'AGPSPWidth',
334
  'type' => 'text',
335
  'class' => '',
337
  'after' => '%',
338
  ),
339
  array(
340
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
341
  'name' => 'AGPPadding',
342
  'type' => 'text',
343
  'class' => '',
344
+ 'placeholder' => __('e.g. 3px 5px or 3% 5%', WDFMInstance(self::PLUGIN)->prefix),
345
  'value' => isset($param_values->AGPPadding) ? $param_values->AGPPadding : '',
346
  'after' => '',
347
  ),
348
  array(
349
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
350
  'name' => 'AGPMargin',
351
  'type' => 'text',
352
  'class' => '',
353
  'value' => isset($param_values->AGPMargin) ? $param_values->AGPMargin : '',
354
+ 'placeholder' => __('e.g. 5px 10px or 5% 10%', WDFMInstance(self::PLUGIN)->prefix),
355
  'after' => '',
356
  ),
357
  array(
358
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
359
  'name' => 'AGPBorder',
360
  'type' => 'checkbox',
361
  'options' => $borders,
363
  'after' => '',
364
  ),
365
  array(
366
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
367
  'name' => 'AGPBorderColor',
368
  'type' => 'text',
369
  'class' => 'color',
370
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #e5e5e5',
371
  'value' => isset($param_values->AGPBorderColor) ? $param_values->AGPBorderColor : '',
372
  'after' => '',
373
  ),
374
  array(
375
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
376
  'name' => 'AGPBorderType',
377
  'type' => 'select',
378
  'options' => $border_types,
381
  'after' => '',
382
  ),
383
  array(
384
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
385
  'name' => 'AGPBorderWidth',
386
  'type' => 'text',
387
  'class' => '',
389
  'after' => 'px',
390
  ),
391
  array(
392
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
393
  'name' => 'AGPBorderRadius',
394
  'type' => 'text',
395
  'class' => '',
397
  'after' => 'px',
398
  ),
399
  array(
400
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
401
  'name' => 'AGPBoxShadow',
402
  'type' => 'text',
403
  'class' => '',
404
  'value' => isset($param_values->AGPBoxShadow) ? $param_values->AGPBoxShadow : '',
405
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 5px 2px #888888',
406
  'after' => '</div>',
407
  ),
408
  ),
409
  'header' => array(
410
  array(
411
+ 'label' => __('General Parameters', WDFMInstance(self::PLUGIN)->prefix),
412
  'type' => 'panel',
413
  'class' => 'col-md-12',
414
  'label_class' => 'fm-mini-title',
415
  'after' => '<br/>',
416
  ),
417
  array(
418
+ 'label' => __('Alignment', WDFMInstance(self::PLUGIN)->prefix),
419
  'name' => 'HPAlign',
420
  'type' => 'select',
421
  'options' => $borders,
424
  'after' => '',
425
  ),
426
  array(
427
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
428
  'name' => 'HPBGColor',
429
  'type' => 'text',
430
  'class' => 'color',
431
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
432
  'value' => isset($param_values->HPBGColor) ? $param_values->HPBGColor : '',
433
  'after' => '',
434
  ),
435
  array(
436
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
437
  'name' => 'HPWidth',
438
  'type' => 'text',
439
  'class' => '',
441
  'after' => '%',
442
  ),
443
  array(
444
+ 'label' => __('Width (for topbar form type)', WDFMInstance(self::PLUGIN)->prefix),
445
  'name' => 'HTPWidth',
446
  'type' => 'text',
447
  'class' => '',
449
  'after' => '%',
450
  ),
451
  array(
452
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
453
  'name' => 'HPPadding',
454
  'type' => 'text',
455
  'class' => '',
456
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
457
  'value' => isset($param_values->HPPadding) ? $param_values->HPPadding : '',
458
  'after' => '',
459
  ),
460
  array(
461
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
462
  'name' => 'HPMargin',
463
  'type' => 'text',
464
  'class' => '',
465
  'value' => isset($param_values->HPMargin) ? $param_values->HPMargin : '',
466
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
467
  'after' => '',
468
  ),
469
  array(
470
+ 'label' => __('Text Align', WDFMInstance(self::PLUGIN)->prefix),
471
  'name' => 'HPTextAlign',
472
  'type' => 'select',
473
  'options' => $aligns,
476
  'after' => '',
477
  ),
478
  array(
479
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
480
  'name' => 'HPBorder',
481
  'type' => 'checkbox',
482
  'options' => $borders,
484
  'after' => '',
485
  ),
486
  array(
487
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
488
  'name' => 'HPBorderColor',
489
  'type' => 'text',
490
  'class' => 'color',
491
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
492
  'value' => isset($param_values->HPBorderColor) ? $param_values->HPBorderColor : '',
493
  'after' => '',
494
  ),
495
  array(
496
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
497
  'name' => 'HPBorderType',
498
  'type' => 'select',
499
  'options' => $border_types,
502
  'after' => '',
503
  ),
504
  array(
505
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
506
  'name' => 'HPBorderWidth',
507
  'type' => 'text',
508
  'class' => '',
510
  'after' => 'px',
511
  ),
512
  array(
513
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
514
  'name' => 'HPBorderRadius',
515
  'type' => 'text',
516
  'class' => '',
518
  'after' => 'px</div>',
519
  ),
520
  array(
521
+ 'label' => __('Title Parameters', WDFMInstance(self::PLUGIN)->prefix),
522
  'type' => 'panel',
523
  'class' => 'col-md-12',
524
  'label_class' => 'fm-mini-title',
525
  'after' => '<br/>',
526
  ),
527
  array(
528
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
529
  'name' => 'HTPFontSize',
530
  'type' => 'text',
531
  'class' => '',
533
  'after' => 'px',
534
  ),
535
  array(
536
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
537
  'name' => 'HTPWeight',
538
  'type' => 'select',
539
  'options' => $font_weights,
542
  'after' => '',
543
  ),
544
  array(
545
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
546
  'name' => 'HTPColor',
547
  'type' => 'text',
548
  'class' => 'color',
549
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
550
  'value' => isset($param_values->HTPColor) ? $param_values->HTPColor : '',
551
  'after' => '',
552
  ),
553
  array(
554
+ 'label' => __('Description Parameters', WDFMInstance(self::PLUGIN)->prefix),
555
  'type' => 'label',
556
  'class' => 'fm-mini-title',
557
  'after' => '<br/>',
558
  ),
559
  array(
560
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
561
  'name' => 'HDPFontSize',
562
  'type' => 'text',
563
  'class' => '',
565
  'after' => 'px',
566
  ),
567
  array(
568
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
569
  'name' => 'HDPColor',
570
  'type' => 'text',
571
  'class' => 'color',
572
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
573
  'value' => isset($param_values->HDPColor) ? $param_values->HDPColor : '',
574
  'after' => '',
575
  ),
576
  array(
577
+ 'label' => __('Image Parameters', WDFMInstance(self::PLUGIN)->prefix),
578
  'type' => 'label',
579
  'class' => 'fm-mini-title',
580
  'after' => '<br/>',
581
  ),
582
  array(
583
+ 'label' => __('Alignment', WDFMInstance(self::PLUGIN)->prefix),
584
  'name' => 'HIPAlign',
585
  'type' => 'select',
586
  'options' => $borders,
589
  'after' => '',
590
  ),
591
  array(
592
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
593
  'name' => 'HIPWidth',
594
  'type' => 'text',
595
  'class' => '',
597
  'after' => 'px',
598
  ),
599
  array(
600
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
601
  'name' => 'HIPHeight',
602
  'type' => 'text',
603
  'class' => '',
607
  ),
608
  'content' => array(
609
  array(
610
+ 'label' => __('General Parameters', WDFMInstance(self::PLUGIN)->prefix),
611
  'type' => 'panel',
612
  'class' => 'col-md-12',
613
  'label_class' => 'fm-mini-title',
614
  'after' => '<br/>',
615
  ),
616
  array(
617
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
618
  'name' => 'GPBGColor',
619
  'type' => 'text',
620
  'class' => 'color',
621
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
622
  'value' => isset($param_values->GPBGColor) ? $param_values->GPBGColor : '',
623
  'after' => '',
624
  ),
625
  array(
626
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
627
  'name' => 'GPFontSize',
628
  'type' => 'text',
629
  'class' => '',
631
  'after' => 'px',
632
  ),
633
  array(
634
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
635
  'name' => 'GPFontWeight',
636
  'type' => 'select',
637
  'options' => $font_weights,
640
  'after' => '',
641
  ),
642
  array(
643
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
644
  'name' => 'GPWidth',
645
  'type' => 'text',
646
  'class' => '',
648
  'after' => '%',
649
  ),
650
  array(
651
+ 'label' => __('Width (for topbar form type)', WDFMInstance(self::PLUGIN)->prefix),
652
  'name' => 'GTPWidth',
653
  'type' => 'text',
654
  'class' => '',
656
  'after' => '%',
657
  ),
658
  array(
659
+ 'label' => __('Alignment', WDFMInstance(self::PLUGIN)->prefix),
660
  'name' => 'GPAlign',
661
  'type' => 'select',
662
  'options' => $aligns,
665
  'after' => '',
666
  ),
667
  array(
668
+ 'label' => __('Background URL', WDFMInstance(self::PLUGIN)->prefix),
669
  'name' => 'GPBackground',
670
  'type' => 'text',
671
  'class' => '',
672
+ // 'placeholder' => __('e.g. http:// or https://', WDFMInstance(self::PLUGIN)->prefix),
673
  'value' => isset($param_values->GPBackground) ? $param_values->GPBackground : '',
674
  'after' => '',
675
  ),
676
  array(
677
+ 'label' => __('Background Repeat', WDFMInstance(self::PLUGIN)->prefix),
678
  'name' => 'GPBackgroundRepeat',
679
  'type' => 'select',
680
  'options' => $bg_repeats,
683
  'after' => '',
684
  ),
685
  array(
686
+ 'label' => __('Background Position', WDFMInstance(self::PLUGIN)->prefix),
687
  'name1' => 'GPBGPosition1',
688
  'name2' => 'GPBGPosition2',
689
  'type' => '2text',
690
  'class' => 'fm-2text',
691
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' px|%, top|bottom|left|right|center',
692
  'value1' => isset($param_values->GPBGPosition1) ? $param_values->GPBGPosition1 : '',
693
  'value2' => isset($param_values->GPBGPosition2) ? $param_values->GPBGPosition2 : '',
694
  'before1' => '',
696
  'after' => '',
697
  ),
698
  array(
699
+ 'label' => __('Background Size', WDFMInstance(self::PLUGIN)->prefix),
700
  'name1' => 'GPBGSize1',
701
  'name2' => 'GPBGSize2',
702
  'type' => '2text',
703
  'class' => 'fm-2text',
704
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' px|%, auto|cover|contain',
705
  'value1' => isset($param_values->GPBGSize1) ? $param_values->GPBGSize1 : '',
706
  'value2' => isset($param_values->GPBGSize2) ? $param_values->GPBGSize2 : '',
707
  'before1' => '',
709
  'after' => '',
710
  ),
711
  array(
712
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
713
  'name' => 'GPColor',
714
  'type' => 'text',
715
  'class' => 'color',
717
  'after' => '',
718
  ),
719
  array(
720
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
721
  'name' => 'GPPadding',
722
  'type' => 'text',
723
  'class' => '',
724
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
725
  'value' => isset($param_values->GPPadding) ? $param_values->GPPadding : '',
726
  'after' => '',
727
  ),
728
  array(
729
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
730
  'name' => 'GPMargin',
731
  'type' => 'text',
732
  'class' => '',
733
  'value' => isset($param_values->GPMargin) ? $param_values->GPMargin : '',
734
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
735
  'after' => '',
736
  ),
737
  array(
738
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
739
  'name' => 'GPBorder',
740
  'type' => 'checkbox',
741
  'options' => $borders,
743
  'after' => '',
744
  ),
745
  array(
746
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
747
  'name' => 'GPBorderColor',
748
  'type' => 'text',
749
  'class' => 'color',
751
  'after' => '',
752
  ),
753
  array(
754
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
755
  'name' => 'GPBorderType',
756
  'type' => 'select',
757
  'options' => $border_types,
760
  'after' => '',
761
  ),
762
  array(
763
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
764
  'name' => 'GPBorderWidth',
765
  'type' => 'text',
766
  'class' => '',
768
  'after' => 'px',
769
  ),
770
  array(
771
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
772
  'name' => 'GPBorderRadius',
773
  'type' => 'text',
774
  'class' => '',
776
  'after' => 'px</div>',
777
  ),
778
  array(
779
+ 'label' => __('Mini labels (name, phone, address, checkbox, radio) Parameters', WDFMInstance(self::PLUGIN)->prefix),
780
  'type' => 'panel',
781
  'class' => 'col-md-12',
782
  'label_class' => 'fm-mini-title',
783
  'after' => '<br/>',
784
  ),
785
  array(
786
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
787
  'name' => 'GPMLFontSize',
788
  'type' => 'text',
789
  'class' => '',
791
  'after' => 'px',
792
  ),
793
  array(
794
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
795
  'name' => 'GPMLFontWeight',
796
  'type' => 'select',
797
  'options' => $font_weights,
800
  'after' => '',
801
  ),
802
  array(
803
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
804
  'name' => 'GPMLColor',
805
  'type' => 'text',
806
  'class' => 'color',
807
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
808
  'value' => isset($param_values->GPMLColor) ? $param_values->GPMLColor : '',
809
  'after' => '',
810
  ),
811
  array(
812
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
813
  'name' => 'GPMLPadding',
814
  'type' => 'text',
815
  'class' => '',
816
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
817
  'value' => isset($param_values->GPMLPadding) ? $param_values->GPMLPadding : '',
818
  'after' => '',
819
  ),
820
  array(
821
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
822
  'name' => 'GPMLMargin',
823
  'type' => 'text',
824
  'class' => '',
825
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
826
  'value' => isset($param_values->GPMLMargin) ? $param_values->GPMLMargin : '',
827
  'after' => '',
828
  ),
829
  array(
830
+ 'label' => __('Section Parameters', WDFMInstance(self::PLUGIN)->prefix),
831
  'type' => 'label',
832
  'class' => 'fm-mini-title',
833
  'after' => '<br/>',
834
  ),
835
  array(
836
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
837
  'name' => 'SEPBGColor',
838
  'type' => 'text',
839
  'class' => 'color',
840
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
841
  'value' => isset($param_values->SEPBGColor) ? $param_values->SEPBGColor : '',
842
  'after' => '',
843
  ),
844
  array(
845
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
846
  'name' => 'SEPPadding',
847
  'type' => 'text',
848
  'class' => '',
849
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
850
  'value' => isset($param_values->SEPPadding) ? $param_values->SEPPadding : '',
851
  'after' => '',
852
  ),
853
  array(
854
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
855
  'name' => 'SEPMargin',
856
  'type' => 'text',
857
  'class' => '',
858
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
859
  'value' => isset($param_values->SEPMargin) ? $param_values->SEPMargin : '',
860
  'after' => '',
861
  ),
862
  array(
863
+ 'label' => __('Section Column Parameters', WDFMInstance(self::PLUGIN)->prefix),
864
  'type' => 'label',
865
  'class' => 'fm-mini-title',
866
  'after' => '<br/>',
867
  ),
868
  array(
869
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
870
  'name' => 'COPPadding',
871
  'type' => 'text',
872
  'class' => '',
873
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
874
  'value' => isset($param_values->COPPadding) ? $param_values->COPPadding : '',
875
  'after' => '',
876
  ),
877
  array(
878
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
879
  'name' => 'COPMargin',
880
  'type' => 'text',
881
  'class' => '',
882
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
883
  'value' => isset($param_values->COPMargin) ? $param_values->COPMargin : '',
884
  'after' => '',
885
  ),
886
  array(
887
+ 'label' => __('Footer Parameters', WDFMInstance(self::PLUGIN)->prefix),
888
  'type' => 'label',
889
  'class' => 'fm-mini-title',
890
  'after' => '<br/>',
891
  ),
892
  array(
893
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
894
  'name' => 'FPWidth',
895
  'type' => 'text',
896
  'class' => '',
898
  'after' => '%',
899
  ),
900
  array(
901
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
902
  'name' => 'FPPadding',
903
  'type' => 'text',
904
  'class' => '',
905
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
906
  'value' => isset($param_values->FPPadding) ? $param_values->FPPadding : '',
907
  'after' => '',
908
  ),
909
  array(
910
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
911
  'name' => 'FPMargin',
912
  'type' => 'text',
913
  'class' => '',
914
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
915
  'value' => isset($param_values->FPMargin) ? $param_values->FPMargin : '',
916
  'after' => '</div>',
917
  ),
925
  'after' => '',
926
  ),
927
  array(
928
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
929
  'name' => 'IPHeight',
930
  'type' => 'text',
931
  'class' => '',
933
  'after' => 'px',
934
  ),
935
  array(
936
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
937
  'name' => 'IPFontSize',
938
  'type' => 'text',
939
  'class' => '',
941
  'after' => 'px',
942
  ),
943
  array(
944
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
945
  'name' => 'IPFontWeight',
946
  'type' => 'select',
947
  'options' => $font_weights,
950
  'after' => '',
951
  ),
952
  array(
953
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
954
  'name' => 'IPBGColor',
955
  'type' => 'text',
956
  'class' => 'color',
957
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
958
  'value' => isset($param_values->IPBGColor) ? $param_values->IPBGColor : '',
959
  'after' => '',
960
  ),
961
  array(
962
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
963
  'name' => 'IPColor',
964
  'type' => 'text',
965
  'class' => 'color',
966
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
967
  'value' => isset($param_values->IPColor) ? $param_values->IPColor : '',
968
  'after' => '',
969
  ),
970
  array(
971
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
972
  'name' => 'IPPadding',
973
  'type' => 'text',
974
  'class' => '',
975
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 3px 5px or 3% 5%',
976
  'value' => isset($param_values->IPPadding) ? $param_values->IPPadding : '',
977
  'after' => '',
978
  ),
979
  array(
980
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
981
  'name' => 'IPMargin',
982
  'type' => 'text',
983
  'class' => '',
984
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
985
  'value' => isset($param_values->IPMargin) ? $param_values->IPMargin : '',
986
  'after' => '',
987
  ),
988
  array(
989
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
990
  'name' => 'IPBorder',
991
  'type' => 'checkbox',
992
  'options' => $borders,
994
  'after' => '',
995
  ),
996
  array(
997
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
998
  'name' => 'IPBorderColor',
999
  'type' => 'text',
1000
  'class' => 'color',
1001
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
1002
  'value' => isset($param_values->IPBorderColor) ? $param_values->IPBorderColor : '',
1003
  'after' => '',
1004
  ),
1005
  array(
1006
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1007
  'name' => 'IPBorderType',
1008
  'type' => 'select',
1009
  'options' => $border_types,
1012
  'after' => '',
1013
  ),
1014
  array(
1015
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1016
  'name' => 'IPBorderWidth',
1017
  'type' => 'text',
1018
  'class' => '',
1020
  'after' => 'px',
1021
  ),
1022
  array(
1023
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1024
  'name' => 'IPBorderRadius',
1025
  'type' => 'text',
1026
  'class' => '',
1028
  'after' => 'px',
1029
  ),
1030
  array(
1031
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
1032
  'name' => 'IPBoxShadow',
1033
  'type' => 'text',
1034
  'class' => '',
1035
  'value' => isset($param_values->IPBoxShadow) ? $param_values->IPBoxShadow : '',
1036
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 5px 2px #888888',
1037
  'after' => '</div>',
1038
  ),
1039
  array(
1040
+ 'label' => __('Dropdown additional', WDFMInstance(self::PLUGIN)->prefix),
1041
  'type' => 'panel',
1042
  'class' => 'col-md-12',
1043
  'label_class' => 'fm-mini-title',
1044
  'after' => '<br/>',
1045
  ),
1046
  array(
1047
+ 'label' => __('Appearance', WDFMInstance(self::PLUGIN)->prefix),
1048
  'name' => 'SBPAppearance',
1049
  'type' => 'text',
1050
  'class' => '',
1051
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' normal, icon, window, button, menu, field',
1052
  'value' => isset($param_values->SBPAppearance) ? $param_values->SBPAppearance : '',
1053
  'after' => '',
1054
  ),
1055
  array(
1056
+ 'label' => __('Background URL', WDFMInstance(self::PLUGIN)->prefix),
1057
  'name' => 'SBPBackground',
1058
  'type' => 'text',
1059
  'class' => '',
1060
+ // 'placeholder' => __('e.g. http:// or https://', WDFMInstance(self::PLUGIN)->prefix),
1061
  'value' => isset($param_values->SBPBackground) ? $param_values->SBPBackground : '',
1062
  'after' => '',
1063
  ),
1064
  array(
1065
+ 'label' => __('Background Repeat', WDFMInstance(self::PLUGIN)->prefix),
1066
  'name' => 'SBPBGRepeat',
1067
  'type' => 'select',
1068
  'options' => $bg_repeats,
1079
  ),
1080
  'choices' => array(
1081
  array(
1082
+ 'label' => __('Single Choice', WDFMInstance(self::PLUGIN)->prefix),
1083
  'type' => 'panel',
1084
  'class' => 'col-md-12',
1085
  'label_class' => 'fm-mini-title',
1086
  'after' => '<br/>',
1087
  ),
1088
  array(
1089
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1090
  'name' => 'SCPBGColor',
1091
  'type' => 'text',
1092
  'class' => 'color',
1093
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
1094
  'value' => isset($param_values->SCPBGColor) ? $param_values->SCPBGColor : '',
1095
  'after' => '',
1096
  ),
1097
  array(
1098
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
1099
  'name' => 'SCPWidth',
1100
  'type' => 'text',
1101
  'class' => '',
1103
  'after' => 'px',
1104
  ),
1105
  array(
1106
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1107
  'name' => 'SCPHeight',
1108
  'type' => 'text',
1109
  'class' => '',
1111
  'after' => 'px',
1112
  ),
1113
  array(
1114
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1115
  'name' => 'SCPMargin',
1116
  'type' => 'text',
1117
  'class' => '5px',
1118
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
1119
  'value' => isset($param_values->SCPMargin) ? $param_values->SCPMargin : '',
1120
  'after' => '',
1121
  ),
1122
  array(
1123
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1124
  'name' => 'SCPBorder',
1125
  'type' => 'checkbox',
1126
  'options' => $borders,
1128
  'after' => '',
1129
  ),
1130
  array(
1131
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1132
  'name' => 'SCPBorderColor',
1133
  'type' => 'text',
1134
  'class' => 'color',
1135
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
1136
  'value' => isset($param_values->SCPBorderColor) ? $param_values->SCPBorderColor : '',
1137
  'after' => '',
1138
  ),
1139
  array(
1140
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1141
  'name' => 'SCPBorderType',
1142
  'type' => 'select',
1143
  'options' => $border_types,
1146
  'after' => '',
1147
  ),
1148
  array(
1149
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1150
  'name' => 'SCPBorderWidth',
1151
  'type' => 'text',
1152
  'class' => '',
1154
  'after' => 'px',
1155
  ),
1156
  array(
1157
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1158
  'name' => 'SCPBorderRadius',
1159
  'type' => 'text',
1160
  'class' => '',
1162
  'after' => 'px',
1163
  ),
1164
  array(
1165
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
1166
  'name' => 'SCPBoxShadow',
1167
  'type' => 'text',
1168
  'class' => '',
1169
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 5px 2px #888888',
1170
  'value' => isset($param_values->SCPBoxShadow) ? $param_values->SCPBoxShadow : '',
1171
  'after' => '',
1172
  ),
1173
  array(
1174
+ 'label' => __('Checked Parameters', WDFMInstance(self::PLUGIN)->prefix),
1175
  'type' => 'label',
1176
  'class' => 'fm-mini-title',
1177
  'after' => '<br/>',
1178
  ),
1179
  array(
1180
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1181
  'name' => 'SCCPBGColor',
1182
  'type' => 'text',
1183
  'class' => 'color',
1184
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
1185
  'value' => isset($param_values->SCCPBGColor) ? $param_values->SCCPBGColor : '',
1186
  'after' => '',
1187
  ),
1188
  array(
1189
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
1190
  'name' => 'SCCPWidth',
1191
  'type' => 'text',
1192
  'class' => '',
1194
  'after' => 'px',
1195
  ),
1196
  array(
1197
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1198
  'name' => 'SCCPHeight',
1199
  'type' => 'text',
1200
  'class' => '',
1202
  'after' => 'px',
1203
  ),
1204
  array(
1205
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1206
  'name' => 'SCCPMargin',
1207
  'type' => 'text',
1208
  'class' => '',
1209
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
1210
  'value' => isset($param_values->SCCPMargin) ? $param_values->SCCPMargin : '',
1211
  'after' => '',
1212
  ),
1213
  array(
1214
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1215
  'name' => 'SCCPBorderRadius',
1216
  'type' => 'text',
1217
  'class' => '',
1219
  'after' => 'px</div>',
1220
  ),
1221
  array(
1222
+ 'label' => __('Multiple Choice', WDFMInstance(self::PLUGIN)->prefix),
1223
  'type' => 'panel',
1224
  'class' => 'col-md-12',
1225
  'label_class' => 'fm-mini-title',
1226
  'after' => '<br/>',
1227
  ),
1228
  array(
1229
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1230
  'name' => 'MCPBGColor',
1231
  'type' => 'text',
1232
  'class' => 'color',
1233
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
1234
  'value' => isset($param_values->MCPBGColor) ? $param_values->MCPBGColor : '',
1235
  'after' => '',
1236
  ),
1237
  array(
1238
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
1239
  'name' => 'MCPWidth',
1240
  'type' => 'text',
1241
  'class' => '',
1243
  'after' => 'px',
1244
  ),
1245
  array(
1246
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1247
  'name' => 'MCPHeight',
1248
  'type' => 'text',
1249
  'class' => '',
1251
  'after' => 'px',
1252
  ),
1253
  array(
1254
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1255
  'name' => 'MCPMargin',
1256
  'type' => 'text',
1257
  'class' => '5px',
1258
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 10px or 5% 10%',
1259
  'value' => isset($param_values->MCPMargin) ? $param_values->MCPMargin : '',
1260
  'after' => '',
1261
  ),
1262
  array(
1263
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1264
  'name' => 'MCPBorder',
1265
  'type' => 'checkbox',
1266
  'options' => $borders,
1268
  'after' => '',
1269
  ),
1270
  array(
1271
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1272
  'name' => 'MCPBorderColor',
1273
  'type' => 'text',
1274
  'class' => 'color',
1275
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' #efefef',
1276
  'value' => isset($param_values->MCPBorderColor) ? $param_values->MCPBorderColor : '',
1277
  'after' => '',
1278
  ),
1279
  array(
1280
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1281
  'name' => 'MCPBorderType',
1282
  'type' => 'select',
1283
  'options' => $border_types,
1286
  'after' => '',
1287
  ),
1288
  array(
1289
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1290
  'name' => 'MCPBorderWidth',
1291
  'type' => 'text',
1292
  'class' => '',
1295
  ),
1296
 
1297
  array(
1298
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1299
  'name' => 'MCPBorderRadius',
1300
  'type' => 'text',
1301
  'class' => '',
1303
  'after' => 'px',
1304
  ),
1305
  array(
1306
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
1307
  'name' => 'MCPBoxShadow',
1308
  'type' => 'text',
1309
  'class' => '',
1310
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .' 5px 5px 2px #888888',
1311
  'value' => isset($param_values->MCPBoxShadow) ? $param_values->MCPBoxShadow : '',
1312
  'after' => '',
1313
  ),
1314
  array(
1315
+ 'label' => __('Checked Parameters', WDFMInstance(self::PLUGIN)->prefix),
1316
  'type' => 'label',
1317
  'class' => 'fm-mini-title',
1318
  'after' => '<br/>',
1319
  ),
1320
  array(
1321
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1322
  'name' => 'MCCPBGColor',
1323
  'type' => 'text',
1324
  'class' => 'color',
1325
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) .'#efefef',
1326
  'value' => isset($param_values->MCCPBGColor) ? $param_values->MCCPBGColor : '',
1327
  'after' => '',
1328
  ),
1329
  array(
1330
+ 'label' => __('Background URL', WDFMInstance(self::PLUGIN)->prefix),
1331
  'name' => 'MCCPBackground',
1332
  'type' => 'text',
1333
  'class' => '',
1334
+ // 'placeholder' => __('e.g. http:// or https://', WDFMInstance(self::PLUGIN)->prefix),
1335
  'value' => isset($param_values->MCCPBackground) ? $param_values->MCCPBackground : '',
1336
  'after' => '',
1337
  ),
1338
  array(
1339
+ 'label' => __('Background Repeat', WDFMInstance(self::PLUGIN)->prefix),
1340
  'name' => 'MCCPBGRepeat',
1341
  'type' => 'select',
1342
  'options' => $bg_repeats,
1345
  'after' => '',
1346
  ),
1347
  array(
1348
+ 'label' => __('Background Position', WDFMInstance(self::PLUGIN)->prefix),
1349
  'name1' => 'MCCPBGPos1',
1350
  'name2' => 'MCCPBGPos2',
1351
  'type' => '2text',
1352
  'class' => 'fm-2text',
1353
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' px|%, top|bottom|left|right|center',
1354
  'value1' => isset($param_values->MCCPBGPos1) ? $param_values->MCCPBGPos1 : '',
1355
  'value2' => isset($param_values->MCCPBGPos2) ? $param_values->MCCPBGPos2 : '',
1356
  'before1' => '',
1358
  'after' => '',
1359
  ),
1360
  array(
1361
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
1362
  'name' => 'MCCPWidth',
1363
  'type' => 'text',
1364
  'class' => '',
1366
  'after' => 'px',
1367
  ),
1368
  array(
1369
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1370
  'name' => 'MCCPHeight',
1371
  'type' => 'text',
1372
  'class' => '',
1374
  'after' => 'px',
1375
  ),
1376
  array(
1377
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1378
  'name' => 'MCCPMargin',
1379
  'type' => 'text',
1380
  'class' => '',
1381
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
1382
  'value' => isset($param_values->MCCPMargin) ? $param_values->MCCPMargin : '',
1383
  'after' => '',
1384
  ),
1385
  array(
1386
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1387
  'name' => 'MCCPBorderRadius',
1388
  'type' => 'text',
1389
  'class' => '',
1393
  ),
1394
  'subscribe' => array(
1395
  array(
1396
+ 'label' => __('Global Parameters', WDFMInstance(self::PLUGIN)->prefix),
1397
  'type' => 'panel',
1398
  'class' => 'col-md-12',
1399
  'label_class' => 'fm-mini-title',
1400
  'after' => '<br/>',
1401
  ),
1402
  array(
1403
+ 'label' => __('Alignment', WDFMInstance(self::PLUGIN)->prefix),
1404
  'name' => 'SPAlign',
1405
  'type' => 'select',
1406
  'options' => $aligns,
1409
  'after' => '</div>',
1410
  ),
1411
  array(
1412
+ 'label' => __('Submit', WDFMInstance(self::PLUGIN)->prefix),
1413
  'type' => 'panel',
1414
  'class' => 'col-md-12',
1415
  'label_class' => 'fm-mini-title',
1416
  'after' => '<br/>',
1417
  ),
1418
  array(
1419
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1420
  'name' => 'SPBGColor',
1421
  'type' => 'text',
1422
  'class' => 'color',
1423
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1424
  'value' => isset($param_values->SPBGColor) ? $param_values->SPBGColor : '',
1425
  'after' => '',
1426
  ),
1427
  array(
1428
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
1429
  'name' => 'SPWidth',
1430
  'type' => 'text',
1431
  'class' => '',
1433
  'after' => 'px',
1434
  ),
1435
  array(
1436
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1437
  'name' => 'SPHeight',
1438
  'type' => 'text',
1439
  'class' => '',
1441
  'after' => 'px',
1442
  ),
1443
  array(
1444
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
1445
  'name' => 'SPFontSize',
1446
  'type' => 'text',
1447
  'class' => '',
1449
  'after' => 'px',
1450
  ),
1451
  array(
1452
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
1453
  'name' => 'SPFontWeight',
1454
  'type' => 'select',
1455
  'options' => $font_weights,
1458
  'after' => '',
1459
  ),
1460
  array(
1461
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
1462
  'name' => 'SPColor',
1463
  'type' => 'text',
1464
  'class' => 'color',
1465
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1466
  'value' => isset($param_values->SPColor) ? $param_values->SPColor : '',
1467
  'after' => '',
1468
  ),
1469
  array(
1470
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
1471
  'name' => 'SPPadding',
1472
  'type' => 'text',
1473
  'class' => '',
1474
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
1475
  'value' => isset($param_values->SPPadding) ? $param_values->SPPadding : '',
1476
  'after' => '',
1477
  ),
1478
  array(
1479
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1480
  'name' => 'SPMargin',
1481
  'type' => 'text',
1482
  'class' => '',
1483
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
1484
  'value' => isset($param_values->SPMargin) ? $param_values->SPMargin : '',
1485
  'after' => '',
1486
  ),
1487
  array(
1488
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1489
  'name' => 'SPBorder',
1490
  'type' => 'checkbox',
1491
  'options' => $borders,
1493
  'after' => '',
1494
  ),
1495
  array(
1496
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1497
  'name' => 'SPBorderColor',
1498
  'type' => 'text',
1499
  'class' => 'color',
1500
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1501
  'value' => isset($param_values->SPBorderColor) ? $param_values->SPBorderColor : '',
1502
  'after' => '',
1503
  ),
1504
  array(
1505
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1506
  'name' => 'SPBorderType',
1507
  'type' => 'select',
1508
  'options' => $border_types,
1511
  'after' => '',
1512
  ),
1513
  array(
1514
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1515
  'name' => 'SPBorderWidth',
1516
  'type' => 'text',
1517
  'class' => '',
1519
  'after' => 'px',
1520
  ),
1521
  array(
1522
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1523
  'name' => 'SPBorderRadius',
1524
  'type' => 'text',
1525
  'class' => '',
1527
  'after' => 'px',
1528
  ),
1529
  array(
1530
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
1531
  'name' => 'SPBoxShadow',
1532
  'type' => 'text',
1533
  'class' => '',
1534
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 5px 2px #888888',
1535
  'value' => isset($param_values->SPBoxShadow) ? $param_values->SPBoxShadow : '',
1536
  'after' => '',
1537
  ),
1538
  array(
1539
+ 'label' => __('Hover Parameters', WDFMInstance(self::PLUGIN)->prefix),
1540
  'type' => 'label',
1541
  'class' => 'fm-mini-title',
1542
  'after' => '<br/>',
1543
  ),
1544
  array(
1545
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1546
  'name' => 'SHPBGColor',
1547
  'type' => 'text',
1548
  'class' => 'color',
1549
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1550
  'value' => isset($param_values->SHPBGColor) ? $param_values->SHPBGColor : '',
1551
  'after' => '',
1552
  ),
1553
  array(
1554
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
1555
  'name' => 'SHPColor',
1556
  'type' => 'text',
1557
  'class' => 'color',
1558
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1559
  'value' => isset($param_values->SHPColor) ? $param_values->SHPColor : '',
1560
  'after' => '',
1561
  ),
1562
  array(
1563
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1564
  'name' => 'SHPBorder',
1565
  'type' => 'checkbox',
1566
  'options' => $borders,
1568
  'after' => '',
1569
  ),
1570
  array(
1571
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1572
  'name' => 'SHPBorderColor',
1573
  'type' => 'text',
1574
  'class' => 'color',
1575
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1576
  'value' => isset($param_values->SHPBorderColor) ? $param_values->SHPBorderColor : '',
1577
  'after' => '',
1578
  ),
1579
  array(
1580
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1581
  'name' => 'SHPBorderType',
1582
  'type' => 'select',
1583
  'options' => $border_types,
1586
  'after' => '',
1587
  ),
1588
  array(
1589
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1590
  'name' => 'SHPBorderWidth',
1591
  'type' => 'text',
1592
  'class' => '',
1594
  'after' => 'px</div>',
1595
  ),
1596
  array(
1597
+ 'label' => __('Reset', WDFMInstance(self::PLUGIN)->prefix),
1598
  'type' => 'panel',
1599
  'class' => 'col-md-12',
1600
  'label_class' => 'fm-mini-title',
1601
  'after' => '<br/>',
1602
  ),
1603
  array(
1604
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1605
  'name' => 'BPBGColor',
1606
  'type' => 'text',
1607
  'class' => 'color',
1608
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1609
  'value' => isset($param_values->BPBGColor) ? $param_values->BPBGColor : '',
1610
  'after' => '',
1611
  ),
1612
  array(
1613
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
1614
  'name' => 'BPWidth',
1615
  'type' => 'text',
1616
  'class' => '',
1618
  'after' => 'px',
1619
  ),
1620
  array(
1621
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1622
  'name' => 'BPHeight',
1623
  'type' => 'text',
1624
  'class' => '',
1626
  'after' => 'px',
1627
  ),
1628
  array(
1629
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
1630
  'name' => 'BPFontSize',
1631
  'type' => 'text',
1632
  'class' => '',
1634
  'after' => 'px',
1635
  ),
1636
  array(
1637
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
1638
  'name' => 'BPFontWeight',
1639
  'type' => 'select',
1640
  'options' => $font_weights,
1643
  'after' => '',
1644
  ),
1645
  array(
1646
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
1647
  'name' => 'BPColor',
1648
  'type' => 'text',
1649
  'class' => 'color',
1650
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1651
  'value' => isset($param_values->BPColor) ? $param_values->BPColor : '',
1652
  'after' => '',
1653
  ),
1654
  array(
1655
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
1656
  'name' => 'BPPadding',
1657
  'type' => 'text',
1658
  'class' => '',
1659
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5xp or 3% 5%',
1660
  'value' => isset($param_values->BPPadding) ? $param_values->BPPadding : '',
1661
  'after' => '',
1662
  ),
1663
  array(
1664
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1665
  'name' => 'BPMargin',
1666
  'type' => 'text',
1667
  'class' => '',
1668
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10xp or 5% 10%',
1669
  'value' => isset($param_values->BPMargin) ? $param_values->BPMargin : '',
1670
  'after' => '',
1671
  ),
1672
  array(
1673
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1674
  'name' => 'BPBorder',
1675
  'type' => 'checkbox',
1676
  'options' => $borders,
1678
  'after' => '',
1679
  ),
1680
  array(
1681
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1682
  'name' => 'BPBorderColor',
1683
  'type' => 'text',
1684
  'class' => 'color',
1685
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1686
  'value' => isset($param_values->BPBorderColor) ? $param_values->BPBorderColor : '',
1687
  'after' => '',
1688
  ),
1689
  array(
1690
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1691
  'name' => 'BPBorderType',
1692
  'type' => 'select',
1693
  'options' => $border_types,
1696
  'after' => '',
1697
  ),
1698
  array(
1699
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1700
  'name' => 'BPBorderWidth',
1701
  'type' => 'text',
1702
  'class' => '',
1704
  'after' => 'px',
1705
  ),
1706
  array(
1707
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1708
  'name' => 'BPBorderRadius',
1709
  'type' => 'text',
1710
  'class' => '',
1712
  'after' => 'px',
1713
  ),
1714
  array(
1715
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
1716
  'name' => 'BPBoxShadow',
1717
  'type' => 'text',
1718
  'class' => '',
1719
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 5px 2px #888888',
1720
  'value' => isset($param_values->BPBoxShadow) ? $param_values->BPBoxShadow : '',
1721
  'after' => '',
1722
  ),
1723
  array(
1724
+ 'label' => __('Hover Parameters', WDFMInstance(self::PLUGIN)->prefix),
1725
  'type' => 'label',
1726
  'class' => 'fm-mini-title',
1727
  'after' => '<br/>',
1728
  ),
1729
  array(
1730
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1731
  'name' => 'BHPBGColor',
1732
  'type' => 'text',
1733
  'class' => 'color',
1734
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1735
  'value' => isset($param_values->BHPBGColor) ? $param_values->BHPBGColor : '',
1736
  'after' => '',
1737
  ),
1738
  array(
1739
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
1740
  'name' => 'BHPColor',
1741
  'type' => 'text',
1742
  'class' => 'color',
1743
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1744
  'value' => isset($param_values->BHPColor) ? $param_values->BHPColor : '',
1745
  'after' => '',
1746
  ),
1747
  array(
1748
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1749
  'name' => 'BHPBorder',
1750
  'type' => 'checkbox',
1751
  'options' => $borders,
1753
  'after' => '',
1754
  ),
1755
  array(
1756
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1757
  'name' => 'BHPBorderColor',
1758
  'type' => 'text',
1759
  'class' => 'color',
1760
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1761
  'value' => isset($param_values->BHPBorderColor) ? $param_values->BHPBorderColor : '',
1762
  'after' => '',
1763
  ),
1764
  array(
1765
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1766
  'name' => 'BHPBorderType',
1767
  'type' => 'select',
1768
  'options' => $border_types,
1771
  'after' => '',
1772
  ),
1773
  array(
1774
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1775
  'name' => 'BHPBorderWidth',
1776
  'type' => 'text',
1777
  'class' => '',
1781
  ),
1782
  'paigination' => array(
1783
  array(
1784
+ 'label' => __('Active', WDFMInstance(self::PLUGIN)->prefix),
1785
  'type' => 'panel',
1786
  'class' => 'col-md-12',
1787
  'label_class' => 'fm-mini-title',
1788
  'after' => '',
1789
  ),
1790
  array(
1791
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1792
  'name' => 'PSAPBGColor',
1793
  'type' => 'text',
1794
  'class' => 'color',
1795
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1796
  'value' => isset($param_values->PSAPBGColor) ? $param_values->PSAPBGColor : '',
1797
  'after' => '',
1798
  ),
1799
  array(
1800
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
1801
  'name' => 'PSAPFontSize',
1802
  'type' => 'text',
1803
  'class' => '',
1805
  'after' => 'px',
1806
  ),
1807
  array(
1808
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
1809
  'name' => 'PSAPFontWeight',
1810
  'type' => 'select',
1811
  'options' => $font_weights,
1814
  'after' => '',
1815
  ),
1816
  array(
1817
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
1818
  'name' => 'PSAPColor',
1819
  'type' => 'text',
1820
  'class' => 'color',
1821
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1822
  'value' => isset($param_values->PSAPColor) ? $param_values->PSAPColor : '',
1823
  'after' => '',
1824
  ),
1825
  array(
1826
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1827
  'name' => 'PSAPHeight',
1828
  'type' => 'text',
1829
  'class' => '',
1831
  'after' => 'px',
1832
  ),
1833
  array(
1834
+ 'label' => __('Line Height', WDFMInstance(self::PLUGIN)->prefix),
1835
  'name' => 'PSAPLineHeight',
1836
  'type' => 'text',
1837
  'class' => '',
1839
  'after' => 'px',
1840
  ),
1841
  array(
1842
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
1843
  'name' => 'PSAPPadding',
1844
  'type' => 'text',
1845
  'class' => '',
1846
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
1847
  'value' => isset($param_values->PSAPPadding) ? $param_values->PSAPPadding : '',
1848
  'after' => '',
1849
  ),
1850
  array(
1851
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1852
  'name' => 'PSAPMargin',
1853
  'type' => 'text',
1854
  'class' => '',
1855
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
1856
  'value' => isset($param_values->PSAPMargin) ? $param_values->PSAPMargin : '',
1857
  'after' => '',
1858
  ),
1859
  array(
1860
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1861
  'name' => 'PSAPBorder',
1862
  'type' => 'checkbox',
1863
  'options' => $borders,
1865
  'after' => '',
1866
  ),
1867
  array(
1868
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1869
  'name' => 'PSAPBorderColor',
1870
  'type' => 'text',
1871
  'class' => 'color',
1872
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1873
  'value' => isset($param_values->PSAPBorderColor) ? $param_values->PSAPBorderColor : '',
1874
  'after' => '',
1875
  ),
1876
  array(
1877
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1878
  'name' => 'PSAPBorderType',
1879
  'type' => 'select',
1880
  'options' => $border_types,
1883
  'after' => '',
1884
  ),
1885
  array(
1886
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
1887
  'name' => 'PSAPBorderWidth',
1888
  'type' => 'text',
1889
  'class' => '',
1891
  'after' => 'px',
1892
  ),
1893
  array(
1894
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
1895
  'name' => 'PSAPBorderRadius',
1896
  'type' => 'text',
1897
  'class' => '',
1899
  'after' => 'px</div>',
1900
  ),
1901
  array(
1902
+ 'label' => __('Inactive', WDFMInstance(self::PLUGIN)->prefix),
1903
  'type' => 'panel',
1904
  'class' => 'col-md-12',
1905
  'label_class' => 'fm-mini-title',
1906
  'after' => '',
1907
  ),
1908
  array(
1909
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
1910
  'name' => 'PSDPBGColor',
1911
  'type' => 'text',
1912
  'class' => 'color',
1913
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1914
  'value' => isset($param_values->PSDPBGColor) ? $param_values->PSDPBGColor : '',
1915
  'after' => '',
1916
  ),
1917
  array(
1918
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
1919
  'name' => 'PSDPFontSize',
1920
  'type' => 'text',
1921
  'class' => '',
1923
  'after' => 'px',
1924
  ),
1925
  array(
1926
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
1927
  'name' => 'PSDPFontWeight',
1928
  'type' => 'select',
1929
  'options' => $font_weights,
1932
  'after' => '',
1933
  ),
1934
  array(
1935
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
1936
  'name' => 'PSDPColor',
1937
  'type' => 'text',
1938
  'class' => 'color',
1939
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1940
  'value' => isset($param_values->PSDPColor) ? $param_values->PSDPColor : '',
1941
  'after' => '',
1942
  ),
1943
  array(
1944
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
1945
  'name' => 'PSDPHeight',
1946
  'type' => 'text',
1947
  'class' => '',
1949
  'after' => 'px',
1950
  ),
1951
  array(
1952
+ 'label' => __('Line Height', WDFMInstance(self::PLUGIN)->prefix),
1953
  'name' => 'PSDPLineHeight',
1954
  'type' => 'text',
1955
  'class' => '',
1957
  'after' => 'px',
1958
  ),
1959
  array(
1960
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
1961
  'name' => 'PSDPPadding',
1962
  'type' => 'text',
1963
  'class' => '',
1964
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
1965
  'value' => isset($param_values->PSDPPadding) ? $param_values->PSDPPadding : '',
1966
  'after' => '',
1967
  ),
1968
  array(
1969
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
1970
  'name' => 'PSDPMargin',
1971
  'type' => 'text',
1972
  'class' => '',
1973
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
1974
  'value' => isset($param_values->PSDPMargin) ? $param_values->PSDPMargin : '',
1975
  'after' => '',
1976
  ),
1977
  array(
1978
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
1979
  'name' => 'PSDPBorder',
1980
  'type' => 'checkbox',
1981
  'options' => $borders,
1983
  'after' => '',
1984
  ),
1985
  array(
1986
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
1987
  'name' => 'PSDPBorderColor',
1988
  'type' => 'text',
1989
  'class' => 'color',
1990
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
1991
  'value' => isset($param_values->PSDPBorderColor) ? $param_values->PSDPBorderColor : '',
1992
  'after' => '',
1993
  ),
1994
  array(
1995
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
1996
  'name' => 'PSDPBorderType',
1997
  'type' => 'select',
1998
  'options' => $border_types,
2001
  'after' => '',
2002
  ),
2003
  array(
2004
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2005
  'name' => 'PSDPBorderWidth',
2006
  'type' => 'text',
2007
  'class' => '',
2009
  'after' => 'px',
2010
  ),
2011
  array(
2012
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
2013
  'name' => 'PSDPBorderRadius',
2014
  'type' => 'text',
2015
  'class' => '',
2017
  'after' => 'px</div>',
2018
  ),
2019
  array(
2020
+ 'label' => __('Steps', WDFMInstance(self::PLUGIN)->prefix),
2021
  'type' => 'panel',
2022
  'class' => 'col-md-12',
2023
  'label_class' => 'fm-mini-title',
2024
  'after' => '',
2025
  ),
2026
  array(
2027
+ 'label' => __('Alignment', WDFMInstance(self::PLUGIN)->prefix),
2028
  'name' => 'PSAPAlign',
2029
  'type' => 'select',
2030
  'options' => $aligns,
2033
  'after' => '',
2034
  ),
2035
  array(
2036
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
2037
  'name' => 'PSAPWidth',
2038
  'type' => 'text',
2039
  'class' => '',
2041
  'after' => 'px</div>',
2042
  ),
2043
  array(
2044
+ 'label' => __('Percentage', WDFMInstance(self::PLUGIN)->prefix),
2045
  'type' => 'panel',
2046
  'class' => 'col-md-12',
2047
  'label_class' => 'fm-mini-title',
2048
  'after' => '',
2049
  ),
2050
  array(
2051
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
2052
  'name' => 'PPAPWidth',
2053
  'type' => 'text',
2054
  'class' => '',
2055
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 500px or 50%',
2056
  'value' => isset($param_values->PPAPWidth) ? $param_values->PPAPWidth : '',
2057
  'after' => '</div>',
2058
  ),
2059
  ),
2060
  'buttons' => array(
2061
  array(
2062
+ 'label' => __('Global Parameters', WDFMInstance(self::PLUGIN)->prefix),
2063
  'type' => 'panel',
2064
  'class' => 'col-md-12',
2065
  'label_class' => 'fm-mini-title',
2066
  'after' => '<br/>',
2067
  ),
2068
  array(
2069
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
2070
  'name' => 'BPFontSize',
2071
  'type' => 'text',
2072
  'class' => '',
2074
  'after' => 'px',
2075
  ),
2076
  array(
2077
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
2078
  'name' => 'BPFontWeight',
2079
  'type' => 'select',
2080
  'options' => $font_weights,
2083
  'after' => '</div>',
2084
  ),
2085
  array(
2086
+ 'label' => __('Next Button Parameters', WDFMInstance(self::PLUGIN)->prefix),
2087
  'type' => 'panel',
2088
  'class' => 'col-md-12',
2089
  'label_class' => 'fm-mini-title',
2090
  'after' => '<br/>',
2091
  ),
2092
  array(
2093
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2094
  'name' => 'NBPBGColor',
2095
  'type' => 'text',
2096
  'class' => 'color',
2097
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2098
  'value' => isset($param_values->NBPBGColor) ? $param_values->NBPBGColor : '',
2099
  'after' => '',
2100
  ),
2101
  array(
2102
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
2103
  'name' => 'NBPWidth',
2104
  'type' => 'text',
2105
  'class' => '',
2107
  'after' => 'px',
2108
  ),
2109
  array(
2110
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
2111
  'name' => 'NBPHeight',
2112
  'type' => 'text',
2113
  'class' => '',
2115
  'after' => 'px',
2116
  ),
2117
  array(
2118
+ 'label' => __('Line Height', WDFMInstance(self::PLUGIN)->prefix),
2119
  'name' => 'NBPLineHeight',
2120
  'type' => 'text',
2121
  'class' => '',
2123
  'after' => 'px',
2124
  ),
2125
  array(
2126
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2127
  'name' => 'NBPColor',
2128
  'type' => 'text',
2129
  'class' => 'color',
2130
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2131
  'value' => isset($param_values->NBPColor) ? $param_values->NBPColor : '',
2132
  'after' => '',
2133
  ),
2134
  array(
2135
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
2136
  'name' => 'NBPPadding',
2137
  'type' => 'text',
2138
  'class' => '',
2139
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
2140
  'value' => isset($param_values->NBPPadding) ? $param_values->NBPPadding : '',
2141
  'after' => '',
2142
  ),
2143
  array(
2144
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
2145
  'name' => 'NBPMargin',
2146
  'type' => 'text',
2147
  'class' => '',
2148
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
2149
  'value' => isset($param_values->NBPMargin) ? $param_values->NBPMargin : '',
2150
  'after' => '',
2151
  ),
2152
  array(
2153
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2154
  'name' => 'NBPBorder',
2155
  'type' => 'checkbox',
2156
  'options' => $borders,
2158
  'after' => '',
2159
  ),
2160
  array(
2161
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2162
  'name' => 'NBPBorderColor',
2163
  'type' => 'text',
2164
  'class' => 'color',
2165
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2166
  'value' => isset($param_values->NBPBorderColor) ? $param_values->NBPBorderColor : '',
2167
  'after' => '',
2168
  ),
2169
  array(
2170
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2171
  'name' => 'NBPBorderType',
2172
  'type' => 'select',
2173
  'options' => $border_types,
2176
  'after' => '',
2177
  ),
2178
  array(
2179
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2180
  'name' => 'NBPBorderWidth',
2181
  'type' => 'text',
2182
  'class' => '',
2184
  'after' => 'px',
2185
  ),
2186
  array(
2187
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
2188
  'name' => 'NBPBorderRadius',
2189
  'type' => 'text',
2190
  'class' => '',
2192
  'after' => 'px',
2193
  ),
2194
  array(
2195
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
2196
  'name' => 'NBPBoxShadow',
2197
  'type' => 'text',
2198
  'class' => '',
2199
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 5px 2px #888888',
2200
  'value' => isset($param_values->NBPBoxShadow) ? $param_values->NBPBoxShadow : '',
2201
  'after' => '',
2202
  ),
2203
  array(
2204
+ 'label' => __('Hover Parameters', WDFMInstance(self::PLUGIN)->prefix),
2205
  'type' => 'label',
2206
  'class' => 'fm-mini-title',
2207
  'after' => '<br/>',
2208
  ),
2209
  array(
2210
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2211
  'name' => 'NBHPBGColor',
2212
  'type' => 'text',
2213
  'class' => 'color',
2214
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2215
  'value' => isset($param_values->NBHPBGColor) ? $param_values->NBHPBGColor : '',
2216
  'after' => '',
2217
  ),
2218
  array(
2219
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2220
  'name' => 'NBHPColor',
2221
  'type' => 'text',
2222
  'class' => 'color',
2223
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2224
  'value' => isset($param_values->NBHPColor) ? $param_values->NBHPColor : '',
2225
  'after' => '',
2226
  ),
2227
  array(
2228
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2229
  'name' => 'NBHPBorder',
2230
  'type' => 'checkbox',
2231
  'options' => $borders,
2233
  'after' => '',
2234
  ),
2235
  array(
2236
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2237
  'name' => 'NBHPBorderColor',
2238
  'type' => 'text',
2239
  'class' => 'color',
2240
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2241
  'value' => isset($param_values->NBHPBorderColor) ? $param_values->NBHPBorderColor : '',
2242
  'after' => '',
2243
  ),
2244
  array(
2245
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2246
  'name' => 'NBHPBorderType',
2247
  'type' => 'select',
2248
  'options' => $border_types,
2251
  'after' => '',
2252
  ),
2253
  array(
2254
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2255
  'name' => 'NBHPBorderWidth',
2256
  'type' => 'text',
2257
  'class' => '',
2259
  'after' => 'px</div>',
2260
  ),
2261
  array(
2262
+ 'label' => __('Previous Button Parameters', WDFMInstance(self::PLUGIN)->prefix),
2263
  'type' => 'panel',
2264
  'class' => 'col-md-12',
2265
  'label_class' => 'fm-mini-title',
2266
  'after' => '<br/>',
2267
  ),
2268
  array(
2269
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2270
  'name' => 'PBPBGColor',
2271
  'type' => 'text',
2272
  'class' => 'color',
2273
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2274
  'value' => isset($param_values->PBPBGColor) ? $param_values->PBPBGColor : '',
2275
  'after' => '',
2276
  ),
2277
  array(
2278
+ 'label' => __('Width', WDFMInstance(self::PLUGIN)->prefix),
2279
  'name' => 'PBPWidth',
2280
  'type' => 'text',
2281
  'class' => '',
2283
  'after' => 'px',
2284
  ),
2285
  array(
2286
+ 'label' => __('Height', WDFMInstance(self::PLUGIN)->prefix),
2287
  'name' => 'PBPHeight',
2288
  'type' => 'text',
2289
  'class' => '',
2291
  'after' => 'px',
2292
  ),
2293
  array(
2294
+ 'label' => __('Line Height', WDFMInstance(self::PLUGIN)->prefix),
2295
  'name' => 'PBPLineHeight',
2296
  'type' => 'text',
2297
  'class' => '',
2299
  'after' => 'px',
2300
  ),
2301
  array(
2302
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2303
  'name' => 'PBPColor',
2304
  'type' => 'text',
2305
  'class' => 'color',
2306
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2307
  'value' => isset($param_values->PBPColor) ? $param_values->PBPColor : '',
2308
  'after' => '',
2309
  ),
2310
  array(
2311
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
2312
  'name' => 'PBPPadding',
2313
  'type' => 'text',
2314
  'class' => '',
2315
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
2316
  'value' => isset($param_values->PBPPadding) ? $param_values->PBPPadding : '',
2317
  'after' => '',
2318
  ),
2319
  array(
2320
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
2321
  'name' => 'PBPMargin',
2322
  'type' => 'text',
2323
  'class' => '',
2324
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
2325
  'value' => isset($param_values->PBPMargin) ? $param_values->PBPMargin : '',
2326
  'after' => '',
2327
  ),
2328
  array(
2329
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2330
  'name' => 'PBPBorder',
2331
  'type' => 'checkbox',
2332
  'options' => $borders,
2334
  'after' => '',
2335
  ),
2336
  array(
2337
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2338
  'name' => 'PBPBorderColor',
2339
  'type' => 'text',
2340
  'class' => 'color',
2341
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2342
  'value' => isset($param_values->PBPBorderColor) ? $param_values->PBPBorderColor : '',
2343
  'after' => '',
2344
  ),
2345
  array(
2346
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2347
  'name' => 'PBPBorderType',
2348
  'type' => 'select',
2349
  'options' => $border_types,
2352
  'after' => '',
2353
  ),
2354
  array(
2355
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2356
  'name' => 'PBPBorderWidth',
2357
  'type' => 'text',
2358
  'class' => '',
2360
  'after' => 'px',
2361
  ),
2362
  array(
2363
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
2364
  'name' => 'PBPBorderRadius',
2365
  'type' => 'text',
2366
  'class' => '',
2368
  'after' => 'px',
2369
  ),
2370
  array(
2371
+ 'label' => __('Box Shadow', WDFMInstance(self::PLUGIN)->prefix),
2372
  'name' => 'PBPBoxShadow',
2373
  'type' => 'text',
2374
  'class' => '',
2375
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 5px 2px #888888',
2376
  'value' => isset($param_values->PBPBoxShadow) ? $param_values->PBPBoxShadow : '',
2377
  'after' => '',
2378
  ),
2379
  array(
2380
+ 'label' => __('Hover Parameters', WDFMInstance(self::PLUGIN)->prefix),
2381
  'type' => 'label',
2382
  'class' => 'fm-mini-title',
2383
  'after' => '<br/>',
2384
  ),
2385
  array(
2386
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2387
  'name' => 'PBHPBGColor',
2388
  'type' => 'text',
2389
  'class' => 'color',
2390
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2391
  'value' => isset($param_values->PBHPBGColor) ? $param_values->PBHPBGColor : '',
2392
  'after' => '',
2393
  ),
2394
  array(
2395
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2396
  'name' => 'PBHPColor',
2397
  'type' => 'text',
2398
  'class' => 'color',
2399
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2400
  'value' => isset($param_values->PBHPColor) ? $param_values->PBHPColor : '',
2401
  'after' => '',
2402
  ),
2403
  array(
2404
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2405
  'name' => 'PBHPBorder',
2406
  'type' => 'checkbox',
2407
  'options' => $borders,
2409
  'after' => '',
2410
  ),
2411
  array(
2412
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2413
  'name' => 'PBHPBorderColor',
2414
  'type' => 'text',
2415
  'class' => 'color',
2416
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2417
  'value' => isset($param_values->PBHPBorderColor) ? $param_values->PBHPBorderColor : '',
2418
  'after' => '',
2419
  ),
2420
  array(
2421
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2422
  'name' => 'PBHPBorderType',
2423
  'type' => 'select',
2424
  'options' => $border_types,
2427
  'after' => '',
2428
  ),
2429
  array(
2430
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2431
  'name' => 'PBHPBorderWidth',
2432
  'type' => 'text',
2433
  'class' => '',
2444
  'after' => '',
2445
  ),
2446
  array(
2447
+ 'label' => __('Position', WDFMInstance(self::PLUGIN)->prefix),
2448
  'name' => 'CBPPosition',
2449
  'type' => 'select',
2450
  'options' => $position_types,
2453
  'after' => '',
2454
  ),
2455
  array(
2456
+ 'label' => __('Top', WDFMInstance(self::PLUGIN)->prefix),
2457
  'name' => 'CBPTop',
2458
  'type' => 'text',
2459
  'class' => '',
2460
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 100px or 10%',
2461
  'value' => isset($param_values->CBPTop) ? $param_values->CBPTop : '',
2462
  'after' => '',
2463
  ),
2464
  array(
2465
+ 'label' => __('Right', WDFMInstance(self::PLUGIN)->prefix),
2466
  'name' => 'CBPRight',
2467
  'type' => 'text',
2468
  'class' => '',
2469
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 100px or 10%',
2470
  'value' => isset($param_values->CBPRight) ? $param_values->CBPRight : '',
2471
  'after' => '',
2472
  ),
2473
  array(
2474
+ 'label' => __('Bottom', WDFMInstance(self::PLUGIN)->prefix),
2475
  'name' => 'CBPBottom',
2476
  'type' => 'text',
2477
  'class' => '',
2478
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 100px or 10%',
2479
  'value' => isset($param_values->CBPBottom) ? $param_values->CBPBottom : '',
2480
  'after' => '',
2481
  ),
2482
  array(
2483
+ 'label' => __('Left', WDFMInstance(self::PLUGIN)->prefix),
2484
  'name' => 'CBPLeft',
2485
  'type' => 'text',
2486
  'class' => '',
2487
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 100px or 10%',
2488
  'value' => isset($param_values->CBPLeft) ? $param_values->CBPLeft : '',
2489
  'after' => '',
2490
  ),
2491
  array(
2492
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2493
  'name' => 'CBPBGColor',
2494
  'type' => 'text',
2495
  'class' => 'color',
2496
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2497
  'value' => isset($param_values->CBPBGColor) ? $param_values->CBPBGColor : '',
2498
  'after' => '',
2499
  ),
2500
  array(
2501
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
2502
  'name' => 'CBPFontSize',
2503
  'type' => 'text',
2504
  'class' => '13',
2506
  'after' => 'px',
2507
  ),
2508
  array(
2509
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
2510
  'name' => 'CBPFontWeight',
2511
  'type' => 'select',
2512
  'options' => $font_weights,
2515
  'after' => '',
2516
  ),
2517
  array(
2518
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2519
  'name' => 'CBPColor',
2520
  'type' => 'text',
2521
  'class' => 'color',
2522
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2523
  'value' => isset($param_values->CBPColor) ? $param_values->CBPColor : '',
2524
  'after' => '',
2525
  ),
2526
  array(
2527
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
2528
  'name' => 'CBPPadding',
2529
  'type' => 'text',
2530
  'class' => '',
2531
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
2532
  'value' => isset($param_values->CBPPadding) ? $param_values->CBPPadding : '',
2533
  'after' => '',
2534
  ),
2535
  array(
2536
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
2537
  'name' => 'CBPMargin',
2538
  'type' => 'text',
2539
  'class' => '',
2540
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
2541
  'value' => isset($param_values->CBPMargin) ? $param_values->CBPMargin : '',
2542
  'after' => '',
2543
  ),
2544
  array(
2545
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2546
  'name' => 'CBPBorder',
2547
  'type' => 'checkbox',
2548
  'options' => $borders,
2550
  'after' => '',
2551
  ),
2552
  array(
2553
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2554
  'name' => 'CBPBorderColor',
2555
  'type' => 'text',
2556
  'class' => 'color',
2557
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2558
  'value' => isset($param_values->CBPBorderColor) ? $param_values->CBPBorderColor : '',
2559
  'after' => '',
2560
  ),
2561
  array(
2562
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2563
  'name' => 'CBPBorderType',
2564
  'type' => 'select',
2565
  'options' => $border_types,
2568
  'after' => '',
2569
  ),
2570
  array(
2571
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2572
  'name' => 'CBPBorderWidth',
2573
  'type' => 'text',
2574
  'class' => '',
2576
  'after' => 'px',
2577
  ),
2578
  array(
2579
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
2580
  'name' => 'CBPBorderRadius',
2581
  'type' => 'text',
2582
  'class' => '',
2584
  'after' => 'px',
2585
  ),
2586
  array(
2587
+ 'label' => __('Hover Parameters', WDFMInstance(self::PLUGIN)->prefix),
2588
  'type' => 'label',
2589
  'class' => 'fm-mini-title',
2590
  'after' => '<br/>',
2591
  ),
2592
  array(
2593
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2594
  'name' => 'CBHPBGColor',
2595
  'type' => 'text',
2596
  'class' => 'color',
2597
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2598
  'value' => isset($param_values->CBHPBGColor) ? $param_values->CBHPBGColor : '',
2599
  'after' => '',
2600
  ),
2601
  array(
2602
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2603
  'name' => 'CBHPColor',
2604
  'type' => 'text',
2605
  'class' => 'color',
2606
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2607
  'value' => isset($param_values->CBHPColor) ? $param_values->CBHPColor : '',
2608
  'after' => '',
2609
  ),
2610
  array(
2611
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2612
  'name' => 'CBHPBorder',
2613
  'type' => 'checkbox',
2614
  'options' => $borders,
2616
  'after' => '',
2617
  ),
2618
  array(
2619
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2620
  'name' => 'CBHPBorderColor',
2621
  'type' => 'text',
2622
  'class' => 'color',
2623
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2624
  'value' => isset($param_values->CBHPBorderColor) ? $param_values->CBHPBorderColor : '',
2625
  'after' => '',
2626
  ),
2627
  array(
2628
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2629
  'name' => 'CBHPBorderType',
2630
  'type' => 'select',
2631
  'options' => $border_types,
2634
  'after' => '',
2635
  ),
2636
  array(
2637
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2638
  'name' => 'CBHPBorderWidth',
2639
  'type' => 'text',
2640
  'class' => '',
2651
  'after' => '',
2652
  ),
2653
  array(
2654
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2655
  'name' => 'MBPBGColor',
2656
  'type' => 'text',
2657
  'class' => 'color',
2658
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2659
  'value' => isset($param_values->MBPBGColor) ? $param_values->MBPBGColor : '',
2660
  'after' => '',
2661
  ),
2662
  array(
2663
+ 'label' => __('Font Size', WDFMInstance(self::PLUGIN)->prefix),
2664
  'name' => 'MBPFontSize',
2665
  'type' => 'text',
2666
  'class' => '13',
2668
  'after' => 'px',
2669
  ),
2670
  array(
2671
+ 'label' => __('Font Weight', WDFMInstance(self::PLUGIN)->prefix),
2672
  'name' => 'MBPFontWeight',
2673
  'type' => 'select',
2674
  'options' => $font_weights,
2677
  'after' => '',
2678
  ),
2679
  array(
2680
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2681
  'name' => 'MBPColor',
2682
  'type' => 'text',
2683
  'class' => 'color',
2684
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2685
  'value' => isset($param_values->MBPColor) ? $param_values->MBPColor : '',
2686
  'after' => '',
2687
  ),
2688
  array(
2689
+ 'label' => __('Text Align', WDFMInstance(self::PLUGIN)->prefix),
2690
  'name' => 'MBPTextAlign',
2691
  'type' => 'select',
2692
  'options' => $aligns,
2695
  'after' => '',
2696
  ),
2697
  array(
2698
+ 'label' => __('Padding', WDFMInstance(self::PLUGIN)->prefix),
2699
  'name' => 'MBPPadding',
2700
  'type' => 'text',
2701
  'class' => '',
2702
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 3px 5px or 3% 5%',
2703
  'value' => isset($param_values->MBPPadding) ? $param_values->MBPPadding : '',
2704
  'after' => 'px|%',
2705
  ),
2706
  array(
2707
+ 'label' => __('Margin', WDFMInstance(self::PLUGIN)->prefix),
2708
  'name' => 'MBPMargin',
2709
  'type' => 'text',
2710
  'class' => '',
2711
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' 5px 10px or 5% 10%',
2712
  'value' => isset($param_values->MBPMargin) ? $param_values->MBPMargin : '',
2713
  'after' => 'px|%',
2714
  ),
2715
  array(
2716
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2717
  'name' => 'MBPBorder',
2718
  'type' => 'checkbox',
2719
  'options' => $borders,
2721
  'after' => '',
2722
  ),
2723
  array(
2724
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2725
  'name' => 'MBPBorderColor',
2726
  'type' => 'text',
2727
  'class' => 'color',
2728
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2729
  'value' => isset($param_values->MBPBorderColor) ? $param_values->MBPBorderColor : '',
2730
  'after' => '',
2731
  ),
2732
  array(
2733
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2734
  'name' => 'MBPBorderType',
2735
  'type' => 'select',
2736
  'options' => $border_types,
2739
  'after' => '',
2740
  ),
2741
  array(
2742
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2743
  'name' => 'MBPBorderWidth',
2744
  'type' => 'text',
2745
  'class' => '',
2747
  'after' => 'px',
2748
  ),
2749
  array(
2750
+ 'label' => __('Border Radius', WDFMInstance(self::PLUGIN)->prefix),
2751
  'name' => 'MBPBorderRadius',
2752
  'type' => 'text',
2753
  'class' => '',
2755
  'after' => 'px',
2756
  ),
2757
  array(
2758
+ 'label' => __('Hover Parameters', WDFMInstance(self::PLUGIN)->prefix),
2759
  'type' => 'label',
2760
  'class' => 'fm-mini-title',
2761
  'after' => '<br/>',
2762
  ),
2763
  array(
2764
+ 'label' => __('Background Color', WDFMInstance(self::PLUGIN)->prefix),
2765
  'name' => 'MBHPBGColor',
2766
  'type' => 'text',
2767
  'class' => 'color',
2768
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2769
  'value' => isset($param_values->MBHPBGColor) ? $param_values->MBHPBGColor : '',
2770
  'after' => '',
2771
  ),
2772
  array(
2773
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2774
  'name' => 'MBHPColor',
2775
  'type' => 'text',
2776
  'class' => 'color',
2777
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2778
  'value' => isset($param_values->MBHPColor) ? $param_values->MBHPColor : '',
2779
  'after' => '',
2780
  ),
2781
  array(
2782
+ 'label' => __('Border', WDFMInstance(self::PLUGIN)->prefix),
2783
  'name' => 'MBHPBorder',
2784
  'type' => 'checkbox',
2785
  'options' => $borders,
2787
  'after' => '',
2788
  ),
2789
  array(
2790
+ 'label' => __('Border Color', WDFMInstance(self::PLUGIN)->prefix),
2791
  'name' => 'MBHPBorderColor',
2792
  'type' => 'text',
2793
  'class' => 'color',
2795
  'after' => '',
2796
  ),
2797
  array(
2798
+ 'label' => __('Border Type', WDFMInstance(self::PLUGIN)->prefix),
2799
  'name' => 'MBHPBorderType',
2800
  'type' => 'select',
2801
  'options' => $border_types,
2804
  'after' => '',
2805
  ),
2806
  array(
2807
+ 'label' => __('Border Width', WDFMInstance(self::PLUGIN)->prefix),
2808
  'name' => 'MBHPBorderWidth',
2809
  'type' => 'text',
2810
  'class' => '',
2814
  ),
2815
  'other' => array(
2816
  array(
2817
+ 'label' => __('Inactive Text', WDFMInstance(self::PLUGIN)->prefix),
2818
  'type' => 'panel',
2819
  'class' => 'col-md-12',
2820
  'label_class' => 'fm-mini-title',
2821
  'after' => '<br/>',
2822
  ),
2823
  array(
2824
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2825
  'name' => 'OPDeInputColor',
2826
  'type' => 'text',
2827
  'class' => 'color',
2828
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' #efefef',
2829
  'value' => isset($param_values->OPDeInputColor) ? $param_values->OPDeInputColor : '',
2830
  'after' => '',
2831
  ),
2832
  array(
2833
+ 'label' => __('Font Style', WDFMInstance(self::PLUGIN)->prefix),
2834
  'name' => 'OPFontStyle',
2835
  'type' => 'text',
2836
  'class' => '',
2838
  'after' => '',
2839
  ),
2840
  array(
2841
+ 'label' => __('Required', WDFMInstance(self::PLUGIN)->prefix),
2842
  'type' => 'label',
2843
  'class' => 'fm-mini-title',
2844
  'after' => '<br/>',
2845
  ),
2846
  array(
2847
+ 'label' => __('Color', WDFMInstance(self::PLUGIN)->prefix),
2848
  'name' => 'OPRColor',
2849
  'type' => 'text',
2850
  'class' => 'color',
2852
  'after' => '',
2853
  ),
2854
  array(
2855
+ 'label' => __('File Upload', WDFMInstance(self::PLUGIN)->prefix),
2856
  'type' => 'label',
2857
  'class' => 'fm-mini-title',
2858
  'after' => '<br/>',
2859
  ),
2860
  array(
2861
+ 'label' => __('Background URL', WDFMInstance(self::PLUGIN)->prefix),
2862
  'name' => 'OPFBgUrl',
2863
  'type' => 'text',
2864
  'class' => '',
2865
+ // 'placeholder' => __('e.g. http:// or https://', WDFMInstance(self::PLUGIN)->prefix),
2866
  'value' => isset($param_values->OPFBgUrl) ? $param_values->OPFBgUrl : '',
2867
  'after' => '',
2868
  ),
2869
  array(
2870
+ 'label' => __('Background Repeat', WDFMInstance(self::PLUGIN)->prefix),
2871
  'name' => 'OPFBGRepeat',
2872
  'type' => 'select',
2873
  'options' => $bg_repeats,
2876
  'after' => '',
2877
  ),
2878
  array(
2879
+ 'label' => __('Background Position', WDFMInstance(self::PLUGIN)->prefix),
2880
  'name1' => 'OPFPos1',
2881
  'name2' => 'OPFPos2',
2882
  'type' => '2text',
2883
  'class' => 'fm-2text',
2884
+ 'placeholder' => __('e.g.', WDFMInstance(self::PLUGIN)->prefix) . ' px|%, top|bottom|left|right|center',
2885
  'value1' => isset($param_values->OPFPos1) ? $param_values->OPFPos1 : '',
2886
  'value2' => isset($param_values->OPFPos2) ? $param_values->OPFPos2 : '',
2887
  'before1' => '',
2889
  'after' => '',
2890
  ),
2891
  array(
2892
+ 'label' => __('Grading', WDFMInstance(self::PLUGIN)->prefix),
2893
  'type' => 'label',
2894
  'class' => 'fm-mini-title',
2895
  'after' => '<br/>',
2896
  ),
2897
  array(
2898
+ 'label' => __('Text Width', WDFMInstance(self::PLUGIN)->prefix),
2899
  'name' => 'OPGWidth',
2900
  'type' => 'text',
2901
  'class' => '',
2912
  'after' => '',
2913
  ),
2914
  array(
2915
+ 'label' => __('Custom CSS', WDFMInstance(self::PLUGIN)->prefix),
2916
  'name' => 'CUPCSS',
2917
  'type' => 'textarea',
2918
  'class' => '',
2930
  */
2931
  public function apply() {
2932
  $data = $this->save_db();
2933
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
2934
+ $active_tab = WDW_FM_Library(self::PLUGIN)->get('active_tab');
2935
+ $pagination = WDW_FM_Library(self::PLUGIN)->get('pagination-type');
2936
+ $form_type = WDW_FM_Library(self::PLUGIN)->get('form_type');
2937
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
2938
  'page' => $page,
2939
  'task' => 'edit',
2940
  'current_id' => $data['id'],
2952
  */
2953
  public function save_db() {
2954
  global $wpdb;
2955
+ $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
2956
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
2957
  $version = 2;
2958
  $params = (isset($_POST['params']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['params'])) : '');
2975
  $id = $wpdb->insert_id;
2976
  }
2977
  if ( $save !== FALSE ) {
2978
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/frontend/models/form_maker.php";
2979
  $model_frontend = new FMModelForm_maker();
2980
  $form_theme = json_decode(html_entity_decode($params), TRUE);
2981
  $model_frontend->create_css($id, $form_theme, $version == 1, TRUE);
3002
  else {
3003
  $message = 2;
3004
  }
3005
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
3006
+ WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
3007
  'page' => $page,
3008
  'task' => 'display',
3009
  'message' => $message,
admin/controllers/Uninstall_fm.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class FMControllerUninstall_fm {
4
  private $model;
5
  private $view;
6
  private $addons = array(
@@ -18,19 +18,19 @@ class FMControllerUninstall_fm {
18
  );
19
 
20
  public function __construct() {
21
- require_once WDFM()->plugin_dir . "/admin/models/Uninstall_fm.php";
22
  $this->model = new FMModelUninstall_fm();
23
- require_once WDFM()->plugin_dir . "/admin/views/Uninstall_fm.php";
24
  $this->view = new FMViewUninstall_fm();
25
 
26
- if ( WDFM()->is_free ) {
27
  global $fm_options;
28
  global $cfm_options;
29
  if (!class_exists("DoradoWebConfig")) {
30
- include_once(WDFM()->plugin_dir . "/wd/config.php");
31
  }
32
  $config = new DoradoWebConfig();
33
- $config->set_options(WDFM()->is_free == 1 ? $fm_options : $cfm_options);
34
  $deactivate_reasons = new DoradoWebDeactivate($config);
35
  $deactivate_reasons->submit_and_deactivate();
36
  }
@@ -39,7 +39,7 @@ class FMControllerUninstall_fm {
39
  public function execute() {
40
  $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
41
  if ( method_exists($this, $task) ) {
42
- check_admin_referer(WDFM()->nonce, WDFM()->nonce);
43
  $this->$task();
44
  }
45
  else {
@@ -60,7 +60,7 @@ class FMControllerUninstall_fm {
60
  $params['prefix'] = $wpdb->prefix;
61
  $params['addons'] = $this->addons;
62
  // Deactivate all addons
63
- WDW_FM_Library::deactivate_all_addons();
64
  $this->view->uninstall($params);
65
  }
66
  }
1
  <?php
2
 
3
+ class FMControllerUninstall_fm extends FMAdminController {
4
  private $model;
5
  private $view;
6
  private $addons = array(
18
  );
19
 
20
  public function __construct() {
21
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Uninstall_fm.php";
22
  $this->model = new FMModelUninstall_fm();
23
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Uninstall_fm.php";
24
  $this->view = new FMViewUninstall_fm();
25
 
26
+ if ( WDFMInstance(self::PLUGIN)->is_free ) {
27
  global $fm_options;
28
  global $cfm_options;
29
  if (!class_exists("DoradoWebConfig")) {
30
+ include_once(WDFMInstance(self::PLUGIN)->plugin_dir . "/wd/config.php");
31
  }
32
  $config = new DoradoWebConfig();
33
+ $config->set_options(WDFMInstance(self::PLUGIN)->is_free == 1 ? $fm_options : $cfm_options);
34
  $deactivate_reasons = new DoradoWebDeactivate($config);
35
  $deactivate_reasons->submit_and_deactivate();
36
  }
39
  public function execute() {
40
  $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
41
  if ( method_exists($this, $task) ) {
42
+ check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
43
  $this->$task();
44
  }
45
  else {
60
  $params['prefix'] = $wpdb->prefix;
61
  $params['addons'] = $this->addons;
62
  // Deactivate all addons
63
+ WDW_FM_Library(self::PLUGIN)->deactivate_all_addons();
64
  $this->view->uninstall($params);
65
  }
66
  }
admin/controllers/Widget.php CHANGED
@@ -4,32 +4,37 @@
4
  * Class FMControllerWidget
5
  */
6
  class FMControllerWidget extends WP_Widget {
 
 
 
 
 
7
  private $view;
8
  private $model;
9
 
10
  public function __construct() {
11
  $widget_ops = array(
12
  'classname' => 'form_maker_widget',
13
- 'description' => __('Add Form Maker widget.', WDFM()->prefix),
14
  );
15
  // Widget Control Settings.
16
  $control_ops = array( 'id_base' => 'form_maker_widget' );
17
  // Create the widget.
18
- parent::__construct('form_maker_widget', WDFM()->nicename, $widget_ops, $control_ops);
19
- require_once WDFM()->plugin_dir . "/admin/models/Widget.php";
20
  $this->model = new FMModelWidget();
21
- require_once WDFM()->plugin_dir . "/admin/views/Widget.php";
22
  $this->view = new FMViewWidget($this->model);
23
  }
24
 
25
  public function widget( $args, $instance ) {
26
- if( get_the_title() == 'Preview' && get_post_type() == 'form-maker' . WDFM()->plugin_postfix ) {
27
  return;
28
  }
29
  $contact_form_forms = explode(',', get_option('contact_form_forms'));
30
- if ( !WDFM()->is_free || !in_array($instance['form_id'], $contact_form_forms) ) {
31
- if ( function_exists('WDFM') ) {
32
- require_once(WDFM()->plugin_dir . '/frontend/controllers/form_maker.php');
33
  $controller_class = 'FMControllerForm_maker';
34
  }
35
  else {
@@ -37,8 +42,8 @@ class FMControllerWidget extends WP_Widget {
37
  }
38
  }
39
  else {
40
- if ( function_exists('WDCFM') ) {
41
- require_once(WDCFM()->plugin_dir . '/frontend/controllers/form_maker.php');
42
  $controller_class = 'FMControllerForm_maker_fmc';
43
  }
44
  else {
4
  * Class FMControllerWidget
5
  */
6
  class FMControllerWidget extends WP_Widget {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  private $view;
13
  private $model;
14
 
15
  public function __construct() {
16
  $widget_ops = array(
17
  'classname' => 'form_maker_widget',
18
+ 'description' => sprintf(__('Add %s widget.', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename),
19
  );
20
  // Widget Control Settings.
21
  $control_ops = array( 'id_base' => 'form_maker_widget' );
22
  // Create the widget.
23
+ parent::__construct('form_maker_widget', WDFMInstance(self::PLUGIN)->nicename, $widget_ops, $control_ops);
24
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/models/Widget.php";
25
  $this->model = new FMModelWidget();
26
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Widget.php";
27
  $this->view = new FMViewWidget($this->model);
28
  }
29
 
30
  public function widget( $args, $instance ) {
31
+ if( get_the_title() == 'Preview' && get_post_type() == 'form-maker' . WDFMInstance(self::PLUGIN)->plugin_postfix ) {
32
  return;
33
  }
34
  $contact_form_forms = explode(',', get_option('contact_form_forms'));
35
+ if ( !WDFMInstance(self::PLUGIN)->is_free || !in_array($instance['form_id'], $contact_form_forms) ) {
36
+ if ( class_exists('WDFM') ) {
37
+ require_once(WDFMInstance(self::PLUGIN)->plugin_dir . '/frontend/controllers/form_maker.php');
38
  $controller_class = 'FMControllerForm_maker';
39
  }
40
  else {
42
  }
43
  }
44
  else {
45
+ if ( class_exists('WDCFM') ) {
46
+ require_once(WDFMInstance(2)->plugin_dir . '/frontend/controllers/form_maker.php');
47
  $controller_class = 'FMControllerForm_maker_fmc';
48
  }
49
  else {
admin/controllers/controller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin controller class.
4
+ */
5
+ class FMAdminController {
6
+ /**
7
+ * PLUGIN = 2 points to Contact Form Maker
8
+ */
9
+ const PLUGIN = 1;
10
+ }
admin/models/Blocked_ips_fm.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelBlocked_ips_fm
5
  */
6
- class FMModelBlocked_ips_fm {
7
  /**
8
  * Get blocked Ips.
9
  *
@@ -15,8 +15,8 @@ class FMModelBlocked_ips_fm {
15
  $order = $params['order'];
16
  $orderby = $params['orderby'];
17
  $items_per_page = $params['items_per_page'];
18
- $search = WDW_FM_Library::get('s', '');
19
- $page = (int) WDW_FM_Library::get('paged', 1);
20
  $limit = $page ? ($page - 1) * $items_per_page : 0;
21
 
22
  global $wpdb;
@@ -54,7 +54,7 @@ class FMModelBlocked_ips_fm {
54
  global $wpdb;
55
  $query = "SELECT COUNT(*) FROM `" . $wpdb->prefix . "formmaker_blocked`";
56
 
57
- $search = WDW_FM_Library::get('s', '');
58
  if ( $search ) {
59
  $query .= ' WHERE `ip` LIKE "%' . $search . '%"';
60
  }
3
  /**
4
  * Class FMModelBlocked_ips_fm
5
  */
6
+ class FMModelBlocked_ips_fm extends FMAdminModel {
7
  /**
8
  * Get blocked Ips.
9
  *
15
  $order = $params['order'];
16
  $orderby = $params['orderby'];
17
  $items_per_page = $params['items_per_page'];
18
+ $search = WDW_FM_Library(self::PLUGIN)->get('s', '');
19
+ $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
20
  $limit = $page ? ($page - 1) * $items_per_page : 0;
21
 
22
  global $wpdb;
54
  global $wpdb;
55
  $query = "SELECT COUNT(*) FROM `" . $wpdb->prefix . "formmaker_blocked`";
56
 
57
+ $search = WDW_FM_Library(self::PLUGIN)->get('s', '');
58
  if ( $search ) {
59
  $query .= ' WHERE `ip` LIKE "%' . $search . '%"';
60
  }
admin/models/Checkpaypal.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelCheckpaypal
5
  */
6
- class FMModelCheckpaypal {
7
  /**
8
  * Get form by id.
9
  *
3
  /**
4
  * Class FMModelCheckpaypal
5
  */
6
+ class FMModelCheckpaypal extends FMAdminModel {
7
  /**
8
  * Get form by id.
9
  *
admin/models/FMPaypalInfo.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelPaypal_info
5
  */
6
- class FMModelPaypal_info {
7
  /**
8
  * Get form session.
9
  *
3
  /**
4
  * Class FMModelPaypal_info
5
  */
6
+ class FMModelPaypal_info extends FMAdminModel {
7
  /**
8
  * Get form session.
9
  *
admin/models/FMSelectDataFromDb.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelSelect_data_from_db
5
  */
6
- class FMModelSelect_data_from_db {
7
  /**
8
  * Get labels by form id.
9
  *
@@ -32,10 +32,10 @@ class FMModelSelect_data_from_db {
32
  }
33
  else {
34
  if ( $con_type == 'remote' ) {
35
- $username = WDW_FM_Library::get('username', '');
36
- $password = WDW_FM_Library::get('password', '');
37
- $database = WDW_FM_Library::get('database', '');
38
- $host = WDW_FM_Library::get('host', '');
39
  $wpdb_temp = new wpdb($username, $password, $database, $host);
40
  $query = "SHOW TABLES";
41
  $tables = $wpdb_temp->get_col($query);
@@ -80,18 +80,18 @@ class FMModelSelect_data_from_db {
80
  */
81
  function get_table_struct() {
82
  global $wpdb;
83
- $name = WDW_FM_Library::get('name', NULL);
84
  if ( !$name ) {
85
  return array();
86
  }
87
- $con_method = WDW_FM_Library::get('con_method', NULL);
88
- $con_type = WDW_FM_Library::get('con_type', NULL);
89
  $query = 'SHOW COLUMNS FROM `' . $name . '`';
90
  if ( $con_type == 'remote' ) {
91
- $username = WDW_FM_Library::get('username', '');
92
- $password = WDW_FM_Library::get('password', '');
93
- $database = WDW_FM_Library::get('database', '');
94
- $host = WDW_FM_Library::get('host', '');
95
  $wpdb_temp = new wpdb($username, $password, $database, $host);
96
  $table_struct = $wpdb_temp->get_results($query);
97
  }
3
  /**
4
  * Class FMModelSelect_data_from_db
5
  */
6
+ class FMModelSelect_data_from_db extends FMAdminModel {
7
  /**
8
  * Get labels by form id.
9
  *
32
  }
33
  else {
34
  if ( $con_type == 'remote' ) {
35
+ $username = WDW_FM_Library(self::PLUGIN)->get('username', '');
36
+ $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
37
+ $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
38
+ $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
39
  $wpdb_temp = new wpdb($username, $password, $database, $host);
40
  $query = "SHOW TABLES";
41
  $tables = $wpdb_temp->get_col($query);
80
  */
81
  function get_table_struct() {
82
  global $wpdb;
83
+ $name = WDW_FM_Library(self::PLUGIN)->get('name', NULL);
84
  if ( !$name ) {
85
  return array();
86
  }
87
+ $con_method = WDW_FM_Library(self::PLUGIN)->get('con_method', NULL);
88
+ $con_type = WDW_FM_Library(self::PLUGIN)->get('con_type', NULL);
89
  $query = 'SHOW COLUMNS FROM `' . $name . '`';
90
  if ( $con_type == 'remote' ) {
91
+ $username = WDW_FM_Library(self::PLUGIN)->get('username', '');
92
+ $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
93
+ $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
94
+ $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
95
  $wpdb_temp = new wpdb($username, $password, $database, $host);
96
  $table_struct = $wpdb_temp->get_results($query);
97
  }
admin/models/FMShortocde.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelFMShortocde
5
  */
6
- class FMModelFMShortocde {
7
  /**
8
  * Get forms.
9
  *
@@ -11,7 +11,7 @@ class FMModelFMShortocde {
11
  */
12
  public function get_form_data() {
13
  global $wpdb;
14
- $rows = $wpdb->get_results("SELECT * FROM `" . $wpdb->prefix . "formmaker`" . (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ') ORDER BY `title`'));
15
 
16
  return $rows;
17
  }
3
  /**
4
  * Class FMModelFMShortocde
5
  */
6
+ class FMModelFMShortocde extends FMAdminModel {
7
  /**
8
  * Get forms.
9
  *
11
  */
12
  public function get_form_data() {
13
  global $wpdb;
14
+ $rows = $wpdb->get_results("SELECT * FROM `" . $wpdb->prefix . "formmaker`" . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ') ORDER BY `title`'));
15
 
16
  return $rows;
17
  }
admin/models/FMSqlMapping.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelFormMakerSQLMapping
5
  */
6
- class FMModelFormMakerSQLMapping {
7
  /**
8
  * Get query by id.
9
  *
@@ -39,17 +39,17 @@ class FMModelFormMakerSQLMapping {
39
  */
40
  function get_tables() {
41
  global $wpdb;
42
- $con_type = WDW_FM_Library::get('con_type', NULL);
43
  if ( $con_type == 'local' ) {
44
  $query = "SHOW TABLES";
45
  $tables = $wpdb->get_col($query);
46
  }
47
  else {
48
  if ( $con_type == 'remote' ) {
49
- $username = WDW_FM_Library::get('username', '');
50
- $password = WDW_FM_Library::get('password', '');
51
- $database = WDW_FM_Library::get('database', '');
52
- $host = WDW_FM_Library::get('host', '');
53
  $wpdb_temp = new wpdb($username, $password, $database, $host);
54
  $query = "SHOW TABLES";
55
  $tables = $wpdb_temp->get_col($query);
@@ -78,18 +78,18 @@ class FMModelFormMakerSQLMapping {
78
 
79
  function get_table_struct() {
80
  global $wpdb;
81
- $name = WDW_FM_Library::get('name', NULL);
82
  if ( !$name ) {
83
  return array();
84
  }
85
- $con_method = WDW_FM_Library::get('con_method', NULL);
86
- $con_type = WDW_FM_Library::get('con_type', NULL);
87
  $query = 'SHOW COLUMNS FROM `' . $name . '`';
88
  if ( $con_type == 'remote' ) {
89
- $username = WDW_FM_Library::get('username', '');
90
- $password = WDW_FM_Library::get('password', '');
91
- $database = WDW_FM_Library::get('database', '');
92
- $host = WDW_FM_Library::get('host', '');
93
  $wpdb_temp = new wpdb($username, $password, $database, $host);
94
  $table_struct = $wpdb_temp->get_results($query);
95
  }
3
  /**
4
  * Class FMModelFormMakerSQLMapping
5
  */
6
+ class FMModelFormMakerSQLMapping extends FMAdminModel {
7
  /**
8
  * Get query by id.
9
  *
39
  */
40
  function get_tables() {
41
  global $wpdb;
42
+ $con_type = WDW_FM_Library(self::PLUGIN)->get('con_type', NULL);
43
  if ( $con_type == 'local' ) {
44
  $query = "SHOW TABLES";
45
  $tables = $wpdb->get_col($query);
46
  }
47
  else {
48
  if ( $con_type == 'remote' ) {
49
+ $username = WDW_FM_Library(self::PLUGIN)->get('username', '');
50
+ $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
51
+ $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
52
+ $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
53
  $wpdb_temp = new wpdb($username, $password, $database, $host);
54
  $query = "SHOW TABLES";
55
  $tables = $wpdb_temp->get_col($query);
78
 
79
  function get_table_struct() {
80
  global $wpdb;
81
+ $name = WDW_FM_Library(self::PLUGIN)->get('name', NULL);
82
  if ( !$name ) {
83
  return array();
84
  }
85
+ $con_method = WDW_FM_Library(self::PLUGIN)->get('con_method', NULL);
86
+ $con_type = WDW_FM_Library(self::PLUGIN)->get('con_type', NULL);
87
  $query = 'SHOW COLUMNS FROM `' . $name . '`';
88
  if ( $con_type == 'remote' ) {
89
+ $username = WDW_FM_Library(self::PLUGIN)->get('username', '');
90
+ $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
91
+ $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
92
+ $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
93
  $wpdb_temp = new wpdb($username, $password, $database, $host);
94
  $table_struct = $wpdb_temp->get_results($query);
95
  }
admin/models/FormMakerSubmits.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelFormMakerSubmits
5
  */
6
- class FMModelFormMakerSubmits {
7
  public function get_from_label_order( $form_id ) {
8
  global $wpdb;
9
  $label_order = $wpdb->get_var($wpdb->prepare('SELECT `label_order` FROM `' . $wpdb->prefix . 'formmaker` WHERE id="%d"', $form_id));
3
  /**
4
  * Class FMModelFormMakerSubmits
5
  */
6
+ class FMModelFormMakerSubmits extends FMAdminModel {
7
  public function get_from_label_order( $form_id ) {
8
  global $wpdb;
9
  $label_order = $wpdb->get_var($wpdb->prepare('SELECT `label_order` FROM `' . $wpdb->prefix . 'formmaker` WHERE id="%d"', $form_id));
admin/models/Manage_fm.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelManage_fm
5
  */
6
- class FMModelManage_fm {
7
  /**
8
  * Get forms.
9
  *
@@ -15,15 +15,15 @@ class FMModelManage_fm {
15
  $order = $params['order'];
16
  $orderby = $params['orderby'];
17
  $items_per_page = $params['items_per_page'];
18
- $search = WDW_FM_Library::get('s', '');
19
- $page = (int) WDW_FM_Library::get('paged', 1);
20
  $limit = $page ? ($page - 1) * $items_per_page : 0;
21
 
22
  global $wpdb;
23
  $query = "SELECT t1.* FROM " . $wpdb->prefix . "formmaker as t1 ";
24
- $query .= (!WDFM()->is_free ? '' : 'WHERE t1.id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
25
  if ( $search ) {
26
- $query .= (!WDFM()->is_free ? 'WHERE' : ' AND') . ' t1.title LIKE "%' . $search . '%"';
27
  }
28
  $query .= ' ORDER BY t1.`' . $orderby . '` ' . $order;
29
  $query .= " LIMIT " . $limit . "," . $items_per_page;
@@ -50,7 +50,7 @@ class FMModelManage_fm {
50
  $row->title = '';
51
  $row->mail = '';
52
  $row->form = '';
53
- $row->form_front = '<div class="wdform-page-and-images wd-table"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row ui-sortable-handle">%1 - type_submit_reset_1%</div></div></div><div valign="top" class="wdform_footer wd-width-100"><div class="wd-width-100"><div class="wd-width-100 wd-table" style="padding-top:10px;"><div class="wd-table-group"><div id="form_id_temppage_nav1" class="wd-table-row"></div></div></div></div></div></div></div>';
54
  $row->theme = 0;
55
  $row->javascript = '';
56
  $row->submit_text = '';
@@ -115,7 +115,7 @@ class FMModelManage_fm {
115
  $row->title = '';
116
  $row->mail = '';
117
  $row->form = '';
118
- $row->form_front = '<div class="wdform-page-and-images" class="wd-table"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row ui-sortable-handle">%1 - type_submit_reset_1%</div></div></div><div valign="top" class="wdform_footer wd-width-100"><div class="wd-width-100"><div class="wd-width-100 wd-table" style="padding-top:10px;"><div class="wd-table-group"><div id="form_id_temppage_nav1" class="wd-table-row"></div></div></div></div></div></div></div>';
119
  $row->theme = $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'");
120
  $row->javascript = '';
121
  $row->submit_text = '';
@@ -324,7 +324,7 @@ class FMModelManage_fm {
324
  $param[$params_name] = $temp[0];
325
  $temp = $temp[1];
326
  }
327
- $rep = '<div id="wdform_field' . $id . '" type="type_section_break" class="wdform_field_section_break">' . $arrows . '<span id="' . $id . '_element_labelform_id_temp" style="display: none;">' . __('Section Break', WDFM()->prefix) . '</span><div id="' . $id . '_element_sectionform_id_temp" align="left" class="wdform_section_break">' . $param['w_editor'] . '</div></div><div id="' . $id . '_element_labelform_id_temp" style="color:red;">' . __('Section Break', WDFM()->prefix) . '</div>';
328
  break;
329
  }
330
  case 'type_editor': {
@@ -335,7 +335,7 @@ class FMModelManage_fm {
335
  $param[$params_name] = $temp[0];
336
  $temp = $temp[1];
337
  }
338
- $rep = '<div id="wdform_field' . $id . '" type="type_editor" class="wdform_field" >' . $param['w_editor'] . '</div>' . $arrows . '<div id="' . $id . '_element_labelform_id_temp" style="color: red;">' . __('Custom HTML', WDFM()->prefix) . $id . '</div>';
339
  break;
340
  }
341
  case 'type_send_copy': {
@@ -856,7 +856,7 @@ class FMModelManage_fm {
856
  $g++;
857
  if ( $w_disabled_fields[5] == 'yes' && $w_disabled_fields[6] == 'yes' ) {
858
  $address_fields .= '<span style="float: ' . (($g % 2 == 0) ? 'right' : 'left') . '; width: 48%; padding-bottom: 8px;"><select type="text" id="' . $id . '_stateform_id_temp" name="' . ($id + 3) . '_stateform_id_temp" style="width: 100%;" ' . $param['attributes'] . ' disabled >';
859
- $states = WDW_FM_Library::get_states();
860
  foreach ($states as $st => $state) {
861
  $address_fields .= '<option value="' . $st . '">' . $state . '</option>';
862
  }
@@ -872,7 +872,7 @@ class FMModelManage_fm {
872
  }
873
  if ( $w_disabled_fields[5] == 'no' ) {
874
  $g++;
875
- $countries_list = WDW_FM_Library::get_countries();
876
  $address_fields .= '<span style="float: ' . (($g % 2 == 0) ? 'right' : 'left') . '; width: 48%; padding-bottom: 8px;">
877
  <select type="text" id="' . $id . '_countryform_id_temp" name="' . ($id + 5) . '_countryform_id_temp" style="width: 100%;" ' . $param['attributes'] . ' disabled>';
878
  foreach ($countries_list as $value => $item) {
@@ -2057,7 +2057,7 @@ class FMModelManage_fm {
2057
  $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2058
  $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2059
  $rep = '<div id="wdform_field' . $id . '" type="type_captcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display:' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_captcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div valign="middle" style="display: table-cell;"><img type="captcha" digit="' . $param['w_digit'] . '" src="' . add_query_arg(array(
2060
- 'action' => 'formmakerwdcaptcha' . WDFM()->plugin_postfix,
2061
  'digit' => $param['w_digit'],
2062
  'i' => 'form_id_temp',
2063
  ), admin_url('admin-ajax.php')) . '" id="_wd_captchaform_id_temp" class="captcha_img" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div><div valign="middle" style="display: table-cell;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div></div></div><div style="display: table-row;"><div style="display: table-cell;"><input type="text" class="captcha_input" id="_wd_captcha_inputform_id_temp" name="captcha_input" style="width: ' . ($param['w_digit'] * 10 + 15) . 'px;" ' . $param['attributes'] . ' disabled/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/></div></div></div></div></div>';
@@ -2103,7 +2103,7 @@ class FMModelManage_fm {
2103
  $param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
2104
  $param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
2105
  $rep = '<div id="wdform_field' . $id . '" type="type_arithmetic_captcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display:' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_captcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;"><img type="captcha" operations_count="' . $param['w_count'] . '" operations="' . $param['w_operations'] . '" input_size="' . $param['w_input_size'] . '" src="' . add_query_arg(array(
2106
- 'action' => 'formmakerwdmathcaptcha' . WDFM()->plugin_postfix,
2107
  'operations_count' => $param['w_count'],
2108
  'operations' => urlencode($param['w_operations']),
2109
  'i' => 'form_id_temp',
@@ -2150,7 +2150,7 @@ class FMModelManage_fm {
2150
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
2151
  $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2152
  $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2153
- $rep = '<div id="wdform_field' . $id . '" type="type_recaptcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_recaptcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><div id="wd_recaptchaform_id_temp" w_type="' . $param['w_type'] . '" position="' . $param['w_position'] . '"><span style="color: red; font-style: italic;">' . __('No preview available for reCAPTCHA.', WDFM()->prefix) . '</span></div></div></div>';
2154
  break;
2155
  }
2156
  case 'type_hidden': {
@@ -2980,7 +2980,7 @@ class FMModelManage_fm {
2980
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
2981
  $images = '';
2982
  for ( $i = 0; $i < $param['w_star_amount']; $i++ ) {
2983
- $images .= '<img id="' . $id . '_star_' . $i . '" src="' . WDFM()->plugin_url . '/images/star.png?ver=' . WDFM()->plugin_version . '" onmouseover="change_src(' . $i . ',' . $id . ',&quot;form_id_temp&quot;)" onmouseout="reset_src(' . $i . ',' . $id . ')" onclick="select_star_rating(' . $i . ',' . $id . ', &quot;form_id_temp&quot;)">';
2984
  }
2985
  $rep = '<div id="wdform_field' . $id . '" type="type_star_rating" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_star_rating" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_star_amount'] . '" id="' . $id . '_star_amountform_id_temp" name="' . $id . '_star_amountform_id_temp"><input type="hidden" value="' . $param['w_field_label_col'] . '" name="' . $id . '_star_colorform_id_temp" id="' . $id . '_star_colorform_id_temp"><div id="' . $id . '_elementform_id_temp" class="wdform_stars" ' . $param['attributes'] . '>' . $images . '</div></div></div>';
2986
  break;
@@ -3399,11 +3399,11 @@ class FMModelManage_fm {
3399
  global $wpdb;
3400
  $query = "SELECT COUNT(*) FROM `" . $wpdb->prefix . "formmaker`";
3401
 
3402
- $search = WDW_FM_Library::get('s', '');
3403
 
3404
- $query .= (!WDFM()->is_free ? '' : 'WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
3405
  if ( $search ) {
3406
- $query .= (!WDFM()->is_free ? 'WHERE' : ' AND') . ' `title` LIKE "%' . $search . '%"';
3407
  }
3408
 
3409
  $total = $wpdb->get_var($query);
@@ -3719,7 +3719,7 @@ class FMModelManage_fm {
3719
  }
3720
 
3721
  public function create_js( $form_id ) {
3722
- WDW_FM_Library::create_js($form_id, true);
3723
  $jsversion = rand();
3724
  global $wpdb;
3725
  $wpdb->update($wpdb->prefix . 'formmaker', array(
@@ -3737,7 +3737,7 @@ class FMModelManage_fm {
3737
  */
3738
  public function insert_formmaker_backup( $backup_id, $id ) {
3739
  global $wpdb;
3740
- $query = "INSERT INTO " . $wpdb->prefix . "formmaker_backup SELECT " . $backup_id . " AS backup_id, 1 AS cur, formmakerbkup.id, formmakerbkup.title, formmakerbkup.type, formmakerbkup.mail, formmakerbkup.form_front, formmakerbkup.theme, formmakerbkup.javascript, formmakerbkup.submit_text, formmakerbkup.url, formmakerbkup.submit_text_type, formmakerbkup.script_mail, formmakerbkup.script_mail_user, formmakerbkup.counter, formmakerbkup.published, formmakerbkup.label_order, formmakerbkup.label_order_current, formmakerbkup.article_id, formmakerbkup.pagination, formmakerbkup.show_title, formmakerbkup.show_numbers, formmakerbkup.public_key, formmakerbkup.private_key, formmakerbkup.recaptcha_theme, formmakerbkup.paypal_mode, formmakerbkup.checkout_mode, formmakerbkup.paypal_email, formmakerbkup.payment_currency, formmakerbkup.tax, formmakerbkup.form_fields, formmakerbkup.savedb, formmakerbkup.sendemail, formmakerbkup.requiredmark, formmakerbkup.from_mail, formmakerbkup.from_name, formmakerbkup.reply_to, formmakerbkup.send_to, formmakerbkup.autogen_layout, formmakerbkup.custom_front, formmakerbkup.mail_from_user, formmakerbkup.mail_from_name_user, formmakerbkup.reply_to_user, formmakerbkup.condition, formmakerbkup.mail_cc, formmakerbkup.mail_cc_user, formmakerbkup.mail_bcc, formmakerbkup.mail_bcc_user, formmakerbkup.mail_subject, formmakerbkup.mail_subject_user, formmakerbkup.mail_mode, formmakerbkup.mail_mode_user, formmakerbkup.mail_attachment, formmakerbkup.mail_attachment_user, formmakerbkup.user_id_wd, formmakerbkup.sortable, formmakerbkup.frontend_submit_fields, formmakerbkup.frontend_submit_stat_fields, formmakerbkup.mail_emptyfields, formmakerbkup.mail_verify, formmakerbkup.mail_verify_expiretime, formmakerbkup.mail_verification_post_id, formmakerbkup.save_uploads, formmakerbkup.header_title, formmakerbkup.header_description, formmakerbkup.header_image_url, formmakerbkup.header_image_animation, formmakerbkup.header_hide_image FROM " . $wpdb->prefix . "formmaker as formmakerbkup WHERE id=" . $id;
3741
 
3742
  return $wpdb->query($query);
3743
  }
@@ -3817,7 +3817,7 @@ class FMModelManage_fm {
3817
  * @return string $guid
3818
  */
3819
  public function get_form_preview_post() {
3820
- $post_type = 'form-maker' . WDFM()->plugin_postfix;
3821
  $row = get_posts(array( 'post_type' => $post_type ));
3822
  if ( !empty($row[0]) ) {
3823
  return get_post_permalink($row[0]->ID);
@@ -3826,9 +3826,9 @@ class FMModelManage_fm {
3826
  $post_params = array(
3827
  'post_author' => 1,
3828
  'post_status' => 'publish',
3829
- 'post_content' => '[FormPreview' . WDFM()->plugin_postfix . ']',
3830
  'post_title' => 'Preview',
3831
- 'post_type' => 'form-maker' . WDFM()->plugin_postfix,
3832
  'comment_status' => 'closed',
3833
  'ping_status' => 'closed',
3834
  'post_parent' => 0,
3
  /**
4
  * Class FMModelManage_fm
5
  */
6
+ class FMModelManage_fm extends FMAdminModel {
7
  /**
8
  * Get forms.
9
  *
15
  $order = $params['order'];
16
  $orderby = $params['orderby'];
17
  $items_per_page = $params['items_per_page'];
18
+ $search = WDW_FM_Library(self::PLUGIN)->get('s', '');
19
+ $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
20
  $limit = $page ? ($page - 1) * $items_per_page : 0;
21
 
22
  global $wpdb;
23
  $query = "SELECT t1.* FROM " . $wpdb->prefix . "formmaker as t1 ";
24
+ $query .= (!WDFMInstance(self::PLUGIN)->is_free ? '' : 'WHERE t1.id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
25
  if ( $search ) {
26
+ $query .= (!WDFMInstance(self::PLUGIN)->is_free ? 'WHERE' : ' AND') . ' t1.title LIKE "%' . $search . '%"';
27
  }
28
  $query .= ' ORDER BY t1.`' . $orderby . '` ' . $order;
29
  $query .= " LIMIT " . $limit . "," . $items_per_page;
50
  $row->title = '';
51
  $row->mail = '';
52
  $row->form = '';
53
+ $row->form_front = '<div class="wdform-page-and-images wd-table"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="true" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row ui-sortable-handle">%1 - type_submit_reset_1%</div></div></div><div valign="top" class="wdform_footer wd-width-100"><div class="wd-width-100"><div class="wd-width-100 wd-table" style="padding-top:10px;"><div class="wd-table-group"><div id="form_id_temppage_nav1" class="wd-table-row"></div></div></div></div></div></div></div>';
54
  $row->theme = 0;
55
  $row->javascript = '';
56
  $row->submit_text = '';
115
  $row->title = '';
116
  $row->mail = '';
117
  $row->form = '';
118
+ $row->form_front = '<div class="wdform-page-and-images" class="wd-table"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="true" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row ui-sortable-handle">%1 - type_submit_reset_1%</div></div></div><div valign="top" class="wdform_footer wd-width-100"><div class="wd-width-100"><div class="wd-width-100 wd-table" style="padding-top:10px;"><div class="wd-table-group"><div id="form_id_temppage_nav1" class="wd-table-row"></div></div></div></div></div></div></div>';
119
  $row->theme = $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'");
120
  $row->javascript = '';
121
  $row->submit_text = '';
324
  $param[$params_name] = $temp[0];
325
  $temp = $temp[1];
326
  }
327
+ $rep = '<div id="wdform_field' . $id . '" type="type_section_break" class="wdform_field_section_break">' . $arrows . '<span id="' . $id . '_element_labelform_id_temp" style="display: none;">' . __('Section Break', WDFMInstance(self::PLUGIN)->prefix) . '</span><div id="' . $id . '_element_sectionform_id_temp" align="left" class="wdform_section_break">' . $param['w_editor'] . '</div></div><div id="' . $id . '_element_labelform_id_temp" style="color:red;">' . __('Section Break', WDFMInstance(self::PLUGIN)->prefix) . '</div>';
328
  break;
329
  }
330
  case 'type_editor': {
335
  $param[$params_name] = $temp[0];
336
  $temp = $temp[1];
337
  }
338
+ $rep = '<div id="wdform_field' . $id . '" type="type_editor" class="wdform_field" >' . $param['w_editor'] . '</div>' . $arrows . '<div id="' . $id . '_element_labelform_id_temp" style="color: red;">' . __('Custom HTML', WDFMInstance(self::PLUGIN)->prefix) . $id . '</div>';
339
  break;
340
  }
341
  case 'type_send_copy': {
856
  $g++;
857
  if ( $w_disabled_fields[5] == 'yes' && $w_disabled_fields[6] == 'yes' ) {
858
  $address_fields .= '<span style="float: ' . (($g % 2 == 0) ? 'right' : 'left') . '; width: 48%; padding-bottom: 8px;"><select type="text" id="' . $id . '_stateform_id_temp" name="' . ($id + 3) . '_stateform_id_temp" style="width: 100%;" ' . $param['attributes'] . ' disabled >';
859
+ $states = WDW_FM_Library(self::PLUGIN)->get_states();
860
  foreach ($states as $st => $state) {
861
  $address_fields .= '<option value="' . $st . '">' . $state . '</option>';
862
  }
872
  }
873
  if ( $w_disabled_fields[5] == 'no' ) {
874
  $g++;
875
+ $countries_list = WDW_FM_Library(self::PLUGIN)->get_countries();
876
  $address_fields .= '<span style="float: ' . (($g % 2 == 0) ? 'right' : 'left') . '; width: 48%; padding-bottom: 8px;">
877
  <select type="text" id="' . $id . '_countryform_id_temp" name="' . ($id + 5) . '_countryform_id_temp" style="width: 100%;" ' . $param['attributes'] . ' disabled>';
878
  foreach ($countries_list as $value => $item) {
2057
  $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2058
  $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2059
  $rep = '<div id="wdform_field' . $id . '" type="type_captcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display:' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_captcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div valign="middle" style="display: table-cell;"><img type="captcha" digit="' . $param['w_digit'] . '" src="' . add_query_arg(array(
2060
+ 'action' => 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix,
2061
  'digit' => $param['w_digit'],
2062
  'i' => 'form_id_temp',
2063
  ), admin_url('admin-ajax.php')) . '" id="_wd_captchaform_id_temp" class="captcha_img" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div><div valign="middle" style="display: table-cell;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div></div></div><div style="display: table-row;"><div style="display: table-cell;"><input type="text" class="captcha_input" id="_wd_captcha_inputform_id_temp" name="captcha_input" style="width: ' . ($param['w_digit'] * 10 + 15) . 'px;" ' . $param['attributes'] . ' disabled/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/></div></div></div></div></div>';
2103
  $param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
2104
  $param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
2105
  $rep = '<div id="wdform_field' . $id . '" type="type_arithmetic_captcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display:' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_captcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;"><img type="captcha" operations_count="' . $param['w_count'] . '" operations="' . $param['w_operations'] . '" input_size="' . $param['w_input_size'] . '" src="' . add_query_arg(array(
2106
+ 'action' => 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix,
2107
  'operations_count' => $param['w_count'],
2108
  'operations' => urlencode($param['w_operations']),
2109
  'i' => 'form_id_temp',
2150
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
2151
  $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2152
  $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2153
+ $rep = '<div id="wdform_field' . $id . '" type="type_recaptcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_recaptcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><div id="wd_recaptchaform_id_temp" w_type="' . $param['w_type'] . '" position="' . $param['w_position'] . '"><span style="color: red; font-style: italic;">' . __('No preview available for reCAPTCHA.', WDFMInstance(self::PLUGIN)->prefix) . '</span></div></div></div>';
2154
  break;
2155
  }
2156
  case 'type_hidden': {
2980
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
2981
  $images = '';
2982
  for ( $i = 0; $i < $param['w_star_amount']; $i++ ) {
2983
+ $images .= '<img id="' . $id . '_star_' . $i . '" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onmouseover="change_src(' . $i . ',' . $id . ',&quot;form_id_temp&quot;)" onmouseout="reset_src(' . $i . ',' . $id . ')" onclick="select_star_rating(' . $i . ',' . $id . ', &quot;form_id_temp&quot;)">';
2984
  }
2985
  $rep = '<div id="wdform_field' . $id . '" type="type_star_rating" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_star_rating" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_star_amount'] . '" id="' . $id . '_star_amountform_id_temp" name="' . $id . '_star_amountform_id_temp"><input type="hidden" value="' . $param['w_field_label_col'] . '" name="' . $id . '_star_colorform_id_temp" id="' . $id . '_star_colorform_id_temp"><div id="' . $id . '_elementform_id_temp" class="wdform_stars" ' . $param['attributes'] . '>' . $images . '</div></div></div>';
2986
  break;
3399
  global $wpdb;
3400
  $query = "SELECT COUNT(*) FROM `" . $wpdb->prefix . "formmaker`";
3401
 
3402
+ $search = WDW_FM_Library(self::PLUGIN)->get('s', '');
3403
 
3404
+ $query .= (!WDFMInstance(self::PLUGIN)->is_free ? '' : 'WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
3405
  if ( $search ) {
3406
+ $query .= (!WDFMInstance(self::PLUGIN)->is_free ? 'WHERE' : ' AND') . ' `title` LIKE "%' . $search . '%"';
3407
  }
3408
 
3409
  $total = $wpdb->get_var($query);
3719
  }
3720
 
3721
  public function create_js( $form_id ) {
3722
+ WDW_FM_Library(self::PLUGIN)->create_js($form_id, true);
3723
  $jsversion = rand();
3724
  global $wpdb;
3725
  $wpdb->update($wpdb->prefix . 'formmaker', array(
3737
  */
3738
  public function insert_formmaker_backup( $backup_id, $id ) {
3739
  global $wpdb;
3740
+ $query = "INSERT INTO " . $wpdb->prefix . "formmaker_backup (backup_id, cur, id, title, `type`, mail, form_front, theme, javascript, submit_text, url, submit_text_type, script_mail, script_mail_user, counter, published, label_order, label_order_current, article_id, pagination, show_title, show_numbers, public_key, private_key, recaptcha_theme, paypal_mode, checkout_mode, paypal_email, payment_currency, tax, form_fields, savedb, sendemail, requiredmark, from_mail, from_name, reply_to, send_to, autogen_layout, custom_front, mail_from_user, mail_from_name_user, reply_to_user, `condition`, mail_cc, mail_cc_user, mail_bcc, mail_bcc_user, mail_subject, mail_subject_user, mail_mode, mail_mode_user, mail_attachment, mail_attachment_user, user_id_wd, sortable, frontend_submit_fields, frontend_submit_stat_fields, mail_emptyfields, mail_verify, mail_verify_expiretime, mail_verification_post_id, save_uploads, header_title, header_description, header_image_url, header_image_animation, header_hide_image) SELECT " . $backup_id . ", 1, formmakerbkup.id, formmakerbkup.title, formmakerbkup.type, formmakerbkup.mail, formmakerbkup.form_front, formmakerbkup.theme, formmakerbkup.javascript, formmakerbkup.submit_text, formmakerbkup.url, formmakerbkup.submit_text_type, formmakerbkup.script_mail, formmakerbkup.script_mail_user, formmakerbkup.counter, formmakerbkup.published, formmakerbkup.label_order, formmakerbkup.label_order_current, formmakerbkup.article_id, formmakerbkup.pagination, formmakerbkup.show_title, formmakerbkup.show_numbers, formmakerbkup.public_key, formmakerbkup.private_key, formmakerbkup.recaptcha_theme, formmakerbkup.paypal_mode, formmakerbkup.checkout_mode, formmakerbkup.paypal_email, formmakerbkup.payment_currency, formmakerbkup.tax, formmakerbkup.form_fields, formmakerbkup.savedb, formmakerbkup.sendemail, formmakerbkup.requiredmark, formmakerbkup.from_mail, formmakerbkup.from_name, formmakerbkup.reply_to, formmakerbkup.send_to, formmakerbkup.autogen_layout, formmakerbkup.custom_front, formmakerbkup.mail_from_user, formmakerbkup.mail_from_name_user, formmakerbkup.reply_to_user, formmakerbkup.condition, formmakerbkup.mail_cc, formmakerbkup.mail_cc_user, formmakerbkup.mail_bcc, formmakerbkup.mail_bcc_user, formmakerbkup.mail_subject, formmakerbkup.mail_subject_user, formmakerbkup.mail_mode, formmakerbkup.mail_mode_user, formmakerbkup.mail_attachment, formmakerbkup.mail_attachment_user, formmakerbkup.user_id_wd, formmakerbkup.sortable, formmakerbkup.frontend_submit_fields, formmakerbkup.frontend_submit_stat_fields, formmakerbkup.mail_emptyfields, formmakerbkup.mail_verify, formmakerbkup.mail_verify_expiretime, formmakerbkup.mail_verification_post_id, formmakerbkup.save_uploads, formmakerbkup.header_title, formmakerbkup.header_description, formmakerbkup.header_image_url, formmakerbkup.header_image_animation, formmakerbkup.header_hide_image FROM " . $wpdb->prefix . "formmaker as formmakerbkup WHERE id=" . $id;
3741
 
3742
  return $wpdb->query($query);
3743
  }
3817
  * @return string $guid
3818
  */
3819
  public function get_form_preview_post() {
3820
+ $post_type = 'form-maker' . WDFMInstance(self::PLUGIN)->plugin_postfix;
3821
  $row = get_posts(array( 'post_type' => $post_type ));
3822
  if ( !empty($row[0]) ) {
3823
  return get_post_permalink($row[0]->ID);
3826
  $post_params = array(
3827
  'post_author' => 1,
3828
  'post_status' => 'publish',
3829
+ 'post_content' => '[FormPreview' . WDFMInstance(self::PLUGIN)->plugin_postfix . ']',
3830
  'post_title' => 'Preview',
3831
+ 'post_type' => 'form-maker' . WDFMInstance(self::PLUGIN)->plugin_postfix,
3832
  'comment_status' => 'closed',
3833
  'ping_status' => 'closed',
3834
  'post_parent' => 0,
admin/models/Options_fm.php CHANGED
@@ -3,18 +3,18 @@
3
  /**
4
  * Class FMModelOptions_fm
5
  */
6
- class FMModelOptions_fm {
7
  /**
8
  * Save data to DB.
9
  */
10
  public function save_db() {
11
- $public_key = WDW_FM_Library::get('public_key', '');
12
- $private_key = WDW_FM_Library::get('private_key', '');
13
  $csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter'] != '' ? esc_html(stripslashes($_POST['csv_delimiter'])) : ',');
14
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
15
- $fm_advanced_layout = WDW_FM_Library::get('fm_advanced_layout', '0');
16
- $map_key = WDW_FM_Library::get('map_key', '');
17
- update_option('fm_settings', array(
18
  'public_key' => $public_key,
19
  'private_key' => $private_key,
20
  'csv_delimiter' => $csv_delimiter,
3
  /**
4
  * Class FMModelOptions_fm
5
  */
6
+ class FMModelOptions_fm extends FMAdminModel {
7
  /**
8
  * Save data to DB.
9
  */
10
  public function save_db() {
11
+ $public_key = WDW_FM_Library(self::PLUGIN)->get('public_key', '');
12
+ $private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
13
  $csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter'] != '' ? esc_html(stripslashes($_POST['csv_delimiter'])) : ',');
14
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
15
+ $fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
16
+ $map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
17
+ update_option((WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings'), array(
18
  'public_key' => $public_key,
19
  'private_key' => $private_key,
20
  'csv_delimiter' => $csv_delimiter,
admin/models/Submissions_fm.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMModelSubmissions_fm
5
  */
6
- class FMModelSubmissions_fm {
7
  public function blocked_ips() {
8
  global $wpdb;
9
  $ips = $wpdb->get_col('SELECT ip FROM ' . $wpdb->prefix . 'formmaker_blocked');
@@ -18,7 +18,7 @@ class FMModelSubmissions_fm {
18
  */
19
  public function get_forms() {
20
  global $wpdb;
21
- $query = "SELECT `id`, `title`, `published` FROM " . $wpdb->prefix . "formmaker " . (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')') . " ORDER BY `title`";
22
  $results = $wpdb->get_results($query);
23
  $forms = array();
24
  if( !empty($results) ) {
@@ -561,10 +561,10 @@ class FMModelSubmissions_fm {
561
  $stars = "";
562
  $new_filename = explode('***', $new_filename);
563
  for ( $j = 0; $j < $new_filename[1]; $j++ ) {
564
- $stars .= '<img id="' . $element_label . '_star_' . $j . '" src="' . WDFM()->plugin_url . '/images/star_' . $new_filename[2] . '.png?ver=' . WDFM()->plugin_version . '" /> ';
565
  }
566
  for ( $k = $new_filename[1]; $k < $new_filename[0]; $k++ ) {
567
- $stars .= '<img id="' . $element_label . '_star_' . $k . '" src="' . WDFM()->plugin_url . '/images/star.png?ver=' . WDFM()->plugin_version . '" /> ';
568
  }
569
  array_push($view_star_rating_array, $stars);
570
 
@@ -594,10 +594,10 @@ class FMModelSubmissions_fm {
594
  $element_value1 = str_replace("***star_rating***", '', $element_value);
595
  $stars_value = explode('/', $element_value1);
596
  for ( $j = 0; $j < $stars_value[0]; $j++ ) {
597
- $edit_stars .= '<img id="' . $label_id . '_star_' . $j . '" onclick="edit_star_rating(' . $j . ',' . $label_id . ')" src="' . WDFM()->plugin_url . '/images/star_yellow.png?ver=' . WDFM()->plugin_version . '" /> ';
598
  }
599
  for ( $k = $stars_value[0]; $k < $stars_value[1]; $k++ ) {
600
- $edit_stars .= '<img id="' . $label_id . '_star_' . $k . '" onclick="edit_star_rating(' . $k . ',' . $label_id . ')" src="' . WDFM()->plugin_url . '/images/star.png?ver=' . WDFM()->plugin_version . '" /> ';
601
  }
602
  array_push($star_rating_array, $edit_stars);
603
  array_push($star_rating_array, $stars_value);
3
  /**
4
  * Class FMModelSubmissions_fm
5
  */
6
+ class FMModelSubmissions_fm extends FMAdminModel {
7
  public function blocked_ips() {
8
  global $wpdb;
9
  $ips = $wpdb->get_col('SELECT ip FROM ' . $wpdb->prefix . 'formmaker_blocked');
18
  */
19
  public function get_forms() {
20
  global $wpdb;
21
+ $query = "SELECT `id`, `title`, `published` FROM " . $wpdb->prefix . "formmaker " . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')') . " ORDER BY `title`";
22
  $results = $wpdb->get_results($query);
23
  $forms = array();
24
  if( !empty($results) ) {
561
  $stars = "";
562
  $new_filename = explode('***', $new_filename);
563
  for ( $j = 0; $j < $new_filename[1]; $j++ ) {
564
+ $stars .= '<img id="' . $element_label . '_star_' . $j . '" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star_' . $new_filename[2] . '.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" /> ';
565
  }
566
  for ( $k = $new_filename[1]; $k < $new_filename[0]; $k++ ) {
567
+ $stars .= '<img id="' . $element_label . '_star_' . $k . '" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" /> ';
568
  }
569
  array_push($view_star_rating_array, $stars);
570
 
594
  $element_value1 = str_replace("***star_rating***", '', $element_value);
595
  $stars_value = explode('/', $element_value1);
596
  for ( $j = 0; $j < $stars_value[0]; $j++ ) {
597
+ $edit_stars .= '<img id="' . $label_id . '_star_' . $j . '" onclick="edit_star_rating(' . $j . ',' . $label_id . ')" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star_yellow.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" /> ';
598
  }
599
  for ( $k = $stars_value[0]; $k < $stars_value[1]; $k++ ) {
600
+ $edit_stars .= '<img id="' . $label_id . '_star_' . $k . '" onclick="edit_star_rating(' . $k . ',' . $label_id . ')" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" /> ';
601
  }
602
  array_push($star_rating_array, $edit_stars);
603
  array_push($star_rating_array, $stars_value);
admin/models/Themes_fm.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class FMModelThemes_fm {
4
  /**
5
  * Get rows data.
6
  *
1
  <?php
2
 
3
+ class FMModelThemes_fm extends FMAdminModel {
4
  /**
5
  * Get rows data.
6
  *
admin/models/Uninstall_fm.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
 
3
- class FMModelUninstall_fm {
4
  public function delete_db_tables() {
5
  global $wpdb;
6
- $true_or_false_forms = !WDFM()->is_free ? false : $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'formmaker WHERE `id`' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
7
  if ($true_or_false_forms) {
8
- $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE `id`' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
9
- $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE `form_id`' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
10
- $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE `form_id`' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
11
  }
12
  else {
13
  $email_verification_post_id = $wpdb->get_var('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE mail_verification_post_id != 0');
1
  <?php
2
 
3
+ class FMModelUninstall_fm extends FMAdminModel {
4
  public function delete_db_tables() {
5
  global $wpdb;
6
+ $true_or_false_forms = !WDFMInstance(self::PLUGIN)->is_free ? false : $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'formmaker WHERE `id`' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
7
  if ($true_or_false_forms) {
8
+ $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE `id`' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
9
+ $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE `form_id`' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
10
+ $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE `form_id`' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
11
  }
12
  else {
13
  $email_verification_post_id = $wpdb->get_var('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE mail_verification_post_id != 0');
admin/models/Widget.php CHANGED
@@ -4,11 +4,16 @@
4
  * Class FMModelWidget
5
  */
6
  class FMModelWidget {
 
 
 
 
 
7
  public function get_gallery_rows_data() {
8
  global $wpdb;
9
  $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker';
10
- if ( WDFM()->is_free && !function_exists('WDCFM') ) {
11
- $query .= (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
12
  }
13
  $query .= ' order by `title`';
14
  $rows = $wpdb->get_results($query);
4
  * Class FMModelWidget
5
  */
6
  class FMModelWidget {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  public function get_gallery_rows_data() {
13
  global $wpdb;
14
  $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker';
15
+ if ( WDFMInstance(self::PLUGIN)->is_free && !class_exists('WDCFM') ) {
16
+ $query .= (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
17
  }
18
  $query .= ' order by `title`';
19
  $rows = $wpdb->get_results($query);
admin/models/model.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin model class.
4
+ */
5
+ class FMAdminModel {
6
+ /**
7
+ * PLUGIN = 2 points to Contact Form Maker
8
+ */
9
+ const PLUGIN = 1;
10
+ }
admin/views/Addons_fm.php CHANGED
@@ -4,13 +4,13 @@
4
  * Class FMViewAddons_fm
5
  */
6
  class FMViewAddons_fm extends FMAdminView {
7
- /**
8
  * FMViewAddons_fm constructor.
9
  */
10
  public function __construct() {
11
- wp_enqueue_style('fm-style');
12
- wp_enqueue_style('fm-pricing');
13
- wp_enqueue_script('fm-admin');
14
  }
15
 
16
  public function display( $params = array() ) {
@@ -20,9 +20,9 @@ class FMViewAddons_fm extends FMAdminView {
20
  echo $this->body($params);
21
  // Pass the content to form.
22
  $form_attr = array(
23
- 'id' => WDFM()->prefix . '_addons',
24
- 'name' => WDFM()->prefix . '_addons',
25
- 'class' => WDFM()->prefix . '_addons wd-form',
26
  'action' => add_query_arg( array('page' => $page, 'task' => 'display'), $page_url),
27
  );
28
  echo $this->form(ob_get_clean(), $form_attr);
@@ -43,7 +43,7 @@ class FMViewAddons_fm extends FMAdminView {
43
  if ( is_plugin_active( $addon['dir'] ) ) {
44
  $activated = true;
45
  }
46
- $premium_version = ( WDFM()->is_free && $addon['pro'] ) ? true : false;
47
  ?>
48
  <div class="fm-add-on<?php echo (!$premium_version) ? ' fm-not-premium-version' : ''; echo ( $activated ) ? ' fm-add-on-activated': ''?>">
49
  <div class="fm-add-on-img">
@@ -58,7 +58,7 @@ class FMViewAddons_fm extends FMAdminView {
58
  else { echo $addon['name']; } ?>
59
  </h2>
60
  <p class="fm-add-on-premium-version">
61
- <?php echo $premium_version ? __('Compatible with Premium version only', WDFM()->prefix) : '&nbsp;'; ?>
62
  </p>
63
  <div class="fm-add-on-desc-more-wrap">
64
  <div class="fm-add-on-desc">
@@ -69,11 +69,11 @@ class FMViewAddons_fm extends FMAdminView {
69
  <?php } ?>
70
  </div>
71
  <?php if ( $activated ) { ?>
72
- <span class="fm-add-on-buy" target="_blank"><?php _e('Activated', WDFM()->prefix); ?></span>
73
  <?php } else { ?>
74
- <a href="<?php echo $addon['url'] ?>" class="fm-add-on-buy" target="_blank"><?php _e('Get this add on', WDFM()->prefix); ?></a>
75
  <?php } ?>
76
- <a href="<?php echo $addon['url'] ?>" target="_blank" class="fm-add-on-learn-more"><?php _e('Learn More', WDFM()->prefix); ?></a>
77
  </div>
78
  <?php
79
  }
4
  * Class FMViewAddons_fm
5
  */
6
  class FMViewAddons_fm extends FMAdminView {
7
+ /**
8
  * FMViewAddons_fm constructor.
9
  */
10
  public function __construct() {
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
12
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-pricing');
13
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
14
  }
15
 
16
  public function display( $params = array() ) {
20
  echo $this->body($params);
21
  // Pass the content to form.
22
  $form_attr = array(
23
+ 'id' => WDFMInstance(self::PLUGIN)->prefix . '_addons',
24
+ 'name' => WDFMInstance(self::PLUGIN)->prefix . '_addons',
25
+ 'class' => WDFMInstance(self::PLUGIN)->prefix . '_addons wd-form',
26
  'action' => add_query_arg( array('page' => $page, 'task' => 'display'), $page_url),
27
  );
28
  echo $this->form(ob_get_clean(), $form_attr);
43
  if ( is_plugin_active( $addon['dir'] ) ) {
44
  $activated = true;
45
  }
46
+ $premium_version = ( WDFMInstance(self::PLUGIN)->is_free && $addon['pro'] ) ? true : false;
47
  ?>
48
  <div class="fm-add-on<?php echo (!$premium_version) ? ' fm-not-premium-version' : ''; echo ( $activated ) ? ' fm-add-on-activated': ''?>">
49
  <div class="fm-add-on-img">
58
  else { echo $addon['name']; } ?>
59
  </h2>
60
  <p class="fm-add-on-premium-version">
61
+ <?php echo $premium_version ? __('Compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix) : '&nbsp;'; ?>
62
  </p>
63
  <div class="fm-add-on-desc-more-wrap">
64
  <div class="fm-add-on-desc">
69
  <?php } ?>
70
  </div>
71
  <?php if ( $activated ) { ?>
72
+ <span class="fm-add-on-buy" target="_blank"><?php _e('Activated', WDFMInstance(self::PLUGIN)->prefix); ?></span>
73
  <?php } else { ?>
74
+ <a href="<?php echo $addon['url'] ?>" class="fm-add-on-buy" target="_blank"><?php _e('Get this add on', WDFMInstance(self::PLUGIN)->prefix); ?></a>
75
  <?php } ?>
76
+ <a href="<?php echo $addon['url'] ?>" target="_blank" class="fm-add-on-learn-more"><?php _e('Learn More', WDFMInstance(self::PLUGIN)->prefix); ?></a>
77
  </div>
78
  <?php
79
  }
admin/views/Blocked_ips_fm.php CHANGED
@@ -7,13 +7,13 @@ class FMViewBlocked_ips_fm extends FMAdminView {
7
  * FMViewBlocked_ips_fm constructor.
8
  */
9
  public function __construct() {
10
- wp_enqueue_style('fm-tables');
11
- wp_enqueue_style('fm-first');
12
- wp_enqueue_style('fm-style');
13
- wp_enqueue_style('fm-layout');
14
 
15
  wp_enqueue_script('jquery');
16
- wp_enqueue_script('fm-admin');
17
  }
18
 
19
  /**
@@ -26,7 +26,7 @@ class FMViewBlocked_ips_fm extends FMAdminView {
26
  $form_attr = array(
27
  'id' => 'blocked_ips',
28
  'class' => 'wd-form',
29
- 'action' => add_query_arg(array('page' => 'blocked_ips' . WDFM()->menu_postfix), 'admin.php'),
30
  );
31
  echo $this->form(ob_get_clean(), $form_attr);
32
  }
@@ -48,11 +48,11 @@ class FMViewBlocked_ips_fm extends FMAdminView {
48
 
49
  $page_url = add_query_arg(array(
50
  'page' => $page,
51
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
52
  ), admin_url('admin.php'));
53
 
54
  echo $this->title(array(
55
- 'title' => __('Blocked IPs', WDFM()->prefix),
56
  'title_class' => 'wd-header',
57
  'add_new_button' => FALSE,
58
  ));
@@ -70,18 +70,18 @@ class FMViewBlocked_ips_fm extends FMAdminView {
70
  <thead>
71
  <tr>
72
  <td id="cb" class="manage-column column-cb check-column">
73
- <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFM()->prefix); ?></label>
74
  <input id="check_all" type="checkbox" />
75
  </td>
76
- <?php echo WDW_FM_Library::ordering('ip', $orderby, $order, __('IP', WDFM()->prefix), $page_url, 'column-primary col_type wd-left'); ?>
77
  </tr>
78
  <tr id="tr">
79
  <th></th>
80
 
81
  <td>
82
  <input type="text" class="input_th" id="fm_ip" name="ip" onkeypress="fm_enter_ip(event); return fm_check_isnum(event)">
83
- <input type = button class="button action" id="add_ip" onclick="if (fm_check_required('fm_ip', '<?php _e('IP', WDFM()->prefix); ?>')) {return false;} fm_insert_blocked_ip('blocked_ips'); " value="<?php _e('Add IP', WDFM()->prefix); ?>">
84
- <div class="loading"><img src="<?php echo WDFM()->plugin_url ?>/images/loading.gif"></div>
85
  </td>
86
  </tr>
87
 
@@ -97,23 +97,23 @@ class FMViewBlocked_ips_fm extends FMAdminView {
97
  <input id="check_<?php echo $row_data->id; ?>" name="check[<?php echo $row_data->id; ?>]" type="checkbox" />
98
  </th>
99
 
100
- <td class="column-primary" id="td_ip_<?php echo $row_data->id; ?>" data-colname="<?php _e('IP', WDFM()->prefix); ?>">
101
 
102
  <strong class="wd_ip_name_<?php echo $row_data->id; ?>">
103
  <a class="pointer" id="ip<?php echo $row_data->id; ?>" onclick="fm_edit_ip(<?php echo $row_data->id; ?>)" title="Edit"><?php echo $row_data->ip; ?></a>
104
 
105
  </strong>
106
- <div class="loading"><img src="<?php echo WDFM()->plugin_url ?>/images/loading.gif"></div>
107
 
108
  <div class="row-actions">
109
 
110
  <span id="td_edit_<?php echo $row_data->id; ?>">
111
- <a class="pointer" onclick="fm_edit_ip(<?php echo $row_data->id; ?>);"> <?php _e('Edit', WDFM()->prefix); ?> </a>
112
  |
113
  </span>
114
 
115
  <span class="trash" id="td_delete_<?php echo $row_data->id; ?>">
116
- <a class="pointer" onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFM()->prefix)); ?>')) {return false;} fm_delete_ip(<?php echo $row_data->id; ?>) "><?php _e('Delete', WDFM()->prefix); ?></a>
117
  </span>
118
  </div>
119
  </td>
@@ -122,7 +122,7 @@ class FMViewBlocked_ips_fm extends FMAdminView {
122
  }
123
  }
124
  else {
125
- echo WDW_FM_Library::no_items('IPs');
126
  }
127
  ?>
128
  </tbody>
7
  * FMViewBlocked_ips_fm constructor.
8
  */
9
  public function __construct() {
10
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-first');
12
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
13
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-layout');
14
 
15
  wp_enqueue_script('jquery');
16
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
17
  }
18
 
19
  /**
26
  $form_attr = array(
27
  'id' => 'blocked_ips',
28
  'class' => 'wd-form',
29
+ 'action' => add_query_arg(array('page' => 'blocked_ips' . WDFMInstance(self::PLUGIN)->menu_postfix), 'admin.php'),
30
  );
31
  echo $this->form(ob_get_clean(), $form_attr);
32
  }
48
 
49
  $page_url = add_query_arg(array(
50
  'page' => $page,
51
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
52
  ), admin_url('admin.php'));
53
 
54
  echo $this->title(array(
55
+ 'title' => __('Blocked IPs', WDFMInstance(self::PLUGIN)->prefix),
56
  'title_class' => 'wd-header',
57
  'add_new_button' => FALSE,
58
  ));
70
  <thead>
71
  <tr>
72
  <td id="cb" class="manage-column column-cb check-column">
73
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix); ?></label>
74
  <input id="check_all" type="checkbox" />
75
  </td>
76
+ <?php echo WDW_FM_Library(self::PLUGIN)->ordering('ip', $orderby, $order, __('IP', WDFMInstance(self::PLUGIN)->prefix), $page_url, 'column-primary col_type wd-left'); ?>
77
  </tr>
78
  <tr id="tr">
79
  <th></th>
80
 
81
  <td>
82
  <input type="text" class="input_th" id="fm_ip" name="ip" onkeypress="fm_enter_ip(event); return fm_check_isnum(event)">
83
+ <input type = button class="button action" id="add_ip" onclick="if (fm_check_required('fm_ip', '<?php _e('IP', WDFMInstance(self::PLUGIN)->prefix); ?>')) {return false;} fm_insert_blocked_ip('blocked_ips'); " value="<?php _e('Add IP', WDFMInstance(self::PLUGIN)->prefix); ?>">
84
+ <div class="loading"><img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url ?>/images/loading.gif"></div>
85
  </td>
86
  </tr>
87
 
97
  <input id="check_<?php echo $row_data->id; ?>" name="check[<?php echo $row_data->id; ?>]" type="checkbox" />
98
  </th>
99
 
100
+ <td class="column-primary" id="td_ip_<?php echo $row_data->id; ?>" data-colname="<?php _e('IP', WDFMInstance(self::PLUGIN)->prefix); ?>">
101
 
102
  <strong class="wd_ip_name_<?php echo $row_data->id; ?>">
103
  <a class="pointer" id="ip<?php echo $row_data->id; ?>" onclick="fm_edit_ip(<?php echo $row_data->id; ?>)" title="Edit"><?php echo $row_data->ip; ?></a>
104
 
105
  </strong>
106
+ <div class="loading"><img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url ?>/images/loading.gif"></div>
107
 
108
  <div class="row-actions">
109
 
110
  <span id="td_edit_<?php echo $row_data->id; ?>">
111
+ <a class="pointer" onclick="fm_edit_ip(<?php echo $row_data->id; ?>);"> <?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?> </a>
112
  |
113
  </span>
114
 
115
  <span class="trash" id="td_delete_<?php echo $row_data->id; ?>">
116
+ <a class="pointer" onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFMInstance(self::PLUGIN)->prefix)); ?>')) {return false;} fm_delete_ip(<?php echo $row_data->id; ?>) "><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></a>
117
  </span>
118
  </div>
119
  </td>
122
  }
123
  }
124
  else {
125
+ echo WDW_FM_Library(self::PLUGIN)->no_items('IPs');
126
  }
127
  ?>
128
  </tbody>
admin/views/Checkpaypal.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewCheckpaypal
5
  */
6
- class FMViewCheckpaypal {
7
  /**
8
  * Payment information template.
9
  *
@@ -22,75 +22,75 @@ class FMViewCheckpaypal {
22
  ?>
23
  <table class="admintable" border="1">
24
  <tr>
25
- <td class="key"><?php _e('Currency', WDFM()->prefix); ?></td>
26
  <td><?php echo $currency; ?></td>
27
  </tr>
28
  <tr>
29
- <td class="key"><?php _e('Date', WDFM()->prefix); ?></td>
30
  <td><?php echo $form_session->ord_last_modified; ?></td>
31
  </tr>
32
  <tr>
33
- <td class="key"><?php _e('Status', WDFM()->prefix); ?></td>
34
  <td><?php echo $form_session->status; ?></td>
35
  </tr>
36
  <tr>
37
- <td class="key"><?php _e('Full name', WDFM()->prefix); ?></td>
38
  <td><?php echo $form_session->full_name; ?></td>
39
  </tr>
40
  <tr>
41
- <td class="key"><?php _e('Email', WDFM()->prefix); ?></td>
42
  <td><?php echo $form_session->email; ?></td>
43
  </tr>
44
  <tr>
45
- <td class="key"><?php _e('Phone', WDFM()->prefix); ?></td>
46
  <td><?php echo $form_session->phone; ?></td>
47
  </tr>
48
  <tr>
49
- <td class="key"><?php _e('Mobile phone', WDFM()->prefix); ?></td>
50
  <td><?php echo $form_session->mobile_phone; ?></td>
51
  </tr>
52
  <tr>
53
- <td class="key"><?php _e('Fax', WDFM()->prefix); ?></td>
54
  <td><?php echo $form_session->fax; ?></td>
55
  </tr>
56
  <tr>
57
- <td class="key"><?php _e('Address', WDFM()->prefix); ?></td>
58
  <td><?php echo $form_session->address; ?></td>
59
  </tr>
60
  <tr>
61
- <td class="key"><?php _e('Payment info', WDFM()->prefix); ?></td>
62
  <td><?php echo $form_session->paypal_info; ?></td>
63
  </tr>
64
  <tr>
65
- <td class="key"><?php _e('IPN', WDFM()->prefix); ?></td>
66
  <td><?php echo $form_session->ipn; ?></td>
67
  </tr>
68
  <tr>
69
- <td class="key"><?php _e('tax', WDFM()->prefix); ?></td>
70
  <td><?php echo $form_session->tax; ?>%</td>
71
  </tr>
72
  <tr>
73
- <td class="key"><?php _e('shipping', WDFM()->prefix); ?></td>
74
  <td><?php echo $form_session->shipping; ?></td>
75
  </tr>
76
  <tr>
77
- <td class="key"><?php _e('read', WDFM()->prefix); ?></td>
78
  <td><?php echo $form_session->read; ?></td>
79
  </tr>
80
  <tr>
81
- <td class="key"><b><?php _e('Item total', WDFM()->prefix); ?></b></td>
82
  <td><?php echo ($total - $tax - $shipping) . $currency; ?></td>
83
  </tr>
84
  <tr>
85
- <td class="key"><b><?php _e('Tax', WDFM()->prefix); ?></b></td>
86
  <td> <?php echo $tax . $currency; ?></td>
87
  </tr>
88
  <tr>
89
- <td class="key"><b><?php _e('Shipping and handling', WDFM()->prefix); ?></b></td>
90
  <td><?php echo $shipping . $currency; ?></td>
91
  </tr>
92
  <tr>
93
- <td class="key"><b><?php _e('Total', WDFM()->prefix); ?></b></td>
94
  <td><?php echo $total . $currency; ?></td>
95
  </tr>
96
  </table>
3
  /**
4
  * Class FMViewCheckpaypal
5
  */
6
+ class FMViewCheckpaypal extends FMAdminView {
7
  /**
8
  * Payment information template.
9
  *
22
  ?>
23
  <table class="admintable" border="1">
24
  <tr>
25
+ <td class="key"><?php _e('Currency', WDFMInstance(self::PLUGIN)->prefix); ?></td>
26
  <td><?php echo $currency; ?></td>
27
  </tr>
28
  <tr>
29
+ <td class="key"><?php _e('Date', WDFMInstance(self::PLUGIN)->prefix); ?></td>
30
  <td><?php echo $form_session->ord_last_modified; ?></td>
31
  </tr>
32
  <tr>
33
+ <td class="key"><?php _e('Status', WDFMInstance(self::PLUGIN)->prefix); ?></td>
34
  <td><?php echo $form_session->status; ?></td>
35
  </tr>
36
  <tr>
37
+ <td class="key"><?php _e('Full name', WDFMInstance(self::PLUGIN)->prefix); ?></td>
38
  <td><?php echo $form_session->full_name; ?></td>
39
  </tr>
40
  <tr>
41
+ <td class="key"><?php _e('Email', WDFMInstance(self::PLUGIN)->prefix); ?></td>
42
  <td><?php echo $form_session->email; ?></td>
43
  </tr>
44
  <tr>
45
+ <td class="key"><?php _e('Phone', WDFMInstance(self::PLUGIN)->prefix); ?></td>
46
  <td><?php echo $form_session->phone; ?></td>
47
  </tr>
48
  <tr>
49
+ <td class="key"><?php _e('Mobile phone', WDFMInstance(self::PLUGIN)->prefix); ?></td>
50
  <td><?php echo $form_session->mobile_phone; ?></td>
51
  </tr>
52
  <tr>
53
+ <td class="key"><?php _e('Fax', WDFMInstance(self::PLUGIN)->prefix); ?></td>
54
  <td><?php echo $form_session->fax; ?></td>
55
  </tr>
56
  <tr>
57
+ <td class="key"><?php _e('Address', WDFMInstance(self::PLUGIN)->prefix); ?></td>
58
  <td><?php echo $form_session->address; ?></td>
59
  </tr>
60
  <tr>
61
+ <td class="key"><?php _e('Payment info', WDFMInstance(self::PLUGIN)->prefix); ?></td>
62
  <td><?php echo $form_session->paypal_info; ?></td>
63
  </tr>
64
  <tr>
65
+ <td class="key"><?php _e('IPN', WDFMInstance(self::PLUGIN)->prefix); ?></td>
66
  <td><?php echo $form_session->ipn; ?></td>
67
  </tr>
68
  <tr>
69
+ <td class="key"><?php _e('tax', WDFMInstance(self::PLUGIN)->prefix); ?></td>
70
  <td><?php echo $form_session->tax; ?>%</td>
71
  </tr>
72
  <tr>
73
+ <td class="key"><?php _e('shipping', WDFMInstance(self::PLUGIN)->prefix); ?></td>
74
  <td><?php echo $form_session->shipping; ?></td>
75
  </tr>
76
  <tr>
77
+ <td class="key"><?php _e('read', WDFMInstance(self::PLUGIN)->prefix); ?></td>
78
  <td><?php echo $form_session->read; ?></td>
79
  </tr>
80
  <tr>
81
+ <td class="key"><b><?php _e('Item total', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
82
  <td><?php echo ($total - $tax - $shipping) . $currency; ?></td>
83
  </tr>
84
  <tr>
85
+ <td class="key"><b><?php _e('Tax', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
86
  <td> <?php echo $tax . $currency; ?></td>
87
  </tr>
88
  <tr>
89
+ <td class="key"><b><?php _e('Shipping and handling', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
90
  <td><?php echo $shipping . $currency; ?></td>
91
  </tr>
92
  <tr>
93
+ <td class="key"><b><?php _e('Total', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
94
  <td><?php echo $total . $currency; ?></td>
95
  </tr>
96
  </table>
admin/views/FMCaptcha.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class FMViewFormmakerwdcaptcha {
4
 
5
  /**
6
  * Display.
@@ -8,7 +8,7 @@ class FMViewFormmakerwdcaptcha {
8
  * @param array $params
9
  */
10
  public function display( $params ) {
11
- if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha' . WDFM()->plugin_postfix) {
12
  $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
13
  $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
14
  $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
@@ -38,7 +38,7 @@ class FMViewFormmakerwdcaptcha {
38
 
39
  $l = rand($cap_length_min, $cap_length_max);
40
  $code = code_generic($l, $cap_digital, $cap_latin_char);
41
- WDW_FM_Library::start_session();
42
  $_SESSION[$i . '_wd_captcha_code'] = md5($code);
43
  $canvas = imagecreatetruecolor($cap_width, $cap_height);
44
  $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
1
  <?php
2
 
3
+ class FMViewFormmakerwdcaptcha extends FMAdminView {
4
 
5
  /**
6
  * Display.
8
  * @param array $params
9
  */
10
  public function display( $params ) {
11
+ if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix) {
12
  $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
13
  $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
14
  $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
38
 
39
  $l = rand($cap_length_min, $cap_length_max);
40
  $code = code_generic($l, $cap_digital, $cap_latin_char);
41
+ WDW_FM_Library(self::PLUGIN)->start_session();
42
  $_SESSION[$i . '_wd_captcha_code'] = md5($code);
43
  $canvas = imagecreatetruecolor($cap_width, $cap_height);
44
  $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
admin/views/FMEditCountryinPopup.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewFromeditcountryinpopup
5
  */
6
- class FMViewFromeditcountryinpopup {
7
  /**
8
  * Display.
9
  *
@@ -51,21 +51,21 @@ class FMViewFromeditcountryinpopup {
51
  <div class="country-list wp-core-ui">
52
  <div class="select-remove">
53
  <button class="button" onclick="toggleCheck(true); return false;">
54
- <?php _e('Select all', WDFM()->prefix); ?>
55
  </button>
56
  <button class="button" onclick="toggleCheck(false); return false;">
57
- <?php _e('Remove all', WDFM()->prefix); ?>
58
  </button>
59
  </div>
60
  <div class="save-cancel">
61
  <button class="button button-primary" onclick="save_list(); return false;">
62
- <?php _e('Save', WDFM()->prefix); ?>
63
  </button>
64
  </div>
65
  <ul id="countries_list" class="ui-sortable" style="list-style: none; padding: 0px;"></ul>
66
  </div>
67
  <script>
68
- var countries = '<?php echo addslashes(json_encode(WDW_FM_Library::get_countries())); ?>';
69
  countries = JSON.parse(countries);
70
  var select_ = window.parent.document.getElementById('<?php echo $field_id ?>_elementform_id_temp');
71
  var n = select_.childNodes.length;
3
  /**
4
  * Class FMViewFromeditcountryinpopup
5
  */
6
+ class FMViewFromeditcountryinpopup extends FMAdminView {
7
  /**
8
  * Display.
9
  *
51
  <div class="country-list wp-core-ui">
52
  <div class="select-remove">
53
  <button class="button" onclick="toggleCheck(true); return false;">
54
+ <?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix); ?>
55
  </button>
56
  <button class="button" onclick="toggleCheck(false); return false;">
57
+ <?php _e('Remove all', WDFMInstance(self::PLUGIN)->prefix); ?>
58
  </button>
59
  </div>
60
  <div class="save-cancel">
61
  <button class="button button-primary" onclick="save_list(); return false;">
62
+ <?php _e('Save', WDFMInstance(self::PLUGIN)->prefix); ?>
63
  </button>
64
  </div>
65
  <ul id="countries_list" class="ui-sortable" style="list-style: none; padding: 0px;"></ul>
66
  </div>
67
  <script>
68
+ var countries = '<?php echo addslashes(json_encode(WDW_FM_Library(self::PLUGIN)->get_countries())); ?>';
69
  countries = JSON.parse(countries);
70
  var select_ = window.parent.document.getElementById('<?php echo $field_id ?>_elementform_id_temp');
71
  var n = select_.childNodes.length;
admin/views/FMIpinfoinPopup.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewFromipinfoinpopup
5
  */
6
- class FMViewFromipinfoinpopup {
7
  /**
8
  * Display.
9
  *
@@ -40,31 +40,31 @@ class FMViewFromipinfoinpopup {
40
  </style>
41
  <table class="admintable">
42
  <tr>
43
- <td class="key"><b><?php _e('IP', WDFM()->prefix); ?>:</b></td>
44
  <td><?php echo $ip; ?></td>
45
  </tr>
46
  <tr>
47
- <td class="key"><b><?php _e('City', WDFM()->prefix); ?>:</b></td>
48
  <td><?php echo $city; ?></td>
49
  </tr>
50
  <tr>
51
- <td class="key"><b><?php _e('Country', WDFM()->prefix); ?>:</b></td>
52
  <td><?php echo $country . ' ' . $country_flag; ?></td>
53
  </tr>
54
  <tr>
55
- <td class="key"><b><?php _e('CountryCode', WDFM()->prefix); ?>:</b></td>
56
  <td><?php echo $countryCode; ?></td>
57
  </tr>
58
  <tr>
59
- <td class="key"><b><?php _e('Timezone', WDFM()->prefix); ?>:</b></td>
60
  <td><?php echo $timezone; ?></td>
61
  </tr>
62
  <tr>
63
- <td class="key"><b><?php _e('Latitude', WDFM()->prefix); ?>:</b></td>
64
  <td><?php echo $lat; ?></td>
65
  </tr>
66
  <tr>
67
- <td class="key"><b><?php _e('Longitude', WDFM()->prefix); ?>:</b></td>
68
  <td><?php echo $lon; ?></td>
69
  </tr>
70
  </table>
3
  /**
4
  * Class FMViewFromipinfoinpopup
5
  */
6
+ class FMViewFromipinfoinpopup extends FMAdminView {
7
  /**
8
  * Display.
9
  *
40
  </style>
41
  <table class="admintable">
42
  <tr>
43
+ <td class="key"><b><?php _e('IP', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
44
  <td><?php echo $ip; ?></td>
45
  </tr>
46
  <tr>
47
+ <td class="key"><b><?php _e('City', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
48
  <td><?php echo $city; ?></td>
49
  </tr>
50
  <tr>
51
+ <td class="key"><b><?php _e('Country', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
52
  <td><?php echo $country . ' ' . $country_flag; ?></td>
53
  </tr>
54
  <tr>
55
+ <td class="key"><b><?php _e('CountryCode', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
56
  <td><?php echo $countryCode; ?></td>
57
  </tr>
58
  <tr>
59
+ <td class="key"><b><?php _e('Timezone', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
60
  <td><?php echo $timezone; ?></td>
61
  </tr>
62
  <tr>
63
+ <td class="key"><b><?php _e('Latitude', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
64
  <td><?php echo $lat; ?></td>
65
  </tr>
66
  <tr>
67
+ <td class="key"><b><?php _e('Longitude', WDFMInstance(self::PLUGIN)->prefix); ?>:</b></td>
68
  <td><?php echo $lon; ?></td>
69
  </tr>
70
  </table>
admin/views/FMMapEditinPopup.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewFrommapeditinpopup
5
  */
6
- class FMViewFrommapeditinpopup {
7
  /**
8
  * Display.
9
  *
@@ -11,21 +11,21 @@ class FMViewFrommapeditinpopup {
11
  */
12
  public function display( $params ) {
13
  wp_print_scripts('google-maps');
14
- wp_print_scripts('fm-gmap_form');
15
  $long = $params['long'];
16
  $lat = $params['lat'];
17
  ?>
18
  <table style="margin:0px; padding:0px">
19
  <tr>
20
- <td><b><?php _e('Address:', WDFM()->prefix); ?></b></td>
21
  <td><input type="text" id="addrval0" style="border:0px; background:none" size="80" readonly /></td>
22
  </tr>
23
  <tr>
24
- <td><b><?php _e('Longitude:', WDFM()->prefix); ?></b></td>
25
  <td><input type="text" id="longval0" style="border:0px; background:none" size="80" readonly /></td>
26
  </tr>
27
  <tr>
28
- <td><b><?php _e('Latitude:', WDFM()->prefix); ?></b></td>
29
  <td><input type="text" id="latval0" style="border:0px; background:none" size="80" readonly /></td>
30
  </tr>
31
  </table>
3
  /**
4
  * Class FMViewFrommapeditinpopup
5
  */
6
+ class FMViewFrommapeditinpopup extends FMAdminView {
7
  /**
8
  * Display.
9
  *
11
  */
12
  public function display( $params ) {
13
  wp_print_scripts('google-maps');
14
+ wp_print_scripts(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
15
  $long = $params['long'];
16
  $lat = $params['lat'];
17
  ?>
18
  <table style="margin:0px; padding:0px">
19
  <tr>
20
+ <td><b><?php _e('Address:', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
21
  <td><input type="text" id="addrval0" style="border:0px; background:none" size="80" readonly /></td>
22
  </tr>
23
  <tr>
24
+ <td><b><?php _e('Longitude:', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
25
  <td><input type="text" id="longval0" style="border:0px; background:none" size="80" readonly /></td>
26
  </tr>
27
  <tr>
28
+ <td><b><?php _e('Latitude:', WDFMInstance(self::PLUGIN)->prefix); ?></b></td>
29
  <td><input type="text" id="latval0" style="border:0px; background:none" size="80" readonly /></td>
30
  </tr>
31
  </table>
admin/views/FMMathCaptcha.php CHANGED
@@ -3,12 +3,12 @@
3
  /**
4
  * Class FMViewFormmakerwdmathcaptcha
5
  */
6
- class FMViewFormmakerwdmathcaptcha {
7
  /**
8
  * Display.
9
  */
10
  public function display() {
11
- if ( isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha' . WDFM()->plugin_postfix ) {
12
  $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
13
  $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
14
  $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
@@ -20,7 +20,7 @@ class FMViewFormmakerwdmathcaptcha {
20
  $cap_height = 26;
21
  $cap_quality = 100;
22
  $code = $this->code_generic($operations_count, $operations);
23
- WDW_FM_Library::start_session();
24
  $_SESSION[$i . '_wd_arithmetic_captcha_code'] = md5($code[1]);
25
  $canvas = imagecreatetruecolor($cap_width, $cap_height);
26
  $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
3
  /**
4
  * Class FMViewFormmakerwdmathcaptcha
5
  */
6
+ class FMViewFormmakerwdmathcaptcha extends FMAdminView {
7
  /**
8
  * Display.
9
  */
10
  public function display() {
11
+ if ( isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix ) {
12
  $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
13
  $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
14
  $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
20
  $cap_height = 26;
21
  $cap_quality = 100;
22
  $code = $this->code_generic($operations_count, $operations);
23
+ WDW_FM_Library(self::PLUGIN)->start_session();
24
  $_SESSION[$i . '_wd_arithmetic_captcha_code'] = md5($code[1]);
25
  $canvas = imagecreatetruecolor($cap_width, $cap_height);
26
  $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
admin/views/FMPaypalInfo.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewPaypal_info
5
  */
6
- class FMViewPaypal_info {
7
  /**
8
  * Display.
9
  *
3
  /**
4
  * Class FMViewPaypal_info
5
  */
6
+ class FMViewPaypal_info extends FMAdminView {
7
  /**
8
  * Display.
9
  *
admin/views/FMProductOption.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewProduct_option
5
  */
6
- class FMViewProduct_option {
7
  /**
8
  * Display.
9
  *
@@ -89,7 +89,7 @@ class FMViewProduct_option {
89
  </div>
90
  <div>
91
  <label class="fm-property-label">Properties</label> &nbsp;
92
- <img id="el_choices_add" src="<?php echo WDFM()->plugin_url . '/images/add.png?ver=' . WDFM()->plugin_version . ''; ?>" style="vertical-align:middle; cursor: pointer;" title="add" onclick="add_choise_option()" />
93
  </div>
94
  <div style="margin-left:0px;" id="options"></div>
95
  </div>
@@ -241,7 +241,7 @@ class FMViewProduct_option {
241
  el_choices.style.cssText = "width:100px; margin:0; padding:4px; border: 1px solid #ccc; vertical-align: middle;";
242
  var el_choices_remove = document.createElement('img');
243
  el_choices_remove.setAttribute("id", "el_option" + j + "_remove");
244
- el_choices_remove.setAttribute("src", '<?php echo WDFM()->plugin_url . '/images/delete.png?ver=' . WDFM()->plugin_version . ''; ?>');
245
  el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:2px';
246
  el_choices_remove.setAttribute("align", 'top');
247
  el_choices_remove.setAttribute("onClick", "remove_option(" + j + "," + i + ")");
@@ -263,7 +263,7 @@ class FMViewProduct_option {
263
  el_choices.style.cssText = "width:100px; margin:0; padding:4px; border: 1px solid #ccc; vertical-align: middle;";
264
  var el_choices_remove = document.createElement('img');
265
  el_choices_remove.setAttribute("id", "el_option" + j + "_remove");
266
- el_choices_remove.setAttribute("src", '<?php echo WDFM()->plugin_url . '/images/delete.png?ver=' . WDFM()->plugin_version . ''; ?>');
267
  el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:2px';
268
  el_choices_remove.setAttribute("align", 'top');
269
  el_choices_remove.setAttribute("onClick", "remove_option('" + j + "','" + num + "')");
3
  /**
4
  * Class FMViewProduct_option
5
  */
6
+ class FMViewProduct_option extends FMAdminView {
7
  /**
8
  * Display.
9
  *
89
  </div>
90
  <div>
91
  <label class="fm-property-label">Properties</label> &nbsp;
92
+ <img id="el_choices_add" src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/add.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . ''; ?>" style="vertical-align:middle; cursor: pointer;" title="add" onclick="add_choise_option()" />
93
  </div>
94
  <div style="margin-left:0px;" id="options"></div>
95
  </div>
241
  el_choices.style.cssText = "width:100px; margin:0; padding:4px; border: 1px solid #ccc; vertical-align: middle;";
242
  var el_choices_remove = document.createElement('img');
243
  el_choices_remove.setAttribute("id", "el_option" + j + "_remove");
244
+ el_choices_remove.setAttribute("src", '<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . ''; ?>');
245
  el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:2px';
246
  el_choices_remove.setAttribute("align", 'top');
247
  el_choices_remove.setAttribute("onClick", "remove_option(" + j + "," + i + ")");
263
  el_choices.style.cssText = "width:100px; margin:0; padding:4px; border: 1px solid #ccc; vertical-align: middle;";
264
  var el_choices_remove = document.createElement('img');
265
  el_choices_remove.setAttribute("id", "el_option" + j + "_remove");
266
+ el_choices_remove.setAttribute("src", '<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . ''; ?>');
267
  el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:2px';
268
  el_choices_remove.setAttribute("align", 'top');
269
  el_choices_remove.setAttribute("onClick", "remove_option('" + j + "','" + num + "')");
admin/views/FMSelectDataFromDb.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewSelect_data_from_db
5
  */
6
- class FMViewSelect_data_from_db {
7
  /**
8
  * Display.
9
  *
@@ -11,8 +11,8 @@ class FMViewSelect_data_from_db {
11
  */
12
  public function display( $params ) {
13
  wp_print_scripts('jquery');
14
- wp_print_styles('fm-style');
15
- wp_print_styles('fm-jquery-ui');
16
  $id = $params['id'];
17
  $form_id = $params['form_id'];
18
  $field_id = $params['field_id'];
@@ -29,7 +29,7 @@ class FMViewSelect_data_from_db {
29
  jQuery.ajax({
30
  type: "POST",
31
  url: "<?php echo add_query_arg(array(
32
- 'action' => 'select_data_from_db' . WDFM()->plugin_postfix,
33
  'form_id' => $form_id,
34
  'field_type' => $field_type,
35
  'task' => 'db_tables',
@@ -233,7 +233,7 @@ class FMViewSelect_data_from_db {
233
  $cond .= '<option>' . $col->Field . '</option>';
234
  }
235
  $cond .= '</select>';
236
- $cond .= '<select id="op_condid" style="width: 110px"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" type="text" /><select id="andor_condid" style="visibility: hidden; width:70px;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFM()->plugin_url . '/images/delete.png?ver=' . WDFM()->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
237
  ?>
238
  <script>
239
  var selected_field = '';
@@ -276,8 +276,8 @@ class FMViewSelect_data_from_db {
276
  });
277
  function save_query() {
278
  str = '';
279
- plugin_url = '<?php echo WDFM()->plugin_url; ?>';
280
- plugin_version = '<?php echo WDFM()->plugin_version; ?>';
281
  product_name = jQuery('#product_name').val();
282
  product_price = jQuery('#product_price').val();
283
  con_type = jQuery('input[name=con_type]:checked').val();
@@ -516,7 +516,7 @@ class FMViewSelect_data_from_db {
516
  </select>
517
  </div>
518
  <div class="select-db-op where">
519
- <img src="<?php echo WDFM()->plugin_url . '/images/add_condition.png?ver=' . WDFM()->plugin_version . ''; ?>" title="ADD" class="add_cond" />WHERE
520
  </div>
521
 
522
  </div>
@@ -574,7 +574,7 @@ class FMViewSelect_data_from_db {
574
  jQuery.ajax({
575
  type: "POST",
576
  url: "<?php echo add_query_arg(array(
577
- 'action' => 'select_data_from_db' . WDFM()->plugin_postfix,
578
  'form_id' => $form_id,
579
  'field_type' => $field_type,
580
  'task' => 'db_table_struct_select',
3
  /**
4
  * Class FMViewSelect_data_from_db
5
  */
6
+ class FMViewSelect_data_from_db extends FMAdminView {
7
  /**
8
  * Display.
9
  *
11
  */
12
  public function display( $params ) {
13
  wp_print_scripts('jquery');
14
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
15
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
16
  $id = $params['id'];
17
  $form_id = $params['form_id'];
18
  $field_id = $params['field_id'];
29
  jQuery.ajax({
30
  type: "POST",
31
  url: "<?php echo add_query_arg(array(
32
+ 'action' => 'select_data_from_db' . WDFMInstance(self::PLUGIN)->plugin_postfix,
33
  'form_id' => $form_id,
34
  'field_type' => $field_type,
35
  'task' => 'db_tables',
233
  $cond .= '<option>' . $col->Field . '</option>';
234
  }
235
  $cond .= '</select>';
236
+ $cond .= '<select id="op_condid" style="width: 110px"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" type="text" /><select id="andor_condid" style="visibility: hidden; width:70px;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
237
  ?>
238
  <script>
239
  var selected_field = '';
276
  });
277
  function save_query() {
278
  str = '';
279
+ plugin_url = '<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>';
280
+ plugin_version = '<?php echo WDFMInstance(self::PLUGIN)->plugin_version; ?>';
281
  product_name = jQuery('#product_name').val();
282
  product_price = jQuery('#product_price').val();
283
  con_type = jQuery('input[name=con_type]:checked').val();
516
  </select>
517
  </div>
518
  <div class="select-db-op where">
519
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/add_condition.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . ''; ?>" title="ADD" class="add_cond" />WHERE
520
  </div>
521
 
522
  </div>
574
  jQuery.ajax({
575
  type: "POST",
576
  url: "<?php echo add_query_arg(array(
577
+ 'action' => 'select_data_from_db' . WDFMInstance(self::PLUGIN)->plugin_postfix,
578
  'form_id' => $form_id,
579
  'field_type' => $field_type,
580
  'task' => 'db_table_struct_select',
admin/views/FMShortocde.php CHANGED
@@ -8,21 +8,21 @@ class FMViewFMShortocde extends FMAdminView {
8
  * FMViewFMShortocde constructor.
9
  */
10
  public function __construct() {
11
- wp_print_scripts('fm-shortcode' . WDFM()->menu_postfix);
12
 
13
  wp_print_styles('wp-admin');
14
  wp_print_styles('buttons');
15
 
16
- wp_print_styles('fm-tables');
17
 
18
- if (!WDFM()->is_free) {
19
  wp_print_scripts('jquery-ui-datepicker');
20
- wp_print_styles('fm-jquery-ui');
21
- wp_print_styles('fm-style');
22
  }
23
  else {
24
- wp_print_styles( 'fm-pricing' );
25
- wp_print_styles( 'fm-roboto' );
26
  }
27
  }
28
 
@@ -39,12 +39,12 @@ class FMViewFMShortocde extends FMAdminView {
39
  <div class="wd-box-content wd-box-content-shortcode">
40
  <span class="wd-group">
41
  <select name="form_maker_id">
42
- <option value="0"><?php _e('-Select a Form-', WDFM()->prefix); ?></option>
43
  <?php
44
  if ( $forms ) {
45
  foreach ( $forms as $form ) {
46
  ?>
47
- <option value="<?php echo $form->id; ?>" <?php if (!$form->published) { echo 'disabled="disabled"';} ?>><?php echo $form->title . ($form->published ? '' : ' - ' . __('Unpublished', WDFM()->prefix)); ?></option>
48
  <?php
49
  }
50
  }
@@ -52,7 +52,7 @@ class FMViewFMShortocde extends FMAdminView {
52
  </select>
53
  </span>
54
  <span class="wd-group wd-right">
55
- <input class="wd-button button-primary" type="button" name="insert" value="<?php _e('Insert', WDFM()->prefix); ?>" onclick="insert_shortcode('form')" />
56
  </span>
57
  </div>
58
  </div>
@@ -69,10 +69,10 @@ class FMViewFMShortocde extends FMAdminView {
69
  */
70
  public function submissions( $forms ) {
71
  ?>
72
- <body class="wp-core-ui" data-width="520" data-height="570" <?php echo (WDFM()->is_free ? 'style="overflow: hidden;"' : ''); ?>>
73
  <?php
74
- if ( WDFM()->is_free ) {
75
- echo $this->free_message(__('Front end submissions are available in Premium version', WDFM()->prefix));
76
  ?>
77
  <div class="wd-fixed-conteiner"></div>
78
  <?php
@@ -83,12 +83,12 @@ class FMViewFMShortocde extends FMAdminView {
83
  <div class="wd-box-content wd-box-content-shortcode">
84
  <span class="wd-group">
85
  <select name="form_maker_id">
86
- <option value="0"><?php _e('-Select a Form-', WDFM()->prefix); ?></option>
87
  <?php
88
  if ( $forms ) {
89
  foreach ( $forms as $form ) {
90
  ?>
91
- <option value="<?php echo $form->id; ?>" <?php if (!$form->published) { echo 'disabled="disabled"';} ?>><?php echo $form->title . ($form->published ? '' : ' - ' . __('Unpublished', WDFM()->prefix)); ?></option>
92
  <?php
93
  }
94
  }
@@ -96,10 +96,10 @@ class FMViewFMShortocde extends FMAdminView {
96
  </select>
97
  </span>
98
  <span class="wd-group">
99
- <label class="wd-label" for="public_key"><?php _e('Select Date Range', WDFM()->prefix); ?></label>
100
- <label for="startdate"><?php _e('From', WDFM()->prefix); ?>:</label>
101
  <input class="initial-width wd-datepicker" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="" />
102
- <label for="enddate"><?php _e('To', WDFM()->prefix); ?>:</label>
103
  <input class="initial-width wd-datepicker" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="" />
104
  </span>
105
  </div>
@@ -109,43 +109,43 @@ class FMViewFMShortocde extends FMAdminView {
109
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
110
  <div class="wd-box-content wd-box-content-shortcode">
111
  <span class="wd-group">
112
- <label class="wd-label"><?php _e('Select fields', WDFM()->prefix); ?></label>
113
  <ul>
114
  <li>
115
  <input type="checkbox" checked="checked" id="submit_date" name="submit_date" value="submit_date" />
116
- <label for="submit_date"><?php _e('Submit Date', WDFM()->prefix); ?></label>
117
  </li>
118
  <li>
119
  <input type="checkbox" checked="checked" id="submitter_ip" name="submitter_ip" value="submitter_ip" />
120
- <label for="submitter_ip"><?php _e('Submitter\'s IP Address', WDFM()->prefix); ?></label>
121
  </li>
122
  <li>
123
  <input type="checkbox" checked="checked" id="username" name="username" value="username" />
124
- <label for="username"><?php _e('Submitter\'s Username', WDFM()->prefix); ?></label>
125
  </li>
126
  <li>
127
  <input type="checkbox" checked="checked" id="useremail" name="useremail" value="useremail" />
128
- <label for="useremail"><?php _e('Submitter\'s Email Address', WDFM()->prefix); ?></label>
129
  </li>
130
  <li>
131
  <input type="checkbox" checked="checked" id="form_fields" name="form_fields" value="form_fields" />
132
- <label for="form_fields"><?php _e('Form Fields', WDFM()->prefix); ?></label>
133
  </li>
134
  <p class="description">
135
- <?php _e('You can hide specific form fields from Form General Options.', WDFM()->prefix); ?>
136
  </p>
137
  </ul>
138
  </span>
139
  <span class="wd-group">
140
- <label class="wd-label"><?php _e('Export to', WDFM()->prefix); ?></label>
141
  <ul>
142
  <li>
143
  <input type="checkbox" checked="checked" id="csv" name="csv" value="csv" />
144
- <label for="csv"><?php _e('CSV', WDFM()->prefix); ?></label>
145
  </li>
146
  <li>
147
  <input type="checkbox" checked="checked" id="xml" name="xml" value="xml" />
148
- <label for="xml"><?php _e('XML', WDFM()->prefix); ?></label>
149
  </li>
150
  </ul>
151
  </span>
@@ -154,39 +154,39 @@ class FMViewFMShortocde extends FMAdminView {
154
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
155
  <div class="wd-box-content wd-box-content-shortcode">
156
  <span class="wd-group">
157
- <label class="wd-label"><?php _e('Show', WDFM()->prefix); ?></label>
158
  <ul>
159
  <li>
160
  <input type="checkbox" checked="checked" id="title" name="title" value="title" />
161
- <label for="title"><?php _e('Title', WDFM()->prefix); ?></label>
162
  </li>
163
  <li>
164
  <input type="checkbox" checked="checked" id="search" name="search" value="search" />
165
- <label for="search"><?php _e('Search', WDFM()->prefix); ?></label>
166
  </li>
167
  <li>
168
  <input type="checkbox" checked="checked" id="ordering" name="ordering" value="ordering" />
169
- <label for="ordering"><?php _e('Ordering', WDFM()->prefix); ?></label>
170
  </li>
171
  <li>
172
  <input type="checkbox" checked="checked" id="entries" name="entries" value="entries" />
173
- <label for="entries"><?php _e('Entries', WDFM()->prefix); ?></label>
174
  </li>
175
  <li>
176
  <input type="checkbox" checked="checked" id="views" name="views" value="views" />
177
- <label for="views"><?php _e('Views', WDFM()->prefix); ?></label>
178
  </li>
179
  <li>
180
  <input type="checkbox" checked="checked" id="conversion_rate" name="conversion_rate" value="conversion_rate" />
181
- <label for="conversion_rate"><?php _e('Conversion Rate', WDFM()->prefix); ?></label>
182
  </li>
183
  <li>
184
  <input type="checkbox" checked="checked" id="pagination" name="pagination" value="pagination" />
185
- <label for="pagination"><?php _e('Pagination', WDFM()->prefix); ?></label>
186
  </li>
187
  <li>
188
  <input type="checkbox" checked="checked" id="stats" name="stats" value="stats" />
189
- <label for="stats"><?php _e('Statistics', WDFM()->prefix); ?></label>
190
  </li>
191
  </ul>
192
  </span>
@@ -197,7 +197,7 @@ class FMViewFMShortocde extends FMAdminView {
197
  <div class="wd-table-col">
198
  <div class="wd-box-content wd-box-content-shortcode">
199
  <span class="wd-group wd-right">
200
- <input class="wd-button button-primary" type="button" name="insert" value="<?php _e('Insert', WDFM()->prefix); ?>" onclick="insert_shortcode('submissions')" />
201
  </span>
202
  </div>
203
  </div>
8
  * FMViewFMShortocde constructor.
9
  */
10
  public function __construct() {
11
+ wp_print_scripts(WDFMInstance(self::PLUGIN)->handle_prefix . '-shortcode' . WDFMInstance(self::PLUGIN)->menu_postfix);
12
 
13
  wp_print_styles('wp-admin');
14
  wp_print_styles('buttons');
15
 
16
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
17
 
18
+ if (!WDFMInstance(self::PLUGIN)->is_free) {
19
  wp_print_scripts('jquery-ui-datepicker');
20
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
21
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
22
  }
23
  else {
24
+ wp_print_styles( WDFMInstance(self::PLUGIN)->handle_prefix . '-pricing' );
25
+ wp_print_styles( WDFMInstance(self::PLUGIN)->handle_prefix . '-roboto' );
26
  }
27
  }
28
 
39
  <div class="wd-box-content wd-box-content-shortcode">
40
  <span class="wd-group">
41
  <select name="form_maker_id">
42
+ <option value="0"><?php _e('-Select a Form-', WDFMInstance(self::PLUGIN)->prefix); ?></option>
43
  <?php
44
  if ( $forms ) {
45
  foreach ( $forms as $form ) {
46
  ?>
47
+ <option value="<?php echo $form->id; ?>" <?php if (!$form->published) { echo 'disabled="disabled"';} ?>><?php echo $form->title . ($form->published ? '' : ' - ' . __('Unpublished', WDFMInstance(self::PLUGIN)->prefix)); ?></option>
48
  <?php
49
  }
50
  }
52
  </select>
53
  </span>
54
  <span class="wd-group wd-right">
55
+ <input class="wd-button button-primary" type="button" name="insert" value="<?php _e('Insert', WDFMInstance(self::PLUGIN)->prefix); ?>" onclick="insert_shortcode('form')" />
56
  </span>
57
  </div>
58
  </div>
69
  */
70
  public function submissions( $forms ) {
71
  ?>
72
+ <body class="wp-core-ui" data-width="520" data-height="570" <?php echo (WDFMInstance(self::PLUGIN)->is_free ? 'style="overflow: hidden;"' : ''); ?>>
73
  <?php
74
+ if ( WDFMInstance(self::PLUGIN)->is_free ) {
75
+ echo $this->free_message(__('Front end submissions are available in Premium version', WDFMInstance(self::PLUGIN)->prefix));
76
  ?>
77
  <div class="wd-fixed-conteiner"></div>
78
  <?php
83
  <div class="wd-box-content wd-box-content-shortcode">
84
  <span class="wd-group">
85
  <select name="form_maker_id">
86
+ <option value="0"><?php _e('-Select a Form-', WDFMInstance(self::PLUGIN)->prefix); ?></option>
87
  <?php
88
  if ( $forms ) {
89
  foreach ( $forms as $form ) {
90
  ?>
91
+ <option value="<?php echo $form->id; ?>" <?php if (!$form->published) { echo 'disabled="disabled"';} ?>><?php echo $form->title . ($form->published ? '' : ' - ' . __('Unpublished', WDFMInstance(self::PLUGIN)->prefix)); ?></option>
92
  <?php
93
  }
94
  }
96
  </select>
97
  </span>
98
  <span class="wd-group">
99
+ <label class="wd-label" for="public_key"><?php _e('Select Date Range', WDFMInstance(self::PLUGIN)->prefix); ?></label>
100
+ <label for="startdate"><?php _e('From', WDFMInstance(self::PLUGIN)->prefix); ?>:</label>
101
  <input class="initial-width wd-datepicker" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="" />
102
+ <label for="enddate"><?php _e('To', WDFMInstance(self::PLUGIN)->prefix); ?>:</label>
103
  <input class="initial-width wd-datepicker" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="" />
104
  </span>
105
  </div>
109
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
110
  <div class="wd-box-content wd-box-content-shortcode">
111
  <span class="wd-group">
112
+ <label class="wd-label"><?php _e('Select fields', WDFMInstance(self::PLUGIN)->prefix); ?></label>
113
  <ul>
114
  <li>
115
  <input type="checkbox" checked="checked" id="submit_date" name="submit_date" value="submit_date" />
116
+ <label for="submit_date"><?php _e('Submit Date', WDFMInstance(self::PLUGIN)->prefix); ?></label>
117
  </li>
118
  <li>
119
  <input type="checkbox" checked="checked" id="submitter_ip" name="submitter_ip" value="submitter_ip" />
120
+ <label for="submitter_ip"><?php _e('Submitter\'s IP Address', WDFMInstance(self::PLUGIN)->prefix); ?></label>
121
  </li>
122
  <li>
123
  <input type="checkbox" checked="checked" id="username" name="username" value="username" />
124
+ <label for="username"><?php _e('Submitter\'s Username', WDFMInstance(self::PLUGIN)->prefix); ?></label>
125
  </li>
126
  <li>
127
  <input type="checkbox" checked="checked" id="useremail" name="useremail" value="useremail" />
128
+ <label for="useremail"><?php _e('Submitter\'s Email Address', WDFMInstance(self::PLUGIN)->prefix); ?></label>
129
  </li>
130
  <li>
131
  <input type="checkbox" checked="checked" id="form_fields" name="form_fields" value="form_fields" />
132
+ <label for="form_fields"><?php _e('Form Fields', WDFMInstance(self::PLUGIN)->prefix); ?></label>
133
  </li>
134
  <p class="description">
135
+ <?php _e('You can hide specific form fields from Form General Options.', WDFMInstance(self::PLUGIN)->prefix); ?>
136
  </p>
137
  </ul>
138
  </span>
139
  <span class="wd-group">
140
+ <label class="wd-label"><?php _e('Export to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
141
  <ul>
142
  <li>
143
  <input type="checkbox" checked="checked" id="csv" name="csv" value="csv" />
144
+ <label for="csv"><?php _e('CSV', WDFMInstance(self::PLUGIN)->prefix); ?></label>
145
  </li>
146
  <li>
147
  <input type="checkbox" checked="checked" id="xml" name="xml" value="xml" />
148
+ <label for="xml"><?php _e('XML', WDFMInstance(self::PLUGIN)->prefix); ?></label>
149
  </li>
150
  </ul>
151
  </span>
154
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
155
  <div class="wd-box-content wd-box-content-shortcode">
156
  <span class="wd-group">
157
+ <label class="wd-label"><?php _e('Show', WDFMInstance(self::PLUGIN)->prefix); ?></label>
158
  <ul>
159
  <li>
160
  <input type="checkbox" checked="checked" id="title" name="title" value="title" />
161
+ <label for="title"><?php _e('Title', WDFMInstance(self::PLUGIN)->prefix); ?></label>
162
  </li>
163
  <li>
164
  <input type="checkbox" checked="checked" id="search" name="search" value="search" />
165
+ <label for="search"><?php _e('Search', WDFMInstance(self::PLUGIN)->prefix); ?></label>
166
  </li>
167
  <li>
168
  <input type="checkbox" checked="checked" id="ordering" name="ordering" value="ordering" />
169
+ <label for="ordering"><?php _e('Ordering', WDFMInstance(self::PLUGIN)->prefix); ?></label>
170
  </li>
171
  <li>
172
  <input type="checkbox" checked="checked" id="entries" name="entries" value="entries" />
173
+ <label for="entries"><?php _e('Entries', WDFMInstance(self::PLUGIN)->prefix); ?></label>
174
  </li>
175
  <li>
176
  <input type="checkbox" checked="checked" id="views" name="views" value="views" />
177
+ <label for="views"><?php _e('Views', WDFMInstance(self::PLUGIN)->prefix); ?></label>
178
  </li>
179
  <li>
180
  <input type="checkbox" checked="checked" id="conversion_rate" name="conversion_rate" value="conversion_rate" />
181
+ <label for="conversion_rate"><?php _e('Conversion Rate', WDFMInstance(self::PLUGIN)->prefix); ?></label>
182
  </li>
183
  <li>
184
  <input type="checkbox" checked="checked" id="pagination" name="pagination" value="pagination" />
185
+ <label for="pagination"><?php _e('Pagination', WDFMInstance(self::PLUGIN)->prefix); ?></label>
186
  </li>
187
  <li>
188
  <input type="checkbox" checked="checked" id="stats" name="stats" value="stats" />
189
+ <label for="stats"><?php _e('Statistics', WDFMInstance(self::PLUGIN)->prefix); ?></label>
190
  </li>
191
  </ul>
192
  </span>
197
  <div class="wd-table-col">
198
  <div class="wd-box-content wd-box-content-shortcode">
199
  <span class="wd-group wd-right">
200
+ <input class="wd-button button-primary" type="button" name="insert" value="<?php _e('Insert', WDFMInstance(self::PLUGIN)->prefix); ?>" onclick="insert_shortcode('submissions')" />
201
  </span>
202
  </div>
203
  </div>
admin/views/FMShowMatrix.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewShow_matrix
5
  */
6
- class FMViewShow_matrix {
7
  /**
8
  * Display.
9
  *
3
  /**
4
  * Class FMViewShow_matrix
5
  */
6
+ class FMViewShow_matrix extends FMAdminView {
7
  /**
8
  * Display.
9
  *
admin/views/FMSqlMapping.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
 
3
- class FMViewFormMakerSQLMapping {
4
  public function __construct() {
5
  wp_print_scripts('jquery');
6
  wp_print_scripts('jquery-ui-tooltip');
7
- wp_print_styles('fm-style');
8
- wp_print_styles('fm-jquery-ui');
9
  wp_print_styles('dashicons');
10
  }
11
 
@@ -82,7 +82,7 @@ class FMViewFormMakerSQLMapping {
82
  $cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
83
  }
84
  $cond .= '</select>';
85
- $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFM()->plugin_dir . '/images/delete.png?ver=' . WDFM()->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
86
  ?>
87
  <script>
88
  jQuery(document).ready(function() {
@@ -235,7 +235,7 @@ class FMViewFormMakerSQLMapping {
235
  jQuery.ajax({
236
  type: "POST",
237
  url: "<?php echo add_query_arg(array(
238
- 'action' => 'FormMakerSQLMapping' . WDFM()->plugin_postfix,
239
  'id' => $id,
240
  'form_id' => $form_id,
241
  'task' => 'update_query',
@@ -811,19 +811,19 @@ class FMViewFormMakerSQLMapping {
811
  $title = $col->Field;
812
  $title .= "<ul style='padding-left: 17px;'>";
813
  if ( $col->Type ) {
814
- $title .= "<li>" . __('Type', WDFM()->prefix) . " - " . $col->Type . "</li>";
815
  }
816
  if ( $col->Null ) {
817
- $title .= "<li>" . __('Null', WDFM()->prefix) . " - " . $col->Null . "</li>";
818
  }
819
  if ( $col->Key ) {
820
- $title .= "<li>" . __('Key', WDFM()->prefix) . " - " . $col->Key . "</li>";
821
  }
822
  if ( $col->Default ) {
823
- $title .= "<li>" . __('Default', WDFM()->prefix) . " - " . $col->Default . "</li>";
824
  }
825
  if ( $col->Extra ) {
826
- $title .= "<li>" . __('Extra', WDFM()->prefix) . " - " . $col->Extra . "</li>";
827
  }
828
  $title .= "</ul>";
829
  ?>
@@ -844,7 +844,7 @@ class FMViewFormMakerSQLMapping {
844
  }
845
  }
846
  if ( $con_method == 'delete' or $con_method == 'update' ) {
847
- echo '<div class="select-db-op where"><img src="' . WDFM()->plugin_url . '/images/add_condition.png?ver=' . WDFM()->plugin_version . '" title="ADD" class="add_cond"/>WHERE</div>';
848
  if ( $wheres ) {
849
  echo '<script>';
850
  $wheres = explode('***where***', $wheres);
@@ -955,7 +955,7 @@ class FMViewFormMakerSQLMapping {
955
  jQuery.ajax({
956
  type: "POST",
957
  url: "<?php echo add_query_arg(array(
958
- 'action' => 'FormMakerSQLMapping' . WDFM()->plugin_postfix,
959
  'id' => 0,
960
  'form_id' => $form_id,
961
  'task' => 'db_tables',
@@ -1176,7 +1176,7 @@ class FMViewFormMakerSQLMapping {
1176
  jQuery.ajax({
1177
  type: "POST",
1178
  url: "<?php echo add_query_arg(array(
1179
- 'action' => 'FormMakerSQLMapping' . WDFM()->plugin_postfix,
1180
  'id' => 0,
1181
  'form_id' => $form_id,
1182
  'task' => 'db_table_struct',
@@ -1251,7 +1251,7 @@ class FMViewFormMakerSQLMapping {
1251
  $cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
1252
  }
1253
  $cond .= '</select>';
1254
- $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFM()->plugin_url . '/images/delete.png?ver=' . WDFM()->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
1255
  ?>
1256
  <script>
1257
  jQuery(document).ready(function() {
@@ -1394,7 +1394,7 @@ class FMViewFormMakerSQLMapping {
1394
  jQuery.ajax({
1395
  type: "POST",
1396
  url: "<?php echo add_query_arg(array(
1397
- 'action' => 'FormMakerSQLMapping' . WDFM()->plugin_postfix,
1398
  'id' => 0,
1399
  'form_id' => $form_id,
1400
  'task' => 'save_query',
@@ -1763,19 +1763,19 @@ class FMViewFormMakerSQLMapping {
1763
  $title = $col->Field;
1764
  $title .= "<ul style='padding-left: 17px;'>";
1765
  if ( $col->Type ) {
1766
- $title .= "<li>" . __('Type', WDFM()->prefix) . " - " . $col->Type . "</li>";
1767
  }
1768
  if ( $col->Null ) {
1769
- $title .= "<li>" . __('Null', WDFM()->prefix) . " - " . $col->Null . "</li>";
1770
  }
1771
  if ( $col->Key ) {
1772
- $title .= "<li>" . __('Key', WDFM()->prefix) . " - " . $col->Key . "</li>";
1773
  }
1774
  if ( $col->Default ) {
1775
- $title .= "<li>" . __('Default', WDFM()->prefix) . " - " . $col->Default . "</li>";
1776
  }
1777
  if ( $col->Extra ) {
1778
- $title .= "<li>" . __('Extra', WDFM()->prefix) . " - " . $col->Extra . "</li>";
1779
  }
1780
  $title .= "</ul>";
1781
  ?>
@@ -1793,7 +1793,7 @@ class FMViewFormMakerSQLMapping {
1793
  }
1794
  }
1795
  if ( $con_method == 'delete' or $con_method == 'update' ) {
1796
- echo '<div class="select-db-op where"><img src="' . WDFM()->plugin_url . '/images/add_condition.png?ver=' . WDFM()->plugin_version . '" title="ADD" class="add_cond"/>WHERE</div>';
1797
  }
1798
  ?>
1799
  </div>
1
  <?php
2
 
3
+ class FMViewFormMakerSQLMapping extends FMAdminView {
4
  public function __construct() {
5
  wp_print_scripts('jquery');
6
  wp_print_scripts('jquery-ui-tooltip');
7
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
8
+ wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
9
  wp_print_styles('dashicons');
10
  }
11
 
82
  $cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
83
  }
84
  $cond .= '</select>';
85
+ $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFMInstance(self::PLUGIN)->plugin_dir . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
86
  ?>
87
  <script>
88
  jQuery(document).ready(function() {
235
  jQuery.ajax({
236
  type: "POST",
237
  url: "<?php echo add_query_arg(array(
238
+ 'action' => 'FormMakerSQLMapping' . WDFMInstance(self::PLUGIN)->plugin_postfix,
239
  'id' => $id,
240
  'form_id' => $form_id,
241
  'task' => 'update_query',
811
  $title = $col->Field;
812
  $title .= "<ul style='padding-left: 17px;'>";
813
  if ( $col->Type ) {
814
+ $title .= "<li>" . __('Type', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Type . "</li>";
815
  }
816
  if ( $col->Null ) {
817
+ $title .= "<li>" . __('Null', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Null . "</li>";
818
  }
819
  if ( $col->Key ) {
820
+ $title .= "<li>" . __('Key', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Key . "</li>";
821
  }
822
  if ( $col->Default ) {
823
+ $title .= "<li>" . __('Default', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Default . "</li>";
824
  }
825
  if ( $col->Extra ) {
826
+ $title .= "<li>" . __('Extra', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Extra . "</li>";
827
  }
828
  $title .= "</ul>";
829
  ?>
844
  }
845
  }
846
  if ( $con_method == 'delete' or $con_method == 'update' ) {
847
+ echo '<div class="select-db-op where"><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/add_condition.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" title="ADD" class="add_cond"/>WHERE</div>';
848
  if ( $wheres ) {
849
  echo '<script>';
850
  $wheres = explode('***where***', $wheres);
955
  jQuery.ajax({
956
  type: "POST",
957
  url: "<?php echo add_query_arg(array(
958
+ 'action' => 'FormMakerSQLMapping' . WDFMInstance(self::PLUGIN)->plugin_postfix,
959
  'id' => 0,
960
  'form_id' => $form_id,
961
  'task' => 'db_tables',
1176
  jQuery.ajax({
1177
  type: "POST",
1178
  url: "<?php echo add_query_arg(array(
1179
+ 'action' => 'FormMakerSQLMapping' . WDFMInstance(self::PLUGIN)->plugin_postfix,
1180
  'id' => 0,
1181
  'form_id' => $form_id,
1182
  'task' => 'db_table_struct',
1251
  $cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
1252
  }
1253
  $cond .= '</select>';
1254
+ $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
1255
  ?>
1256
  <script>
1257
  jQuery(document).ready(function() {
1394
  jQuery.ajax({
1395
  type: "POST",
1396
  url: "<?php echo add_query_arg(array(
1397
+ 'action' => 'FormMakerSQLMapping' . WDFMInstance(self::PLUGIN)->plugin_postfix,
1398
  'id' => 0,
1399
  'form_id' => $form_id,
1400
  'task' => 'save_query',
1763
  $title = $col->Field;
1764
  $title .= "<ul style='padding-left: 17px;'>";
1765
  if ( $col->Type ) {
1766
+ $title .= "<li>" . __('Type', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Type . "</li>";
1767
  }
1768
  if ( $col->Null ) {
1769
+ $title .= "<li>" . __('Null', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Null . "</li>";
1770
  }
1771
  if ( $col->Key ) {
1772
+ $title .= "<li>" . __('Key', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Key . "</li>";
1773
  }
1774
  if ( $col->Default ) {
1775
+ $title .= "<li>" . __('Default', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Default . "</li>";
1776
  }
1777
  if ( $col->Extra ) {
1778
+ $title .= "<li>" . __('Extra', WDFMInstance(self::PLUGIN)->prefix) . " - " . $col->Extra . "</li>";
1779
  }
1780
  $title .= "</ul>";
1781
  ?>
1793
  }
1794
  }
1795
  if ( $con_method == 'delete' or $con_method == 'update' ) {
1796
+ echo '<div class="select-db-op where"><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/add_condition.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" title="ADD" class="add_cond"/>WHERE</div>';
1797
  }
1798
  ?>
1799
  </div>
admin/views/FormMakerSubmits.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewFormMakerSubmits
5
  */
6
- class FMViewFormMakerSubmits {
7
  public function display( $params ) {
8
  if ( isset($_GET['form_id']) && isset($_GET['group_id']) ) {
9
  $rows = $params['rows'];
3
  /**
4
  * Class FMViewFormMakerSubmits
5
  */
6
+ class FMViewFormMakerSubmits extends FMAdminView {
7
  public function display( $params ) {
8
  if ( isset($_GET['form_id']) && isset($_GET['group_id']) ) {
9
  $rows = $params['rows'];
admin/views/Manage_fm.php CHANGED
@@ -5,19 +5,19 @@ class FMViewManage_fm extends FMAdminView {
5
  * FMViewManage_fm constructor.
6
  */
7
  public function __construct() {
8
- wp_enqueue_style('fm-tables');
9
- wp_enqueue_style('fm-first');
10
- wp_enqueue_style('fm-style');
11
- wp_enqueue_style('fm-layout');
12
 
13
  wp_enqueue_script('jquery');
14
  wp_enqueue_script('jquery-ui-sortable');
15
- wp_enqueue_script('fm-admin');
16
- wp_enqueue_script('fm-manage');
17
  /*$inline_styles = '#fm_admin_container .wdform_page .wdform_section .wdform_column.ui-sortable:empty:last-child:after {
18
- content: "' . __('Drop a field here to create a column.', WDFM()->prefix) . '";
19
  }';
20
- wp_add_inline_style('fm-style', $inline_styles);*/
21
  }
22
 
23
  /**
@@ -31,7 +31,7 @@ class FMViewManage_fm extends FMAdminView {
31
  $form_attr = array(
32
  'id' => 'manage_form',
33
  'class' =>'wd-form',
34
- 'action' => add_query_arg(array('page' => 'manage' . WDFM()->menu_postfix), 'admin.php'),
35
  );
36
  echo $this->form(ob_get_clean(), $form_attr);
37
  }
@@ -53,10 +53,10 @@ class FMViewManage_fm extends FMAdminView {
53
 
54
  $page_url = add_query_arg(array(
55
  'page' => $page,
56
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
57
  ), admin_url('admin.php'));
58
  echo $this->title(array(
59
- 'title' => __('Forms', WDFM()->prefix),
60
  'title_class' => 'wd-header',
61
  'add_new_button' => array(
62
  'href' => add_query_arg(array( 'page' => $page, 'task' => 'add' ), admin_url('admin.php')),
@@ -67,7 +67,7 @@ class FMViewManage_fm extends FMAdminView {
67
  <div class="tablenav top">
68
  <?php
69
  echo $this->bulk_actions($actions);
70
- if (WDFM()->is_free != 2) {
71
  echo $this->exp_imp_buttons();
72
  }
73
  echo $this->pagination($page_url, $total, $items_per_page);
@@ -78,14 +78,14 @@ class FMViewManage_fm extends FMAdminView {
78
  <thead>
79
  <tr>
80
  <td id="cb" class="manage-column column-cb check-column">
81
- <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFM()->prefix); ?></label>
82
  <input id="check_all" type="checkbox" />
83
  </td>
84
- <?php echo WDW_FM_Library::ordering('title', $orderby, $order, __('Title', WDFM()->prefix), $page_url, 'col_title column-primary wd-left'); ?>
85
- <?php echo WDW_FM_Library::ordering('type', $orderby, $order, __('Type', WDFM()->prefix), $page_url, 'col_type wd-left'); ?>
86
- <th class="col_count wd-left"><?php _e('Submissions', WDFM()->prefix); ?></th>
87
- <?php echo WDW_FM_Library::ordering('id', $orderby, $order, __('Shortcode', WDFM()->prefix), $page_url, 'wd-center'); ?>
88
- <th class="col_function wd-center"><?php _e('PHP function', WDFM()->prefix); ?></th>
89
  </tr>
90
  </thead>
91
  <tbody>
@@ -105,7 +105,7 @@ class FMViewManage_fm extends FMAdminView {
105
  <th class="check-column">
106
  <input id="check_<?php echo $row_data->id; ?>" name="check[<?php echo $row_data->id; ?>]" type="checkbox" class="form_title" data-id="<?php echo $row_data->id; ?>" />
107
  </th>
108
- <td class="column-primary" data-colname="<?php _e('Title', WDFM()->prefix); ?>">
109
  <strong>
110
  <?php
111
  if ( !$old ) {
@@ -123,7 +123,7 @@ class FMViewManage_fm extends FMAdminView {
123
  if ( !$row_data->published ) {
124
  ?>
125
 
126
- <span class="post-state"><?php _e('Unpublished', WDFM()->prefix); ?></span>
127
  <?php
128
  }
129
  ?>
@@ -133,46 +133,46 @@ class FMViewManage_fm extends FMAdminView {
133
  if ( !$old ) {
134
  ?>
135
  <span>
136
- <a href="<?php echo $edit_url; ?>"><?php _e('Edit', WDFM()->prefix); ?></a>
137
  |
138
  </span>
139
  <?php
140
  }
141
  ?>
142
  <span>
143
- <a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', WDFM()->prefix); ?></a>
144
  |
145
  </span>
146
  <span>
147
- <a href="<?php echo $publish_url; ?>"><?php echo ($row_data->published ? __('Unpublish', WDFM()->prefix) : __('Publish', WDFM()->prefix)); ?></a>
148
  |
149
  </span>
150
  <span class="trash">
151
- <a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFM()->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', WDFM()->prefix); ?></a>
152
  |
153
  </span>
154
  <span>
155
- <a href="<?php echo $preview_url; ?>" target="_blank"><?php _e('Preview', WDFM()->prefix); ?></a>
156
  </span>
157
  </div>
158
  <button class="toggle-row" type="button">
159
- <span class="screen-reader-text"><?php _e('Show more details', WDFM()->prefix); ?></span>
160
  </button>
161
  </td>
162
- <td data-colname="<?php _e('Type', WDFM()->prefix); ?>">
163
  <?php echo ucfirst($row_data->type); ?>
164
  <div class="row-actions">
165
  <span>
166
- <a href="<?php echo add_query_arg(array('task' => 'display_options', 'current_id' => $row_data->id), $page_url); ?>"><?php _e('Set display options', WDFM()->prefix); ?></a>
167
  </span>
168
  </div>
169
  </td>
170
- <td data-colname="<?php _e('Submissions', WDFM()->prefix); ?>">
171
  <?php
172
  if ($row_data->submission_count != 0) {
173
  ?>
174
- <a title="<?php _e('View sumbissions', WDFM()->prefix); ?>" target="_blank" href="<?php echo add_query_arg(array(
175
- 'page' => 'submissions' . WDFM()->menu_postfix,
176
  'task' => 'display',
177
  'current_id' => $row_data->id,
178
  ), admin_url('admin.php')); ?>">
@@ -186,18 +186,18 @@ class FMViewManage_fm extends FMAdminView {
186
  }
187
  ?>
188
  </td>
189
- <td data-colname="<?php _e('Shortcode', WDFM()->prefix); ?>">
190
- <input type="text" value='[Form id="<?php echo $row_data->id; ?>"]' onclick="fm_select_value(this)" size="12" readonly="readonly" />
191
  </td>
192
- <td data-colname="<?php _e('PHP function', WDFM()->prefix); ?>">
193
- <input type="text" value='&#60;?php wd_form_maker(<?php echo $row_data->id; ?>, "<?php echo $row_data->type; ?>"); ?&#62;' onclick="fm_select_value(this)" readonly="readonly" />
194
  </td>
195
  </tr>
196
  <?php
197
  }
198
  }
199
  else {
200
- echo WDW_FM_Library::no_items('forms');
201
  }
202
  ?>
203
  </tbody>
@@ -221,10 +221,10 @@ class FMViewManage_fm extends FMAdminView {
221
  echo $this->topbar();
222
 
223
  wp_enqueue_style('thickbox');
224
- wp_enqueue_style('fm-phone_field_css');
225
- wp_enqueue_style('fm-jquery-ui');
226
- wp_enqueue_style('fm-codemirror');
227
- wp_enqueue_style('fm-colorpicker');
228
 
229
  wp_enqueue_script('thickbox');
230
  wp_enqueue_script('jquery-ui-widget');
@@ -232,27 +232,27 @@ class FMViewManage_fm extends FMAdminView {
232
  wp_enqueue_script('jquery-ui-spinner');
233
  wp_enqueue_script('jquery-ui-datepicker');
234
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
235
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
236
  }
237
  else {
238
- echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
239
  }
240
  wp_enqueue_media();
241
  wp_enqueue_script('google-maps');
242
- wp_enqueue_script('fm-gmap_form');
243
- wp_enqueue_script('fm-phone_field');
244
- wp_enqueue_script('fm-formmaker_div');
245
- wp_enqueue_script('fm-codemirror');
246
- wp_enqueue_script('fm-formatting');
247
- wp_enqueue_script('fm-clike');
248
- wp_enqueue_script('fm-css');
249
- wp_enqueue_script('fm-javascript');
250
- wp_enqueue_script('fm-xml');
251
- wp_enqueue_script('fm-php');
252
- wp_enqueue_script('fm-htmlmixed');
253
- wp_enqueue_script('fm-colorpicker');
254
- wp_enqueue_script('fm-manage-edit');
255
- wp_enqueue_script('fm-add-fields');
256
 
257
  $id = $params['id'];
258
  $row = $params['row'];
@@ -291,23 +291,23 @@ class FMViewManage_fm extends FMAdminView {
291
  form_fields_initial = decodeURIComponent(form_fields_initial);
292
 
293
  default_theme = '<?php echo $default_theme; ?>';
294
- theme_edit_url = '<?php echo add_query_arg( array('page' => 'themes' . WDFM()->menu_postfix, 'task' =>'edit'), $page_url); ?>';
295
  jQuery(document).ready(function () {
296
  set_theme();
297
  });
298
  </script>
299
- <form class="wrap" id="manage_form" method="post" autocomplete="off" action="admin.php?page=manage<?php echo WDFM()->menu_postfix; ?>">
300
  <?php
301
  // Generate message container by message id or directly by message.
302
- $message_id = WDW_FM_Library::get('message', 0);
303
- $message = WDW_FM_Library::get('msg', '');
304
- echo WDW_FM_Library::message_id($message_id, $message);
305
  ?>
306
- <?php wp_nonce_field(WDFM()->nonce, WDFM()->nonce); ?>
307
  <h2 class="fm-h2-message"></h2>
308
  <div class="fm-page-header">
309
  <div class="wd-page-title wd-header">
310
- <h1 class="wp-heading-inline"><?php _e('Form Title', WDFM()->prefix); ?></h1>
311
  <input id="title" name="title" value="<?php echo $row->title; ?>" data-initial-value="<?php echo $row->title; ?>" class="fm-check-change" type="text" />
312
  <div class="fm-page-actions">
313
  <?php
@@ -315,40 +315,40 @@ class FMViewManage_fm extends FMAdminView {
315
  if ( $row->backup_id != "" ) {
316
  $backup_id = $next_backup_id;
317
  if ( $backup_id ) { ?>
318
- <button class="button redo-button button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFM()->prefix); ?>') || !FormManageSubmitButton()) {return false;}; jQuery('#saving_text').html('<?php _e('Redo', WDFM()->prefix); ?>');fm_set_input_value('task', 'redo');">
319
- <?php _e('Redo', WDFM()->prefix); ?>
320
  </button>
321
  <?php
322
  }
323
  $backup_id = $prev_backup_id;
324
  if ( $backup_id ) { ?>
325
- <button class="button undo-button button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFM()->prefix); ?>') || !FormManageSubmitButton()) {return false;}; jQuery('#saving_text').html('<?php _e('Undo', WDFM()->prefix); ?>');fm_set_input_value('task', 'undo');">
326
  <span></span>
327
- <?php _e('Undo', WDFM()->prefix); ?>
328
  </button>
329
  <?php
330
  }
331
  }
332
  }
333
  ?>
334
- <button class="button button-primary button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFM()->prefix); ?>') || !FormManageSubmitButton()) {return false;}; fm_set_input_value('task', 'apply');">
335
  <?php
336
  if ($row->title) {
337
- _e('Update', WDFM()->prefix);
338
  }
339
  else {
340
- _e('Publish', WDFM()->prefix);
341
  }
342
  ?>
343
  </button>
344
- <button class="button preview-button button-large"<?php if (!$row->title) echo ' disabled="disabled"' ?> <?php echo ($row->title) ? 'onclick="window.open(\''. add_query_arg( array('wdform_id' => $id), $form_preview_link ) .'\', \'_blank\'); return false;"' : ''; ?>><?php _e('Preview', WDFM()->prefix); ?></button>
345
  </div>
346
  </div>
347
  <div class="fm-clear"></div>
348
  </div>
349
  <div class="fm-theme-banner">
350
  <div class="fm-theme" style="float:left; position: relative">
351
- <span><?php _e('Theme', WDFM()->prefix); ?>:&nbsp;</span>
352
  <select id="theme" name="theme" data-initial-value="<?php echo $row->theme; ?>" class="fm-check-change" onChange="set_theme()">
353
  <optgroup label="New Themes">
354
  <?php
@@ -368,20 +368,20 @@ class FMViewManage_fm extends FMAdminView {
368
  ?>
369
  </optgroup>
370
  </select>
371
- <a id="edit_css" class="pointer" onclick="window.open('<?php echo add_query_arg(array('current_id' => ($row->theme ? $row->theme : $default_theme), WDFM()->nonce => wp_create_nonce(WDFM()->nonce)), admin_url('admin.php?page=themes' . WDFM()->menu_postfix . '&task=edit')); ?>'); return false;">
372
- <?php _e('Edit', WDFM()->prefix); ?>
373
  </a>
374
  <br />
375
- <div id="old_theme_notice" style="display: none;"><div class="error inline"><p><?php _e('The theme you have selected is outdated. Please choose one from New Themes section.', WDFM()->prefix); ?></p></div></div>
376
  </div>
377
  <div class="fm-page-actions">
378
  <?php if( $id ){ ?>
379
- <a class="button button-primary" href="<?php echo $params['form_options_url']; ?>"><?php _e('Form Options', WDFM()->prefix); ?></a>
380
- <a class="button" href="<?php echo $params['display_options_url']; ?>"><?php _e('Display Options', WDFM()->prefix); ?></a>
381
  <?php
382
  if ( !empty($params['advanced_layout_url']) ) {
383
  ?>
384
- <a class="button" href="<?php echo $params['advanced_layout_url']; ?>"><?php _e('Advanced Layout', WDFM()->prefix); ?></a>
385
  <?php
386
  }
387
  }
@@ -397,19 +397,19 @@ class FMViewManage_fm extends FMAdminView {
397
  <div class="meta-box-sortables" style="margin-top:30px;">
398
  <div id="postexcerpt" class="postbox closed" >
399
  <button type="button" class="button-link handlediv" aria-expanded="true">
400
- <span class="screen-reader-text"><?php _e('Toggle panel: Form Header', WDFM()->prefix); ?></span>
401
  <span class="toggle-indicator" aria-hidden="true"></span>
402
  </button>
403
- <h2 class="hndle"><span><?php _e('Form Header', WDFM()->prefix); ?></span></h2>
404
  <div class="inside">
405
  <div id="fm-header-content" class="panel-content">
406
  <div>
407
  <div class="fm-row">
408
- <label><?php _e('Title:', WDFM()->prefix); ?></label>
409
  <input type="text" id="header_title" name="header_title" class="fm-check-change" value="<?php echo $row->header_title; ?>" data-initial-value="<?php echo $row->header_title; ?>" />
410
  </div>
411
  <div class="fm-row">
412
- <label><?php _e('Description:', WDFM()->prefix); ?></label>
413
  <div id="description_editor" style="display: inline-block; vertical-align: middle;">
414
  <input type="hidden" id="header_description_initial_value" value="<?php echo rawurlencode($row->header_description); ?>" />
415
  <?php if (user_can_richedit()) {
@@ -425,9 +425,9 @@ class FMViewManage_fm extends FMAdminView {
425
  </div>
426
  <div>
427
  <div class="fm-row">
428
- <label><?php _e('Image:', WDFM()->prefix); ?></label>
429
  <input type="text" id="header_image_url" name="header_image_url" class="fm-check-change" value="<?php echo $row->header_image_url; ?>" data-initial-value="<?php echo $row->header_image_url; ?>" />
430
- <button class="button add-button medium" onclick="fmOpenMediaUploader(event); return false;"><?php _e('Add Image', WDFM()->prefix); ?></button>
431
  <?php $header_bg = $row->header_image_url ? 'background-image: url('.$row->header_image_url.'); background-position: center;' : ''; ?>
432
  <div id="header_image" class="header_img<?php if (!$row->header_image_url) echo ' fm-hide'; ?>" style="<?php echo $header_bg; ?>">
433
  <button type="button" id="remove_header_img" onclick="fmRemoveHeaderImage(event); return false;">
@@ -436,7 +436,7 @@ class FMViewManage_fm extends FMAdminView {
436
  </div>
437
  </div>
438
  <div class="fm-row">
439
- <label><?php _e('Image Animation:', WDFM()->prefix); ?></label>
440
  <select name="header_image_animation" class="fm-check-change" data-initial-value="<?php echo $row->header_image_animation; ?>">
441
  <?php
442
  foreach($animation_effects as $anim_key => $animation_effect){
@@ -447,7 +447,7 @@ class FMViewManage_fm extends FMAdminView {
447
  </select>
448
  </div>
449
  <div class="fm-row">
450
- <label for="header_hide_image"><?php _e('Hide Image on Mobile:', WDFM()->prefix); ?></label>
451
  <input type="checkbox" id="header_hide_image" name="header_hide_image" value="1" data-initial-value="<?php echo $row->header_hide_image; ?>" <?php echo $row->header_hide_image == '1' ? 'checked="checked"' : '' ?> />
452
  </div>
453
  </div>
@@ -458,7 +458,7 @@ class FMViewManage_fm extends FMAdminView {
458
  <div class="fm-edit-content">
459
  <div class="fm-drag-and-drop">
460
  <div>
461
- <label for="enable_sortable"><?php _e('Enable Drag & Drop', WDFM()->prefix); ?></label>
462
  <button name="sortable" id="enable_sortable" class="fm-checkbox-radio-button <?php echo $row->sortable == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="enable_drag(this); return false;" value="<?php echo $row->sortable; ?>">
463
  <span></span>
464
  </button>
@@ -478,13 +478,13 @@ class FMViewManage_fm extends FMAdminView {
478
  <div id="add_field" class="ui-sortable-handle">
479
  <div class="first-time-use">
480
  <span class="first-time-use-close dashicons dashicons-no-alt"></span>
481
- <?php _e('Drag icon to the form to add a field.', WDFM()->prefix); ?>
482
  </div>
483
 
484
  <div type="type_text" class="wdform_field">
485
  <div class="add-new-button button-primary" onclick="if (fm_check_something_really_important()) return; popup_ready(); Enable(); return false;">
486
  <span class="dashicons dashicons-move"></span>
487
- <?php _e('New Field', WDFM()->prefix); ?>
488
  </div>
489
  </div>
490
  </div>
@@ -516,58 +516,58 @@ class FMViewManage_fm extends FMAdminView {
516
  $pro_fields1 = array('file_upload', 'map', 'paypal');
517
  $pro_fields2 = array('file_upload', 'paypal', 'checkbox', 'radio', 'survey', 'time_and_date', 'select');
518
  $fields = array(
519
- __('BASIC FIELDS', WDFM()->prefix) => array(
520
- array('type' => 'text', 'subtype' => 'text', 'title' => __('Single Line Text', WDFM()->prefix)),
521
- array('type' => 'text', 'subtype' => 'textarea', 'title' => __('Paragraph Text', WDFM()->prefix)),
522
- array('type' => 'survey', 'subtype' => 'spinner', 'title' => __('Number', WDFM()->prefix)),
523
- array('type' => 'time_and_date', 'subtype' => 'date_new', 'title' => __('Date', WDFM()->prefix)),
524
- array('type' => 'select', 'subtype' => 'own_select', 'title' => __('Select', WDFM()->prefix)),
525
- array('type' => 'radio', 'subtype' => '', 'title' => __('Single Choice', WDFM()->prefix)),
526
- array('type' => 'checkbox', 'subtype' => '', 'title' => __('Multiple Choice', WDFM()->prefix)),
527
- array('type' => 'captcha', 'subtype' => 'recaptcha', 'title' => __('Recaptcha', WDFM()->prefix)),
528
- array('type' => 'button', 'subtype' => 'submit_reset', 'title' => __('Submit', WDFM()->prefix)),
529
- array('type' => 'captcha', 'subtype' => 'captcha', 'title' => __('Simple Captcha', WDFM()->prefix)),
530
  ),
531
- __('USER INFO FIELDS', WDFM()->prefix) => array(
532
- array('type' => 'text', 'subtype' => 'name', 'title' => __('Name', WDFM()->prefix)),
533
- array('type' => 'text', 'subtype' => 'submitter_mail', 'title' => __('Email', WDFM()->prefix)),
534
- array('type' => 'text', 'subtype' => 'phone_new', 'title' => __('Phone', WDFM()->prefix)),
535
- array('type' => 'text', 'subtype' => 'address', 'title' => __('Address', WDFM()->prefix)),
536
- array('type' => 'text', 'subtype' => 'mark_map', 'title' => __('Mark on Map', WDFM()->prefix)),
537
- array('type' => 'select', 'subtype' => 'country', 'title' => __('Country List', WDFM()->prefix)),
538
- array('type' => 'time_and_date', 'subtype' => 'date_fields', 'title' => __('Date of Birth', WDFM()->prefix)),
539
  ),
540
- __('LAYOUT FIELDS', WDFM()->prefix) => array(
541
- array('type' => 'editor', 'subtype' => '', 'title' => __('HTML', WDFM()->prefix)),
542
- array('type' => 'section_break', 'subtype' => '', 'title' => __('Section', WDFM()->prefix)),
543
- array('type' => 'page_break', 'subtype' => '', 'title' => __('Page', WDFM()->prefix)),
544
  ),
545
- __('ADVANCED', WDFM()->prefix) => array(
546
- array('type' => 'file_upload', 'subtype' => '', 'title' => __('File Upload', WDFM()->prefix)),
547
- array('type' => 'map', 'subtype' => '', 'title' => __('Map', WDFM()->prefix)),
548
- array('type' => 'time_and_date', 'subtype' => 'time', 'title' => __('Time', WDFM()->prefix)),
549
- array('type' => 'text', 'subtype' => 'send_copy', 'title' => __('Receive Copy', WDFM()->prefix)),
550
- array('type' => 'time_and_date', 'subtype' => 'date_range', 'title' => __('Date Range', WDFM()->prefix)),
551
- array('type' => 'survey', 'subtype' => 'star_rating', 'title' => __('Stars', WDFM()->prefix)),
552
- array('type' => 'survey', 'subtype' => 'scale_rating', 'title' => __('Rating', WDFM()->prefix)),
553
- array('type' => 'survey', 'subtype' => 'slider', 'title' => __('Slider', WDFM()->prefix)),
554
- array('type' => 'survey', 'subtype' => 'range', 'title' => __('Range', WDFM()->prefix)),
555
- array('type' => 'survey', 'subtype' => 'grading', 'title' => __('Grades', WDFM()->prefix)),
556
- array('type' => 'survey', 'subtype' => 'matrix', 'title' => __('Table of Fields', WDFM()->prefix)),
557
- array('type' => 'text', 'subtype' => 'hidden', 'title' => __('Hidden Input', WDFM()->prefix)),
558
- array('type' => 'button', 'subtype' => 'button', 'title' => __('Custom Button', WDFM()->prefix)),
559
- array('type' => 'text', 'subtype' => 'password', 'title' => __('Password', WDFM()->prefix)),
560
- array('type' => 'text', 'subtype' => 'phone', 'title' => __('Phone-Area Code', WDFM()->prefix)),
561
- array('type' => 'captcha', 'subtype' => 'arithmetic_captcha', 'title' => __('Arithmetic Captcha', WDFM()->prefix)),
562
  ),
563
- __('PAYMENT', WDFM()->prefix) => array(
564
- array('type' => 'paypal', 'subtype' => 'paypal_price_new', 'title' => __('Price', WDFM()->prefix)),
565
- array('type' => 'paypal', 'subtype' => 'paypal_select', 'title' => __('Payment Select', WDFM()->prefix)),
566
- array('type' => 'paypal', 'subtype' => 'paypal_radio', 'title' => __('Payment Single Choice', WDFM()->prefix)),
567
- array('type' => 'paypal', 'subtype' => 'paypal_checkbox', 'title' => __('Payment Multiple Choice', WDFM()->prefix)),
568
- array('type' => 'paypal', 'subtype' => 'paypal_shipping', 'title' => __('Shipping', WDFM()->prefix)),
569
- array('type' => 'paypal', 'subtype' => 'paypal_total', 'title' => __('Total', WDFM()->prefix)),
570
- array('type' => 'paypal', 'subtype' => 'stripe', 'title' => __('Stripe', WDFM()->prefix)),
571
  ),
572
  );
573
  ob_start();
@@ -575,16 +575,16 @@ class FMViewManage_fm extends FMAdminView {
575
  <div class="add-popup js">
576
  <div class="popup-header">
577
  <span class="popup-title">
578
- <?php _e('Add field', WDFM()->prefix); ?>
579
  </span>
580
- <span title="<?php _e('Close', WDFM()->prefix); ?>" alt="<?php _e('Close', WDFM()->prefix); ?>" class="close-popup dashicons dashicons-no-alt" onclick="close_window()"></span>
581
  </div>
582
  <div class="popup-body meta-box-sortables">
583
  <div class="popup-body-col field_types">
584
  <div class="field_types_cont">
585
- <h2 class="hndle field-types-filter_header"><span><?php _e('FIELD TYPES', WDFM()->prefix); ?></span></h2>
586
  <span class="field-types-filter-cont">
587
- <input class="field-types-filter" value="" placeholder="<?php _e('Filter', WDFM()->prefix); ?>" tabindex="-1" type="search" />
588
  </span>
589
  <div class="postbox filtered-fields hide">
590
  <button class="button-link handlediv" type="button" aria-expanded="true">
@@ -592,16 +592,16 @@ class FMViewManage_fm extends FMAdminView {
592
  <span class="toggle-indicator" aria-hidden="true"></span>
593
  </button>
594
  <h2 class="hndle">
595
- <span><?php _e('Filtered fields', WDFM()->prefix); ?></span>
596
  </h2>
597
  <div class="inside"></div>
598
  </div>
599
  <?php
600
  foreach ($fields as $section => $field) {
601
  ?>
602
- <div class="postbox<?php echo $section != __('BASIC FIELDS', WDFM()->prefix) ? " closed" : ""; ?>">
603
  <button class="button-link handlediv" type="button" aria-expanded="true">
604
- <span class="screen-reader-text"><?php echo __('Toggle panel:', WDFM()->prefix) , $section; ?></span>
605
  <span class="toggle-indicator" aria-hidden="false"></span>
606
  </button>
607
  <h2 class="hndle">
@@ -611,7 +611,7 @@ class FMViewManage_fm extends FMAdminView {
611
  <?php
612
  foreach ($field as $button) {
613
  ?>
614
- <button class="<?php echo ((WDFM()->is_free == 1 && in_array($button['type'], $pro_fields1)) || (WDFM()->is_free == 2 && in_array($button['type'], $pro_fields2))) ? 'wd-pro-fields ' : ''; ?>wd-button button-secondary" onclick="addRow(event, this, '<?php echo $button['type']; ?>', '<?php echo $button['subtype']; ?>'); return false;" data-type="type_<?php echo $button['subtype'] ? $button['subtype'] : $button['type']; ?>">
615
  <span class="field-type-button wd<?php echo ($button['subtype'] == '' ? $button['type'] : $button['subtype']); ?>"></span>
616
  <?php echo $button['title']; ?>
617
  </button>
@@ -627,21 +627,21 @@ class FMViewManage_fm extends FMAdminView {
627
  </div>
628
  <div id="field_container">
629
  <?php
630
- if (WDFM()->is_free) {
631
- echo $this->free_message(__('This field type is available in Premium version', WDFM()->prefix), '', '', 'premium_message');
632
  }
633
  $stripe_addon = $params['stripe_addon'];
634
  if ( $stripe_addon['enable'] ) {
635
- if (WDFM()->is_free) {
636
- echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFM()->prefix), '', '', 'stripe_message');
637
  }
638
  }
639
  else {
640
- if (WDFM()->is_free) {
641
- echo $this->promo_box(__('This feature is available only in the Premium version', WDFM()->prefix), __('Requires STRIPE add-on.', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', 'stripe_message');
642
  }
643
  else {
644
- echo $this->free_message(__('This feature requires STRIPE add-on', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFM()->prefix ), 'stripe_message');
645
  }
646
  }
647
  ?>
@@ -651,7 +651,7 @@ class FMViewManage_fm extends FMAdminView {
651
  <div class="popup-body-col field_preview">
652
  <div id="add-button-cont" class="add-button-cont">
653
  <button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">
654
- <?php _e('Add', WDFM()->prefix);?>
655
  </button>
656
  </div>
657
  <div id="show_table">
@@ -663,7 +663,7 @@ class FMViewManage_fm extends FMAdminView {
663
  <input type="hidden" id="old_selected" />
664
  <input type="hidden" id="element_type" />
665
  <input type="hidden" id="editing_id" />
666
- <input type="hidden" value="<?php echo WDFM()->plugin_url; ?>" id="form_plugins_url" />
667
  <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
668
  <?php if ( user_can_richedit() ) {
669
  wp_editor('', 'form_maker_editor', array(
@@ -686,10 +686,10 @@ class FMViewManage_fm extends FMAdminView {
686
 
687
  public function form_options( $params ) {
688
  wp_enqueue_style('thickbox');
689
- wp_enqueue_style('fm-phone_field_css');
690
- wp_enqueue_style('fm-jquery-ui');
691
- wp_enqueue_style('fm-codemirror');
692
- wp_enqueue_style('fm-colorpicker');
693
 
694
  wp_enqueue_script('thickbox');
695
  wp_enqueue_script('jquery-ui-widget');
@@ -697,26 +697,26 @@ class FMViewManage_fm extends FMAdminView {
697
  wp_enqueue_script('jquery-ui-spinner');
698
  wp_enqueue_script('jquery-ui-datepicker');
699
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
700
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
701
  }
702
  else {
703
- echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
704
  }
705
  wp_enqueue_media();
706
  wp_enqueue_script('google-maps');
707
- wp_enqueue_script('fm-form-options');
708
- wp_enqueue_script('fm-gmap_form');
709
- wp_enqueue_script('fm-phone_field');
710
- wp_enqueue_script('fm-formmaker_div');
711
- wp_enqueue_script('fm-codemirror');
712
- wp_enqueue_script('fm-formatting');
713
- wp_enqueue_script('fm-clike');
714
- wp_enqueue_script('fm-css');
715
- wp_enqueue_script('fm-javascript');
716
- wp_enqueue_script('fm-xml');
717
- wp_enqueue_script('fm-php');
718
- wp_enqueue_script('fm-htmlmixed');
719
- wp_enqueue_script('fm-colorpicker');
720
 
721
  $id = $params['id'];
722
  $page = $params['page'];
@@ -728,7 +728,7 @@ class FMViewManage_fm extends FMAdminView {
728
  $form_attr = array(
729
  'id' => 'adminForm',
730
  'name' => 'adminForm',
731
- 'class' => WDFM()->css_prefix . 'form_options wd-form',
732
  'current_id' => $id,
733
  'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
734
  );
@@ -768,13 +768,13 @@ class FMViewManage_fm extends FMAdminView {
768
  ));
769
  $buttons = array(
770
  'save' => array(
771
- 'title' => __('Update', WDFM()->prefix),
772
  'value' => 'save',
773
  'onclick' => 'if( ! wd_fm_apply_options(\'apply_form_options\') ){ return false; }',
774
  'class' => 'button-primary',
775
  ),
776
  'back' => array(
777
- 'title' => __('Back to Form', WDFM()->prefix),
778
  'value' => 'back',
779
  'onclick' => 'window.open(\'' . $back_url . '\', \'_self\'); return false;',
780
  'class' => 'button',
@@ -798,25 +798,25 @@ class FMViewManage_fm extends FMAdminView {
798
  <div class="submenu-pad">
799
  <ul id="submenu" class="configuration">
800
  <li>
801
- <a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#"><?php _e('General Options', WDFM()->prefix); ?></a>
802
  </li>
803
  <li>
804
- <a id="emailTab" class="fm_fieldset_tab" onclick="form_maker_options_tabs('emailTab')" href="#"><?php _e('Email Options', WDFM()->prefix); ?></a>
805
  </li>
806
  <li>
807
- <a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#"><?php _e('Actions after Submission', WDFM()->prefix); ?></a>
808
  </li>
809
  <li>
810
- <a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#"><?php _e('Payment Options', WDFM()->prefix); ?></a>
811
  </li>
812
  <li>
813
- <a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript'); codemirror_for_javascript();" href="#"><?php _e('JavaScript', WDFM()->prefix); ?></a>
814
  </li>
815
  <li>
816
- <a id="conditions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('conditions')" href="#"><?php _e('Conditional Fields', WDFM()->prefix); ?></a>
817
  </li>
818
  <li>
819
- <a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#"><?php _e('MySQL Mapping', WDFM()->prefix); ?></a>
820
  </li>
821
  <?php
822
  if ( !empty($addons['tabs']) ) {
@@ -840,25 +840,25 @@ class FMViewManage_fm extends FMAdminView {
840
  <div class="wd-box-section">
841
  <div class="wd-box-content">
842
  <span class="wd-group">
843
- <label class="wd-label"><?php _e('Published', WDFM()->prefix); ?></label>
844
  <input type="radio" name="published" <?php echo $row->published == 1 ? 'checked="checked"' : '' ?> id="fm_go-published-1" class="wd-radio" value="1">
845
- <label class="wd-label-radio" for="fm_go-published-1"><?php _e('Yes', WDFM()->prefix); ?></label>
846
  <input type="radio" name="published" <?php echo $row->published == 0 ? 'checked="checked"' : '' ?> id="fm_go-published-0" class="wd-radio" value="0">
847
- <label class="wd-label-radio" for="fm_go-published-0"><?php _e('No', WDFM()->prefix); ?></label>
848
  </span>
849
  <span class="wd-group">
850
- <label class="wd-label"><?php _e('Save data(to database)', WDFM()->prefix); ?></label>
851
  <input type="radio" name="savedb" <?php echo $row->savedb == 1 ? 'checked="checked"' : '' ?> id="fm_go-savedb-1" class="wd-radio" value="1">
852
- <label class="wd-label-radio" for="fm_go-savedb-1"><?php _e('Yes', WDFM()->prefix); ?></label>
853
  <input type="radio" name="savedb" <?php echo $row->savedb == 0 ? 'checked="checked"' : '' ?> id="fm_go-savedb-0" class="wd-radio" value="0">
854
- <label class="wd-label-radio" for="fm_go-savedb-0"><?php _e('No', WDFM()->prefix); ?></label>
855
- <p class="description"><?php _e('IMPORTANT! If you disable this option, the information submitted through this form will not be saved in the database and will not be displayed on the Submissions page.', WDFM()->prefix); ?></p>
856
  </span>
857
  <span class="wd-group theme-wrap">
858
- <label class="wd-label"><?php _e('Theme', WDFM()->prefix); ?></label>
859
  <select id="theme" name="theme" onChange="set_theme()">
860
- <optgroup label="<?php _e('New Themes', WDFM()->prefix); ?>">
861
- <option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2"><?php _e('Inherit From Website Theme', WDFM()->prefix); ?></option>
862
  <?php
863
  $optiongroup = TRUE;
864
  foreach ($themes as $theme) {
@@ -866,7 +866,7 @@ class FMViewManage_fm extends FMAdminView {
866
  $optiongroup = FALSE;
867
  ?>
868
  </optgroup>
869
- <optgroup label="<?php _e('Outdated Themes', WDFM()->prefix); ?>">
870
  <?php } ?>
871
  <option value="<?php echo $theme->id; ?>" <?php echo(($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
872
  <?php } ?>
@@ -874,24 +874,24 @@ class FMViewManage_fm extends FMAdminView {
874
  </select>
875
  <a id="edit_css" class="options-edit-button" onclick="window.open('<?php echo add_query_arg(array(
876
  'current_id' => ($row->theme && $row->theme != '0' ? $row->theme : $default_theme),
877
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce)
878
- ), admin_url('admin.php?page=themes' . WDFM()->menu_postfix . '&task=edit')); ?>'); return false;"><?php _e('Edit', WDFM()->prefix); ?></a>
879
- <div id="old_theme_notice" class="error inline" style="display: none;"><p><?php _e('The theme you have selected is outdated. Please choose one from New Themes section.', WDFM()->prefix); ?></p></div>
880
- <p class="description"><?php _e('The appearance of your forms is controlled by the theme you select with this option. Press Edit button to open and modify your form theme.', WDFM()->prefix); ?></p>
881
 
882
  </span>
883
  <span class="wd-group">
884
- <label class="wd-label" for="requiredmark"><?php _e('Required fields mark', WDFM()->prefix); ?></label>
885
  <input type="text" id="requiredmark" name="requiredmark" value="<?php echo $row->requiredmark; ?>">
886
- <p class="description"><?php _e('Use this option to change the mark for required fields of your form.', WDFM()->prefix); ?></p>
887
  </span>
888
  <span class="wd-group">
889
- <label class="wd-label"><?php _e('Save Uploads', WDFM()->prefix); ?></label>
890
  <input type="radio" name="save_uploads" <?php echo $row->save_uploads == 1 ? 'checked="checked"' : '' ?> id="fm_go-save_uploads-1" class="wd-radio" value="1">
891
- <label class="wd-label-radio" for="fm_go-save_uploads-1"><?php _e('Yes', WDFM()->prefix); ?></label>
892
  <input type="radio" name="save_uploads" <?php echo $row->save_uploads == 0 ? 'checked="checked"' : '' ?> id="fm_go-save_uploads-0" class="wd-radio" value="0">
893
- <label class="wd-label-radio" for="fm_go-save_uploads-0"><?php _e('No', WDFM()->prefix); ?></label>
894
- <p class="description"><?php _e('IMPORTANT! If you disable this option, the files uploaded through your form will not be saved on your site. The files will still be sent to emails and saved in Google Drive or Dropbox, if configured.', WDFM()->prefix); ?></p>
895
  </span>
896
  </div>
897
  </div>
@@ -900,12 +900,12 @@ class FMViewManage_fm extends FMAdminView {
900
  <div class="wd-box-section">
901
  <div class="wd-box-content">
902
  <?php
903
- if (WDFM()->is_free) {
904
- echo $this->free_message(__('This functionality is available in Premium version', WDFM()->prefix));
905
  }
906
  ?>
907
- <span class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
908
- <label class="wd-label"><?php _e('Allow User to see submissions', WDFM()->prefix); ?></label>
909
  <?php
910
  $checked_UserGroup = explode(',', $row->user_id_wd);
911
  $i = 0;
@@ -914,53 +914,53 @@ class FMViewManage_fm extends FMAdminView {
914
  if ( in_array($val, $checked_UserGroup) ) {
915
  echo ' checked="checked"';
916
  }
917
- echo ' onchange="acces_level(' . count($userGroups) . ')" ' . disabled(WDFM()->is_free, true, false) . ' /><label for="user_' . $i . '">' . $uG["name"] . '</label><br>';
918
  $i++;
919
  }
920
  ?>
921
- <input type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo(in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?> <?php disabled(WDFM()->is_free, true) ?> /><label for="user_<?php echo $i; ?>">Guest</label>
922
  <input type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
923
- <p class="description"><?php _e('Mark all user roles which will be able to view front-end submissions, when you publish them on a post or page.', WDFM()->prefix); ?></p>
924
  </span>
925
  <?php if ( count($label_titles_for_submissions) ) { ?>
926
- <span class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
927
- <label class="wd-label"><?php _e('Fields to hide in frontend submissions', WDFM()->prefix); ?></label>
928
  <ul id="form_fields">
929
  <li>
930
- <input type="checkbox" name="all_fields" id="all_fields" onclick="checkAllByParentId('form_fields'); checked_labels('filed_label')" value="submit_id,<?php echo implode(',', $labels_id_for_submissions) . "," . ($payment_info ? "payment_info" : ""); ?>" <?php disabled(WDFM()->is_free, true) ?> />
931
- <label for="all_fields"><?php _e('Select All', WDFM()->prefix); ?></label>
932
  </li>
933
  <?php
934
- echo "<li><input type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"submit_id\">ID</label></li>";
935
  for ( $i = 0, $n = count($label_titles_for_submissions); $i < $n; $i++ ) {
936
  $field_label = $label_titles_for_submissions[$i];
937
- echo "<li><input type=\"checkbox\" id=\"filed_label" . $i . "\" name=\"filed_label" . $i . "\" value=\"" . $labels_id_for_submissions[$i] . "\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
938
  }
939
  if ( $payment_info ) {
940
- echo "<li><input type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"payment_info\">Payment Info</label></li>";
941
  }
942
  ?>
943
  </ul>
944
  <input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
945
- <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFM()->prefix); ?></p>
946
  </span>
947
  <?php if ( $stats_labels ) { ?>
948
  <span class="wd-group">
949
- <label class="wd-label"><?php _e('Stats fields:', WDFM()->prefix); ?></label>
950
  <ul id="stats_fields">
951
  <li>
952
- <input type="checkbox" name="all_stats_fields" id="all_stats_fields" onclick="checkAllByParentId('stats_fields'); checked_labels('stats_filed_label');" value="<?php echo implode(',', $stats_labels_ids) . ","; ?>" <?php disabled(WDFM()->is_free, true) ?> />
953
- <label for="all_stats_fields"><?php _e('Select All', WDFM()->prefix); ?></label>
954
  </li>
955
  <?php
956
  for ( $i = 0, $n = count($stats_labels); $i < $n; $i++ ) {
957
  $field_label = $stats_labels[$i];
958
- echo "<li><input type=\"checkbox\" id=\"stats_filed_label" . $i . "\" name=\"stats_filed_label" . $i . "\" value=\"" . $stats_labels_ids[$i] . "\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"stats_filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
959
  }
960
  ?>
961
  </ul>
962
  <input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
963
- <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFM()->prefix); ?></p>
964
  </span>
965
  <?php }
966
  } ?>
@@ -975,13 +975,13 @@ class FMViewManage_fm extends FMAdminView {
975
  <div class="wd-box-section">
976
  <div class="wd-box-content">
977
  <div class="wd-group">
978
- <label class="wd-label"><?php _e('Send E-mail', WDFM()->prefix); ?></label>
979
  <input type="radio" name="sendemail" <?php echo $row->sendemail == 1 ? 'checked="checked"' : '' ?> id="fm_sendemail-1" class="wd-radio" value="1" onchange="fm_toggle_email_options(true)" />
980
- <label class="wd-label-radio" for="fm_sendemail-1"><?php _e('Yes', WDFM()->prefix); ?></label>
981
  <input type="radio" name="sendemail" <?php echo $row->sendemail == 0 ? 'checked="checked"' : '' ?> id="fm_sendemail-0" class="wd-radio" value="0" onchange="fm_toggle_email_options(false)" />
982
- <label class="wd-label-radio" for="fm_sendemail-0"><?php _e('No', WDFM()->prefix); ?></label>
983
- <p class="description"><?php _e('Enable this setting to send submitted information to administrators and/or the submitter.', WDFM()->prefix); ?></p>
984
- <p class="description fm_email_options"><?php _e('In case you cannot find the submission email in your Inbox, make sure to check the Spam folder as well.', WDFM()->prefix); ?></p>
985
  </div>
986
  </div>
987
  </div>
@@ -992,11 +992,11 @@ class FMViewManage_fm extends FMAdminView {
992
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
993
  <div class="wd-box-section">
994
  <div class="wd-box-title">
995
- <strong><?php _e('Email to Administrator', WDFM()->prefix); ?></strong>
996
  </div>
997
  <div class="wd-box-content">
998
  <div class="wd-group wd-has-placeholder">
999
- <label class="wd-label" for="mailToAdd"><?php _e('Email to send submissions to', WDFM()->prefix); ?></label>
1000
  <input type="text" id="mailToAdd" name="mailToAdd" />
1001
  <input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
1002
  <span class="dashicons dashicons-list-view" data-id="mailToAdd"></span>
@@ -1007,23 +1007,23 @@ class FMViewManage_fm extends FMAdminView {
1007
  if ( $mail && $mail != ',' ) {
1008
  ?>
1009
  <p class="fm_mail_input">
1010
- <span class="mail_name"><?php echo $mail; ?></span><span class="dashicons dashicons-trash" onclick="fm_delete_mail(this, '<?php echo $mail; ?>')" title="<?php _e('Delete Email', WDFM()->prefix); ?>"></span>
1011
  </p>
1012
  <?php
1013
  }
1014
  }
1015
  ?>
1016
  </div>
1017
- <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFM()->prefix); ?></p>
1018
  </div>
1019
  <div class="wd-group wd-has-placeholder">
1020
- <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFM()->prefix); ?></label>
1021
  <input type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
1022
  <span class="dashicons dashicons-list-view" data-id="mail_subject"></span>
1023
- <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
1024
  </div>
1025
  <div class="wd-group">
1026
- <label class="wd-label" for="script_mail"><?php _e('Custom Text in Email For Administrator', WDFM()->prefix); ?></label>
1027
  <div class="wd-editor-placeholder">
1028
  <span class="dashicons dashicons-list-view" data-id="script_mail"></span>
1029
  </div>
@@ -1042,19 +1042,19 @@ class FMViewManage_fm extends FMAdminView {
1042
  <?php
1043
  }
1044
  ?>
1045
- <p class="description"><?php _e('Write custom content to the email message which is sent to administrator. Include All Fields List to forward all submitted information, or click on fields buttons to use individual field values in the content.', WDFM()->prefix); ?></p>
1046
  </div>
1047
  <div class="postbox closed">
1048
  <button class="button-link handlediv" type="button" aria-expanded="true">
1049
- <span class="screen-reader-text"><?php _e('Toggle panel:', WDFM()->prefix); ?></span>
1050
  <span class="toggle-indicator" aria-hidden="false"></span>
1051
  </button>
1052
  <h2 class="hndle">
1053
- <span><?php _e('Advanced', WDFM()->prefix); ?></span>
1054
  </h2>
1055
  <div class="inside">
1056
  <div class="wd-group">
1057
- <label class="wd-label"><?php _e('Email From', WDFM()->prefix); ?></label>
1058
  <?php
1059
  $is_other = TRUE;
1060
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
@@ -1075,20 +1075,20 @@ class FMViewManage_fm extends FMAdminView {
1075
  }
1076
  ?>
1077
  <input style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-radio" type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other_wrap')" />
1078
- <label style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-label-radio" for="other"><?php _e('Other', WDFM()->prefix); ?></label>
1079
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1080
  <input type="text" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1081
  </p>
1082
- <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFM()->prefix); ?></p>
1083
  </div>
1084
  <div class="wd-group wd-has-placeholder">
1085
- <label class="wd-label" for="from_name"><?php _e('From Name', WDFM()->prefix); ?></label>
1086
  <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
1087
  <span class="dashicons dashicons-list-view" data-id="from_name"></span>
1088
- <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFM()->prefix); ?></p>
1089
  </div>
1090
  <div class="wd-group">
1091
- <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1092
  <?php
1093
  $is_other = TRUE;
1094
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
@@ -1109,45 +1109,45 @@ class FMViewManage_fm extends FMAdminView {
1109
  }
1110
  ?>
1111
  <input style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-radio" type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other_wrap')" />
1112
- <label style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-label-radio" for="other1"><?php _e('Other', WDFM()->prefix); ?></label>
1113
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other_wrap">
1114
  <input type="text" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" id="reply_to_other" />
1115
  </p>
1116
- <p class="description"><?php _e('Specify an alternative email address, to which the administrator will be able to reply upon receiving the message.', WDFM()->prefix); ?></p>
1117
  </div>
1118
  <div class="wd-group">
1119
- <label class="wd-label" for="mail_cc"><?php _e('CC', WDFM()->prefix); ?></label>
1120
  <input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" />
1121
- <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFM()->prefix); ?></p>
1122
  </div>
1123
  <div class="wd-group">
1124
- <label class="wd-label" for="mail_bcc"><?php _e('BCC', WDFM()->prefix); ?></label>
1125
  <input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" />
1126
- <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFM()->prefix); ?></p>
1127
  </div>
1128
  <div class="wd-group">
1129
- <label class="wd-label"><?php _e('Mode', WDFM()->prefix); ?></label>
1130
  <input type="radio" name="mail_mode" <?php echo $row->mail_mode == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode-1" class="wd-radio" value="1">
1131
- <label class="wd-label-radio" for="fm_mo_mail_mode-1"><?php _e('HTML', WDFM()->prefix); ?></label>
1132
  <input type="radio" name="mail_mode" <?php echo $row->mail_mode == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode-0" class="wd-radio" value="0">
1133
- <label class="wd-label-radio" for="fm_mo_mail_mode-0"><?php _e('Text', WDFM()->prefix); ?></label>
1134
- <p class="description"><?php _e('Select the layout of the submission email, Text or HTML.', WDFM()->prefix); ?></p>
1135
  </div>
1136
  <div class="wd-group">
1137
- <label class="wd-label"><?php _e('Attach File', WDFM()->prefix); ?></label>
1138
  <input type="radio" name="mail_attachment" <?php echo $row->mail_attachment == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment-1" class="wd-radio" value="1">
1139
- <label class="wd-label-radio" for="fm_mo_mail_attachment-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1140
  <input type="radio" name="mail_attachment" <?php echo $row->mail_attachment == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment-0" class="wd-radio" value="0">
1141
- <label class="wd-label-radio" for="fm_mo_mail_attachment-0"><?php _e('No', WDFM()->prefix); ?></label>
1142
- <p class="description"><?php _e('If you have File Upload fields on your form, enable this setting to attach uploaded files to submission or confirmation email.', WDFM()->prefix); ?></p>
1143
  </div>
1144
  <div class="wd-group">
1145
- <label class="wd-label"><?php _e('Email empty fields', WDFM()->prefix); ?></label>
1146
  <input type="radio" name="mail_emptyfields" <?php echo $row->mail_emptyfields == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_emptyfields-1" class="wd-radio" value="1">
1147
- <label class="wd-label-radio" for="fm_mo_mail_emptyfields-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1148
  <input type="radio" name="mail_emptyfields" <?php echo $row->mail_emptyfields == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_emptyfields-0" class="wd-radio" value="0">
1149
- <label class="wd-label-radio" for="fm_mo_mail_emptyfields-0"><?php _e('No', WDFM()->prefix); ?></label>
1150
- <p class="description"><?php _e('Disable this setting, in case you do not want to include form fields, which are left empty by the submitter.', WDFM()->prefix); ?></p>
1151
  </div>
1152
  </div>
1153
  </div>
@@ -1157,16 +1157,16 @@ class FMViewManage_fm extends FMAdminView {
1157
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
1158
  <div class="wd-box-section">
1159
  <div class="wd-box-title">
1160
- <strong><?php _e('Email to User', WDFM()->prefix); ?></strong>
1161
  </div>
1162
  <div class="wd-box-content">
1163
  <div class="wd-group">
1164
- <label class="wd-label"><?php _e('Send to', WDFM()->prefix); ?></label>
1165
  <?php
1166
  $fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
1167
  $fields_count = count($fields);
1168
  if ( $fields_count == 1 ) {
1169
- _e('There is no email field', WDFM()->prefix);
1170
  }
1171
  else {
1172
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
@@ -1179,16 +1179,16 @@ class FMViewManage_fm extends FMAdminView {
1179
  }
1180
  }
1181
  ?>
1182
- <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFM()->prefix); ?></p>
1183
  </div>
1184
  <div class="wd-group wd-has-placeholder">
1185
- <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFM()->prefix); ?></label>
1186
  <input type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
1187
  <span class="dashicons dashicons-list-view" data-id="mail_subject_user"></span>
1188
- <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
1189
  </div>
1190
  <div class="wd-group">
1191
- <label class="wd-label" for="script_mail_user"><?php _e('Custom Text in Email For User', WDFM()->prefix); ?></label>
1192
  <div class="wd-editor-placeholder">
1193
  <span class="dashicons dashicons-list-view" data-id="script_mail_user"></span>
1194
  </div>
@@ -1207,76 +1207,76 @@ class FMViewManage_fm extends FMAdminView {
1207
  <?php
1208
  }
1209
  ?>
1210
- <p class="description"><?php _e('Write custom content to the email message which is sent to submitter. Include All Fields List to forward all submitted information, or click on fields buttons to use individual field values in the content.', WDFM()->prefix); ?></p>
1211
  </div>
1212
  <div class="postbox closed">
1213
  <button class="button-link handlediv" type="button" aria-expanded="true">
1214
- <span class="screen-reader-text"><?php _e('Toggle panel:', WDFM()->prefix); ?></span>
1215
  <span class="toggle-indicator" aria-hidden="false"></span>
1216
  </button>
1217
  <h2 class="hndle">
1218
- <span><?php _e('Advanced', WDFM()->prefix); ?></span>
1219
  </h2>
1220
  <div class="inside">
1221
  <div class="wd-group">
1222
- <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFM()->prefix); ?></label>
1223
  <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1224
- <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFM()->prefix); ?></p>
1225
  </div>
1226
  <div class="wd-group wd-has-placeholder">
1227
- <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFM()->prefix); ?></label>
1228
  <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
1229
  <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
1230
- <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFM()->prefix); ?></p>
1231
  </div>
1232
  <div class="wd-group">
1233
- <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1234
  <input type="text" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" id="reply_to_user" />
1235
- <p class="description"><?php _e('Specify an alternative email address, to which the submitter will be able to reply upon receiving the message.', WDFM()->prefix); ?></p>
1236
  </div>
1237
  <div class="wd-group">
1238
- <label class="wd-label" for="mail_cc_user"><?php _e('CC', WDFM()->prefix); ?></label>
1239
  <input type="text" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" id="mail_cc_user" />
1240
- <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFM()->prefix); ?></p>
1241
  </div>
1242
  <div class="wd-group">
1243
- <label class="wd-label" for="mail_bcc_user"><?php _e('BCC', WDFM()->prefix); ?></label>
1244
  <input type="text" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" id="mail_bcc_user" />
1245
- <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFM()->prefix); ?></p>
1246
  </div>
1247
  <div class="wd-group">
1248
- <label class="wd-label"><?php _e('Mode', WDFM()->prefix); ?></label>
1249
  <input type="radio" name="mail_mode_user" <?php echo $row->mail_mode_user == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode_user-1" class="wd-radio" value="1">
1250
- <label class="wd-label-radio" for="fm_mo_mail_mode_user-1"><?php _e('HTML', WDFM()->prefix); ?></label>
1251
  <input type="radio" name="mail_mode_user" <?php echo $row->mail_mode_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode_user-0" class="wd-radio" value="0">
1252
- <label class="wd-label-radio" for="fm_mo_mail_mode_user-0"><?php _e('Text', WDFM()->prefix); ?></label>
1253
- <p class="description"><?php _e('Select the layout of the submission email, Text or HTML.', WDFM()->prefix); ?></p>
1254
  </div>
1255
  <div class="wd-group">
1256
- <label class="wd-label"><?php _e('Attach File', WDFM()->prefix); ?></label>
1257
  <input type="radio" name="mail_attachment_user" <?php echo $row->mail_attachment_user == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment_user-1" class="wd-radio" value="1">
1258
- <label class="wd-label-radio" for="fm_mo_mail_attachment_user-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1259
  <input type="radio" name="mail_attachment_user" <?php echo $row->mail_attachment_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment_user-0" class="wd-radio" value="0">
1260
- <label class="wd-label-radio" for="fm_mo_mail_attachment_user-0"><?php _e('No', WDFM()->prefix); ?></label>
1261
- <p class="description"><?php _e('If you have File Upload fields on your form, enable this setting to attach uploaded files to submission or confirmation email.', WDFM()->prefix); ?></p>
1262
  </div>
1263
  <div class="wd-group">
1264
- <label class="wd-label"><?php _e('Email verification', WDFM()->prefix); ?></label>
1265
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-1" onclick="wdshow('expire_link')" class="wd-radio" value="1">
1266
- <label class="wd-label-radio" for="fm_mo_mail_verify-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1267
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-0" onclick="wdhide('expire_link')" class="wd-radio" value="0">
1268
- <label class="wd-label-radio" for="fm_mo_mail_verify-0"><?php _e('No', WDFM()->prefix); ?></label>
1269
- <p class="description"><?php _e('Activate this option, in case you would like the users to verify their email addresses. If it’s enabled, the user email will contain a verification link.', WDFM()->prefix); ?></p>
1270
  </div>
1271
  <div class="wd-group" <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : '') ?> id="expire_link">
1272
- <label class="wd-label" for="mail_verify_expiretime"><?php _e('Verification link expires in', WDFM()->prefix); ?></label>
1273
  <input class="inputbox" type="text" name="mail_verify_expiretime" maxlength="10" value="<?php echo($row->mail_verify_expiretime ? $row->mail_verify_expiretime : 0); ?>" onkeypress="return check_isnum_point(event)" id="mail_verify_expiretime">
1274
- <small><?php _e(' -- hours (0 - never expires).', WDFM()->prefix); ?></small>
1275
  <a target="_blank" href="<?php echo add_query_arg(array(
1276
  'post' => $params["mail_ver_id"],
1277
  'action' => 'edit',
1278
- ), admin_url('post.php')); ?>"><?php _e('Edit post', WDFM()->prefix); ?></a>
1279
- <p class="description"><?php _e('Use this option to specify a time period (hours), during which the user will be able to verify their email address.', WDFM()->prefix); ?></p>
1280
  </div>
1281
  </div>
1282
  </div>
@@ -1291,25 +1291,25 @@ class FMViewManage_fm extends FMAdminView {
1291
  <div class="wd-box-section">
1292
  <div class="wd-box-content">
1293
  <span class="wd-group">
1294
- <label class="wd-label"><?php _e('Action type', WDFM()->prefix); ?></label>
1295
  <input type="radio" name="submit_text_type" id="text_type_none" onclick="set_type('none')" value="1" <?php echo ($row->submit_text_type != 2 && $row->submit_text_type != 3 && $row->submit_text_type != 4 && $row->submit_text_type != 5) ? "checked" : ""; ?> />
1296
- <label for="text_type_none"><?php _e('Stay on Form', WDFM()->prefix); ?></label>
1297
  <br>
1298
  <input type="radio" name="submit_text_type" id="text_type_post" onclick="set_type('post')" value="2" <?php echo ($row->submit_text_type == 2) ? "checked" : ""; ?> />
1299
- <label for="text_type_post"><?php _e('Post', WDFM()->prefix); ?></label>
1300
  <br>
1301
  <input type="radio" name="submit_text_type" id="text_type_page" onclick="set_type('page')" value="5" <?php echo ($row->submit_text_type == 5) ? "checked" : ""; ?> />
1302
- <label for="text_type_page"><?php _e('Page', WDFM()->prefix); ?></label>
1303
  <br>
1304
  <input type="radio" name="submit_text_type" id="text_type_custom_text" onclick="set_type('custom_text')" value="3" <?php echo ($row->submit_text_type == 3) ? "checked" : ""; ?> />
1305
- <label for="text_type_custom_text"><?php _e('Custom Text', WDFM()->prefix); ?></label>
1306
  <br>
1307
  <input type="radio" name="submit_text_type" id="text_type_url" onclick="set_type('url')" value="4" <?php echo ($row->submit_text_type == 4) ? "checked" : ""; ?> />
1308
- <label for="text_type_url"><?php _e('URL', WDFM()->prefix); ?></label>
1309
  </span>
1310
  <span class="wd-group">
1311
  <div id="post" <?php echo(($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
1312
- <label class="wd-label"><?php _e('Post', WDFM()->prefix); ?></label>
1313
  <select id="post_name" name="post_name">
1314
  <option value="0">- Select Post -</option>
1315
  <?php
@@ -1326,7 +1326,7 @@ class FMViewManage_fm extends FMAdminView {
1326
  </select>
1327
  </div>
1328
  <div id="page" <?php echo(($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
1329
- <label class="wd-label"><?php _e('Page', WDFM()->prefix); ?></label>
1330
  <select id="page_name" name="page_name">
1331
  <option value="0">- Select Page -</option>
1332
  <?php
@@ -1342,7 +1342,7 @@ class FMViewManage_fm extends FMAdminView {
1342
  </select>
1343
  </div>
1344
  <div id="custom_text" <?php echo(($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
1345
- <label class="wd-label"><?php _e('Text', WDFM()->prefix); ?></label>
1346
  <div class="wd-editor-placeholder">
1347
  <span class="dashicons dashicons-list-view" data-id="submit_text"></span>
1348
  </div>
@@ -1365,7 +1365,7 @@ class FMViewManage_fm extends FMAdminView {
1365
  ?>
1366
  </div>
1367
  <div id="url" <?php echo(($row->submit_text_type != 4) ? 'style="display:none"' : ''); ?>>
1368
- <label class="wd-label"><?php _e('URL', WDFM()->prefix); ?></label>
1369
  <input type="text" id="url" name="url" value="<?php echo $row->url; ?>" />
1370
  </div>
1371
  </span>
@@ -1380,23 +1380,23 @@ class FMViewManage_fm extends FMAdminView {
1380
  <div class="wd-box-section">
1381
  <div class="wd-box-content">
1382
  <div class="wd-group">
1383
- <label class="wd-label"><?php _e('Payment Method', WDFM()->prefix); ?></label>
1384
  <input type="radio" name="paypal_mode" id="paypal_mode0" value="none" class="wd-radio" <?php echo ($payment_method == "none") ? "checked" : ""; ?> onchange="fm_change_payment_method('none');" />
1385
- <label for="paypal_mode0"><?php _e('None', WDFM()->prefix); ?></label><br>
1386
  <input type="radio" name="paypal_mode" id="paypal_mode1" value="paypal" class="wd-radio" <?php echo ($payment_method == "paypal") ? "checked" : ""; ?> onchange="fm_change_payment_method('paypal');" />
1387
- <label for="paypal_mode1"><?php _e('Paypal', WDFM()->prefix); ?></label><br>
1388
  <input type="radio" name="paypal_mode" id="paypal_mode2" value="stripe" <?php echo ($payment_method == "stripe") ? "checked" : ""; ?> class="wd-radio" onchange="fm_change_payment_method('stripe');" />
1389
- <label for="paypal_mode2"><?php _e('Stripe', WDFM()->prefix); ?></label>
1390
  </div>
1391
  <div class="fm_payment_option">
1392
  <?php
1393
- if (WDFM()->is_free) {
1394
- echo $this->free_message(__('PAYPAL is available in Premium version', WDFM()->prefix));
1395
  }
1396
  ?>
1397
- <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1398
- <label class="wd-label" for="payment_currency"><?php _e('Payment Currency', WDFM()->prefix); ?></label>
1399
- <select id="payment_currency" name="payment_currency" <?php disabled(WDFM()->is_free, true) ?>>
1400
  <option value="USD" <?php echo(($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ &#8226; U.S. Dollar</option>
1401
  <option value="EUR" <?php echo(($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>&#8364; &#8226; Euro</option>
1402
  <option value="GBP" <?php echo(($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>&#163; &#8226; Pound Sterling</option>
@@ -1421,42 +1421,42 @@ class FMViewManage_fm extends FMAdminView {
1421
  <option value="PHP" <?php echo(($row->payment_currency == 'PHP') ? 'selected' : ''); ?>>&#8369; &#8226; Philippine Peso</option>
1422
  <option value="THB" <?php echo(($row->payment_currency == 'THB') ? 'selected' : ''); ?>>&#xe3f; &#8226; Thai Bahtv</option>
1423
  </select>
1424
- <p class="description"><?php _e('Choose the currency to be used for the payments made through your form.', WDFM()->prefix); ?></p>
1425
  </div>
1426
- <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1427
- <label class="wd-label" for="tax"><?php _e('Tax', WDFM()->prefix); ?> (%)</label>
1428
- <input type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" onKeyPress="return check_isnum_point(event)" <?php disabled(WDFM()->is_free, true) ?> />
1429
- <p class="description"><?php _e('Specify the percentage of the tax. It will be calculated from the total payment amount of your form.', WDFM()->prefix); ?></p>
1430
  </div>
1431
- <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1432
- <label class="wd-label"><?php _e('Checkout Mode', WDFM()->prefix); ?></label>
1433
- <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 1 ? 'checked="checked"' : '' ?> id="checkout_mode-1" class="wd-radio" value="1" <?php disabled(WDFM()->is_free, true) ?> />
1434
- <label class="wd-label-radio" for="checkout_mode-1"><?php _e('Production', WDFM()->prefix); ?></label>
1435
- <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 0 ? 'checked="checked"' : '' ?> id="checkout_mode-0" class="wd-radio" value="0" <?php disabled(WDFM()->is_free, true) ?> />
1436
- <label class="wd-label-radio" for="checkout_mode-0"><?php _e('Testmode', WDFM()->prefix); ?></label>
1437
  </div>
1438
- <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1439
- <label class="wd-label" for="paypal_email"><?php _e('Paypal email', WDFM()->prefix); ?></label>
1440
- <input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" <?php disabled(WDFM()->is_free, true) ?> />
1441
- <p class="description"><?php _e('Provide the email address of a valid PayPal account. It will receive the payments made through your form.', WDFM()->prefix); ?></p>
1442
  </div>
1443
  </div>
1444
  <div class="fm_payment_option_stripe">
1445
  <?php
1446
  if ( $stripe_addon['enable'] && !empty($stripe_addon['html']) ) {
1447
- if (WDFM()->is_free) {
1448
- echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFM()->prefix));
1449
  }
1450
  else {
1451
  echo $stripe_addon[ 'html' ];
1452
  }
1453
  }
1454
  else {
1455
- if (WDFM()->is_free) {
1456
- echo $this->promo_box(__('This feature is available only in the Premium version', WDFM()->prefix), __('Requires STRIPE add-on.', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html');
1457
  }
1458
  else {
1459
- echo $this->free_message(__('This feature requires STRIPE add-on', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFM()->prefix ));
1460
  }
1461
  }
1462
  ?>
@@ -1585,9 +1585,9 @@ class FMViewManage_fm extends FMAdminView {
1585
  <div class="wd-box-section">
1586
  <div class="wd-box-content">
1587
  <div class="wd-group" id="conditions_fieldset_wrap">
1588
- <p class="description"><?php _e('Press Add Condition button to configure the first condition of your form. Show/Hide select box represents the action which will be completed, if all or any of the condition statements are fulfilled. Use the second drop-down menu to select the field which will be shown or hidden. Click the little Plus (+) icon to add the statement of your form condition.', WDFM()->prefix); ?><br><br></p>
1589
  <div style="text-align: right;">
1590
- <button class="wd-button button-primary" onclick="add_condition('<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>', '<?php echo $all_ids_cond; ?>', '<?php echo htmlspecialchars(addslashes($all_labels_cond)); ?>'); return false;"><?php _e('Add Condition', WDFM()->prefix); ?></button>
1591
  </div>
1592
  <?php
1593
  for ( $k = 0; $k < $count_of_conditions; $k++ ) {
@@ -1597,10 +1597,10 @@ class FMViewManage_fm extends FMAdminView {
1597
  <select id="show_hide<?php echo $k; ?>" name="show_hide<?php echo $k; ?>" class="fm_condition_show_hide">
1598
  <option value="1" <?php if ( $show_hide[$k] == 1 ) {
1599
  echo 'selected="selected"';
1600
- } ?>><?php _e('Show', WDFM()->prefix); ?></option>
1601
  <option value="0" <?php if ( $show_hide[$k] == 0 ) {
1602
  echo 'selected="selected"';
1603
- } ?>><?php _e('Hide', WDFM()->prefix); ?></option>
1604
  </select>
1605
  <select id="fields<?php echo $k; ?>" name="fields<?php echo $k; ?>" class="fm_condition_fields">
1606
  <?php
@@ -1619,12 +1619,12 @@ class FMViewManage_fm extends FMAdminView {
1619
  <select id="all_any<?php echo $k; ?>" name="all_any<?php echo $k; ?>" class="fm_condition_all_any">
1620
  <option value="and" <?php if ( $all_any[$k] == "and" ) {
1621
  echo 'selected="selected"';
1622
- } ?>><?php _e('all', WDFM()->prefix); ?></option>
1623
  <option value="or" <?php if ( $all_any[$k] == "or" ) {
1624
  echo 'selected="selected"';
1625
- } ?>><?php _e('any', WDFM()->prefix); ?></option>
1626
  </select>
1627
- <span style="display: inline-block; width: 100%; max-width: 235px;"><?php _e('of the following match:', WDFM()->prefix); ?></span>
1628
  <span class="dashicons dashicons-trash" onclick="delete_condition('<?php echo $k; ?>')"></span>
1629
  <span class="dashicons dashicons-plus-alt" onclick="add_condition_fields(<?php echo $k; ?>,'<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')"></span>
1630
  </div>
@@ -1742,7 +1742,7 @@ class FMViewManage_fm extends FMAdminView {
1742
  }
1743
  }
1744
  if ( $types[$key_select_or_input] == "type_address" ) {
1745
- $w_countries = WDW_FM_Library::get_countries();
1746
  $w_options = '';
1747
  foreach ( $w_countries as $w_country ) {
1748
  if ( in_array($w_country, $multiselect) ) {
@@ -1793,8 +1793,8 @@ class FMViewManage_fm extends FMAdminView {
1793
 
1794
  <div id="mapping_fieldset" class="adminform fm_fieldset_deactive">
1795
  <?php
1796
- if ( WDFM()->is_demo ) {
1797
- echo WDW_FM_Library::message_id(0, 'This feature is disabled in demo.', 'error');
1798
  }
1799
  else {
1800
  ?>
@@ -1803,30 +1803,30 @@ class FMViewManage_fm extends FMAdminView {
1803
  <div class="wd-box-section">
1804
  <div class="wd-box-content">
1805
  <div class="wd-group">
1806
- <p class="description"><?php _e('WordPress Form Maker stores the submitted information into [prefix]_formmaker_submits MySQL database table of your website by default. With MySQL Mapping functionality of Form Maker you can insert this data into any local or remote table of your choice, or perform other queries based on submitted values. Press Add Query button to configure the first query for this form.', WDFM()->prefix); ?></p><br><br>
1807
  <div style="text-align: right; padding-bottom: 20px;">
1808
  <button id="add_query" class="wd-button button-primary" onclick="tb_show('', '<?php echo add_query_arg(array(
1809
- 'action' => 'FormMakerSQLMapping' . WDFM()->plugin_postfix,
1810
  'id' => 0,
1811
  'form_id' => $row->id,
1812
  'width' => '1000',
1813
  'height' => '500',
1814
  'TB_iframe' => '1'
1815
- ), admin_url('admin-ajax.php')); ?>'); return false;"><?php _e('Add Query', WDFM()->prefix); ?></button>
1816
  </div>
1817
  <?php if ( $queries ) { ?>
1818
  <table class="wp-list-table widefat fixed posts table_content">
1819
  <thead>
1820
  <tr>
1821
- <th style="width:86%;" class="table_large_col"><?php _e('Query', WDFM()->prefix); ?></th>
1822
- <th style="width:14%;" class="table_large_col"><?php _e('Delete', WDFM()->prefix); ?></th>
1823
  </tr>
1824
  </thead>
1825
  <?php
1826
  for ( $i = 0, $n = count($queries); $i < $n; $i++ ) {
1827
  $query = $queries[$i];
1828
  $link = add_query_arg(array(
1829
- 'action' => 'FormMakerSQLMapping' . WDFM()->plugin_postfix,
1830
  'id' => $query->id,
1831
  'form_id' => $row->id,
1832
  'width' => '1000',
@@ -1880,7 +1880,7 @@ class FMViewManage_fm extends FMAdminView {
1880
  <script>
1881
  default_theme = '<?php echo $default_theme; ?>';
1882
  payment_method = '<?php echo $payment_method; ?>';
1883
- theme_edit_url = '<?php echo add_query_arg( array('page' => 'themes' . WDFM()->menu_postfix, 'task' =>'edit'), $page_url); ?>';
1884
 
1885
  jQuery(document).ready( function () {
1886
  set_theme();
@@ -1897,22 +1897,22 @@ class FMViewManage_fm extends FMAdminView {
1897
  <div class="placeholder-body meta-box-sortables">
1898
  <div class="placeholder-body-col placeholders">
1899
  <div class="placeholders_cont">
1900
- <p class="description"><?php _e('Select a field, the value of which will be used as the placeholder.', WDFM()->prefix); ?></p>
1901
  <span class="placeholders-filter-cont">
1902
- <input class="placeholders-filter" value="" placeholder="<?php _e('Filter', WDFM()->prefix); ?>" tabindex="-1" type="search" />
1903
  </span>
1904
  <div class="postbox filtered-placeholders hide">
1905
  <h2 class="hndle readonly">
1906
- <span><?php _e('Filtered placeholders', WDFM()->prefix); ?></span>
1907
  </h2>
1908
  <div class="inside"></div>
1909
  </div>
1910
  <?php
1911
  foreach ($placeholders as $section => $field) {
1912
  ?>
1913
- <div class="postbox<?php echo $section != __('Misc', WDFM()->prefix) ? " closed" : ""; ?>">
1914
  <button class="button-link handlediv" type="button" aria-expanded="true">
1915
- <span class="screen-reader-text"><?php echo __('Toggle panel:', WDFM()->prefix) , $section; ?></span>
1916
  <span class="toggle-indicator" aria-hidden="false"></span>
1917
  </button>
1918
  <h2 class="hndle">
@@ -1948,20 +1948,20 @@ class FMViewManage_fm extends FMAdminView {
1948
  *
1949
  */
1950
  public function form_layout( $params ) {
1951
- wp_enqueue_style('fm-codemirror');
1952
- wp_enqueue_style('fm-colorpicker');
1953
 
1954
- wp_enqueue_script('fm-codemirror');
1955
- wp_enqueue_script('fm-formatting');
1956
- wp_enqueue_script('fm-formatting');
1957
- wp_enqueue_script('fm-clike');
1958
- wp_enqueue_script('fm-css');
1959
- wp_enqueue_script('fm-javascript');
1960
- wp_enqueue_script('fm-xml');
1961
- wp_enqueue_script('fm-php');
1962
- wp_enqueue_script('fm-htmlmixed');
1963
- wp_enqueue_script('fm-colorpicker');
1964
- wp_enqueue_script('fm-form-advanced-layout');
1965
 
1966
  $id = $params['id'];
1967
  $page = $params['page'];
@@ -1977,13 +1977,13 @@ class FMViewManage_fm extends FMAdminView {
1977
  );
1978
  $buttons = array(
1979
  'save' => array(
1980
- 'title' => __('Update', WDFM()->prefix),
1981
  'value' => 'save',
1982
  'onclick' => 'fm_apply_advanced_layout(\'apply_layout\');',
1983
  'class' => 'button-primary'
1984
  ),
1985
  'back' => array(
1986
- 'title' => __('Back to Form', WDFM()->prefix),
1987
  'value' => 'back',
1988
  'onclick' => 'window.open(\''. $back_url .'\', \'_self\'); return false;',
1989
  'class' => 'button'
@@ -1997,9 +1997,9 @@ class FMViewManage_fm extends FMAdminView {
1997
 
1998
  // Pass the content to form.
1999
  $form_attr = array(
2000
- 'id' => WDFM()->css_prefix . 'ApplyLayoutForm',
2001
  'name' => 'adminForm',
2002
- 'class' => WDFM()->css_prefix . 'advanced_layout wd-form',
2003
  'current_id' => $id,
2004
  'enctype' => 'multipart/form-data',
2005
  'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
@@ -2024,16 +2024,16 @@ class FMViewManage_fm extends FMAdminView {
2024
  <div class="wd-table-col-100">
2025
  <div class="wd-box-section">
2026
  <div class="wd-box-content">
2027
- <p><?php _e('To customize the layout of the form fields uncheck the Auto-Generate Layout box and edit the HTML.', WDFM()->prefix); ?></p>
2028
- <p><?php _e('You can change positioning, add in-line styles and etc. Click on the provided buttons to add the corresponding field.', WDFM()->prefix); ?></p>
2029
- <p><?php _e('This will add the following line:', WDFM()->prefix); ?>
2030
- <b><span class="cm-tag">&lt;div</span> <span class="cm-attribute">wdid</span>=<span class="cm-string">"example_id"</span> <span class="cm-attribute">class</span>=<span class="cm-string">"wdform_row"</span><span class="cm-tag">&gt;</span>%example_id - Example%<span class="cm-tag">&lt;/div&gt;</span></b> , where <b><span class="cm-tag">&lt;div&gt;</span></b> <?php _e('is used to set a row.', WDFM()->prefix); ?></p>
2031
  <p>
2032
- <b style="color:red"><?php _e('Notice', WDFM()->prefix); ?></b><br>
2033
- <?php _e('Make sure not to publish the same field twice. This will cause malfunctioning of the form.', WDFM()->prefix); ?>
2034
  </p>
2035
  <div class="wd-group">
2036
- <label class="wd-label autogen_layout_label" for="autogen_layout"><?php _e('Auto Generate Layout?', WDFM()->prefix); ?></label>
2037
  <input type="checkbox" value="1" name="autogen_layout" id="autogen_layout" <?php echo (($row->autogen_layout) ? 'checked="checked"' : ''); ?> />
2038
  </div>
2039
  <div class="wd-group">
@@ -2048,7 +2048,7 @@ class FMViewManage_fm extends FMAdminView {
2048
  }
2049
  ?>
2050
  </div>
2051
- <span class="button button-hero fm_auto_format_button" onclick="autoFormat()"><strong><?php _e('Apply Source Formatting', WDFM()->prefix); ?></strong> <em>(<?php _e('ctrl-enter', WDFM()->prefix); ?>)</em></span>
2052
  <textarea id="source" name="source" style="display: none;"></textarea>
2053
  <input type="hidden" name="custom_front" id="custom_front" value="" />
2054
  </div>
@@ -2079,7 +2079,7 @@ class FMViewManage_fm extends FMAdminView {
2079
  $form_attr = array(
2080
  'id' => 'adminForm',
2081
  'name' => 'adminForm',
2082
- 'class' => WDFM()->prefix . '_display_options wd-form',
2083
  'current_id' => $id,
2084
  'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
2085
  );
@@ -2102,13 +2102,13 @@ class FMViewManage_fm extends FMAdminView {
2102
 
2103
  $buttons = array(
2104
  'save' => array(
2105
- 'title' => __('Update', WDFM()->prefix),
2106
  'value' => 'save',
2107
  'onclick' => 'fm_apply_options(\'apply_display_options\');',
2108
  'class' => 'button-primary',
2109
  ),
2110
  'back' => array(
2111
- 'title' => __('Back to Form', WDFM()->prefix),
2112
  'value' => 'back',
2113
  'onclick' => 'window.open(\''. $back_url .'\', \'_self\'); return false;',
2114
  'class' => 'button',
@@ -2128,7 +2128,7 @@ class FMViewManage_fm extends FMAdminView {
2128
  <div class="wd-box-content">
2129
  <span>
2130
  <div class="fm-row fm-form-types">
2131
- <label class="wd-label"><?php _e('Form Type', WDFM()->prefix); ?></label>
2132
  <label>
2133
  <input type="radio" name="form_type" value="embedded" onclick="change_form_type('embedded'); change_hide_show('fm-embedded');"
2134
  <?php echo $row->type == 'embedded' ? 'checked="checked"' : '' ?>>
@@ -2164,15 +2164,15 @@ class FMViewManage_fm extends FMAdminView {
2164
  <div class="wd-box-section">
2165
  <div class="wd-box-content">
2166
  <span class="wd-group fm-embedded <?php echo $row->type == 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2167
- <label class="wd-label"><?php _e('Form Placement', WDFM()->prefix); ?></label>
2168
  <div id="fm-embedded-element">
2169
- <p><?php _e('Use', WDFM()->prefix); ?></p>
2170
- <input type="text" value='[Form id="<?php echo $row->form_id; ?>"]' onclick="fm_select_value(this)" readonly="readonly" style="width:155px !important;"/>
2171
- <p><?php _e('shortcode to display the form.', WDFM()->prefix); ?></p>
2172
  </div>
2173
  </span>
2174
  <span class="wd-group fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
2175
- <label class="wd-label"><?php _e('Animation Effect', WDFM()->prefix); ?></label>
2176
  <select id="popover_animate_effect" name="popover_animate_effect">
2177
  <?php
2178
  foreach($animation_effects as $anim_key => $animation_effect){
@@ -2183,119 +2183,119 @@ class FMViewManage_fm extends FMAdminView {
2183
  </select>
2184
  </span>
2185
  <span class="wd-group fm-popover <?php echo $row->type != 'popover' ? 'fm-hide' : 'fm-show'; ?>">
2186
- <label class="wd-label"><?php _e('Loading Delay', WDFM()->prefix); ?></label>
2187
  <input type="number" name="popover_loading_delay" value="<?php echo $row->popover_loading_delay; ?>" /> seconds
2188
  <div>
2189
- <?php _e('Define the amount of time before the form popup appears after the page loads.', WDFM()->prefix); ?>
2190
- <?php _e('Set 0 for no delay.', WDFM()->prefix); ?>
2191
  </div>
2192
  </span>
2193
  <span class="wd-group fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
2194
- <label class="wd-label"><?php _e('Frequency', WDFM()->prefix); ?></label>
2195
  <input type="number" name="popover_frequency" value="<?php echo $row->popover_frequency; ?>" /> days
2196
  <div>
2197
- <?php _e('Display the popup to the same visitor (who has closed the popup/submitted the form) after this period.', WDFM()->prefix); ?>
2198
- <?php _e('Set the value to 0 to always show.', WDFM()->prefix); ?>
2199
  </div>
2200
  </span>
2201
  <span class="wd-group fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
2202
- <label class="wd-label"><?php _e('Position', WDFM()->prefix); ?></label>
2203
  <input type="radio" name="topbar_position" <?php echo $row->topbar_position == 1 ? 'checked="checked"' : '' ?> id="fm_do-topbarpos-1" class="wd-radio" value="1">
2204
- <label class="wd-label-radio" for="fm_do-topbarpos-1"><?php _e('Top', WDFM()->prefix); ?></label>
2205
  <input type="radio" name="topbar_position" <?php echo $row->topbar_position == 0 ? 'checked="checked"' : '' ?> id="fm_do-topbarpos-0" class="wd-radio" value="0">
2206
- <label class="wd-label-radio" for="fm_do-topbarpos-0"><?php _e('Bottom', WDFM()->prefix); ?></label>
2207
  </span>
2208
  <span class="wd-group fm-topbar topbar_remain_top <?php echo $row->type != 'topbar' ? 'fm-hide' : ($row->topbar_position == 1 ? 'fm-show' : 'fm-hide') ?>">
2209
- <label class="wd-label"><?php _e('Remain at top when scrolling', WDFM()->prefix); ?></label>
2210
  <input type="radio" name="topbar_remain_top" <?php echo $row->topbar_remain_top == 1 ? 'checked="checked"' : '' ?> id="fm_do-remaintop-1" class="wd-radio" value="1">
2211
- <label class="wd-label-radio" for="fm_do-remaintop-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2212
  <input type="radio" name="topbar_remain_top" <?php echo $row->topbar_remain_top == 0 ? 'checked="checked"' : '' ?> id="fm_do-remaintop-0" class="wd-radio" value="0">
2213
- <label class="wd-label-radio" for="fm_do-remaintop-0"><?php _e('No', WDFM()->prefix); ?></label>
2214
  </span>
2215
  <span class="wd-group fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
2216
- <label class="wd-label"><?php _e('Allow Closing the bar', WDFM()->prefix); ?></label>
2217
  <input type="radio" name="topbar_closing" <?php echo $row->topbar_closing == 1 ? 'checked="checked"' : '' ?> id="fm_do-topbarclosing-1" class="wd-radio" value="1">
2218
- <label class="wd-label-radio" for="fm_do-topbarclosing-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2219
  <input type="radio" name="topbar_closing" <?php echo $row->topbar_closing == 0 ? 'checked="checked"' : '' ?> id="fm_do-topbarclosing-0" class="wd-radio" value="0">
2220
- <label class="wd-label-radio" for="fm_do-topbarclosing-0"><?php _e('No', WDFM()->prefix); ?></label>
2221
  </span>
2222
  <span class="wd-group fm-topbar topbar_hide_duration <?php echo $row->type != 'topbar' ? 'fm-hide' : 'fm-show' ?>">
2223
- <label class="wd-label"><?php _e('Frequency', WDFM()->prefix); ?></label>
2224
  <input type="number" name="topbar_hide_duration" value="<?php echo $row->topbar_hide_duration; ?>"/>days
2225
  <div>
2226
- <?php _e('Display the topbar to the same visitor (who has closed the popup/submitted the form) after this period.', WDFM()->prefix); ?>
2227
- <?php _e('Set the value to 0 to always show.', WDFM()->prefix); ?>
2228
  </div>
2229
  </span>
2230
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2231
- <label class="wd-label"><?php _e('Position', WDFM()->prefix); ?></label>
2232
  <input type="radio" name="scrollbox_position" <?php echo $row->scrollbox_position == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxposition-0" class="wd-radio" value="0">
2233
- <label class="wd-label-radio" for="fm_do-scrollboxposition-0"><?php _e('Left', WDFM()->prefix); ?></label>
2234
  <input type="radio" name="scrollbox_position" <?php echo $row->scrollbox_position == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxposition-1" class="wd-radio" value="1">
2235
- <label class="wd-label-radio" for="fm_do-scrollboxposition-1"><?php _e('Right', WDFM()->prefix); ?></label>
2236
  </span>
2237
  <span class="wd-group fm-scrollbox <?php echo $row->type != 'scrollbox' ? 'fm-hide' : 'fm-show'; ?>">
2238
- <label class="wd-label"><?php _e('Loading Delay', WDFM()->prefix); ?></label>
2239
  <input type="number" name="scrollbox_loading_delay" value="<?php echo $row->scrollbox_loading_delay; ?>" /> seconds
2240
  <div>
2241
- <?php _e('Define the amount of time before the form scrollbox appears after the page loads. Set 0 for no delay.', WDFM()->prefix); ?>
2242
  </div>
2243
  </span>
2244
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2245
- <label class="wd-label"><?php _e('Frequency', WDFM()->prefix); ?></label>
2246
  <input type="number" name="scrollbox_hide_duration" value="<?php echo $row->scrollbox_hide_duration; ?>"/>days
2247
  <div>
2248
- <?php _e('Display the scrollbox to the same visitor (who has closed the popup/submitted the form) after this period.', WDFM()->prefix); ?>
2249
- <?php _e('Set the value to 0 to always show.', WDFM()->prefix); ?>
2250
  </div>
2251
  </span>
2252
  <span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2253
- <label class="wd-label"><?php _e('Always show for administrator', WDFM()->prefix); ?></label>
2254
  <input type="radio" name="show_for_admin" <?php echo $row->show_for_admin == 1 ? 'checked="checked"' : '' ?> id="fm_do-showforadmin-1" class="wd-radio" value="1">
2255
- <label class="wd-label-radio" for="fm_do-showforadmin-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2256
  <input type="radio" name="show_for_admin" <?php echo $row->show_for_admin == 0 ? 'checked="checked"' : '' ?> id="fm_do-showforadmin-0" class="wd-radio" value="0">
2257
- <label class="wd-label-radio" for="fm_do-showforadmin-0"><?php _e('No', WDFM()->prefix); ?></label>
2258
  <div>
2259
- <?php _e('If this option is enabled, website admins will always see the form.', WDFM()->prefix); ?>
2260
  </div>
2261
  </span>
2262
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2263
- <label class="wd-label"><?php _e('Trigger Point', WDFM()->prefix); ?></label>
2264
  <input type="number" name="scrollbox_trigger_point" value="<?php echo $row->scrollbox_trigger_point; ?>"/>%
2265
  <div>
2266
- <?php _e('Set the percentage of the page height, where the scrollbox form will appear after scrolling down.', WDFM()->prefix); ?>
2267
  </div>
2268
  </span>
2269
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2270
- <label class="wd-label"><?php _e('Allow Closing the bar', WDFM()->prefix); ?></label>
2271
  <input type="radio" name="scrollbox_closing" <?php echo $row->scrollbox_closing == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxclosing-1" class="wd-radio" value="1">
2272
- <label class="wd-label-radio" for="fm_do-scrollboxclosing-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2273
  <input type="radio" name="scrollbox_closing" <?php echo $row->scrollbox_closing == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxclosing-0" class="wd-radio" value="0">
2274
- <label class="wd-label-radio" for="fm_do-scrollboxclosing-0"><?php _e('No', WDFM()->prefix); ?></label>
2275
  </span>
2276
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2277
- <label class="wd-label"><?php _e('Allow Minimize', WDFM()->prefix); ?></label>
2278
  <input type="radio" name="scrollbox_minimize" <?php echo $row->scrollbox_minimize == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxminimize-1" class="wd-radio" value="1">
2279
- <label class="wd-label-radio" for="fm_do-scrollboxminimize-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2280
  <input type="radio" name="scrollbox_minimize" <?php echo $row->scrollbox_minimize == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxminimize-0" class="wd-radio" value="0">
2281
- <label class="wd-label-radio" for="fm_do-scrollboxminimize-0"><?php _e('No', WDFM()->prefix); ?></label>
2282
  </span>
2283
  <span class="wd-group fm-scrollbox minimize_text <?php echo $row->type == 'scrollbox' && $row->scrollbox_minimize == 1 ? 'fm-show' : 'fm-hide' ?>">
2284
- <label class="wd-label"><?php _e('Minimize Text', WDFM()->prefix); ?></label>
2285
  <input type="text" name="scrollbox_minimize_text" value="<?php echo $row->scrollbox_minimize_text; ?>"/>
2286
  </span>
2287
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2288
- <label class="wd-label"><?php _e('Auto Hide', WDFM()->prefix); ?></label>
2289
  <input type="radio" name="scrollbox_auto_hide" <?php echo $row->scrollbox_auto_hide == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxautohide-1" class="wd-radio" value="1">
2290
- <label class="wd-label-radio" for="fm_do-scrollboxautohide-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2291
  <input type="radio" name="scrollbox_auto_hide" <?php echo $row->scrollbox_auto_hide == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxautohide-0" class="wd-radio" value="0">
2292
- <label class="wd-label-radio" for="fm_do-scrollboxautohide-0"><?php _e('No', WDFM()->prefix); ?></label>
2293
  <div>
2294
- <?php _e('Hide the scrollbox form again when visitor scrolls back up.', WDFM()->prefix); ?>
2295
  </div>
2296
  </span>
2297
  <span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2298
- <label class="wd-label"><?php _e('Display on', WDFM()->prefix); ?></label>
2299
  <ul class="pp_display pp_display_on"><?php
2300
  $posts_and_pages = $params['posts_and_pages'];
2301
  $stat_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives');
@@ -2321,7 +2321,7 @@ class FMViewManage_fm extends FMAdminView {
2321
  </ul>
2322
  </span>
2323
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-cat-show <?php echo $row->type != 'embedded' && $show_cats ? 'fm-show' : 'fm-hide' ?>">
2324
- <label class="wd-label"><?php _e("Display on these categories' posts", WDFM()->prefix); ?></label>
2325
  <ul class="pp_display pp_display_on_categories"><?php
2326
  $categories = $params['categories'];
2327
  $selected_categories = $params['selected_categories'];
@@ -2341,12 +2341,12 @@ class FMViewManage_fm extends FMAdminView {
2341
  <input type="hidden" name="current_categories" value="<?php echo $current_categories; ?>"/>
2342
  </span>
2343
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-posts-show <?php echo (in_array('everything', $selected_types) || in_array('post', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2344
- <label class="wd-label"><?php _e('Display on these posts', WDFM()->prefix); ?></label>
2345
  <div class="fm-mini-heading">
2346
- <?php _e('Click on input area to view the list of posts.', WDFM()->prefix); ?>
2347
- <?php _e('If left empty the form will appear on all posts.', WDFM()->prefix); ?>
2348
  </div>
2349
- <p><?php _e('Posts defined below will override all settings above.', WDFM()->prefix); ?></p>
2350
  <ul class="fm-pp">
2351
  <li class="pp_selected"><?php if($row->posts_include){
2352
  $posts_include = explode(',', $row->posts_include);
@@ -2371,12 +2371,12 @@ class FMViewManage_fm extends FMAdminView {
2371
  </ul>
2372
  </span>
2373
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-pages-show <?php echo (in_array('everything', $selected_types) || in_array('page', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2374
- <label class="wd-label"><?php _e('Display on these pages', WDFM()->prefix); ?></label>
2375
  <div class="fm-mini-heading">
2376
- <?php _e('Click on input area to view the list of pages. ', WDFM()->prefix); ?>
2377
- <?php _e('If left empty the form will appear on all pages.', WDFM()->prefix); ?>
2378
  </div>
2379
- <p><?php _e('Pages defined below will override all settings above.', WDFM()->prefix); ?></p>
2380
  <ul class="fm-pp">
2381
  <li class="pp_selected"><?php if($row->pages_include){
2382
  $pages_include = explode(',', $row->pages_include);
@@ -2400,11 +2400,11 @@ class FMViewManage_fm extends FMAdminView {
2400
  </ul>
2401
  </span>
2402
  <span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2403
- <label class="wd-label"><?php _e('Hide on Mobile', WDFM()->prefix); ?></label>
2404
  <input type="radio" name="hide_mobile" <?php echo $row->hide_mobile == 1 ? 'checked="checked"' : '' ?> id="fm_do-hidemobile-1" class="wd-radio" value="1">
2405
- <label class="wd-label-radio" for="fm_do-hidemobile-1"><?php _e('Yes', WDFM()->prefix); ?></label>
2406
  <input type="radio" name="hide_mobile" <?php echo $row->hide_mobile == 0 ? 'checked="checked"' : '' ?> id="fm_do-hidemobile-0" class="wd-radio" value="0">
2407
- <label class="wd-label-radio" for="fm_do-hidemobile-0"><?php _e('No', WDFM()->prefix); ?></label>
2408
  </span>
2409
  </div>
2410
  </div>
5
  * FMViewManage_fm constructor.
6
  */
7
  public function __construct() {
8
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
9
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-first');
10
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-layout');
12
 
13
  wp_enqueue_script('jquery');
14
  wp_enqueue_script('jquery-ui-sortable');
15
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
16
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-manage');
17
  /*$inline_styles = '#fm_admin_container .wdform_page .wdform_section .wdform_column.ui-sortable:empty:last-child:after {
18
+ content: "' . __('Drop a field here to create a column.', WDFMInstance(self::PLUGIN)->prefix) . '";
19
  }';
20
+ wp_add_inline_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style', $inline_styles);*/
21
  }
22
 
23
  /**
31
  $form_attr = array(
32
  'id' => 'manage_form',
33
  'class' =>'wd-form',
34
+ 'action' => add_query_arg(array('page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix), 'admin.php'),
35
  );
36
  echo $this->form(ob_get_clean(), $form_attr);
37
  }
53
 
54
  $page_url = add_query_arg(array(
55
  'page' => $page,
56
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
57
  ), admin_url('admin.php'));
58
  echo $this->title(array(
59
+ 'title' => __('Forms', WDFMInstance(self::PLUGIN)->prefix),
60
  'title_class' => 'wd-header',
61
  'add_new_button' => array(
62
  'href' => add_query_arg(array( 'page' => $page, 'task' => 'add' ), admin_url('admin.php')),
67
  <div class="tablenav top">
68
  <?php
69
  echo $this->bulk_actions($actions);
70
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
71
  echo $this->exp_imp_buttons();
72
  }
73
  echo $this->pagination($page_url, $total, $items_per_page);
78
  <thead>
79
  <tr>
80
  <td id="cb" class="manage-column column-cb check-column">
81
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix); ?></label>
82
  <input id="check_all" type="checkbox" />
83
  </td>
84
+ <?php echo WDW_FM_Library(self::PLUGIN)->ordering('title', $orderby, $order, __('Title', WDFMInstance(self::PLUGIN)->prefix), $page_url, 'col_title column-primary wd-left'); ?>
85
+ <?php echo WDW_FM_Library(self::PLUGIN)->ordering('type', $orderby, $order, __('Type', WDFMInstance(self::PLUGIN)->prefix), $page_url, 'col_type wd-left'); ?>
86
+ <th class="col_count wd-left"><?php _e('Submissions', WDFMInstance(self::PLUGIN)->prefix); ?></th>
87
+ <?php echo WDW_FM_Library(self::PLUGIN)->ordering('id', $orderby, $order, __('Shortcode', WDFMInstance(self::PLUGIN)->prefix), $page_url, 'wd-center'); ?>
88
+ <th class="col_function wd-center"><?php _e('PHP function', WDFMInstance(self::PLUGIN)->prefix); ?></th>
89
  </tr>
90
  </thead>
91
  <tbody>
105
  <th class="check-column">
106
  <input id="check_<?php echo $row_data->id; ?>" name="check[<?php echo $row_data->id; ?>]" type="checkbox" class="form_title" data-id="<?php echo $row_data->id; ?>" />
107
  </th>
108
+ <td class="column-primary" data-colname="<?php _e('Title', WDFMInstance(self::PLUGIN)->prefix); ?>">
109
  <strong>
110
  <?php
111
  if ( !$old ) {
123
  if ( !$row_data->published ) {
124
  ?>
125
 
126
+ <span class="post-state"><?php _e('Unpublished', WDFMInstance(self::PLUGIN)->prefix); ?></span>
127
  <?php
128
  }
129
  ?>
133
  if ( !$old ) {
134
  ?>
135
  <span>
136
+ <a href="<?php echo $edit_url; ?>"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a>
137
  |
138
  </span>
139
  <?php
140
  }
141
  ?>
142
  <span>
143
+ <a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', WDFMInstance(self::PLUGIN)->prefix); ?></a>
144
  |
145
  </span>
146
  <span>
147
+ <a href="<?php echo $publish_url; ?>"><?php echo ($row_data->published ? __('Unpublish', WDFMInstance(self::PLUGIN)->prefix) : __('Publish', WDFMInstance(self::PLUGIN)->prefix)); ?></a>
148
  |
149
  </span>
150
  <span class="trash">
151
+ <a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFMInstance(self::PLUGIN)->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></a>
152
  |
153
  </span>
154
  <span>
155
+ <a href="<?php echo $preview_url; ?>" target="_blank"><?php _e('Preview', WDFMInstance(self::PLUGIN)->prefix); ?></a>
156
  </span>
157
  </div>
158
  <button class="toggle-row" type="button">
159
+ <span class="screen-reader-text"><?php _e('Show more details', WDFMInstance(self::PLUGIN)->prefix); ?></span>
160
  </button>
161
  </td>
162
+ <td data-colname="<?php _e('Type', WDFMInstance(self::PLUGIN)->prefix); ?>">
163
  <?php echo ucfirst($row_data->type); ?>
164
  <div class="row-actions">
165
  <span>
166
+ <a href="<?php echo add_query_arg(array('task' => 'display_options', 'current_id' => $row_data->id), $page_url); ?>"><?php _e('Set display options', WDFMInstance(self::PLUGIN)->prefix); ?></a>
167
  </span>
168
  </div>
169
  </td>
170
+ <td data-colname="<?php _e('Submissions', WDFMInstance(self::PLUGIN)->prefix); ?>">
171
  <?php
172
  if ($row_data->submission_count != 0) {
173
  ?>
174
+ <a title="<?php _e('View sumbissions', WDFMInstance(self::PLUGIN)->prefix); ?>" target="_blank" href="<?php echo add_query_arg(array(
175
+ 'page' => 'submissions' . WDFMInstance(self::PLUGIN)->menu_postfix,
176
  'task' => 'display',
177
  'current_id' => $row_data->id,
178
  ), admin_url('admin.php')); ?>">
186
  }
187
  ?>
188
  </td>
189
+ <td data-colname="<?php _e('Shortcode', WDFMInstance(self::PLUGIN)->prefix); ?>">
190
+ <input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '[wd_contact_form id="' . $row_data->id . '"]' : '[Form id="' . $row_data->id . '"]'); ?>' onclick="fm_select_value(this)" size="12" readonly="readonly" />
191
  </td>
192
+ <td data-colname="<?php _e('PHP function', WDFMInstance(self::PLUGIN)->prefix); ?>">
193
+ <input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '&#60;?php wd_contact_form_maker(' . $row_data->id . ', "' . $row_data->type . '"); ?&#62;' : '&#60;?php wd_form_maker(' . $row_data->id . ', "' . $row_data->type . '"); ?&#62;'); ?>' onclick="fm_select_value(this)" readonly="readonly" />
194
  </td>
195
  </tr>
196
  <?php
197
  }
198
  }
199
  else {
200
+ echo WDW_FM_Library(self::PLUGIN)->no_items('forms');
201
  }
202
  ?>
203
  </tbody>
221
  echo $this->topbar();
222
 
223
  wp_enqueue_style('thickbox');
224
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field_css');
225
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
226
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
227
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
228
 
229
  wp_enqueue_script('thickbox');
230
  wp_enqueue_script('jquery-ui-widget');
232
  wp_enqueue_script('jquery-ui-spinner');
233
  wp_enqueue_script('jquery-ui-datepicker');
234
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
235
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker());
236
  }
237
  else {
238
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker() . '</script>';
239
  }
240
  wp_enqueue_media();
241
  wp_enqueue_script('google-maps');
242
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
243
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field');
244
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-formmaker_div');
245
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
246
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-formatting');
247
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-clike');
248
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-css');
249
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-javascript');
250
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-xml');
251
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-php');
252
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-htmlmixed');
253
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
254
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-manage-edit');
255
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-add-fields');
256
 
257
  $id = $params['id'];
258
  $row = $params['row'];
291
  form_fields_initial = decodeURIComponent(form_fields_initial);
292
 
293
  default_theme = '<?php echo $default_theme; ?>';
294
+ theme_edit_url = '<?php echo add_query_arg( array('page' => 'themes' . WDFMInstance(self::PLUGIN)->menu_postfix, 'task' =>'edit'), $page_url); ?>';
295
  jQuery(document).ready(function () {
296
  set_theme();
297
  });
298
  </script>
299
+ <form class="wrap" id="manage_form" method="post" autocomplete="off" action="admin.php?page=manage<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>">
300
  <?php
301
  // Generate message container by message id or directly by message.
302
+ $message_id = WDW_FM_Library(self::PLUGIN)->get('message', 0);
303
+ $message = WDW_FM_Library(self::PLUGIN)->get('msg', '');
304
+ echo WDW_FM_Library(self::PLUGIN)->message_id($message_id, $message);
305
  ?>
306
+ <?php wp_nonce_field(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce); ?>
307
  <h2 class="fm-h2-message"></h2>
308
  <div class="fm-page-header">
309
  <div class="wd-page-title wd-header">
310
+ <h1 class="wp-heading-inline"><?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?></h1>
311
  <input id="title" name="title" value="<?php echo $row->title; ?>" data-initial-value="<?php echo $row->title; ?>" class="fm-check-change" type="text" />
312
  <div class="fm-page-actions">
313
  <?php
315
  if ( $row->backup_id != "" ) {
316
  $backup_id = $next_backup_id;
317
  if ( $backup_id ) { ?>
318
+ <button class="button redo-button button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || !FormManageSubmitButton()) {return false;}; jQuery('#saving_text').html('<?php _e('Redo', WDFMInstance(self::PLUGIN)->prefix); ?>');fm_set_input_value('task', 'redo');">
319
+ <?php _e('Redo', WDFMInstance(self::PLUGIN)->prefix); ?>
320
  </button>
321
  <?php
322
  }
323
  $backup_id = $prev_backup_id;
324
  if ( $backup_id ) { ?>
325
+ <button class="button undo-button button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || !FormManageSubmitButton()) {return false;}; jQuery('#saving_text').html('<?php _e('Undo', WDFMInstance(self::PLUGIN)->prefix); ?>');fm_set_input_value('task', 'undo');">
326
  <span></span>
327
+ <?php _e('Undo', WDFMInstance(self::PLUGIN)->prefix); ?>
328
  </button>
329
  <?php
330
  }
331
  }
332
  }
333
  ?>
334
+ <button class="button button-primary button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || !FormManageSubmitButton()) {return false;}; fm_set_input_value('task', 'apply');">
335
  <?php
336
  if ($row->title) {
337
+ _e('Update', WDFMInstance(self::PLUGIN)->prefix);
338
  }
339
  else {
340
+ _e('Publish', WDFMInstance(self::PLUGIN)->prefix);
341
  }
342
  ?>
343
  </button>
344
+ <button class="button preview-button button-large"<?php if (!$row->title) echo ' disabled="disabled"' ?> <?php echo ($row->title) ? 'onclick="window.open(\''. add_query_arg( array('wdform_id' => $id), $form_preview_link ) .'\', \'_blank\'); return false;"' : ''; ?>><?php _e('Preview', WDFMInstance(self::PLUGIN)->prefix); ?></button>
345
  </div>
346
  </div>
347
  <div class="fm-clear"></div>
348
  </div>
349
  <div class="fm-theme-banner">
350
  <div class="fm-theme" style="float:left; position: relative">
351
+ <span><?php _e('Theme', WDFMInstance(self::PLUGIN)->prefix); ?>:&nbsp;</span>
352
  <select id="theme" name="theme" data-initial-value="<?php echo $row->theme; ?>" class="fm-check-change" onChange="set_theme()">
353
  <optgroup label="New Themes">
354
  <?php
368
  ?>
369
  </optgroup>
370
  </select>
371
+ <a id="edit_css" class="pointer" onclick="window.open('<?php echo add_query_arg(array('current_id' => ($row->theme ? $row->theme : $default_theme), WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce)), admin_url('admin.php?page=themes' . WDFMInstance(self::PLUGIN)->menu_postfix . '&task=edit')); ?>'); return false;">
372
+ <?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?>
373
  </a>
374
  <br />
375
+ <div id="old_theme_notice" style="display: none;"><div class="error inline"><p><?php _e('The theme you have selected is outdated. Please choose one from New Themes section.', WDFMInstance(self::PLUGIN)->prefix); ?></p></div></div>
376
  </div>
377
  <div class="fm-page-actions">
378
  <?php if( $id ){ ?>
379
+ <a class="button button-primary" href="<?php echo $params['form_options_url']; ?>"><?php _e('Form Options', WDFMInstance(self::PLUGIN)->prefix); ?></a>
380
+ <a class="button" href="<?php echo $params['display_options_url']; ?>"><?php _e('Display Options', WDFMInstance(self::PLUGIN)->prefix); ?></a>
381
  <?php
382
  if ( !empty($params['advanced_layout_url']) ) {
383
  ?>
384
+ <a class="button" href="<?php echo $params['advanced_layout_url']; ?>"><?php _e('Advanced Layout', WDFMInstance(self::PLUGIN)->prefix); ?></a>
385
  <?php
386
  }
387
  }
397
  <div class="meta-box-sortables" style="margin-top:30px;">
398
  <div id="postexcerpt" class="postbox closed" >
399
  <button type="button" class="button-link handlediv" aria-expanded="true">
400
+ <span class="screen-reader-text"><?php _e('Toggle panel: Form Header', WDFMInstance(self::PLUGIN)->prefix); ?></span>
401
  <span class="toggle-indicator" aria-hidden="true"></span>
402
  </button>
403
+ <h2 class="hndle"><span><?php _e('Form Header', WDFMInstance(self::PLUGIN)->prefix); ?></span></h2>
404
  <div class="inside">
405
  <div id="fm-header-content" class="panel-content">
406
  <div>
407
  <div class="fm-row">
408
+ <label><?php _e('Title:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
409
  <input type="text" id="header_title" name="header_title" class="fm-check-change" value="<?php echo $row->header_title; ?>" data-initial-value="<?php echo $row->header_title; ?>" />
410
  </div>
411
  <div class="fm-row">
412
+ <label><?php _e('Description:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
413
  <div id="description_editor" style="display: inline-block; vertical-align: middle;">
414
  <input type="hidden" id="header_description_initial_value" value="<?php echo rawurlencode($row->header_description); ?>" />
415
  <?php if (user_can_richedit()) {
425
  </div>
426
  <div>
427
  <div class="fm-row">
428
+ <label><?php _e('Image:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
429
  <input type="text" id="header_image_url" name="header_image_url" class="fm-check-change" value="<?php echo $row->header_image_url; ?>" data-initial-value="<?php echo $row->header_image_url; ?>" />
430
+ <button class="button add-button medium" onclick="fmOpenMediaUploader(event); return false;"><?php _e('Add Image', WDFMInstance(self::PLUGIN)->prefix); ?></button>
431
  <?php $header_bg = $row->header_image_url ? 'background-image: url('.$row->header_image_url.'); background-position: center;' : ''; ?>
432
  <div id="header_image" class="header_img<?php if (!$row->header_image_url) echo ' fm-hide'; ?>" style="<?php echo $header_bg; ?>">
433
  <button type="button" id="remove_header_img" onclick="fmRemoveHeaderImage(event); return false;">
436
  </div>
437
  </div>
438
  <div class="fm-row">
439
+ <label><?php _e('Image Animation:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
440
  <select name="header_image_animation" class="fm-check-change" data-initial-value="<?php echo $row->header_image_animation; ?>">
441
  <?php
442
  foreach($animation_effects as $anim_key => $animation_effect){
447
  </select>
448
  </div>
449
  <div class="fm-row">
450
+ <label for="header_hide_image"><?php _e('Hide Image on Mobile:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
451
  <input type="checkbox" id="header_hide_image" name="header_hide_image" value="1" data-initial-value="<?php echo $row->header_hide_image; ?>" <?php echo $row->header_hide_image == '1' ? 'checked="checked"' : '' ?> />
452
  </div>
453
  </div>
458
  <div class="fm-edit-content">
459
  <div class="fm-drag-and-drop">
460
  <div>
461
+ <label for="enable_sortable"><?php _e('Enable Drag & Drop', WDFMInstance(self::PLUGIN)->prefix); ?></label>
462
  <button name="sortable" id="enable_sortable" class="fm-checkbox-radio-button <?php echo $row->sortable == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="enable_drag(this); return false;" value="<?php echo $row->sortable; ?>">
463
  <span></span>
464
  </button>
478
  <div id="add_field" class="ui-sortable-handle">
479
  <div class="first-time-use">
480
  <span class="first-time-use-close dashicons dashicons-no-alt"></span>
481
+ <?php _e('Drag icon to the form to add a field.', WDFMInstance(self::PLUGIN)->prefix); ?>
482
  </div>
483
 
484
  <div type="type_text" class="wdform_field">
485
  <div class="add-new-button button-primary" onclick="if (fm_check_something_really_important()) return; popup_ready(); Enable(); return false;">
486
  <span class="dashicons dashicons-move"></span>
487
+ <?php _e('New Field', WDFMInstance(self::PLUGIN)->prefix); ?>
488
  </div>
489
  </div>
490
  </div>
516
  $pro_fields1 = array('file_upload', 'map', 'paypal');
517
  $pro_fields2 = array('file_upload', 'paypal', 'checkbox', 'radio', 'survey', 'time_and_date', 'select');
518
  $fields = array(
519
+ __('BASIC FIELDS', WDFMInstance(self::PLUGIN)->prefix) => array(
520
+ array('type' => 'text', 'subtype' => 'text', 'title' => __('Single Line Text', WDFMInstance(self::PLUGIN)->prefix)),
521
+ array('type' => 'text', 'subtype' => 'textarea', 'title' => __('Paragraph Text', WDFMInstance(self::PLUGIN)->prefix)),
522
+ array('type' => 'survey', 'subtype' => 'spinner', 'title' => __('Number', WDFMInstance(self::PLUGIN)->prefix)),
523
+ array('type' => 'time_and_date', 'subtype' => 'date_new', 'title' => __('Date', WDFMInstance(self::PLUGIN)->prefix)),
524
+ array('type' => 'select', 'subtype' => 'own_select', 'title' => __('Select', WDFMInstance(self::PLUGIN)->prefix)),
525
+ array('type' => 'radio', 'subtype' => '', 'title' => __('Single Choice', WDFMInstance(self::PLUGIN)->prefix)),
526
+ array('type' => 'checkbox', 'subtype' => '', 'title' => __('Multiple Choice', WDFMInstance(self::PLUGIN)->prefix)),
527
+ array('type' => 'captcha', 'subtype' => 'recaptcha', 'title' => __('Recaptcha', WDFMInstance(self::PLUGIN)->prefix)),
528
+ array('type' => 'button', 'subtype' => 'submit_reset', 'title' => __('Submit', WDFMInstance(self::PLUGIN)->prefix)),
529
+ array('type' => 'captcha', 'subtype' => 'captcha', 'title' => __('Simple Captcha', WDFMInstance(self::PLUGIN)->prefix)),
530
  ),
531
+ __('USER INFO FIELDS', WDFMInstance(self::PLUGIN)->prefix) => array(
532
+ array('type' => 'text', 'subtype' => 'name', 'title' => __('Name', WDFMInstance(self::PLUGIN)->prefix)),
533
+ array('type' => 'text', 'subtype' => 'submitter_mail', 'title' => __('Email', WDFMInstance(self::PLUGIN)->prefix)),
534
+ array('type' => 'text', 'subtype' => 'phone_new', 'title' => __('Phone', WDFMInstance(self::PLUGIN)->prefix)),
535
+ array('type' => 'text', 'subtype' => 'address', 'title' => __('Address', WDFMInstance(self::PLUGIN)->prefix)),
536
+ array('type' => 'text', 'subtype' => 'mark_map', 'title' => __('Mark on Map', WDFMInstance(self::PLUGIN)->prefix)),
537
+ array('type' => 'select', 'subtype' => 'country', 'title' => __('Country List', WDFMInstance(self::PLUGIN)->prefix)),
538
+ array('type' => 'time_and_date', 'subtype' => 'date_fields', 'title' => __('Date of Birth', WDFMInstance(self::PLUGIN)->prefix)),
539
  ),
540
+ __('LAYOUT FIELDS', WDFMInstance(self::PLUGIN)->prefix) => array(
541
+ array('type' => 'editor', 'subtype' => '', 'title' => __('HTML', WDFMInstance(self::PLUGIN)->prefix)),
542
+ array('type' => 'section_break', 'subtype' => '', 'title' => __('Section', WDFMInstance(self::PLUGIN)->prefix)),
543
+ array('type' => 'page_break', 'subtype' => '', 'title' => __('Page', WDFMInstance(self::PLUGIN)->prefix)),
544
  ),
545
+ __('ADVANCED', WDFMInstance(self::PLUGIN)->prefix) => array(
546
+ array('type' => 'file_upload', 'subtype' => '', 'title' => __('File Upload', WDFMInstance(self::PLUGIN)->prefix)),
547
+ array('type' => 'map', 'subtype' => '', 'title' => __('Map', WDFMInstance(self::PLUGIN)->prefix)),
548
+ array('type' => 'time_and_date', 'subtype' => 'time', 'title' => __('Time', WDFMInstance(self::PLUGIN)->prefix)),
549
+ array('type' => 'text', 'subtype' => 'send_copy', 'title' => __('Receive Copy', WDFMInstance(self::PLUGIN)->prefix)),
550
+ array('type' => 'time_and_date', 'subtype' => 'date_range', 'title' => __('Date Range', WDFMInstance(self::PLUGIN)->prefix)),
551
+ array('type' => 'survey', 'subtype' => 'star_rating', 'title' => __('Stars', WDFMInstance(self::PLUGIN)->prefix)),
552
+ array('type' => 'survey', 'subtype' => 'scale_rating', 'title' => __('Rating', WDFMInstance(self::PLUGIN)->prefix)),
553
+ array('type' => 'survey', 'subtype' => 'slider', 'title' => __('Slider', WDFMInstance(self::PLUGIN)->prefix)),
554
+ array('type' => 'survey', 'subtype' => 'range', 'title' => __('Range', WDFMInstance(self::PLUGIN)->prefix)),
555
+ array('type' => 'survey', 'subtype' => 'grading', 'title' => __('Grades', WDFMInstance(self::PLUGIN)->prefix)),
556
+ array('type' => 'survey', 'subtype' => 'matrix', 'title' => __('Table of Fields', WDFMInstance(self::PLUGIN)->prefix)),
557
+ array('type' => 'text', 'subtype' => 'hidden', 'title' => __('Hidden Input', WDFMInstance(self::PLUGIN)->prefix)),
558
+ array('type' => 'button', 'subtype' => 'button', 'title' => __('Custom Button', WDFMInstance(self::PLUGIN)->prefix)),
559
+ array('type' => 'text', 'subtype' => 'password', 'title' => __('Password', WDFMInstance(self::PLUGIN)->prefix)),
560
+ array('type' => 'text', 'subtype' => 'phone', 'title' => __('Phone-Area Code', WDFMInstance(self::PLUGIN)->prefix)),
561
+ array('type' => 'captcha', 'subtype' => 'arithmetic_captcha', 'title' => __('Arithmetic Captcha', WDFMInstance(self::PLUGIN)->prefix)),
562
  ),
563
+ __('PAYMENT', WDFMInstance(self::PLUGIN)->prefix) => array(
564
+ array('type' => 'paypal', 'subtype' => 'paypal_price_new', 'title' => __('Price', WDFMInstance(self::PLUGIN)->prefix)),
565
+ array('type' => 'paypal', 'subtype' => 'paypal_select', 'title' => __('Payment Select', WDFMInstance(self::PLUGIN)->prefix)),
566
+ array('type' => 'paypal', 'subtype' => 'paypal_radio', 'title' => __('Payment Single Choice', WDFMInstance(self::PLUGIN)->prefix)),
567
+ array('type' => 'paypal', 'subtype' => 'paypal_checkbox', 'title' => __('Payment Multiple Choice', WDFMInstance(self::PLUGIN)->prefix)),
568
+ array('type' => 'paypal', 'subtype' => 'paypal_shipping', 'title' => __('Shipping', WDFMInstance(self::PLUGIN)->prefix)),
569
+ array('type' => 'paypal', 'subtype' => 'paypal_total', 'title' => __('Total', WDFMInstance(self::PLUGIN)->prefix)),
570
+ array('type' => 'paypal', 'subtype' => 'stripe', 'title' => __('Stripe', WDFMInstance(self::PLUGIN)->prefix)),
571
  ),
572
  );
573
  ob_start();
575
  <div class="add-popup js">
576
  <div class="popup-header">
577
  <span class="popup-title">
578
+ <?php _e('Add field', WDFMInstance(self::PLUGIN)->prefix); ?>
579
  </span>
580
+ <span title="<?php _e('Close', WDFMInstance(self::PLUGIN)->prefix); ?>" alt="<?php _e('Close', WDFMInstance(self::PLUGIN)->prefix); ?>" class="close-popup dashicons dashicons-no-alt" onclick="close_window()"></span>
581
  </div>
582
  <div class="popup-body meta-box-sortables">
583
  <div class="popup-body-col field_types">
584
  <div class="field_types_cont">
585
+ <h2 class="hndle field-types-filter_header"><span><?php _e('FIELD TYPES', WDFMInstance(self::PLUGIN)->prefix); ?></span></h2>
586
  <span class="field-types-filter-cont">
587
+ <input class="field-types-filter" value="" placeholder="<?php _e('Filter', WDFMInstance(self::PLUGIN)->prefix); ?>" tabindex="-1" type="search" />
588
  </span>
589
  <div class="postbox filtered-fields hide">
590
  <button class="button-link handlediv" type="button" aria-expanded="true">
592
  <span class="toggle-indicator" aria-hidden="true"></span>
593
  </button>
594
  <h2 class="hndle">
595
+ <span><?php _e('Filtered fields', WDFMInstance(self::PLUGIN)->prefix); ?></span>
596
  </h2>
597
  <div class="inside"></div>
598
  </div>
599
  <?php
600
  foreach ($fields as $section => $field) {
601
  ?>
602
+ <div class="postbox<?php echo $section != __('BASIC FIELDS', WDFMInstance(self::PLUGIN)->prefix) ? " closed" : ""; ?>">
603
  <button class="button-link handlediv" type="button" aria-expanded="true">
604
+ <span class="screen-reader-text"><?php echo __('Toggle panel:', WDFMInstance(self::PLUGIN)->prefix) , $section; ?></span>
605
  <span class="toggle-indicator" aria-hidden="false"></span>
606
  </button>
607
  <h2 class="hndle">
611
  <?php
612
  foreach ($field as $button) {
613
  ?>
614
+ <button class="<?php echo ((WDFMInstance(self::PLUGIN)->is_free == 1 && in_array($button['type'], $pro_fields1)) || (WDFMInstance(self::PLUGIN)->is_free == 2 && in_array($button['type'], $pro_fields2))) ? 'wd-pro-fields ' : ''; ?>wd-button button-secondary" onclick="addRow(event, this, '<?php echo $button['type']; ?>', '<?php echo $button['subtype']; ?>'); return false;" data-type="type_<?php echo $button['subtype'] ? $button['subtype'] : $button['type']; ?>">
615
  <span class="field-type-button wd<?php echo ($button['subtype'] == '' ? $button['type'] : $button['subtype']); ?>"></span>
616
  <?php echo $button['title']; ?>
617
  </button>
627
  </div>
628
  <div id="field_container">
629
  <?php
630
+ if (WDFMInstance(self::PLUGIN)->is_free) {
631
+ echo $this->free_message(__('This field type is available in Premium version', WDFMInstance(self::PLUGIN)->prefix), '', '', 'premium_message');
632
  }
633
  $stripe_addon = $params['stripe_addon'];
634
  if ( $stripe_addon['enable'] ) {
635
+ if (WDFMInstance(self::PLUGIN)->is_free) {
636
+ echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix), '', '', 'stripe_message');
637
  }
638
  }
639
  else {
640
+ if (WDFMInstance(self::PLUGIN)->is_free) {
641
+ echo $this->promo_box(__('This feature is available only in the Premium version', WDFMInstance(self::PLUGIN)->prefix), __('Requires STRIPE add-on.', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', 'stripe_message');
642
  }
643
  else {
644
+ echo $this->free_message(__('This feature requires STRIPE add-on', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFMInstance(self::PLUGIN)->prefix ), 'stripe_message');
645
  }
646
  }
647
  ?>
651
  <div class="popup-body-col field_preview">
652
  <div id="add-button-cont" class="add-button-cont">
653
  <button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">
654
+ <?php _e('Add', WDFMInstance(self::PLUGIN)->prefix);?>
655
  </button>
656
  </div>
657
  <div id="show_table">
663
  <input type="hidden" id="old_selected" />
664
  <input type="hidden" id="element_type" />
665
  <input type="hidden" id="editing_id" />
666
+ <input type="hidden" value="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>" id="form_plugins_url" />
667
  <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
668
  <?php if ( user_can_richedit() ) {
669
  wp_editor('', 'form_maker_editor', array(
686
 
687
  public function form_options( $params ) {
688
  wp_enqueue_style('thickbox');
689
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field_css');
690
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
691
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
692
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
693
 
694
  wp_enqueue_script('thickbox');
695
  wp_enqueue_script('jquery-ui-widget');
697
  wp_enqueue_script('jquery-ui-spinner');
698
  wp_enqueue_script('jquery-ui-datepicker');
699
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
700
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker());
701
  }
702
  else {
703
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker() . '</script>';
704
  }
705
  wp_enqueue_media();
706
  wp_enqueue_script('google-maps');
707
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-form-options');
708
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
709
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field');
710
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-formmaker_div');
711
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
712
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-formatting');
713
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-clike');
714
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-css');
715
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-javascript');
716
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-xml');
717
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-php');
718
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-htmlmixed');
719
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
720
 
721
  $id = $params['id'];
722
  $page = $params['page'];
728
  $form_attr = array(
729
  'id' => 'adminForm',
730
  'name' => 'adminForm',
731
+ 'class' => WDFMInstance(self::PLUGIN)->css_prefix . 'form_options wd-form',
732
  'current_id' => $id,
733
  'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
734
  );
768
  ));
769
  $buttons = array(
770
  'save' => array(
771
+ 'title' => __('Update', WDFMInstance(self::PLUGIN)->prefix),
772
  'value' => 'save',
773
  'onclick' => 'if( ! wd_fm_apply_options(\'apply_form_options\') ){ return false; }',
774
  'class' => 'button-primary',
775
  ),
776
  'back' => array(
777
+ 'title' => __('Back to Form', WDFMInstance(self::PLUGIN)->prefix),
778
  'value' => 'back',
779
  'onclick' => 'window.open(\'' . $back_url . '\', \'_self\'); return false;',
780
  'class' => 'button',
798
  <div class="submenu-pad">
799
  <ul id="submenu" class="configuration">
800
  <li>
801
+ <a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#"><?php _e('General Options', WDFMInstance(self::PLUGIN)->prefix); ?></a>
802
  </li>
803
  <li>
804
+ <a id="emailTab" class="fm_fieldset_tab" onclick="form_maker_options_tabs('emailTab')" href="#"><?php _e('Email Options', WDFMInstance(self::PLUGIN)->prefix); ?></a>
805
  </li>
806
  <li>
807
+ <a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#"><?php _e('Actions after Submission', WDFMInstance(self::PLUGIN)->prefix); ?></a>
808
  </li>
809
  <li>
810
+ <a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#"><?php _e('Payment Options', WDFMInstance(self::PLUGIN)->prefix); ?></a>
811
  </li>
812
  <li>
813
+ <a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript'); codemirror_for_javascript();" href="#"><?php _e('JavaScript', WDFMInstance(self::PLUGIN)->prefix); ?></a>
814
  </li>
815
  <li>
816
+ <a id="conditions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('conditions')" href="#"><?php _e('Conditional Fields', WDFMInstance(self::PLUGIN)->prefix); ?></a>
817
  </li>
818
  <li>
819
+ <a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#"><?php _e('MySQL Mapping', WDFMInstance(self::PLUGIN)->prefix); ?></a>
820
  </li>
821
  <?php
822
  if ( !empty($addons['tabs']) ) {
840
  <div class="wd-box-section">
841
  <div class="wd-box-content">
842
  <span class="wd-group">
843
+ <label class="wd-label"><?php _e('Published', WDFMInstance(self::PLUGIN)->prefix); ?></label>
844
  <input type="radio" name="published" <?php echo $row->published == 1 ? 'checked="checked"' : '' ?> id="fm_go-published-1" class="wd-radio" value="1">
845
+ <label class="wd-label-radio" for="fm_go-published-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
846
  <input type="radio" name="published" <?php echo $row->published == 0 ? 'checked="checked"' : '' ?> id="fm_go-published-0" class="wd-radio" value="0">
847
+ <label class="wd-label-radio" for="fm_go-published-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
848
  </span>
849
  <span class="wd-group">
850
+ <label class="wd-label"><?php _e('Save data(to database)', WDFMInstance(self::PLUGIN)->prefix); ?></label>
851
  <input type="radio" name="savedb" <?php echo $row->savedb == 1 ? 'checked="checked"' : '' ?> id="fm_go-savedb-1" class="wd-radio" value="1">
852
+ <label class="wd-label-radio" for="fm_go-savedb-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
853
  <input type="radio" name="savedb" <?php echo $row->savedb == 0 ? 'checked="checked"' : '' ?> id="fm_go-savedb-0" class="wd-radio" value="0">
854
+ <label class="wd-label-radio" for="fm_go-savedb-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
855
+ <p class="description"><?php _e('IMPORTANT! If you disable this option, the information submitted through this form will not be saved in the database and will not be displayed on the Submissions page.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
856
  </span>
857
  <span class="wd-group theme-wrap">
858
+ <label class="wd-label"><?php _e('Theme', WDFMInstance(self::PLUGIN)->prefix); ?></label>
859
  <select id="theme" name="theme" onChange="set_theme()">
860
+ <optgroup label="<?php _e('New Themes', WDFMInstance(self::PLUGIN)->prefix); ?>">
861
+ <option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2"><?php _e('Inherit From Website Theme', WDFMInstance(self::PLUGIN)->prefix); ?></option>
862
  <?php
863
  $optiongroup = TRUE;
864
  foreach ($themes as $theme) {
866
  $optiongroup = FALSE;
867
  ?>
868
  </optgroup>
869
+ <optgroup label="<?php _e('Outdated Themes', WDFMInstance(self::PLUGIN)->prefix); ?>">
870
  <?php } ?>
871
  <option value="<?php echo $theme->id; ?>" <?php echo(($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
872
  <?php } ?>
874
  </select>
875
  <a id="edit_css" class="options-edit-button" onclick="window.open('<?php echo add_query_arg(array(
876
  'current_id' => ($row->theme && $row->theme != '0' ? $row->theme : $default_theme),
877
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce)
878
+ ), admin_url('admin.php?page=themes' . WDFMInstance(self::PLUGIN)->menu_postfix . '&task=edit')); ?>'); return false;"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a>
879
+ <div id="old_theme_notice" class="error inline" style="display: none;"><p><?php _e('The theme you have selected is outdated. Please choose one from New Themes section.', WDFMInstance(self::PLUGIN)->prefix); ?></p></div>
880
+ <p class="description"><?php _e('The appearance of your forms is controlled by the theme you select with this option. Press Edit button to open and modify your form theme.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
881
 
882
  </span>
883
  <span class="wd-group">
884
+ <label class="wd-label" for="requiredmark"><?php _e('Required fields mark', WDFMInstance(self::PLUGIN)->prefix); ?></label>
885
  <input type="text" id="requiredmark" name="requiredmark" value="<?php echo $row->requiredmark; ?>">
886
+ <p class="description"><?php _e('Use this option to change the mark for required fields of your form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
887
  </span>
888
  <span class="wd-group">
889
+ <label class="wd-label"><?php _e('Save Uploads', WDFMInstance(self::PLUGIN)->prefix); ?></label>
890
  <input type="radio" name="save_uploads" <?php echo $row->save_uploads == 1 ? 'checked="checked"' : '' ?> id="fm_go-save_uploads-1" class="wd-radio" value="1">
891
+ <label class="wd-label-radio" for="fm_go-save_uploads-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
892
  <input type="radio" name="save_uploads" <?php echo $row->save_uploads == 0 ? 'checked="checked"' : '' ?> id="fm_go-save_uploads-0" class="wd-radio" value="0">
893
+ <label class="wd-label-radio" for="fm_go-save_uploads-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
894
+ <p class="description"><?php _e('IMPORTANT! If you disable this option, the files uploaded through your form will not be saved on your site. The files will still be sent to emails and saved in Google Drive or Dropbox, if configured.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
895
  </span>
896
  </div>
897
  </div>
900
  <div class="wd-box-section">
901
  <div class="wd-box-content">
902
  <?php
903
+ if (WDFMInstance(self::PLUGIN)->is_free) {
904
+ echo $this->free_message(__('This functionality is available in Premium version', WDFMInstance(self::PLUGIN)->prefix));
905
  }
906
  ?>
907
+ <span class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
908
+ <label class="wd-label"><?php _e('Allow User to see submissions', WDFMInstance(self::PLUGIN)->prefix); ?></label>
909
  <?php
910
  $checked_UserGroup = explode(',', $row->user_id_wd);
911
  $i = 0;
914
  if ( in_array($val, $checked_UserGroup) ) {
915
  echo ' checked="checked"';
916
  }
917
+ echo ' onchange="acces_level(' . count($userGroups) . ')" ' . disabled(WDFMInstance(self::PLUGIN)->is_free, true, false) . ' /><label for="user_' . $i . '">' . $uG["name"] . '</label><br>';
918
  $i++;
919
  }
920
  ?>
921
+ <input type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo(in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?> <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> /><label for="user_<?php echo $i; ?>">Guest</label>
922
  <input type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
923
+ <p class="description"><?php _e('Mark all user roles which will be able to view front-end submissions, when you publish them on a post or page.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
924
  </span>
925
  <?php if ( count($label_titles_for_submissions) ) { ?>
926
+ <span class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
927
+ <label class="wd-label"><?php _e('Fields to hide in frontend submissions', WDFMInstance(self::PLUGIN)->prefix); ?></label>
928
  <ul id="form_fields">
929
  <li>
930
+ <input type="checkbox" name="all_fields" id="all_fields" onclick="checkAllByParentId('form_fields'); checked_labels('filed_label')" value="submit_id,<?php echo implode(',', $labels_id_for_submissions) . "," . ($payment_info ? "payment_info" : ""); ?>" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
931
+ <label for="all_fields"><?php _e('Select All', WDFMInstance(self::PLUGIN)->prefix); ?></label>
932
  </li>
933
  <?php
934
+ echo "<li><input type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFMInstance(self::PLUGIN)->is_free, true, false) . " /><label for=\"submit_id\">ID</label></li>";
935
  for ( $i = 0, $n = count($label_titles_for_submissions); $i < $n; $i++ ) {
936
  $field_label = $label_titles_for_submissions[$i];
937
+ echo "<li><input type=\"checkbox\" id=\"filed_label" . $i . "\" name=\"filed_label" . $i . "\" value=\"" . $labels_id_for_submissions[$i] . "\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFMInstance(self::PLUGIN)->is_free, true, false) . " /><label for=\"filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
938
  }
939
  if ( $payment_info ) {
940
+ echo "<li><input type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFMInstance(self::PLUGIN)->is_free, true, false) . " /><label for=\"payment_info\">Payment Info</label></li>";
941
  }
942
  ?>
943
  </ul>
944
  <input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
945
+ <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
946
  </span>
947
  <?php if ( $stats_labels ) { ?>
948
  <span class="wd-group">
949
+ <label class="wd-label"><?php _e('Stats fields:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
950
  <ul id="stats_fields">
951
  <li>
952
+ <input type="checkbox" name="all_stats_fields" id="all_stats_fields" onclick="checkAllByParentId('stats_fields'); checked_labels('stats_filed_label');" value="<?php echo implode(',', $stats_labels_ids) . ","; ?>" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
953
+ <label for="all_stats_fields"><?php _e('Select All', WDFMInstance(self::PLUGIN)->prefix); ?></label>
954
  </li>
955
  <?php
956
  for ( $i = 0, $n = count($stats_labels); $i < $n; $i++ ) {
957
  $field_label = $stats_labels[$i];
958
+ echo "<li><input type=\"checkbox\" id=\"stats_filed_label" . $i . "\" name=\"stats_filed_label" . $i . "\" value=\"" . $stats_labels_ids[$i] . "\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\" " . disabled(WDFMInstance(self::PLUGIN)->is_free, true, false) . " /><label for=\"stats_filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
959
  }
960
  ?>
961
  </ul>
962
  <input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
963
+ <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
964
  </span>
965
  <?php }
966
  } ?>
975
  <div class="wd-box-section">
976
  <div class="wd-box-content">
977
  <div class="wd-group">
978
+ <label class="wd-label"><?php _e('Send E-mail', WDFMInstance(self::PLUGIN)->prefix); ?></label>
979
  <input type="radio" name="sendemail" <?php echo $row->sendemail == 1 ? 'checked="checked"' : '' ?> id="fm_sendemail-1" class="wd-radio" value="1" onchange="fm_toggle_email_options(true)" />
980
+ <label class="wd-label-radio" for="fm_sendemail-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
981
  <input type="radio" name="sendemail" <?php echo $row->sendemail == 0 ? 'checked="checked"' : '' ?> id="fm_sendemail-0" class="wd-radio" value="0" onchange="fm_toggle_email_options(false)" />
982
+ <label class="wd-label-radio" for="fm_sendemail-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
983
+ <p class="description"><?php _e('Enable this setting to send submitted information to administrators and/or the submitter.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
984
+ <p class="description fm_email_options"><?php _e('In case you cannot find the submission email in your Inbox, make sure to check the Spam folder as well.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
985
  </div>
986
  </div>
987
  </div>
992
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
993
  <div class="wd-box-section">
994
  <div class="wd-box-title">
995
+ <strong><?php _e('Email to Administrator', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
996
  </div>
997
  <div class="wd-box-content">
998
  <div class="wd-group wd-has-placeholder">
999
+ <label class="wd-label" for="mailToAdd"><?php _e('Email to send submissions to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1000
  <input type="text" id="mailToAdd" name="mailToAdd" />
1001
  <input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
1002
  <span class="dashicons dashicons-list-view" data-id="mailToAdd"></span>
1007
  if ( $mail && $mail != ',' ) {
1008
  ?>
1009
  <p class="fm_mail_input">
1010
+ <span class="mail_name"><?php echo $mail; ?></span><span class="dashicons dashicons-trash" onclick="fm_delete_mail(this, '<?php echo $mail; ?>')" title="<?php _e('Delete Email', WDFMInstance(self::PLUGIN)->prefix); ?>"></span>
1011
  </p>
1012
  <?php
1013
  }
1014
  }
1015
  ?>
1016
  </div>
1017
+ <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1018
  </div>
1019
  <div class="wd-group wd-has-placeholder">
1020
+ <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1021
  <input type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
1022
  <span class="dashicons dashicons-list-view" data-id="mail_subject"></span>
1023
+ <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1024
  </div>
1025
  <div class="wd-group">
1026
+ <label class="wd-label" for="script_mail"><?php _e('Custom Text in Email For Administrator', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1027
  <div class="wd-editor-placeholder">
1028
  <span class="dashicons dashicons-list-view" data-id="script_mail"></span>
1029
  </div>
1042
  <?php
1043
  }
1044
  ?>
1045
+ <p class="description"><?php _e('Write custom content to the email message which is sent to administrator. Include All Fields List to forward all submitted information, or click on fields buttons to use individual field values in the content.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1046
  </div>
1047
  <div class="postbox closed">
1048
  <button class="button-link handlediv" type="button" aria-expanded="true">
1049
+ <span class="screen-reader-text"><?php _e('Toggle panel:', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1050
  <span class="toggle-indicator" aria-hidden="false"></span>
1051
  </button>
1052
  <h2 class="hndle">
1053
+ <span><?php _e('Advanced', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1054
  </h2>
1055
  <div class="inside">
1056
  <div class="wd-group">
1057
+ <label class="wd-label"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1058
  <?php
1059
  $is_other = TRUE;
1060
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
1075
  }
1076
  ?>
1077
  <input style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-radio" type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other_wrap')" />
1078
+ <label style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-label-radio" for="other"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1079
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1080
  <input type="text" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1081
  </p>
1082
+ <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1083
  </div>
1084
  <div class="wd-group wd-has-placeholder">
1085
+ <label class="wd-label" for="from_name"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1086
  <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
1087
  <span class="dashicons dashicons-list-view" data-id="from_name"></span>
1088
+ <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1089
  </div>
1090
  <div class="wd-group">
1091
+ <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1092
  <?php
1093
  $is_other = TRUE;
1094
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
1109
  }
1110
  ?>
1111
  <input style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-radio" type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other_wrap')" />
1112
+ <label style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-label-radio" for="other1"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1113
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other_wrap">
1114
  <input type="text" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" id="reply_to_other" />
1115
  </p>
1116
+ <p class="description"><?php _e('Specify an alternative email address, to which the administrator will be able to reply upon receiving the message.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1117
  </div>
1118
  <div class="wd-group">
1119
+ <label class="wd-label" for="mail_cc"><?php _e('CC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1120
  <input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" />
1121
+ <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1122
  </div>
1123
  <div class="wd-group">
1124
+ <label class="wd-label" for="mail_bcc"><?php _e('BCC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1125
  <input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" />
1126
+ <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1127
  </div>
1128
  <div class="wd-group">
1129
+ <label class="wd-label"><?php _e('Mode', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1130
  <input type="radio" name="mail_mode" <?php echo $row->mail_mode == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode-1" class="wd-radio" value="1">
1131
+ <label class="wd-label-radio" for="fm_mo_mail_mode-1"><?php _e('HTML', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1132
  <input type="radio" name="mail_mode" <?php echo $row->mail_mode == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode-0" class="wd-radio" value="0">
1133
+ <label class="wd-label-radio" for="fm_mo_mail_mode-0"><?php _e('Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1134
+ <p class="description"><?php _e('Select the layout of the submission email, Text or HTML.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1135
  </div>
1136
  <div class="wd-group">
1137
+ <label class="wd-label"><?php _e('Attach File', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1138
  <input type="radio" name="mail_attachment" <?php echo $row->mail_attachment == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment-1" class="wd-radio" value="1">
1139
+ <label class="wd-label-radio" for="fm_mo_mail_attachment-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1140
  <input type="radio" name="mail_attachment" <?php echo $row->mail_attachment == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment-0" class="wd-radio" value="0">
1141
+ <label class="wd-label-radio" for="fm_mo_mail_attachment-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1142
+ <p class="description"><?php _e('If you have File Upload fields on your form, enable this setting to attach uploaded files to submission or confirmation email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1143
  </div>
1144
  <div class="wd-group">
1145
+ <label class="wd-label"><?php _e('Email empty fields', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1146
  <input type="radio" name="mail_emptyfields" <?php echo $row->mail_emptyfields == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_emptyfields-1" class="wd-radio" value="1">
1147
+ <label class="wd-label-radio" for="fm_mo_mail_emptyfields-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1148
  <input type="radio" name="mail_emptyfields" <?php echo $row->mail_emptyfields == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_emptyfields-0" class="wd-radio" value="0">
1149
+ <label class="wd-label-radio" for="fm_mo_mail_emptyfields-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1150
+ <p class="description"><?php _e('Disable this setting, in case you do not want to include form fields, which are left empty by the submitter.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1151
  </div>
1152
  </div>
1153
  </div>
1157
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
1158
  <div class="wd-box-section">
1159
  <div class="wd-box-title">
1160
+ <strong><?php _e('Email to User', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
1161
  </div>
1162
  <div class="wd-box-content">
1163
  <div class="wd-group">
1164
+ <label class="wd-label"><?php _e('Send to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1165
  <?php
1166
  $fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
1167
  $fields_count = count($fields);
1168
  if ( $fields_count == 1 ) {
1169
+ _e('There is no email field', WDFMInstance(self::PLUGIN)->prefix);
1170
  }
1171
  else {
1172
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
1179
  }
1180
  }
1181
  ?>
1182
+ <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1183
  </div>
1184
  <div class="wd-group wd-has-placeholder">
1185
+ <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1186
  <input type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
1187
  <span class="dashicons dashicons-list-view" data-id="mail_subject_user"></span>
1188
+ <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1189
  </div>
1190
  <div class="wd-group">
1191
+ <label class="wd-label" for="script_mail_user"><?php _e('Custom Text in Email For User', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1192
  <div class="wd-editor-placeholder">
1193
  <span class="dashicons dashicons-list-view" data-id="script_mail_user"></span>
1194
  </div>
1207
  <?php
1208
  }
1209
  ?>
1210
+ <p class="description"><?php _e('Write custom content to the email message which is sent to submitter. Include All Fields List to forward all submitted information, or click on fields buttons to use individual field values in the content.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1211
  </div>
1212
  <div class="postbox closed">
1213
  <button class="button-link handlediv" type="button" aria-expanded="true">
1214
+ <span class="screen-reader-text"><?php _e('Toggle panel:', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1215
  <span class="toggle-indicator" aria-hidden="false"></span>
1216
  </button>
1217
  <h2 class="hndle">
1218
+ <span><?php _e('Advanced', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1219
  </h2>
1220
  <div class="inside">
1221
  <div class="wd-group">
1222
+ <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1223
  <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1224
+ <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1225
  </div>
1226
  <div class="wd-group wd-has-placeholder">
1227
+ <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1228
  <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
1229
  <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
1230
+ <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1231
  </div>
1232
  <div class="wd-group">
1233
+ <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1234
  <input type="text" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" id="reply_to_user" />
1235
+ <p class="description"><?php _e('Specify an alternative email address, to which the submitter will be able to reply upon receiving the message.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1236
  </div>
1237
  <div class="wd-group">
1238
+ <label class="wd-label" for="mail_cc_user"><?php _e('CC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1239
  <input type="text" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" id="mail_cc_user" />
1240
+ <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1241
  </div>
1242
  <div class="wd-group">
1243
+ <label class="wd-label" for="mail_bcc_user"><?php _e('BCC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1244
  <input type="text" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" id="mail_bcc_user" />
1245
+ <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1246
  </div>
1247
  <div class="wd-group">
1248
+ <label class="wd-label"><?php _e('Mode', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1249
  <input type="radio" name="mail_mode_user" <?php echo $row->mail_mode_user == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode_user-1" class="wd-radio" value="1">
1250
+ <label class="wd-label-radio" for="fm_mo_mail_mode_user-1"><?php _e('HTML', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1251
  <input type="radio" name="mail_mode_user" <?php echo $row->mail_mode_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode_user-0" class="wd-radio" value="0">
1252
+ <label class="wd-label-radio" for="fm_mo_mail_mode_user-0"><?php _e('Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1253
+ <p class="description"><?php _e('Select the layout of the submission email, Text or HTML.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1254
  </div>
1255
  <div class="wd-group">
1256
+ <label class="wd-label"><?php _e('Attach File', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1257
  <input type="radio" name="mail_attachment_user" <?php echo $row->mail_attachment_user == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment_user-1" class="wd-radio" value="1">
1258
+ <label class="wd-label-radio" for="fm_mo_mail_attachment_user-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1259
  <input type="radio" name="mail_attachment_user" <?php echo $row->mail_attachment_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment_user-0" class="wd-radio" value="0">
1260
+ <label class="wd-label-radio" for="fm_mo_mail_attachment_user-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1261
+ <p class="description"><?php _e('If you have File Upload fields on your form, enable this setting to attach uploaded files to submission or confirmation email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1262
  </div>
1263
  <div class="wd-group">
1264
+ <label class="wd-label"><?php _e('Email verification', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1265
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 1 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-1" onclick="wdshow('expire_link')" class="wd-radio" value="1">
1266
+ <label class="wd-label-radio" for="fm_mo_mail_verify-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1267
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-0" onclick="wdhide('expire_link')" class="wd-radio" value="0">
1268
+ <label class="wd-label-radio" for="fm_mo_mail_verify-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1269
+ <p class="description"><?php _e('Activate this option, in case you would like the users to verify their email addresses. If it’s enabled, the user email will contain a verification link.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1270
  </div>
1271
  <div class="wd-group" <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : '') ?> id="expire_link">
1272
+ <label class="wd-label" for="mail_verify_expiretime"><?php _e('Verification link expires in', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1273
  <input class="inputbox" type="text" name="mail_verify_expiretime" maxlength="10" value="<?php echo($row->mail_verify_expiretime ? $row->mail_verify_expiretime : 0); ?>" onkeypress="return check_isnum_point(event)" id="mail_verify_expiretime">
1274
+ <small><?php _e(' -- hours (0 - never expires).', WDFMInstance(self::PLUGIN)->prefix); ?></small>
1275
  <a target="_blank" href="<?php echo add_query_arg(array(
1276
  'post' => $params["mail_ver_id"],
1277
  'action' => 'edit',
1278
+ ), admin_url('post.php')); ?>"><?php _e('Edit post', WDFMInstance(self::PLUGIN)->prefix); ?></a>
1279
+ <p class="description"><?php _e('Use this option to specify a time period (hours), during which the user will be able to verify their email address.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1280
  </div>
1281
  </div>
1282
  </div>
1291
  <div class="wd-box-section">
1292
  <div class="wd-box-content">
1293
  <span class="wd-group">
1294
+ <label class="wd-label"><?php _e('Action type', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1295
  <input type="radio" name="submit_text_type" id="text_type_none" onclick="set_type('none')" value="1" <?php echo ($row->submit_text_type != 2 && $row->submit_text_type != 3 && $row->submit_text_type != 4 && $row->submit_text_type != 5) ? "checked" : ""; ?> />
1296
+ <label for="text_type_none"><?php _e('Stay on Form', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1297
  <br>
1298
  <input type="radio" name="submit_text_type" id="text_type_post" onclick="set_type('post')" value="2" <?php echo ($row->submit_text_type == 2) ? "checked" : ""; ?> />
1299
+ <label for="text_type_post"><?php _e('Post', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1300
  <br>
1301
  <input type="radio" name="submit_text_type" id="text_type_page" onclick="set_type('page')" value="5" <?php echo ($row->submit_text_type == 5) ? "checked" : ""; ?> />
1302
+ <label for="text_type_page"><?php _e('Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1303
  <br>
1304
  <input type="radio" name="submit_text_type" id="text_type_custom_text" onclick="set_type('custom_text')" value="3" <?php echo ($row->submit_text_type == 3) ? "checked" : ""; ?> />
1305
+ <label for="text_type_custom_text"><?php _e('Custom Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1306
  <br>
1307
  <input type="radio" name="submit_text_type" id="text_type_url" onclick="set_type('url')" value="4" <?php echo ($row->submit_text_type == 4) ? "checked" : ""; ?> />
1308
+ <label for="text_type_url"><?php _e('URL', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1309
  </span>
1310
  <span class="wd-group">
1311
  <div id="post" <?php echo(($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
1312
+ <label class="wd-label"><?php _e('Post', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1313
  <select id="post_name" name="post_name">
1314
  <option value="0">- Select Post -</option>
1315
  <?php
1326
  </select>
1327
  </div>
1328
  <div id="page" <?php echo(($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
1329
+ <label class="wd-label"><?php _e('Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1330
  <select id="page_name" name="page_name">
1331
  <option value="0">- Select Page -</option>
1332
  <?php
1342
  </select>
1343
  </div>
1344
  <div id="custom_text" <?php echo(($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
1345
+ <label class="wd-label"><?php _e('Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1346
  <div class="wd-editor-placeholder">
1347
  <span class="dashicons dashicons-list-view" data-id="submit_text"></span>
1348
  </div>
1365
  ?>
1366
  </div>
1367
  <div id="url" <?php echo(($row->submit_text_type != 4) ? 'style="display:none"' : ''); ?>>
1368
+ <label class="wd-label"><?php _e('URL', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1369
  <input type="text" id="url" name="url" value="<?php echo $row->url; ?>" />
1370
  </div>
1371
  </span>
1380
  <div class="wd-box-section">
1381
  <div class="wd-box-content">
1382
  <div class="wd-group">
1383
+ <label class="wd-label"><?php _e('Payment Method', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1384
  <input type="radio" name="paypal_mode" id="paypal_mode0" value="none" class="wd-radio" <?php echo ($payment_method == "none") ? "checked" : ""; ?> onchange="fm_change_payment_method('none');" />
1385
+ <label for="paypal_mode0"><?php _e('None', WDFMInstance(self::PLUGIN)->prefix); ?></label><br>
1386
  <input type="radio" name="paypal_mode" id="paypal_mode1" value="paypal" class="wd-radio" <?php echo ($payment_method == "paypal") ? "checked" : ""; ?> onchange="fm_change_payment_method('paypal');" />
1387
+ <label for="paypal_mode1"><?php _e('Paypal', WDFMInstance(self::PLUGIN)->prefix); ?></label><br>
1388
  <input type="radio" name="paypal_mode" id="paypal_mode2" value="stripe" <?php echo ($payment_method == "stripe") ? "checked" : ""; ?> class="wd-radio" onchange="fm_change_payment_method('stripe');" />
1389
+ <label for="paypal_mode2"><?php _e('Stripe', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1390
  </div>
1391
  <div class="fm_payment_option">
1392
  <?php
1393
+ if (WDFMInstance(self::PLUGIN)->is_free) {
1394
+ echo $this->free_message(__('PAYPAL is available in Premium version', WDFMInstance(self::PLUGIN)->prefix));
1395
  }
1396
  ?>
1397
+ <div class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
1398
+ <label class="wd-label" for="payment_currency"><?php _e('Payment Currency', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1399
+ <select id="payment_currency" name="payment_currency" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?>>
1400
  <option value="USD" <?php echo(($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ &#8226; U.S. Dollar</option>
1401
  <option value="EUR" <?php echo(($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>&#8364; &#8226; Euro</option>
1402
  <option value="GBP" <?php echo(($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>&#163; &#8226; Pound Sterling</option>
1421
  <option value="PHP" <?php echo(($row->payment_currency == 'PHP') ? 'selected' : ''); ?>>&#8369; &#8226; Philippine Peso</option>
1422
  <option value="THB" <?php echo(($row->payment_currency == 'THB') ? 'selected' : ''); ?>>&#xe3f; &#8226; Thai Bahtv</option>
1423
  </select>
1424
+ <p class="description"><?php _e('Choose the currency to be used for the payments made through your form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1425
  </div>
1426
+ <div class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
1427
+ <label class="wd-label" for="tax"><?php _e('Tax', WDFMInstance(self::PLUGIN)->prefix); ?> (%)</label>
1428
+ <input type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" onKeyPress="return check_isnum_point(event)" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
1429
+ <p class="description"><?php _e('Specify the percentage of the tax. It will be calculated from the total payment amount of your form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1430
  </div>
1431
+ <div class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
1432
+ <label class="wd-label"><?php _e('Checkout Mode', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1433
+ <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 1 ? 'checked="checked"' : '' ?> id="checkout_mode-1" class="wd-radio" value="1" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
1434
+ <label class="wd-label-radio" for="checkout_mode-1"><?php _e('Production', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1435
+ <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 0 ? 'checked="checked"' : '' ?> id="checkout_mode-0" class="wd-radio" value="0" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
1436
+ <label class="wd-label-radio" for="checkout_mode-0"><?php _e('Testmode', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1437
  </div>
1438
+ <div class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
1439
+ <label class="wd-label" for="paypal_email"><?php _e('Paypal email', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1440
+ <input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
1441
+ <p class="description"><?php _e('Provide the email address of a valid PayPal account. It will receive the payments made through your form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1442
  </div>
1443
  </div>
1444
  <div class="fm_payment_option_stripe">
1445
  <?php
1446
  if ( $stripe_addon['enable'] && !empty($stripe_addon['html']) ) {
1447
+ if (WDFMInstance(self::PLUGIN)->is_free) {
1448
+ echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix));
1449
  }
1450
  else {
1451
  echo $stripe_addon[ 'html' ];
1452
  }
1453
  }
1454
  else {
1455
+ if (WDFMInstance(self::PLUGIN)->is_free) {
1456
+ echo $this->promo_box(__('This feature is available only in the Premium version', WDFMInstance(self::PLUGIN)->prefix), __('Requires STRIPE add-on.', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html');
1457
  }
1458
  else {
1459
+ echo $this->free_message(__('This feature requires STRIPE add-on', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFMInstance(self::PLUGIN)->prefix ));
1460
  }
1461
  }
1462
  ?>
1585
  <div class="wd-box-section">
1586
  <div class="wd-box-content">
1587
  <div class="wd-group" id="conditions_fieldset_wrap">
1588
+ <p class="description"><?php _e('Press Add Condition button to configure the first condition of your form. Show/Hide select box represents the action which will be completed, if all or any of the condition statements are fulfilled. Use the second drop-down menu to select the field which will be shown or hidden. Click the little Plus (+) icon to add the statement of your form condition.', WDFMInstance(self::PLUGIN)->prefix); ?><br><br></p>
1589
  <div style="text-align: right;">
1590
+ <button class="wd-button button-primary" onclick="add_condition('<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>', '<?php echo $all_ids_cond; ?>', '<?php echo htmlspecialchars(addslashes($all_labels_cond)); ?>'); return false;"><?php _e('Add Condition', WDFMInstance(self::PLUGIN)->prefix); ?></button>
1591
  </div>
1592
  <?php
1593
  for ( $k = 0; $k < $count_of_conditions; $k++ ) {
1597
  <select id="show_hide<?php echo $k; ?>" name="show_hide<?php echo $k; ?>" class="fm_condition_show_hide">
1598
  <option value="1" <?php if ( $show_hide[$k] == 1 ) {
1599
  echo 'selected="selected"';
1600
+ } ?>><?php _e('Show', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1601
  <option value="0" <?php if ( $show_hide[$k] == 0 ) {
1602
  echo 'selected="selected"';
1603
+ } ?>><?php _e('Hide', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1604
  </select>
1605
  <select id="fields<?php echo $k; ?>" name="fields<?php echo $k; ?>" class="fm_condition_fields">
1606
  <?php
1619
  <select id="all_any<?php echo $k; ?>" name="all_any<?php echo $k; ?>" class="fm_condition_all_any">
1620
  <option value="and" <?php if ( $all_any[$k] == "and" ) {
1621
  echo 'selected="selected"';
1622
+ } ?>><?php _e('all', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1623
  <option value="or" <?php if ( $all_any[$k] == "or" ) {
1624
  echo 'selected="selected"';
1625
+ } ?>><?php _e('any', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1626
  </select>
1627
+ <span style="display: inline-block; width: 100%; max-width: 235px;"><?php _e('of the following match:', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1628
  <span class="dashicons dashicons-trash" onclick="delete_condition('<?php echo $k; ?>')"></span>
1629
  <span class="dashicons dashicons-plus-alt" onclick="add_condition_fields(<?php echo $k; ?>,'<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')"></span>
1630
  </div>
1742
  }
1743
  }
1744
  if ( $types[$key_select_or_input] == "type_address" ) {
1745
+ $w_countries = WDW_FM_Library(self::PLUGIN)->get_countries();
1746
  $w_options = '';
1747
  foreach ( $w_countries as $w_country ) {
1748
  if ( in_array($w_country, $multiselect) ) {
1793
 
1794
  <div id="mapping_fieldset" class="adminform fm_fieldset_deactive">
1795
  <?php
1796
+ if ( WDFMInstance(self::PLUGIN)->is_demo ) {
1797
+ echo WDW_FM_Library(self::PLUGIN)->message_id(0, 'This feature is disabled in demo.', 'error');
1798
  }
1799
  else {
1800
  ?>
1803
  <div class="wd-box-section">
1804
  <div class="wd-box-content">
1805
  <div class="wd-group">
1806
+ <p class="description"><?php _e('WordPress Form Maker stores the submitted information into [prefix]_formmaker_submits MySQL database table of your website by default. With MySQL Mapping functionality of Form Maker you can insert this data into any local or remote table of your choice, or perform other queries based on submitted values. Press Add Query button to configure the first query for this form.', WDFMInstance(self::PLUGIN)->prefix); ?></p><br><br>
1807
  <div style="text-align: right; padding-bottom: 20px;">
1808
  <button id="add_query" class="wd-button button-primary" onclick="tb_show('', '<?php echo add_query_arg(array(
1809
+ 'action' => 'FormMakerSQLMapping' . WDFMInstance(self::PLUGIN)->plugin_postfix,
1810
  'id' => 0,
1811
  'form_id' => $row->id,
1812
  'width' => '1000',
1813
  'height' => '500',
1814
  'TB_iframe' => '1'
1815
+ ), admin_url('admin-ajax.php')); ?>'); return false;"><?php _e('Add Query', WDFMInstance(self::PLUGIN)->prefix); ?></button>
1816
  </div>
1817
  <?php if ( $queries ) { ?>
1818
  <table class="wp-list-table widefat fixed posts table_content">
1819
  <thead>
1820
  <tr>
1821
+ <th style="width:86%;" class="table_large_col"><?php _e('Query', WDFMInstance(self::PLUGIN)->prefix); ?></th>
1822
+ <th style="width:14%;" class="table_large_col"><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></th>
1823
  </tr>
1824
  </thead>
1825
  <?php
1826
  for ( $i = 0, $n = count($queries); $i < $n; $i++ ) {
1827
  $query = $queries[$i];
1828
  $link = add_query_arg(array(
1829
+ 'action' => 'FormMakerSQLMapping' . WDFMInstance(self::PLUGIN)->plugin_postfix,
1830
  'id' => $query->id,
1831
  'form_id' => $row->id,
1832
  'width' => '1000',
1880
  <script>
1881
  default_theme = '<?php echo $default_theme; ?>';
1882
  payment_method = '<?php echo $payment_method; ?>';
1883
+ theme_edit_url = '<?php echo add_query_arg( array('page' => 'themes' . WDFMInstance(self::PLUGIN)->menu_postfix, 'task' =>'edit'), $page_url); ?>';
1884
 
1885
  jQuery(document).ready( function () {
1886
  set_theme();
1897
  <div class="placeholder-body meta-box-sortables">
1898
  <div class="placeholder-body-col placeholders">
1899
  <div class="placeholders_cont">
1900
+ <p class="description"><?php _e('Select a field, the value of which will be used as the placeholder.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1901
  <span class="placeholders-filter-cont">
1902
+ <input class="placeholders-filter" value="" placeholder="<?php _e('Filter', WDFMInstance(self::PLUGIN)->prefix); ?>" tabindex="-1" type="search" />
1903
  </span>
1904
  <div class="postbox filtered-placeholders hide">
1905
  <h2 class="hndle readonly">
1906
+ <span><?php _e('Filtered placeholders', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1907
  </h2>
1908
  <div class="inside"></div>
1909
  </div>
1910
  <?php
1911
  foreach ($placeholders as $section => $field) {
1912
  ?>
1913
+ <div class="postbox<?php echo $section != __('Misc', WDFMInstance(self::PLUGIN)->prefix) ? " closed" : ""; ?>">
1914
  <button class="button-link handlediv" type="button" aria-expanded="true">
1915
+ <span class="screen-reader-text"><?php echo __('Toggle panel:', WDFMInstance(self::PLUGIN)->prefix) , $section; ?></span>
1916
  <span class="toggle-indicator" aria-hidden="false"></span>
1917
  </button>
1918
  <h2 class="hndle">
1948
  *
1949
  */
1950
  public function form_layout( $params ) {
1951
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
1952
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
1953
 
1954
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
1955
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-formatting');
1956
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-formatting');
1957
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-clike');
1958
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-css');
1959
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-javascript');
1960
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-xml');
1961
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-php');
1962
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-htmlmixed');
1963
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
1964
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-form-advanced-layout');
1965
 
1966
  $id = $params['id'];
1967
  $page = $params['page'];
1977
  );
1978
  $buttons = array(
1979
  'save' => array(
1980
+ 'title' => __('Update', WDFMInstance(self::PLUGIN)->prefix),
1981
  'value' => 'save',
1982
  'onclick' => 'fm_apply_advanced_layout(\'apply_layout\');',
1983
  'class' => 'button-primary'
1984
  ),
1985
  'back' => array(
1986
+ 'title' => __('Back to Form', WDFMInstance(self::PLUGIN)->prefix),
1987
  'value' => 'back',
1988
  'onclick' => 'window.open(\''. $back_url .'\', \'_self\'); return false;',
1989
  'class' => 'button'
1997
 
1998
  // Pass the content to form.
1999
  $form_attr = array(
2000
+ 'id' => WDFMInstance(self::PLUGIN)->css_prefix . 'ApplyLayoutForm',
2001
  'name' => 'adminForm',
2002
+ 'class' => WDFMInstance(self::PLUGIN)->css_prefix . 'advanced_layout wd-form',
2003
  'current_id' => $id,
2004
  'enctype' => 'multipart/form-data',
2005
  'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
2024
  <div class="wd-table-col-100">
2025
  <div class="wd-box-section">
2026
  <div class="wd-box-content">
2027
+ <p><?php _e('To customize the layout of the form fields uncheck the Auto-Generate Layout box and edit the HTML.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2028
+ <p><?php _e('You can change positioning, add in-line styles and etc. Click on the provided buttons to add the corresponding field.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2029
+ <p><?php _e('This will add the following line:', WDFMInstance(self::PLUGIN)->prefix); ?>
2030
+ <b><span class="cm-tag">&lt;div</span> <span class="cm-attribute">wdid</span>=<span class="cm-string">"example_id"</span> <span class="cm-attribute">class</span>=<span class="cm-string">"wdform_row"</span><span class="cm-tag">&gt;</span>%example_id - Example%<span class="cm-tag">&lt;/div&gt;</span></b> , where <b><span class="cm-tag">&lt;div&gt;</span></b> <?php _e('is used to set a row.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2031
  <p>
2032
+ <b style="color:red"><?php _e('Notice', WDFMInstance(self::PLUGIN)->prefix); ?></b><br>
2033
+ <?php _e('Make sure not to publish the same field twice. This will cause malfunctioning of the form.', WDFMInstance(self::PLUGIN)->prefix); ?>
2034
  </p>
2035
  <div class="wd-group">
2036
+ <label class="wd-label autogen_layout_label" for="autogen_layout"><?php _e('Auto Generate Layout?', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2037
  <input type="checkbox" value="1" name="autogen_layout" id="autogen_layout" <?php echo (($row->autogen_layout) ? 'checked="checked"' : ''); ?> />
2038
  </div>
2039
  <div class="wd-group">
2048
  }
2049
  ?>
2050
  </div>
2051
+ <span class="button button-hero fm_auto_format_button" onclick="autoFormat()"><strong><?php _e('Apply Source Formatting', WDFMInstance(self::PLUGIN)->prefix); ?></strong> <em>(<?php _e('ctrl-enter', WDFMInstance(self::PLUGIN)->prefix); ?>)</em></span>
2052
  <textarea id="source" name="source" style="display: none;"></textarea>
2053
  <input type="hidden" name="custom_front" id="custom_front" value="" />
2054
  </div>
2079
  $form_attr = array(
2080
  'id' => 'adminForm',
2081
  'name' => 'adminForm',
2082
+ 'class' => WDFMInstance(self::PLUGIN)->prefix . '_display_options wd-form',
2083
  'current_id' => $id,
2084
  'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
2085
  );
2102
 
2103
  $buttons = array(
2104
  'save' => array(
2105
+ 'title' => __('Update', WDFMInstance(self::PLUGIN)->prefix),
2106
  'value' => 'save',
2107
  'onclick' => 'fm_apply_options(\'apply_display_options\');',
2108
  'class' => 'button-primary',
2109
  ),
2110
  'back' => array(
2111
+ 'title' => __('Back to Form', WDFMInstance(self::PLUGIN)->prefix),
2112
  'value' => 'back',
2113
  'onclick' => 'window.open(\''. $back_url .'\', \'_self\'); return false;',
2114
  'class' => 'button',
2128
  <div class="wd-box-content">
2129
  <span>
2130
  <div class="fm-row fm-form-types">
2131
+ <label class="wd-label"><?php _e('Form Type', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2132
  <label>
2133
  <input type="radio" name="form_type" value="embedded" onclick="change_form_type('embedded'); change_hide_show('fm-embedded');"
2134
  <?php echo $row->type == 'embedded' ? 'checked="checked"' : '' ?>>
2164
  <div class="wd-box-section">
2165
  <div class="wd-box-content">
2166
  <span class="wd-group fm-embedded <?php echo $row->type == 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2167
+ <label class="wd-label"><?php _e('Form Placement', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2168
  <div id="fm-embedded-element">
2169
+ <p><?php _e('Use', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2170
+ <input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '[wd_contact_form id="' . $row->form_id . '"]' : '[Form id="' . $row->form_id . '"]'); ?>' onclick="fm_select_value(this)" readonly="readonly" style="width:155px !important;"/>
2171
+ <p><?php _e('shortcode to display the form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2172
  </div>
2173
  </span>
2174
  <span class="wd-group fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
2175
+ <label class="wd-label"><?php _e('Animation Effect', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2176
  <select id="popover_animate_effect" name="popover_animate_effect">
2177
  <?php
2178
  foreach($animation_effects as $anim_key => $animation_effect){
2183
  </select>
2184
  </span>
2185
  <span class="wd-group fm-popover <?php echo $row->type != 'popover' ? 'fm-hide' : 'fm-show'; ?>">
2186
+ <label class="wd-label"><?php _e('Loading Delay', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2187
  <input type="number" name="popover_loading_delay" value="<?php echo $row->popover_loading_delay; ?>" /> seconds
2188
  <div>
2189
+ <?php _e('Define the amount of time before the form popup appears after the page loads.', WDFMInstance(self::PLUGIN)->prefix); ?>
2190
+ <?php _e('Set 0 for no delay.', WDFMInstance(self::PLUGIN)->prefix); ?>
2191
  </div>
2192
  </span>
2193
  <span class="wd-group fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
2194
+ <label class="wd-label"><?php _e('Frequency', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2195
  <input type="number" name="popover_frequency" value="<?php echo $row->popover_frequency; ?>" /> days
2196
  <div>
2197
+ <?php _e('Display the popup to the same visitor (who has closed the popup/submitted the form) after this period.', WDFMInstance(self::PLUGIN)->prefix); ?>
2198
+ <?php _e('Set the value to 0 to always show.', WDFMInstance(self::PLUGIN)->prefix); ?>
2199
  </div>
2200
  </span>
2201
  <span class="wd-group fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
2202
+ <label class="wd-label"><?php _e('Position', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2203
  <input type="radio" name="topbar_position" <?php echo $row->topbar_position == 1 ? 'checked="checked"' : '' ?> id="fm_do-topbarpos-1" class="wd-radio" value="1">
2204
+ <label class="wd-label-radio" for="fm_do-topbarpos-1"><?php _e('Top', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2205
  <input type="radio" name="topbar_position" <?php echo $row->topbar_position == 0 ? 'checked="checked"' : '' ?> id="fm_do-topbarpos-0" class="wd-radio" value="0">
2206
+ <label class="wd-label-radio" for="fm_do-topbarpos-0"><?php _e('Bottom', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2207
  </span>
2208
  <span class="wd-group fm-topbar topbar_remain_top <?php echo $row->type != 'topbar' ? 'fm-hide' : ($row->topbar_position == 1 ? 'fm-show' : 'fm-hide') ?>">
2209
+ <label class="wd-label"><?php _e('Remain at top when scrolling', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2210
  <input type="radio" name="topbar_remain_top" <?php echo $row->topbar_remain_top == 1 ? 'checked="checked"' : '' ?> id="fm_do-remaintop-1" class="wd-radio" value="1">
2211
+ <label class="wd-label-radio" for="fm_do-remaintop-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2212
  <input type="radio" name="topbar_remain_top" <?php echo $row->topbar_remain_top == 0 ? 'checked="checked"' : '' ?> id="fm_do-remaintop-0" class="wd-radio" value="0">
2213
+ <label class="wd-label-radio" for="fm_do-remaintop-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2214
  </span>
2215
  <span class="wd-group fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
2216
+ <label class="wd-label"><?php _e('Allow Closing the bar', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2217
  <input type="radio" name="topbar_closing" <?php echo $row->topbar_closing == 1 ? 'checked="checked"' : '' ?> id="fm_do-topbarclosing-1" class="wd-radio" value="1">
2218
+ <label class="wd-label-radio" for="fm_do-topbarclosing-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2219
  <input type="radio" name="topbar_closing" <?php echo $row->topbar_closing == 0 ? 'checked="checked"' : '' ?> id="fm_do-topbarclosing-0" class="wd-radio" value="0">
2220
+ <label class="wd-label-radio" for="fm_do-topbarclosing-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2221
  </span>
2222
  <span class="wd-group fm-topbar topbar_hide_duration <?php echo $row->type != 'topbar' ? 'fm-hide' : 'fm-show' ?>">
2223
+ <label class="wd-label"><?php _e('Frequency', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2224
  <input type="number" name="topbar_hide_duration" value="<?php echo $row->topbar_hide_duration; ?>"/>days
2225
  <div>
2226
+ <?php _e('Display the topbar to the same visitor (who has closed the popup/submitted the form) after this period.', WDFMInstance(self::PLUGIN)->prefix); ?>
2227
+ <?php _e('Set the value to 0 to always show.', WDFMInstance(self::PLUGIN)->prefix); ?>
2228
  </div>
2229
  </span>
2230
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2231
+ <label class="wd-label"><?php _e('Position', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2232
  <input type="radio" name="scrollbox_position" <?php echo $row->scrollbox_position == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxposition-0" class="wd-radio" value="0">
2233
+ <label class="wd-label-radio" for="fm_do-scrollboxposition-0"><?php _e('Left', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2234
  <input type="radio" name="scrollbox_position" <?php echo $row->scrollbox_position == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxposition-1" class="wd-radio" value="1">
2235
+ <label class="wd-label-radio" for="fm_do-scrollboxposition-1"><?php _e('Right', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2236
  </span>
2237
  <span class="wd-group fm-scrollbox <?php echo $row->type != 'scrollbox' ? 'fm-hide' : 'fm-show'; ?>">
2238
+ <label class="wd-label"><?php _e('Loading Delay', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2239
  <input type="number" name="scrollbox_loading_delay" value="<?php echo $row->scrollbox_loading_delay; ?>" /> seconds
2240
  <div>
2241
+ <?php _e('Define the amount of time before the form scrollbox appears after the page loads. Set 0 for no delay.', WDFMInstance(self::PLUGIN)->prefix); ?>
2242
  </div>
2243
  </span>
2244
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2245
+ <label class="wd-label"><?php _e('Frequency', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2246
  <input type="number" name="scrollbox_hide_duration" value="<?php echo $row->scrollbox_hide_duration; ?>"/>days
2247
  <div>
2248
+ <?php _e('Display the scrollbox to the same visitor (who has closed the popup/submitted the form) after this period.', WDFMInstance(self::PLUGIN)->prefix); ?>
2249
+ <?php _e('Set the value to 0 to always show.', WDFMInstance(self::PLUGIN)->prefix); ?>
2250
  </div>
2251
  </span>
2252
  <span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2253
+ <label class="wd-label"><?php _e('Always show for administrator', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2254
  <input type="radio" name="show_for_admin" <?php echo $row->show_for_admin == 1 ? 'checked="checked"' : '' ?> id="fm_do-showforadmin-1" class="wd-radio" value="1">
2255
+ <label class="wd-label-radio" for="fm_do-showforadmin-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2256
  <input type="radio" name="show_for_admin" <?php echo $row->show_for_admin == 0 ? 'checked="checked"' : '' ?> id="fm_do-showforadmin-0" class="wd-radio" value="0">
2257
+ <label class="wd-label-radio" for="fm_do-showforadmin-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2258
  <div>
2259
+ <?php _e('If this option is enabled, website admins will always see the form.', WDFMInstance(self::PLUGIN)->prefix); ?>
2260
  </div>
2261
  </span>
2262
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2263
+ <label class="wd-label"><?php _e('Trigger Point', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2264
  <input type="number" name="scrollbox_trigger_point" value="<?php echo $row->scrollbox_trigger_point; ?>"/>%
2265
  <div>
2266
+ <?php _e('Set the percentage of the page height, where the scrollbox form will appear after scrolling down.', WDFMInstance(self::PLUGIN)->prefix); ?>
2267
  </div>
2268
  </span>
2269
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2270
+ <label class="wd-label"><?php _e('Allow Closing the bar', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2271
  <input type="radio" name="scrollbox_closing" <?php echo $row->scrollbox_closing == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxclosing-1" class="wd-radio" value="1">
2272
+ <label class="wd-label-radio" for="fm_do-scrollboxclosing-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2273
  <input type="radio" name="scrollbox_closing" <?php echo $row->scrollbox_closing == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxclosing-0" class="wd-radio" value="0">
2274
+ <label class="wd-label-radio" for="fm_do-scrollboxclosing-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2275
  </span>
2276
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2277
+ <label class="wd-label"><?php _e('Allow Minimize', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2278
  <input type="radio" name="scrollbox_minimize" <?php echo $row->scrollbox_minimize == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxminimize-1" class="wd-radio" value="1">
2279
+ <label class="wd-label-radio" for="fm_do-scrollboxminimize-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2280
  <input type="radio" name="scrollbox_minimize" <?php echo $row->scrollbox_minimize == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxminimize-0" class="wd-radio" value="0">
2281
+ <label class="wd-label-radio" for="fm_do-scrollboxminimize-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2282
  </span>
2283
  <span class="wd-group fm-scrollbox minimize_text <?php echo $row->type == 'scrollbox' && $row->scrollbox_minimize == 1 ? 'fm-show' : 'fm-hide' ?>">
2284
+ <label class="wd-label"><?php _e('Minimize Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2285
  <input type="text" name="scrollbox_minimize_text" value="<?php echo $row->scrollbox_minimize_text; ?>"/>
2286
  </span>
2287
  <span class="wd-group fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
2288
+ <label class="wd-label"><?php _e('Auto Hide', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2289
  <input type="radio" name="scrollbox_auto_hide" <?php echo $row->scrollbox_auto_hide == 1 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxautohide-1" class="wd-radio" value="1">
2290
+ <label class="wd-label-radio" for="fm_do-scrollboxautohide-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2291
  <input type="radio" name="scrollbox_auto_hide" <?php echo $row->scrollbox_auto_hide == 0 ? 'checked="checked"' : '' ?> id="fm_do-scrollboxautohide-0" class="wd-radio" value="0">
2292
+ <label class="wd-label-radio" for="fm_do-scrollboxautohide-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2293
  <div>
2294
+ <?php _e('Hide the scrollbox form again when visitor scrolls back up.', WDFMInstance(self::PLUGIN)->prefix); ?>
2295
  </div>
2296
  </span>
2297
  <span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2298
+ <label class="wd-label"><?php _e('Display on', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2299
  <ul class="pp_display pp_display_on"><?php
2300
  $posts_and_pages = $params['posts_and_pages'];
2301
  $stat_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives');
2321
  </ul>
2322
  </span>
2323
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-cat-show <?php echo $row->type != 'embedded' && $show_cats ? 'fm-show' : 'fm-hide' ?>">
2324
+ <label class="wd-label"><?php _e("Display on these categories' posts", WDFMInstance(self::PLUGIN)->prefix); ?></label>
2325
  <ul class="pp_display pp_display_on_categories"><?php
2326
  $categories = $params['categories'];
2327
  $selected_categories = $params['selected_categories'];
2341
  <input type="hidden" name="current_categories" value="<?php echo $current_categories; ?>"/>
2342
  </span>
2343
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-posts-show <?php echo (in_array('everything', $selected_types) || in_array('post', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2344
+ <label class="wd-label"><?php _e('Display on these posts', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2345
  <div class="fm-mini-heading">
2346
+ <?php _e('Click on input area to view the list of posts.', WDFMInstance(self::PLUGIN)->prefix); ?>
2347
+ <?php _e('If left empty the form will appear on all posts.', WDFMInstance(self::PLUGIN)->prefix); ?>
2348
  </div>
2349
+ <p><?php _e('Posts defined below will override all settings above.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2350
  <ul class="fm-pp">
2351
  <li class="pp_selected"><?php if($row->posts_include){
2352
  $posts_include = explode(',', $row->posts_include);
2371
  </ul>
2372
  </span>
2373
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-pages-show <?php echo (in_array('everything', $selected_types) || in_array('page', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2374
+ <label class="wd-label"><?php _e('Display on these pages', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2375
  <div class="fm-mini-heading">
2376
+ <?php _e('Click on input area to view the list of pages. ', WDFMInstance(self::PLUGIN)->prefix); ?>
2377
+ <?php _e('If left empty the form will appear on all pages.', WDFMInstance(self::PLUGIN)->prefix); ?>
2378
  </div>
2379
+ <p><?php _e('Pages defined below will override all settings above.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2380
  <ul class="fm-pp">
2381
  <li class="pp_selected"><?php if($row->pages_include){
2382
  $pages_include = explode(',', $row->pages_include);
2400
  </ul>
2401
  </span>
2402
  <span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2403
+ <label class="wd-label"><?php _e('Hide on Mobile', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2404
  <input type="radio" name="hide_mobile" <?php echo $row->hide_mobile == 1 ? 'checked="checked"' : '' ?> id="fm_do-hidemobile-1" class="wd-radio" value="1">
2405
+ <label class="wd-label-radio" for="fm_do-hidemobile-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2406
  <input type="radio" name="hide_mobile" <?php echo $row->hide_mobile == 0 ? 'checked="checked"' : '' ?> id="fm_do-hidemobile-0" class="wd-radio" value="0">
2407
+ <label class="wd-label-radio" for="fm_do-hidemobile-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2408
  </span>
2409
  </div>
2410
  </div>
admin/views/Options_fm.php CHANGED
@@ -8,10 +8,10 @@ class FMViewOptions_fm extends FMAdminView {
8
  * FMViewOptions_fm constructor.
9
  */
10
  public function __construct() {
11
- wp_enqueue_style('fm-tables');
12
 
13
  wp_enqueue_script('jquery');
14
- wp_enqueue_script('fm-admin');
15
  }
16
 
17
  /**
@@ -20,13 +20,13 @@ class FMViewOptions_fm extends FMAdminView {
20
  public function display($params) {
21
  ob_start();
22
  echo $this->title(array(
23
- 'title' => __('Options', WDFM()->prefix),
24
  'title_class' => 'wd-header',
25
  'add_new_button' => FALSE,
26
  ));
27
  $buttons = array(
28
  'save' => array(
29
- 'title' => __('Save', WDFM()->prefix),
30
  'value' => 'save',
31
  'onclick' => 'fm_set_input_value(\'task\', \'save\')',
32
  'class' => 'button-primary',
@@ -37,7 +37,7 @@ class FMViewOptions_fm extends FMAdminView {
37
  // Pass the content to form.
38
  $form_attr = array(
39
  'id' => 'options_form',
40
- 'action' => add_query_arg(array('page' => 'options' . WDFM()->menu_postfix), 'admin.php'),
41
  );
42
  echo $this->form(ob_get_clean(), $form_attr);
43
  }
@@ -48,24 +48,24 @@ class FMViewOptions_fm extends FMAdminView {
48
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
49
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? '1' : '0';
50
  $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
51
- $uninstall_href = add_query_arg( array( 'page' => 'uninstall' . WDFM()->menu_postfix), admin_url('admin.php') );
52
  ?>
53
  <div class="wd-table">
54
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
55
  <div class="wd-box-section">
56
  <div class="wd-box-title">
57
- <strong><?php _e('Recaptcha', WDFM()->prefix); ?></strong>
58
  </div>
59
  <div class="wd-box-content">
60
  <span class="wd-group">
61
- <label class="wd-label" for="public_key"><?php _e('Site key', WDFM()->prefix); ?></label>
62
  <input id="public_key" name="public_key" value="<?php echo $public_key; ?>" type="text" />
63
  </span>
64
  <span class="wd-group">
65
- <label class="wd-label" for="private_key"><?php _e('Secret key', WDFM()->prefix); ?></label>
66
  <input id="private_key" name="private_key" value="<?php echo $private_key; ?>" type="text" />
67
  <p class="description">
68
- <?php echo sprintf(__('%s for your site from ReCaptcha website and copy the provided here.', WDFM()->prefix), '<a href="https://www.google.com/recaptcha/intro/index.html" target="_blank">' . __('Get ReCaptcha Site and Secret Keys', WDFM()->prefix) . '</a>'); ?>
69
  </p>
70
  </span>
71
  <span class="wd-group wd-right">
@@ -75,16 +75,16 @@ class FMViewOptions_fm extends FMAdminView {
75
  </div>
76
  <div class="wd-box-section">
77
  <div class="wd-box-title">
78
- <strong><?php _e('Google Maps', WDFM()->prefix); ?></strong>
79
  </div>
80
  <div class="wd-box-content">
81
  <span class="wd-group">
82
- <label class="wd-label" for="map_key"><?php _e('Map API Key', WDFM()->prefix); ?></label>
83
  <input id="map_key" name="map_key" value="<?php echo $map_key; ?>" type="text" />
84
  <p class="description">
85
- <?php echo _e('Get', WDFM()->prefix); ?>
86
- <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank"><?php _e('Google Map API key', WDFM()->prefix); ?></a>
87
- <?php echo _e(' and copy them to this input. Make sure the key does not have restrictions.', WDFM()->prefix); ?>
88
  </p>
89
  </span>
90
  </div>
@@ -93,25 +93,25 @@ class FMViewOptions_fm extends FMAdminView {
93
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
94
  <div class="wd-box-section">
95
  <div class="wd-box-title">
96
- <strong><?php _e('Other', WDFM()->prefix); ?></strong>
97
  </div>
98
  <div class="wd-box-content">
99
  <span class="wd-group">
100
- <label class="wd-label" for="csv_delimiter"><?php _e('CSV Delimiter', WDFM()->prefix); ?></label>
101
  <input id="csv_delimiter" name="csv_delimiter" value="<?php echo $csv_delimiter; ?>" type="text" />
102
- <p class="description"><?php _e('This option sets the symbol, which will be used to separate the values in CSV file of form submissions.', WDFM()->prefix); ?></p>
103
  </span>
104
  <span class="wd-group">
105
- <label class="wd-label"><?php _e('Enable Advanced Layout', WDFM()->prefix); ?></label>
106
  <input <?php echo checked($fm_advanced_layout, '1'); ?> id="fm_advanced_layout-1" class="wd-radio" value="1" name="fm_advanced_layout" type="radio"/>
107
- <label class="wd-label-radio" for="fm_advanced_layout-1"><?php _e('Yes', WDFM()->prefix); ?></label>
108
  <input <?php echo checked($fm_advanced_layout, '0'); ?> id="fm_advanced_layout-0" class="wd-radio" value="0" name="fm_advanced_layout" type="radio"/>
109
- <label class="wd-label-radio" for="fm_advanced_layout-0"><?php _e('No', WDFM()->prefix); ?></label>
110
- <p class="description"><?php _e('If you wish to build your form with HTML, instead of using Form Maker’s user-friendly interface, you can enable Advanced Layout. It can be accessed from the form editor.', WDFM()->prefix); ?></p>
111
  </span>
112
  <span class="wd-group">
113
- <label class="wd-label"><?php echo sprintf(__('Uninstall %s', WDFM()->prefix), WDFM()->nicename); ?></label>
114
- <a class="button" href="<?php echo $uninstall_href ?>"><?php _e('Uninstall', WDFM()->prefix); ?></a>
115
  </span>
116
  </div>
117
  </div>
8
  * FMViewOptions_fm constructor.
9
  */
10
  public function __construct() {
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
12
 
13
  wp_enqueue_script('jquery');
14
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
15
  }
16
 
17
  /**
20
  public function display($params) {
21
  ob_start();
22
  echo $this->title(array(
23
+ 'title' => __('Options', WDFMInstance(self::PLUGIN)->prefix),
24
  'title_class' => 'wd-header',
25
  'add_new_button' => FALSE,
26
  ));
27
  $buttons = array(
28
  'save' => array(
29
+ 'title' => __('Save', WDFMInstance(self::PLUGIN)->prefix),
30
  'value' => 'save',
31
  'onclick' => 'fm_set_input_value(\'task\', \'save\')',
32
  'class' => 'button-primary',
37
  // Pass the content to form.
38
  $form_attr = array(
39
  'id' => 'options_form',
40
+ 'action' => add_query_arg(array('page' => 'options' . WDFMInstance(self::PLUGIN)->menu_postfix), 'admin.php'),
41
  );
42
  echo $this->form(ob_get_clean(), $form_attr);
43
  }
48
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
49
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? '1' : '0';
50
  $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
51
+ $uninstall_href = add_query_arg( array( 'page' => 'uninstall' . WDFMInstance(self::PLUGIN)->menu_postfix), admin_url('admin.php') );
52
  ?>
53
  <div class="wd-table">
54
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
55
  <div class="wd-box-section">
56
  <div class="wd-box-title">
57
+ <strong><?php _e('Recaptcha', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
58
  </div>
59
  <div class="wd-box-content">
60
  <span class="wd-group">
61
+ <label class="wd-label" for="public_key"><?php _e('Site key', WDFMInstance(self::PLUGIN)->prefix); ?></label>
62
  <input id="public_key" name="public_key" value="<?php echo $public_key; ?>" type="text" />
63
  </span>
64
  <span class="wd-group">
65
+ <label class="wd-label" for="private_key"><?php _e('Secret key', WDFMInstance(self::PLUGIN)->prefix); ?></label>
66
  <input id="private_key" name="private_key" value="<?php echo $private_key; ?>" type="text" />
67
  <p class="description">
68
+ <?php echo sprintf(__('%s for your site from ReCaptcha website and copy the provided here.', WDFMInstance(self::PLUGIN)->prefix), '<a href="https://www.google.com/recaptcha/intro/index.html" target="_blank">' . __('Get ReCaptcha Site and Secret Keys', WDFMInstance(self::PLUGIN)->prefix) . '</a>'); ?>
69
  </p>
70
  </span>
71
  <span class="wd-group wd-right">
75
  </div>
76
  <div class="wd-box-section">
77
  <div class="wd-box-title">
78
+ <strong><?php _e('Google Maps', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
79
  </div>
80
  <div class="wd-box-content">
81
  <span class="wd-group">
82
+ <label class="wd-label" for="map_key"><?php _e('Map API Key', WDFMInstance(self::PLUGIN)->prefix); ?></label>
83
  <input id="map_key" name="map_key" value="<?php echo $map_key; ?>" type="text" />
84
  <p class="description">
85
+ <?php echo _e('Get', WDFMInstance(self::PLUGIN)->prefix); ?>
86
+ <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank"><?php _e('Google Map API key', WDFMInstance(self::PLUGIN)->prefix); ?></a>
87
+ <?php echo _e(' and copy them to this input. Make sure the key does not have restrictions.', WDFMInstance(self::PLUGIN)->prefix); ?>
88
  </p>
89
  </span>
90
  </div>
93
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
94
  <div class="wd-box-section">
95
  <div class="wd-box-title">
96
+ <strong><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
97
  </div>
98
  <div class="wd-box-content">
99
  <span class="wd-group">
100
+ <label class="wd-label" for="csv_delimiter"><?php _e('CSV Delimiter', WDFMInstance(self::PLUGIN)->prefix); ?></label>
101
  <input id="csv_delimiter" name="csv_delimiter" value="<?php echo $csv_delimiter; ?>" type="text" />
102
+ <p class="description"><?php _e('This option sets the symbol, which will be used to separate the values in CSV file of form submissions.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
103
  </span>
104
  <span class="wd-group">
105
+ <label class="wd-label"><?php _e('Enable Advanced Layout', WDFMInstance(self::PLUGIN)->prefix); ?></label>
106
  <input <?php echo checked($fm_advanced_layout, '1'); ?> id="fm_advanced_layout-1" class="wd-radio" value="1" name="fm_advanced_layout" type="radio"/>
107
+ <label class="wd-label-radio" for="fm_advanced_layout-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
108
  <input <?php echo checked($fm_advanced_layout, '0'); ?> id="fm_advanced_layout-0" class="wd-radio" value="0" name="fm_advanced_layout" type="radio"/>
109
+ <label class="wd-label-radio" for="fm_advanced_layout-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
110
+ <p class="description"><?php _e('If you wish to build your form with HTML, instead of using Form Maker’s user-friendly interface, you can enable Advanced Layout. It can be accessed from the form editor.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
111
  </span>
112
  <span class="wd-group">
113
+ <label class="wd-label"><?php echo sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?></label>
114
+ <a class="button" href="<?php echo $uninstall_href ?>"><?php _e('Uninstall', WDFMInstance(self::PLUGIN)->prefix); ?></a>
115
  </span>
116
  </div>
117
  </div>
admin/views/Pricing_fm.php CHANGED
@@ -8,9 +8,9 @@ class FMViewPricing_fm extends FMAdminView {
8
  * FMViewpricing_fm constructor.
9
  */
10
  public function __construct() {
11
- wp_enqueue_style('fm-style');
12
- wp_enqueue_style('fm-pricing');
13
- wp_enqueue_script('fm-admin');
14
  }
15
 
16
  public function display( $params = array() ) {
@@ -20,9 +20,9 @@ class FMViewPricing_fm extends FMAdminView {
20
  echo $this->body($params);
21
  // Pass the content to form.
22
  $form_attr = array(
23
- 'id' => WDFM()->prefix . '_pricing',
24
- 'name' => WDFM()->prefix . '_pricing',
25
- 'class' => WDFM()->prefix . '_pricing wd-form',
26
  'action' => add_query_arg( array('page' => $page, 'task' => 'display'), $page_url),
27
  );
28
  echo $this->form(ob_get_clean(), $form_attr);
@@ -39,133 +39,133 @@ class FMViewPricing_fm extends FMAdminView {
39
  <div class="fm-pricestable">
40
  <div class="ptFree">
41
  <span class="price product_info"><span>$</span>30</span>
42
- <p><?php _e('Personal', WDFM()->prefix); ?></p>
43
  <span class="supp">
44
- <strong><?php _e('6 Months', WDFM()->prefix); ?></strong>
45
- <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFM()->prefix); ?></span><br>
46
- <?php _e('Access to Updates', WDFM()->prefix); ?>
47
  </span>
48
  <span class="supp">
49
- <strong><?php _e('6 Months', WDFM()->prefix); ?></strong>
50
- <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span><br>
51
- <?php _e('Premium Support', WDFM()->prefix); ?>
52
  </span>
53
  <span class="supp product_info">
54
- <strong><?php _e('1 Domain', WDFM()->prefix); ?></strong><br>
55
- <?php _e('Support', WDFM()->prefix); ?>
56
  </span>
57
  <ul class="circles">
58
  <li><div></div></li>
59
  <li><div></div></li>
60
  <li><div></div></li>
61
  </ul>
62
- <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFM()->prefix); ?></span>
63
- <span class="supp product_info"><?php _e('40+ Field Types', WDFM()->prefix); ?></span>
64
- <span class="supp product_info"><?php _e('Multi-Page Forms', WDFM()->prefix); ?></span>
65
- <span class="supp product_info"><?php _e('Paypal Integration', WDFM()->prefix); ?></span>
66
- <span class="supp product_info"><?php _e('File Upload field', WDFM()->prefix); ?></span>
67
- <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFM()->prefix); ?></span>
68
  <span>
69
- <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=69&offerId=117" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
70
  </span>
71
  </div>
72
  <div class="ptPersonal">
73
  <span class="price product_info"><span>$</span>45</span>
74
- <p><?php _e('Business', WDFM()->prefix); ?></p>
75
  <span class="supp">
76
- <strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
77
- <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFM()->prefix); ?></span><br>
78
- <?php _e('Access to Updates', WDFM()->prefix); ?>
79
  </span>
80
  <span class="supp">
81
- <strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
82
- <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span><br>
83
- <?php _e('Premium Support', WDFM()->prefix); ?>
84
  </span>
85
  <span class="supp product_info">
86
- <strong><?php _e('3 Domains', WDFM()->prefix); ?></strong><br>
87
- <?php _e('Support', WDFM()->prefix); ?>
88
  </span>
89
  <ul class="circles">
90
  <li><div></div></li>
91
  <li><div></div></li>
92
  <li><div></div></li>
93
  </ul>
94
- <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFM()->prefix); ?></span>
95
- <span class="supp product_info"><?php _e('40+ Field Types', WDFM()->prefix); ?></span>
96
- <span class="supp product_info"><?php _e('Multi-Page Forms', WDFM()->prefix); ?></span>
97
- <span class="supp product_info"><?php _e('Paypal Integration', WDFM()->prefix); ?></span>
98
- <span class="supp product_info"><?php _e('File Upload field', WDFM()->prefix); ?></span>
99
- <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFM()->prefix); ?></span>
100
  <span>
101
- <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=70&offerId=117" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
102
  </span>
103
  </div>
104
  <div class="ptBusiness">
105
  <span class="price product_info"><span>$</span>60</span>
106
- <p><?php _e('Developer', WDFM()->prefix); ?></p>
107
  <span class="supp">
108
- <strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
109
- <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFM()->prefix); ?></span><br>
110
- <?php _e('Access to Updates', WDFM()->prefix); ?>
111
  </span>
112
- <span class="supp"><strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
113
- <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span><br>
114
- <?php _e('Premium Support', WDFM()->prefix); ?>
115
  </span>
116
  <span class="supp product_info">
117
- <strong><?php _e('Unlimited Domains', WDFM()->prefix); ?></strong><br>
118
- <?php _e('Support', WDFM()->prefix); ?>
119
  </span>
120
  <ul class="circles">
121
  <li><div></div></li>
122
  <li><div></div></li>
123
  <li><div></div></li>
124
  </ul>
125
- <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFM()->prefix); ?></span>
126
- <span class="supp product_info"><?php _e('40+ Field Types', WDFM()->prefix); ?></span>
127
- <span class="supp product_info"><?php _e('Multi-Page Forms', WDFM()->prefix); ?></span>
128
- <span class="supp product_info"><?php _e('Paypal Integration', WDFM()->prefix); ?></span>
129
- <span class="supp product_info"><?php _e('File Upload field', WDFM()->prefix); ?></span>
130
- <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFM()->prefix); ?></span>
131
  <span>
132
- <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=71&offerId=117" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
133
  </span>
134
  </div>
135
  <div class="ptDeveloper">
136
- <span class="special_offer"><?php _e('Special offer', WDFM()->prefix); ?></span>
137
  <span class="price product_info"><span>$</span>99</span>
138
- <p class="save_money"><span><?php _e('Save', WDFM()->prefix); ?> $735</span></p>
139
- <p><?php _e('Form Maker Premium', WDFM()->prefix); ?></p>
140
  <span class="supp">
141
- <strong><?php _e('+12 Add-ons', WDFM()->prefix); ?></strong>
142
- <span class="desc_span"><?php _e('Tune up Form Maker with powerful add-ons: PDF Integration, Mailchimp, Export/Import, Conditional Emails, Registration,etc.', WDFM()->prefix); ?></span>
143
  </span>
144
  <span class="supp product_info">
145
- <strong><?php _e('+ All Our 50 WordPress Premium Plugins', WDFM()->prefix); ?></strong>
146
  </span>
147
- <span class="supp product_info"><?php _e('Photo Gallery, Slider, Event Calendar &amp; etc.', WDFM()->prefix); ?></span>
148
  <ul class="circles">
149
  <li><div></div></li>
150
  <li><div></div></li>
151
  <li><div></div></li>
152
  </ul>
153
  <span class="supp">
154
- <?php _e('6 Months Access to Updates', WDFM()->prefix); ?>
155
- <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugins to include new features without additional charges.', WDFM()->prefix); ?></span>
156
  </span>
157
- <span class="supp"><?php _e('6 Months Premium Support', WDFM()->prefix); ?>
158
- <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span>
159
  </span>
160
- <span class="supp product_info"><?php _e('Unlimited Domains Support', WDFM()->prefix); ?></span>
161
  <span>
162
- <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&task=buy&id=117&from_id=71&wd_button_clicks=insert_into" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
163
  </span>
164
  </div>
165
  </div>
166
  <div class="fm-prices-more">
167
  <div>
168
- <?php _e('Learn more about Form Maker plugin.', WDFM()->prefix); ?> <a href="https://web-dorado.com/files/fromFormMaker.php" target="_blank"><?php _e('Learn More', WDFM()->prefix); ?></a>
169
  </div>
170
  </div>
171
  </div>
8
  * FMViewpricing_fm constructor.
9
  */
10
  public function __construct() {
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
12
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-pricing');
13
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
14
  }
15
 
16
  public function display( $params = array() ) {
20
  echo $this->body($params);
21
  // Pass the content to form.
22
  $form_attr = array(
23
+ 'id' => WDFMInstance(self::PLUGIN)->prefix . '_pricing',
24
+ 'name' => WDFMInstance(self::PLUGIN)->prefix . '_pricing',
25
+ 'class' => WDFMInstance(self::PLUGIN)->prefix . '_pricing wd-form',
26
  'action' => add_query_arg( array('page' => $page, 'task' => 'display'), $page_url),
27
  );
28
  echo $this->form(ob_get_clean(), $form_attr);
39
  <div class="fm-pricestable">
40
  <div class="ptFree">
41
  <span class="price product_info"><span>$</span>30</span>
42
+ <p><?php _e('Personal', WDFMInstance(self::PLUGIN)->prefix); ?></p>
43
  <span class="supp">
44
+ <strong><?php _e('6 Months', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
45
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFMInstance(self::PLUGIN)->prefix); ?></span><br>
46
+ <?php _e('Access to Updates', WDFMInstance(self::PLUGIN)->prefix); ?>
47
  </span>
48
  <span class="supp">
49
+ <strong><?php _e('6 Months', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
50
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFMInstance(self::PLUGIN)->prefix); ?></span><br>
51
+ <?php _e('Premium Support', WDFMInstance(self::PLUGIN)->prefix); ?>
52
  </span>
53
  <span class="supp product_info">
54
+ <strong><?php _e('1 Domain', WDFMInstance(self::PLUGIN)->prefix); ?></strong><br>
55
+ <?php _e('Support', WDFMInstance(self::PLUGIN)->prefix); ?>
56
  </span>
57
  <ul class="circles">
58
  <li><div></div></li>
59
  <li><div></div></li>
60
  <li><div></div></li>
61
  </ul>
62
+ <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFMInstance(self::PLUGIN)->prefix); ?></span>
63
+ <span class="supp product_info"><?php _e('40+ Field Types', WDFMInstance(self::PLUGIN)->prefix); ?></span>
64
+ <span class="supp product_info"><?php _e('Multi-Page Forms', WDFMInstance(self::PLUGIN)->prefix); ?></span>
65
+ <span class="supp product_info"><?php _e('Paypal Integration', WDFMInstance(self::PLUGIN)->prefix); ?></span>
66
+ <span class="supp product_info"><?php _e('File Upload field', WDFMInstance(self::PLUGIN)->prefix); ?></span>
67
+ <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFMInstance(self::PLUGIN)->prefix); ?></span>
68
  <span>
69
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=69&offerId=117" target="_blank"><?php _e('Buy now', WDFMInstance(self::PLUGIN)->prefix); ?></a>
70
  </span>
71
  </div>
72
  <div class="ptPersonal">
73
  <span class="price product_info"><span>$</span>45</span>
74
+ <p><?php _e('Business', WDFMInstance(self::PLUGIN)->prefix); ?></p>
75
  <span class="supp">
76
+ <strong><?php _e('1 Year', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
77
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFMInstance(self::PLUGIN)->prefix); ?></span><br>
78
+ <?php _e('Access to Updates', WDFMInstance(self::PLUGIN)->prefix); ?>
79
  </span>
80
  <span class="supp">
81
+ <strong><?php _e('1 Year', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
82
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFMInstance(self::PLUGIN)->prefix); ?></span><br>
83
+ <?php _e('Premium Support', WDFMInstance(self::PLUGIN)->prefix); ?>
84
  </span>
85
  <span class="supp product_info">
86
+ <strong><?php _e('3 Domains', WDFMInstance(self::PLUGIN)->prefix); ?></strong><br>
87
+ <?php _e('Support', WDFMInstance(self::PLUGIN)->prefix); ?>
88
  </span>
89
  <ul class="circles">
90
  <li><div></div></li>
91
  <li><div></div></li>
92
  <li><div></div></li>
93
  </ul>
94
+ <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFMInstance(self::PLUGIN)->prefix); ?></span>
95
+ <span class="supp product_info"><?php _e('40+ Field Types', WDFMInstance(self::PLUGIN)->prefix); ?></span>
96
+ <span class="supp product_info"><?php _e('Multi-Page Forms', WDFMInstance(self::PLUGIN)->prefix); ?></span>
97
+ <span class="supp product_info"><?php _e('Paypal Integration', WDFMInstance(self::PLUGIN)->prefix); ?></span>
98
+ <span class="supp product_info"><?php _e('File Upload field', WDFMInstance(self::PLUGIN)->prefix); ?></span>
99
+ <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFMInstance(self::PLUGIN)->prefix); ?></span>
100
  <span>
101
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=70&offerId=117" target="_blank"><?php _e('Buy now', WDFMInstance(self::PLUGIN)->prefix); ?></a>
102
  </span>
103
  </div>
104
  <div class="ptBusiness">
105
  <span class="price product_info"><span>$</span>60</span>
106
+ <p><?php _e('Developer', WDFMInstance(self::PLUGIN)->prefix); ?></p>
107
  <span class="supp">
108
+ <strong><?php _e('1 Year', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
109
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFMInstance(self::PLUGIN)->prefix); ?></span><br>
110
+ <?php _e('Access to Updates', WDFMInstance(self::PLUGIN)->prefix); ?>
111
  </span>
112
+ <span class="supp"><strong><?php _e('1 Year', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
113
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFMInstance(self::PLUGIN)->prefix); ?></span><br>
114
+ <?php _e('Premium Support', WDFMInstance(self::PLUGIN)->prefix); ?>
115
  </span>
116
  <span class="supp product_info">
117
+ <strong><?php _e('Unlimited Domains', WDFMInstance(self::PLUGIN)->prefix); ?></strong><br>
118
+ <?php _e('Support', WDFMInstance(self::PLUGIN)->prefix); ?>
119
  </span>
120
  <ul class="circles">
121
  <li><div></div></li>
122
  <li><div></div></li>
123
  <li><div></div></li>
124
  </ul>
125
+ <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFMInstance(self::PLUGIN)->prefix); ?></span>
126
+ <span class="supp product_info"><?php _e('40+ Field Types', WDFMInstance(self::PLUGIN)->prefix); ?></span>
127
+ <span class="supp product_info"><?php _e('Multi-Page Forms', WDFMInstance(self::PLUGIN)->prefix); ?></span>
128
+ <span class="supp product_info"><?php _e('Paypal Integration', WDFMInstance(self::PLUGIN)->prefix); ?></span>
129
+ <span class="supp product_info"><?php _e('File Upload field', WDFMInstance(self::PLUGIN)->prefix); ?></span>
130
+ <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFMInstance(self::PLUGIN)->prefix); ?></span>
131
  <span>
132
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=71&offerId=117" target="_blank"><?php _e('Buy now', WDFMInstance(self::PLUGIN)->prefix); ?></a>
133
  </span>
134
  </div>
135
  <div class="ptDeveloper">
136
+ <span class="special_offer"><?php _e('Special offer', WDFMInstance(self::PLUGIN)->prefix); ?></span>
137
  <span class="price product_info"><span>$</span>99</span>
138
+ <p class="save_money"><span><?php _e('Save', WDFMInstance(self::PLUGIN)->prefix); ?> $735</span></p>
139
+ <p><?php _e('Form Maker Premium', WDFMInstance(self::PLUGIN)->prefix); ?></p>
140
  <span class="supp">
141
+ <strong><?php _e('+12 Add-ons', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
142
+ <span class="desc_span"><?php _e('Tune up Form Maker with powerful add-ons: PDF Integration, Mailchimp, Export/Import, Conditional Emails, Registration,etc.', WDFMInstance(self::PLUGIN)->prefix); ?></span>
143
  </span>
144
  <span class="supp product_info">
145
+ <strong><?php _e('+ All Our 50 WordPress Premium Plugins', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
146
  </span>
147
+ <span class="supp product_info"><?php _e('Photo Gallery, Slider, Event Calendar &amp; etc.', WDFMInstance(self::PLUGIN)->prefix); ?></span>
148
  <ul class="circles">
149
  <li><div></div></li>
150
  <li><div></div></li>
151
  <li><div></div></li>
152
  </ul>
153
  <span class="supp">
154
+ <?php _e('6 Months Access to Updates', WDFMInstance(self::PLUGIN)->prefix); ?>
155
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugins to include new features without additional charges.', WDFMInstance(self::PLUGIN)->prefix); ?></span>
156
  </span>
157
+ <span class="supp"><?php _e('6 Months Premium Support', WDFMInstance(self::PLUGIN)->prefix); ?>
158
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFMInstance(self::PLUGIN)->prefix); ?></span>
159
  </span>
160
+ <span class="supp product_info"><?php _e('Unlimited Domains Support', WDFMInstance(self::PLUGIN)->prefix); ?></span>
161
  <span>
162
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&task=buy&id=117&from_id=71&wd_button_clicks=insert_into" target="_blank"><?php _e('Buy now', WDFMInstance(self::PLUGIN)->prefix); ?></a>
163
  </span>
164
  </div>
165
  </div>
166
  <div class="fm-prices-more">
167
  <div>
168
+ <?php _e('Learn more about Form Maker plugin.', WDFMInstance(self::PLUGIN)->prefix); ?> <a href="https://web-dorado.com/files/fromFormMaker.php" target="_blank"><?php _e('Learn More', WDFMInstance(self::PLUGIN)->prefix); ?></a>
169
  </div>
170
  </div>
171
  </div>
admin/views/Submissions_fm.php CHANGED
@@ -8,9 +8,9 @@ class FMViewSubmissions_fm extends FMAdminView {
8
  public function __construct( $model ) {
9
  $this->model = $model;
10
  wp_enqueue_style('thickbox');
11
- wp_enqueue_style('fm-tables');
12
- wp_enqueue_style('fm-style');
13
- wp_enqueue_style('fm-jquery-ui');
14
  wp_enqueue_style('jquery.fancybox');
15
 
16
  wp_enqueue_script('thickbox');
@@ -24,14 +24,14 @@ class FMViewSubmissions_fm extends FMAdminView {
24
  wp_enqueue_script('jquery-ui-core');
25
  wp_enqueue_script('jquery-ui-datepicker');
26
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
27
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
28
  }
29
  else {
30
- echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
31
  }
32
- wp_enqueue_script('fm-admin');
33
- wp_enqueue_script('fm-manage');
34
- wp_enqueue_script('fm-submissions');
35
  wp_enqueue_script('jquery.fancybox.pack');
36
  }
37
 
@@ -60,15 +60,15 @@ class FMViewSubmissions_fm extends FMAdminView {
60
  <?php echo $this->saelect_form( array('id' => $id, 'forms' => $forms, 'page' => $page, 'page_url' => $page_url) ); ?>
61
  </div>
62
  <div class="fm-export-tools">
63
- <?php $blocked_ips_link = add_query_arg(array( 'page' => 'blocked_ips' . WDFM()->menu_postfix ), $page_url); ?>
64
- <a class="button" href="<?php echo $blocked_ips_link; ?>" target="_blank"><?php echo _e('Blocked IPs', WDFM()->prefix);?></a>
65
  </div>
66
  </div>
67
  <?php if( !$id ) { ?>
68
  <table class="wp-list-table widefat fixed striped posts">
69
  <body id="the-list">
70
  <tr class="no-items">
71
- <td class="colspanchange" colspan="0"><?php _e('Please select a form to view submissions', WDFM()->prefix); ?></td>
72
  </tr>
73
  </body>
74
  </table>
@@ -88,10 +88,10 @@ class FMViewSubmissions_fm extends FMAdminView {
88
 
89
  // Pass the content to form.
90
  $form_attr = array(
91
- // 'id' => WDFM()->prefix . '_submissions',
92
  'id' => 'admin_form',
93
- 'name' => WDFM()->prefix . '_submissions',
94
- 'class' => WDFM()->prefix . '_submissions wd-form',
95
  'action' => add_query_arg( array('page' => $page, 'task' => 'display', 'current_id' => $id ), $page_url),
96
  );
97
  echo $this->form(ob_get_clean(), $form_attr);
@@ -167,22 +167,22 @@ class FMViewSubmissions_fm extends FMAdminView {
167
  <div class="fm-reports">
168
  <div class="fm-tools-button">
169
  <div class="fm-total_entries"><?php echo $statistics["total_entries"]; ?></div>
170
- <?php echo _e('Entries', WDFM()->prefix);?>
171
  </div>
172
  <div class="fm-tools-button">
173
  <div class="fm-total_rate"><?php echo $statistics["conversion_rate"]; ?></div>
174
- <?php echo _e('Conversion Rate', WDFM()->prefix);?>
175
  </div>
176
  <div class="fm-tools-button">
177
  <div class="fm-total_views"><?php echo $statistics["total_views"] ? $statistics["total_views"] : 0; ?></div>
178
- <?php echo _e('Views', WDFM()->prefix);?>
179
  </div>
180
  </div>
181
  <div class="fm-export-tools">
182
- <?php $blocked_ips_link = add_query_arg(array( 'page' => 'blocked_ips' . WDFM()->menu_postfix ), $page_url); ?>
183
- <a class="button" href="<?php echo $blocked_ips_link; ?>" target="_blank"><?php echo _e('Blocked IPs', WDFM()->prefix);?></a>
184
- <button class="button" onclick="export_submissions('csv', 0); return false;"><?php echo _e('Export to CSV', WDFM()->prefix);?></button>
185
- <button class="button" onclick="export_submissions('xml', 0); return false;"><?php echo _e('Export to XML', WDFM()->prefix);?></button>
186
  </div>
187
  </div>
188
  <div class="tablenav top">
@@ -190,12 +190,12 @@ class FMViewSubmissions_fm extends FMAdminView {
190
  echo $this->bulk_actions($actions);
191
  ?>
192
  <div class="alignleft actions fm-bulk-actions">
193
- <input type="button" class="button action" onclick="toggleChBDiv(true); return false;" value="<?php echo _e('Add/Remove Columns', WDFM()->prefix);?>">
194
  <input type="hidden" name="hide_label_list" value="">
195
- <button type="button" class="button action" onclick="show_hide_filter(); return false;"><span class="show-filter <?php echo !($is_search) ? '' : 'hide'?>"><?php echo __('Show Filters', WDFM()->prefix); ?></span> <span class="hide-filter <?php echo !($is_search) ? 'hide' : 'show'?>" ><?php echo __('Hide Filters', WDFM()->prefix);?></span></button>
196
  <span class="search_reset_button <?php echo ($is_search) ? '' : 'hide'; ?>">
197
- <input type="button" class="button action" onclick="fm_form_submit(event, 'admin_form'); return false;" value="<?php echo _e('Search', WDFM()->prefix);?>">
198
- <input type="button" class="button action <?php echo ($is_search) ? '' : 'hide'; ?>" onclick="remove_all(); fm_set_input_value('order_by', 'group_id'); fm_set_input_value('asc_or_desc', 'desc'); fm_form_submit(event, 'admin_form'); return false;" value="<?php echo _e('Reset', WDFM()->prefix);?>">
199
  </span>
200
  </div>
201
  <?php
@@ -213,7 +213,7 @@ class FMViewSubmissions_fm extends FMAdminView {
213
  <thead>
214
  <tr class="fm_table_head">
215
  <td id="cb" class="column-cb check-column">
216
- <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFM()->prefix);?></label>
217
  <input type="checkbox" id="check_all">
218
  </td>
219
  <th id="submitid_fc" class="<?php if ( $order_by == "group_id" ) {
@@ -221,11 +221,11 @@ class FMViewSubmissions_fm extends FMAdminView {
221
  }
222
  else {
223
  echo $oder_class_default;
224
- } ?> col_id" <?php echo $style_id; ?> data-colname="<?php _e('ID', WDFM()->prefix);?>">
225
  <a href="" class="sub_id" onclick="fm_set_input_value('order_by', 'group_id');
226
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'group_id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
227
  fm_form_submit(event, 'admin_form')">
228
- <span><?php echo _e('ID', WDFM()->prefix);?></span>
229
  <span class="sorting-indicator"></span>
230
  </a>
231
  </th>
@@ -234,11 +234,11 @@ class FMViewSubmissions_fm extends FMAdminView {
234
  }
235
  else {
236
  echo $oder_class_default;
237
- } ?>" <?php echo $style_date; ?> data-colname="<?php _e('Submit date', WDFM()->prefix);?>">
238
  <a href="" onclick="fm_set_input_value('order_by', 'date');
239
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'date' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
240
  fm_form_submit(event, 'admin_form')">
241
- <span><?php _e('Submit date', WDFM()->prefix);?></span>
242
  <span class="sorting-indicator"></span>
243
  </a>
244
  </th>
@@ -247,11 +247,11 @@ class FMViewSubmissions_fm extends FMAdminView {
247
  }
248
  else {
249
  echo $oder_class_default;
250
- } ?>" <?php echo $style_ip; ?> data-colname="<?php _e('Submitter\'s IP', WDFM()->prefix);?>">
251
  <a href="" onclick="fm_set_input_value('order_by', 'ip');
252
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'ip' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
253
  fm_form_submit(event, 'admin_form')">
254
- <span><?php _e('Submitter\'s IP', WDFM()->prefix);?></span>
255
  <span class="sorting-indicator"></span>
256
  </a>
257
  </th>
@@ -260,11 +260,11 @@ class FMViewSubmissions_fm extends FMAdminView {
260
  }
261
  else {
262
  echo $oder_class_default;
263
- } ?>" <?php echo $style_username; ?> data-colname="<?php _e('Submitter\'s Username', WDFM()->prefix);?>">
264
  <a href="" onclick="fm_set_input_value('order_by', 'display_name');
265
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'display_name' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
266
  fm_form_submit(event, 'admin_form')">
267
- <span><?php _e('Submitter\'s Username', WDFM()->prefix);?></span>
268
  <span class="sorting-indicator"></span>
269
  </a>
270
  </th>
@@ -273,11 +273,11 @@ class FMViewSubmissions_fm extends FMAdminView {
273
  }
274
  else {
275
  echo $oder_class_default;
276
- } ?>" <?php echo $style_useremail; ?> data-colname="<?php _e('Submitter\'s Email Address', WDFM()->prefix);?>">
277
  <a href="" onclick="fm_set_input_value('order_by', 'user_email');
278
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'user_email' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
279
  fm_form_submit(event, 'admin_form')">
280
- <span><?php _e('Submitter\'s Email Address', WDFM()->prefix);?></span>
281
  <span class="sorting-indicator"></span>
282
  </a>
283
  </th>
@@ -326,9 +326,9 @@ class FMViewSubmissions_fm extends FMAdminView {
326
  }
327
  }
328
  if( $stripe_paypal ) { ?>
329
- <th id="payment_info_fc" class="column-autor payment_info_fc" <?php echo $style_payment_info; ?> data-colname="<?php _e('Payment Info', WDFM()->prefix); ?>"><?php _e('Payment Info', WDFM()->prefix); ?></th>
330
  <?php } ?>
331
- </tr>
332
  <tr id="fm-fields-filter" style="display: none;">
333
  <th></th>
334
  <th class="submitid_fc" <?php echo $style_id; ?> >
@@ -456,13 +456,13 @@ class FMViewSubmissions_fm extends FMAdminView {
456
  <th class="check-column">
457
  <input type="checkbox" id="check_<?php echo $data->group_id; ?>" name="check[<?php echo $data->group_id; ?>]">
458
  </th>
459
- <td id="submitid_fc" class="col-id" data-colname="<?php _e('ID', WDFM()->prefix);?>" <?php echo $style_id; ?>>
460
  <a href="" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id',<?php echo $data->group_id; ?>); fm_form_submit(event, 'admin_form');"><?php echo $data->group_id; ?></a>
461
  </td>
462
- <td class="column-primary col-submit-date" data-colname="<?php _e('Submit date', WDFM()->prefix);?>" <?php echo $style_date; ?>>
463
  <?php
464
  $view_url = add_query_arg( array(
465
- 'action' => 'FormMakerSubmits' . WDFM()->plugin_postfix,
466
  'group_id' => $data->group_id,
467
  'form_id' => $form_id,
468
  'width' => '600',
@@ -476,7 +476,7 @@ class FMViewSubmissions_fm extends FMAdminView {
476
  $unblock_url = add_query_arg( array( 'task' => 'unblock_ip', 'current_id' => $data->group_id, 'form_id' => $form_id ), $page_url );
477
 
478
  $ip_infoin_popup_url = add_query_arg( array(
479
- 'action' => 'FormMakerIpinfoinPopup' . WDFM()->plugin_postfix,
480
  'data_ip' => $data->ip,
481
  'width' => '450',
482
  'height' => '300',
@@ -486,33 +486,33 @@ class FMViewSubmissions_fm extends FMAdminView {
486
  ?>
487
  <p><strong><a href="<?php echo $edit_url; ?>" target="_blank"><?php echo $data->date; ?></a></strong></p>
488
  <div class="row-actions">
489
- <span><a href="<?php echo $view_url; ?>" class="thickbox thickbox-preview" title="<?php _e("View submission", WDFM()->prefix); ?>"><?php _e('View', WDFM()->prefix); ?></a> |</span>
490
- <span><a href="<?php echo $edit_url; ?>" target="_blank" title="<?php _e("Edit submission", WDFM()->prefix); ?>"><?php _e('Edit', WDFM()->prefix); ?></a> |</span>
491
  <?php if ( $pdf_data && isset($pdf_data[$group_id_s[$www]]) ){ ?>
492
- <span><a href="<?php echo site_url() . '/' . $pdf_data[$group_id_s[$www]]; ?>" download ><?php _e('Download PDF', WDFM()->prefix); ?></a> |</span>
493
  <?php } ?>
494
- <span class="trash"><a href="<?php echo $delete_url; ?>" title="<?php _e("Edit submission", WDFM()->prefix); ?>" onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFM()->prefix)); ?>')) {return false;}"><?php _e('Delete', WDFM()->prefix); ?></a></span>
495
 
496
- <button class="toggle-row" type="button"><span class="screen-reader-text"><?php _e("Show more details", WDFM()->prefix); ?></span></button>
497
  </div>
498
  </td>
499
- <td class="submitterip_fc sub-align" id="submitterip_fc" <?php echo $style_ip; ?> data-colname="<?php _e('Show submitter information', WDFM()->prefix);?>">
500
- <p><a class="thickbox-preview" href="<?php echo $ip_infoin_popup_url; ?>" title="<?php _e("Show submitter information", WDFM()->prefix); ?>" <?php echo (!in_array($data->ip, $blocked_ips)) ? '' : 'style="color: #FF0000;"'; ?>><?php echo $data->ip; ?></a></p>
501
  <div class="row-actions">
502
  <?php if( !in_array($data->ip, $blocked_ips) ){ ?>
503
- <span><a href="<?php echo $block_url; ?>" title="<?php _e("Block IP", WDFM()->prefix); ?>"><?php _e('Block IP', WDFM()->prefix); ?></a></span>
504
  <?php } else { ?>
505
- <span><a href="<?php echo $unblock_url; ?>" title="<?php _e("Unblock IP ", WDFM()->prefix); ?>"><?php _e('Unblock IP', WDFM()->prefix); ?></a></span>
506
  <?php } ?>
507
  </div>
508
  </td>
509
- <td class="table_large_col submitterusername_fc sub-align" id="submitterusername_fc" <?php echo $style_username; ?> data-colname="<?php _e('Submitter\'s Username', WDFM()->prefix);?>">
510
  <p><?php echo $username; ?></p>
511
  </td>
512
- <td class="table_large_col submitteremail_fc sub-align" id="submitteremail_fc" <?php echo $style_useremail; ?> data-colname="<?php _e('Submitter\'s Email Address', WDFM()->prefix);?>">
513
  <p><?php echo $useremail; ?></p>
514
  </td>
515
- <?php
516
  for ( $h = 0; $h < $m; $h++ ) {
517
  $ispaypal = false;
518
  if ( $sorted_label_types[$h] == 'type_stripe' ) {
@@ -529,21 +529,21 @@ class FMViewSubmissions_fm extends FMAdminView {
529
  if ( strpos($temp[$g]->element_value, "***map***") ) {
530
  $map_params = explode('***map***', $temp[$g]->element_value);
531
  ?>
532
- <td class="table_large_col <?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Show on Map', WDFM()->prefix);?>">
533
  <a class="thickbox-preview" href="<?php echo add_query_arg(array(
534
- 'action' => 'FormMakerMapEditinPopup' . WDFM()->plugin_postfix,
535
  'long' => $map_params[0],
536
  'lat' => $map_params[1],
537
  'width' => '620',
538
  'height' => '550',
539
  'TB_iframe' => '1',
540
- ), admin_url('admin-ajax.php')); ?>" title="<?php _e("Show on Map", WDFM()->prefix); ?>"><?php _e("Show on Map", WDFM()->prefix); ?></a>
541
  </td>
542
  <?php
543
  }
544
  elseif ( strpos($temp[$g]->element_value, "*@@url@@*") ) {
545
  ?>
546
- <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('URL', WDFM()->prefix);?>">
547
  <?php
548
  $new_files = explode("*@@url@@*", $temp[$g]->element_value);
549
  foreach ( $new_files as $new_file ) {
@@ -564,19 +564,19 @@ class FMViewSubmissions_fm extends FMAdminView {
564
  $view_star_rating_array = $this->model->view_for_star_rating($temp[$g]->element_value, $temp[$g]->element_label);
565
  $stars = $view_star_rating_array[0];
566
  ?>
567
- <td align="center" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Star rating', WDFM()->prefix);?>"><?php echo $stars; ?></td>
568
  <?php
569
  }
570
  elseif ( strpos($temp[$g]->element_value, "***matrix***") ) {
571
  ?>
572
- <td class="table_large_col <?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Matrix', WDFM()->prefix);?>">
573
  <a class="thickbox-preview" href="<?php echo add_query_arg(array(
574
- 'action' => 'show_matrix' . WDFM()->plugin_postfix,
575
  'matrix_params' => str_replace('#', '%23', urlencode($temp[$g]->element_value)),
576
  'width' => '620',
577
  'height' => '550',
578
  'TB_iframe' => '1',
579
- ), admin_url('admin-ajax.php')); ?>" title="<?php _e("Show Matrix", WDFM()->prefix); ?>"><?php _e("Show Matrix", WDFM()->prefix); ?></a>
580
  </td>
581
  <?php
582
  }
@@ -591,12 +591,12 @@ class FMViewSubmissions_fm extends FMAdminView {
591
  $view_grading_array = $this->model->view_for_grading($temp[$g]->element_value);
592
  $items = $view_grading_array[0];
593
  ?>
594
- <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Grading', WDFM()->prefix);?>">
595
  <p><?php echo $items; ?></p>
596
  </td>
597
  <?php
598
  }
599
- else {
600
  // check is paypal status
601
  if($sorted_labels_id[$h] == 0 && !empty($temp[$g]->element_value) ) {
602
  $ispaypal = true;
@@ -619,7 +619,7 @@ class FMViewSubmissions_fm extends FMAdminView {
619
  ?>
620
  <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
621
  <p><?php echo $temp[$g]->element_value; ?>
622
- <span style="color:#2DA068;">( Verified <img src="<?php echo WDFM()->plugin_url . '/images/verified.png'; ?>" /> )</span>
623
  </p>
624
  </td>
625
  <?php }
@@ -653,15 +653,15 @@ class FMViewSubmissions_fm extends FMAdminView {
653
  }
654
  if ( $ispaypal ) {
655
  ?>
656
- <td class="payment_info_fc sub-align" id="payment_info_fc" <?php echo $style_payment_info; ?> data-colname="<?php _e('Paypal information', WDFM()->prefix); ?>">
657
  <a class="thickbox-preview" href="<?php echo add_query_arg(array(
658
- 'action' => 'paypal_info' . WDFM()->plugin_postfix,
659
  'id' => $i,
660
  'width' => '600',
661
  'height' => '500',
662
  'TB_iframe' => '1',
663
- ), admin_url('admin-ajax.php')); ?>" title="<?php _e("Paypal information", WDFM()->prefix); ?>">
664
- <img src="<?php echo WDFM()->plugin_url . '/images/info.png'; ?>" />
665
  </a>
666
  </td>
667
  <?php
@@ -673,7 +673,7 @@ class FMViewSubmissions_fm extends FMAdminView {
673
  }
674
  }
675
  else {
676
- echo WDW_FM_Library::no_items('submissions');
677
  }
678
  ?>
679
  </tbody>
@@ -690,15 +690,15 @@ class FMViewSubmissions_fm extends FMAdminView {
690
  }
691
  }
692
  if ( $is_stats ) {
693
- $ajax_nonce = wp_create_nonce( WDFM()->nonce );
694
- ?>
695
  <div class="fm-statistics">
696
- <h2><?php echo _e('Statistics', WDFM()->prefix);?></h2>
697
  <table class="stats">
698
  <tr>
699
  <td colspan="3">
700
  <select id="sorted_label_key">
701
- <option value=""><?php echo _e('- Select -', WDFM()->prefix);?></option>
702
  <?php
703
  foreach ( $sorted_label_types as $key => $sorted_label_type ) {
704
  if ( $sorted_label_type == "type_checkbox" || $sorted_label_type == "type_radio" || $sorted_label_type == "type_own_select" || $sorted_label_type == "type_country" || $sorted_label_type == "type_paypal_select" || $sorted_label_type == "type_paypal_radio" || $sorted_label_type == "type_paypal_checkbox" || $sorted_label_type == "type_paypal_shipping" ) {
@@ -709,28 +709,28 @@ class FMViewSubmissions_fm extends FMAdminView {
709
  }
710
  ?>
711
  </select>
712
- <p class="fm_error_sorted_label_key"><?php echo _e('Please select the field!', WDFM()->prefix);?></p>
713
  </td>
714
  </tr>
715
  <tr>
716
  <td>
717
- <label style="margin-left: 7px;"><?php echo _e('Date From:', WDFM()->prefix);?></label>
718
  </td>
719
  <td>
720
  <input class="inputbox" type="text" name="startstats" id="startstats" size="9" maxlength="9" />
721
- <?php echo _e('To:', WDFM()->prefix);?>
722
  <input class="inputbox" type="text" name="endstats" id="endstats" size="9" maxlength="9" />
723
  </td>
724
  <td>
725
  <span class="fm-div_stats-loading spinner"></span>
726
- <button class="button" onclick="show_stats(); return false;"><?php _e('Show', WDFM()->prefix); ?></button>
727
  </td>
728
  </tr>
729
  </table>
730
  <div id="div_stats"></div>
731
  </div>
732
- <script>
733
- show_stats_url = "<?php echo add_query_arg( array('action' => 'get_stats' . WDFM()->plugin_postfix, 'task' => 'show_stats', 'current_id' => $form_id ), $page_url); ?>";
734
  </script>
735
  <?php
736
  }
@@ -801,10 +801,10 @@ class FMViewSubmissions_fm extends FMAdminView {
801
  }
802
  </script>
803
  <div id="ChBDiv">
804
- <p class="add-col-header"><?php _e('Select columns', WDFM()->prefix); ?></p>
805
  <div class="fm_check_labels">
806
  <input type="checkbox" <?php echo ( !$lists['hide_label_list'] ) ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll" />
807
- <label for="ChBAll"><?php _e('All', WDFM()->prefix); ?></label>
808
  </div>
809
  <?php
810
  foreach ( $templabels as $key => $curlabel ) {
@@ -835,13 +835,13 @@ class FMViewSubmissions_fm extends FMAdminView {
835
  ?>
836
  <div class="fm_check_labels">
837
  <input type="checkbox" onclick="clickLabChB('payment_info', this)" id="fm_check_payment_info" <?php echo (strpos($lists['hide_label_list'], '@payment_info@') === FALSE) ? 'checked="checked"' : ''; ?> />
838
- <label for="fm_check_payment_info"><?php _e('Payment info', WDFM()->prefix); ?></label>
839
  </div>
840
  <?php
841
  }
842
  ?>
843
  <div class="done-cont">
844
- <button onclick="toggleChBDiv(false); return false;" class="button button-primary"><?php _e('Done', WDFM()->prefix); ?></button>
845
  </div>
846
  </div>
847
  <script type="text/javascript">
@@ -856,7 +856,7 @@ class FMViewSubmissions_fm extends FMAdminView {
856
  url: "<?php echo add_query_arg(array(
857
  'form_id' => $form_id,
858
  'send_header' => 0,
859
- ), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "&limitstart=" + limit,
860
  data: {search_labels: '<?php echo $searched_ids; ?>', verified_emails: jQuery('#verified_emails').val()},
861
  beforeSend: function () {
862
  if (<?php echo $subs_count; ?> >=
@@ -894,7 +894,7 @@ class FMViewSubmissions_fm extends FMAdminView {
894
  window.location = "<?php echo add_query_arg(array(
895
  'form_id' => $form_id,
896
  'send_header' => 1,
897
- ), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "&limitstart=" + limit;
898
  }
899
  }
900
  });
@@ -1009,9 +1009,9 @@ class FMViewSubmissions_fm extends FMAdminView {
1009
  <table class="adminlist">
1010
  <thead>
1011
  <tr>
1012
- <th width="20%"><?php _e('Choices', WDFM()->prefix); ?></th>
1013
- <th><?php _e('Percentage', WDFM()->prefix); ?></th>
1014
- <th width="10%" style="text-align: left;"><?php _e('Count', WDFM()->prefix); ?></th>
1015
  </tr>
1016
  </thead>
1017
  <?php
@@ -1051,14 +1051,14 @@ class FMViewSubmissions_fm extends FMAdminView {
1051
  if ( $unanswered ) {
1052
  ?>
1053
  <tr>
1054
- <td colspan="2" style="text-align:right; color: #000;"><?php _e('Unanswered', WDFM()->prefix); ?></td>
1055
  <td><strong style="margin-left:10px;"><?php echo $unanswered; ?></strong></td>
1056
  </tr>
1057
  <?php
1058
  }
1059
  ?>
1060
  <tr>
1061
- <td colspan="2" style="text-align:right; color: #000;"><strong><?php _e('Total', WDFM()->prefix); ?></strong></td>
1062
  <td><strong style="margin-left:10px;"><?php echo $all; ?></strong></td>
1063
  </tr>
1064
  </table>
@@ -1083,43 +1083,43 @@ class FMViewSubmissions_fm extends FMAdminView {
1083
  <div class="wrap">
1084
  <?php
1085
  // Generate message container by message id or directly by message.
1086
- $message_id = WDW_FM_Library::get('message', 0);
1087
- $message = WDW_FM_Library::get('msg', '');
1088
- echo WDW_FM_Library::message_id($message_id, $message);
1089
  ?>
1090
- <form action="admin.php?page=submissions<?php echo WDFM()->menu_postfix; ?>" method="post" id="adminForm" name="adminForm" class="form_maker_submissions_edit wd-form">
1091
  <div class="wd-page-title wd-header">
1092
- <h1 class="wp-heading-inline"><?php _e('Edit Submission', WDFM()->prefix); ?></h1>
1093
  </div>
1094
  <div class="wd-buttons">
1095
- <button class="button button-primary button-large" onclick="fm_set_input_value('task', 'save'); fm_set_input_value('current_id', <?php echo $current_id; ?>); fm_form_submit(event, 'adminForm');"><?php _e('Save', WDFM()->prefix); ?></button>
1096
  </div>
1097
  <div class="wd-table">
1098
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
1099
  <div class="wd-box-section">
1100
  <div class="wd-box-content non-editable">
1101
  <div class="wd-group">
1102
- <label class="wd-label" for="id"><?php _e('Form', WDFM()->prefix); ?></label>
1103
  <span><?php echo $form->title; ?></span>
1104
  </div>
1105
  <div class="wd-group">
1106
- <label class="wd-label" for="id"><?php _e('ID', WDFM()->prefix); ?></label>
1107
  <span><?php echo $rows[0]->group_id; ?></span>
1108
  </div>
1109
  <div class="wd-group">
1110
- <label class="wd-label" for="id"><?php _e('Date', WDFM()->prefix); ?></label>
1111
  <span><?php echo $rows[0]->date; ?></span>
1112
  </div>
1113
  <div class="wd-group">
1114
- <label class="wd-label" for="id"><?php _e('IP', WDFM()->prefix); ?></label>
1115
  <span><?php echo $rows[0]->ip; ?></span>
1116
  </div>
1117
  <div class="wd-group">
1118
- <label class="wd-label" for="id"><?php _e('Submitter\'s Username', WDFM()->prefix); ?></label>
1119
  <span><?php echo $username; ?></span>
1120
  </div>
1121
  <div class="wd-group">
1122
- <label class="wd-label" for="id"><?php _e('Submitter\'s Email Address', WDFM()->prefix); ?></label>
1123
  <span><?php echo $useremail; ?></span>
1124
  </div>
1125
  </div>
@@ -1154,27 +1154,27 @@ class FMViewSubmissions_fm extends FMAdminView {
1154
  <label class="wd-label"><?php echo $labels_name[$key]; ?></label>
1155
  <select name="submission_0" id="submission_0">
1156
  <option value=""></option>
1157
- <option value="Canceled"><?php echo _e('Canceled', WDFM()->prefix); ?></option>
1158
- <option value="Cleared"><?php echo _e('Cleared', WDFM()->prefix); ?></option>
1159
- <option value="Cleared by payment review"><?php echo _e('Cleared by payment review', WDFM()->prefix); ?></option>
1160
- <option value="Completed"><?php echo _e('Completed', WDFM()->prefix); ?></option>
1161
- <option value="Denied"><?php echo _e('Denied', WDFM()->prefix); ?></option>
1162
- <option value="Failed"><?php echo _e('Failed', WDFM()->prefix); ?></option>
1163
- <option value="Held"><?php echo _e('Held', WDFM()->prefix); ?></option>
1164
- <option value="In progress"><?php echo _e('In progress', WDFM()->prefix); ?></option>
1165
- <option value="On hold"><?php echo _e('On hold', WDFM()->prefix); ?></option>
1166
- <option value="Paid"><?php echo _e('Paid', WDFM()->prefix); ?></option>
1167
- <option value="Partially refunded"><?php echo _e('Partially refunded', WDFM()->prefix); ?></option>
1168
- <option value="Pending verification"><?php echo _e('Pending verification', WDFM()->prefix); ?></option>
1169
- <option value="Placed"><?php echo _e('Placed', WDFM()->prefix); ?></option>
1170
- <option value="Processing"><?php echo _e('Processing', WDFM()->prefix); ?></option>
1171
- <option value="Refunded"><?php echo _e('Refunded', WDFM()->prefix); ?></option>
1172
- <option value="Refused"><?php echo _e('Refused', WDFM()->prefix); ?></option>
1173
- <option value="Removed"><?php echo _e('Removed', WDFM()->prefix); ?></option>
1174
- <option value="Returned"><?php echo _e('Returned', WDFM()->prefix); ?></option>
1175
- <option value="Reversed"><?php echo _e('Reversed', WDFM()->prefix); ?></option>
1176
- <option value="Temporary hold"><?php echo _e('Temporary hold', WDFM()->prefix); ?></option>
1177
- <option value="Unclaimed"><?php echo _e('Unclaimed', WDFM()->prefix); ?></option>
1178
  </select>
1179
  <script>
1180
  var element = document.getElementById("submission_0");
@@ -1284,14 +1284,14 @@ class FMViewSubmissions_fm extends FMAdminView {
1284
  </div>
1285
  </div>
1286
  </div>
1287
- <?php wp_nonce_field(WDFM()->nonce, WDFM()->nonce); ?>
1288
  <input type="hidden" name="option" value="com_formmaker" />
1289
  <input type="hidden" id="current_id" name="current_id" value="<?php echo $rows[0]->group_id; ?>" />
1290
  <input type="hidden" name="form_id" value="<?php echo $rows[0]->form_id; ?>" />
1291
  <input type="hidden" name="date" value="<?php echo $rows[0]->date; ?>" />
1292
  <input type="hidden" name="ip" value="<?php echo $rows[0]->ip; ?>" />
1293
  <input type="hidden" id="task" name="task" value="" />
1294
- <input type="hidden" value="<?php echo WDFM()->plugin_url; ?>" id="form_plugins_url" />
1295
  </form>
1296
  </div>
1297
  <?php
@@ -1307,7 +1307,7 @@ class FMViewSubmissions_fm extends FMAdminView {
1307
  $page_url = $params['page_url'];
1308
  ?>
1309
  <select name="form_id" id="form_id">
1310
- <option value="0"><?php _e('- Select a form -', WDFM()->prefix); ?></option>
1311
  <?php
1312
  foreach ( $params['forms'] as $form ) {
1313
  $selected = ( $form->id == $params['id'] ) ? 'selected="selected"' : '';
8
  public function __construct( $model ) {
9
  $this->model = $model;
10
  wp_enqueue_style('thickbox');
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
12
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
13
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
14
  wp_enqueue_style('jquery.fancybox');
15
 
16
  wp_enqueue_script('thickbox');
24
  wp_enqueue_script('jquery-ui-core');
25
  wp_enqueue_script('jquery-ui-datepicker');
26
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
27
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker());
28
  }
29
  else {
30
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker() . '</script>';
31
  }
32
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
33
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-manage');
34
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-submissions');
35
  wp_enqueue_script('jquery.fancybox.pack');
36
  }
37
 
60
  <?php echo $this->saelect_form( array('id' => $id, 'forms' => $forms, 'page' => $page, 'page_url' => $page_url) ); ?>
61
  </div>
62
  <div class="fm-export-tools">
63
+ <?php $blocked_ips_link = add_query_arg(array( 'page' => 'blocked_ips' . WDFMInstance(self::PLUGIN)->menu_postfix ), $page_url); ?>
64
+ <a class="button" href="<?php echo $blocked_ips_link; ?>" target="_blank"><?php echo _e('Blocked IPs', WDFMInstance(self::PLUGIN)->prefix);?></a>
65
  </div>
66
  </div>
67
  <?php if( !$id ) { ?>
68
  <table class="wp-list-table widefat fixed striped posts">
69
  <body id="the-list">
70
  <tr class="no-items">
71
+ <td class="colspanchange" colspan="0"><?php _e('Please select a form to view submissions', WDFMInstance(self::PLUGIN)->prefix); ?></td>
72
  </tr>
73
  </body>
74
  </table>
88
 
89
  // Pass the content to form.
90
  $form_attr = array(
91
+ // 'id' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
92
  'id' => 'admin_form',
93
+ 'name' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
94
+ 'class' => WDFMInstance(self::PLUGIN)->prefix . '_submissions wd-form',
95
  'action' => add_query_arg( array('page' => $page, 'task' => 'display', 'current_id' => $id ), $page_url),
96
  );
97
  echo $this->form(ob_get_clean(), $form_attr);
167
  <div class="fm-reports">
168
  <div class="fm-tools-button">
169
  <div class="fm-total_entries"><?php echo $statistics["total_entries"]; ?></div>
170
+ <?php echo _e('Entries', WDFMInstance(self::PLUGIN)->prefix);?>
171
  </div>
172
  <div class="fm-tools-button">
173
  <div class="fm-total_rate"><?php echo $statistics["conversion_rate"]; ?></div>
174
+ <?php echo _e('Conversion Rate', WDFMInstance(self::PLUGIN)->prefix);?>
175
  </div>
176
  <div class="fm-tools-button">
177
  <div class="fm-total_views"><?php echo $statistics["total_views"] ? $statistics["total_views"] : 0; ?></div>
178
+ <?php echo _e('Views', WDFMInstance(self::PLUGIN)->prefix);?>
179
  </div>
180
  </div>
181
  <div class="fm-export-tools">
182
+ <?php $blocked_ips_link = add_query_arg(array( 'page' => 'blocked_ips' . WDFMInstance(self::PLUGIN)->menu_postfix ), $page_url); ?>
183
+ <a class="button" href="<?php echo $blocked_ips_link; ?>" target="_blank"><?php echo _e('Blocked IPs', WDFMInstance(self::PLUGIN)->prefix);?></a>
184
+ <button class="button" onclick="export_submissions('csv', 0); return false;"><?php echo _e('Export to CSV', WDFMInstance(self::PLUGIN)->prefix);?></button>
185
+ <button class="button" onclick="export_submissions('xml', 0); return false;"><?php echo _e('Export to XML', WDFMInstance(self::PLUGIN)->prefix);?></button>
186
  </div>
187
  </div>
188
  <div class="tablenav top">
190
  echo $this->bulk_actions($actions);
191
  ?>
192
  <div class="alignleft actions fm-bulk-actions">
193
+ <input type="button" class="button action" onclick="toggleChBDiv(true); return false;" value="<?php echo _e('Add/Remove Columns', WDFMInstance(self::PLUGIN)->prefix);?>">
194
  <input type="hidden" name="hide_label_list" value="">
195
+ <button type="button" class="button action" onclick="show_hide_filter(); return false;"><span class="show-filter <?php echo !($is_search) ? '' : 'hide'?>"><?php echo __('Show Filters', WDFMInstance(self::PLUGIN)->prefix); ?></span> <span class="hide-filter <?php echo !($is_search) ? 'hide' : 'show'?>" ><?php echo __('Hide Filters', WDFMInstance(self::PLUGIN)->prefix);?></span></button>
196
  <span class="search_reset_button <?php echo ($is_search) ? '' : 'hide'; ?>">
197
+ <input type="button" class="button action" onclick="fm_form_submit(event, 'admin_form'); return false;" value="<?php echo _e('Search', WDFMInstance(self::PLUGIN)->prefix);?>">
198
+ <input type="button" class="button action <?php echo ($is_search) ? '' : 'hide'; ?>" onclick="remove_all(); fm_set_input_value('order_by', 'group_id'); fm_set_input_value('asc_or_desc', 'desc'); fm_form_submit(event, 'admin_form'); return false;" value="<?php echo _e('Reset', WDFMInstance(self::PLUGIN)->prefix);?>">
199
  </span>
200
  </div>
201
  <?php
213
  <thead>
214
  <tr class="fm_table_head">
215
  <td id="cb" class="column-cb check-column">
216
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix);?></label>
217
  <input type="checkbox" id="check_all">
218
  </td>
219
  <th id="submitid_fc" class="<?php if ( $order_by == "group_id" ) {
221
  }
222
  else {
223
  echo $oder_class_default;
224
+ } ?> col_id" <?php echo $style_id; ?> data-colname="<?php _e('ID', WDFMInstance(self::PLUGIN)->prefix);?>">
225
  <a href="" class="sub_id" onclick="fm_set_input_value('order_by', 'group_id');
226
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'group_id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
227
  fm_form_submit(event, 'admin_form')">
228
+ <span><?php echo _e('ID', WDFMInstance(self::PLUGIN)->prefix);?></span>
229
  <span class="sorting-indicator"></span>
230
  </a>
231
  </th>
234
  }
235
  else {
236
  echo $oder_class_default;
237
+ } ?>" <?php echo $style_date; ?> data-colname="<?php _e('Submit date', WDFMInstance(self::PLUGIN)->prefix);?>">
238
  <a href="" onclick="fm_set_input_value('order_by', 'date');
239
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'date' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
240
  fm_form_submit(event, 'admin_form')">
241
+ <span><?php _e('Submit date', WDFMInstance(self::PLUGIN)->prefix);?></span>
242
  <span class="sorting-indicator"></span>
243
  </a>
244
  </th>
247
  }
248
  else {
249
  echo $oder_class_default;
250
+ } ?>" <?php echo $style_ip; ?> data-colname="<?php _e('Submitter\'s IP', WDFMInstance(self::PLUGIN)->prefix);?>">
251
  <a href="" onclick="fm_set_input_value('order_by', 'ip');
252
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'ip' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
253
  fm_form_submit(event, 'admin_form')">
254
+ <span><?php _e('Submitter\'s IP', WDFMInstance(self::PLUGIN)->prefix);?></span>
255
  <span class="sorting-indicator"></span>
256
  </a>
257
  </th>
260
  }
261
  else {
262
  echo $oder_class_default;
263
+ } ?>" <?php echo $style_username; ?> data-colname="<?php _e('Submitter\'s Username', WDFMInstance(self::PLUGIN)->prefix);?>">
264
  <a href="" onclick="fm_set_input_value('order_by', 'display_name');
265
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'display_name' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
266
  fm_form_submit(event, 'admin_form')">
267
+ <span><?php _e('Submitter\'s Username', WDFMInstance(self::PLUGIN)->prefix);?></span>
268
  <span class="sorting-indicator"></span>
269
  </a>
270
  </th>
273
  }
274
  else {
275
  echo $oder_class_default;
276
+ } ?>" <?php echo $style_useremail; ?> data-colname="<?php _e('Submitter\'s Email Address', WDFMInstance(self::PLUGIN)->prefix);?>">
277
  <a href="" onclick="fm_set_input_value('order_by', 'user_email');
278
  fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'user_email' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
279
  fm_form_submit(event, 'admin_form')">
280
+ <span><?php _e('Submitter\'s Email Address', WDFMInstance(self::PLUGIN)->prefix);?></span>
281
  <span class="sorting-indicator"></span>
282
  </a>
283
  </th>
326
  }
327
  }
328
  if( $stripe_paypal ) { ?>
329
+ <th id="payment_info_fc" class="column-autor payment_info_fc" <?php echo $style_payment_info; ?> data-colname="<?php _e('Payment Info', WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Payment Info', WDFMInstance(self::PLUGIN)->prefix); ?></th>
330
  <?php } ?>
331
+ </tr>
332
  <tr id="fm-fields-filter" style="display: none;">
333
  <th></th>
334
  <th class="submitid_fc" <?php echo $style_id; ?> >
456
  <th class="check-column">
457
  <input type="checkbox" id="check_<?php echo $data->group_id; ?>" name="check[<?php echo $data->group_id; ?>]">
458
  </th>
459
+ <td id="submitid_fc" class="col-id" data-colname="<?php _e('ID', WDFMInstance(self::PLUGIN)->prefix);?>" <?php echo $style_id; ?>>
460
  <a href="" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id',<?php echo $data->group_id; ?>); fm_form_submit(event, 'admin_form');"><?php echo $data->group_id; ?></a>
461
  </td>
462
+ <td class="column-primary col-submit-date" data-colname="<?php _e('Submit date', WDFMInstance(self::PLUGIN)->prefix);?>" <?php echo $style_date; ?>>
463
  <?php
464
  $view_url = add_query_arg( array(
465
+ 'action' => 'FormMakerSubmits' . WDFMInstance(self::PLUGIN)->plugin_postfix,
466
  'group_id' => $data->group_id,
467
  'form_id' => $form_id,
468
  'width' => '600',
476
  $unblock_url = add_query_arg( array( 'task' => 'unblock_ip', 'current_id' => $data->group_id, 'form_id' => $form_id ), $page_url );
477
 
478
  $ip_infoin_popup_url = add_query_arg( array(
479
+ 'action' => 'FormMakerIpinfoinPopup' . WDFMInstance(self::PLUGIN)->plugin_postfix,
480
  'data_ip' => $data->ip,
481
  'width' => '450',
482
  'height' => '300',
486
  ?>
487
  <p><strong><a href="<?php echo $edit_url; ?>" target="_blank"><?php echo $data->date; ?></a></strong></p>
488
  <div class="row-actions">
489
+ <span><a href="<?php echo $view_url; ?>" class="thickbox thickbox-preview" title="<?php _e("View submission", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('View', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
490
+ <span><a href="<?php echo $edit_url; ?>" target="_blank" title="<?php _e("Edit submission", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
491
  <?php if ( $pdf_data && isset($pdf_data[$group_id_s[$www]]) ){ ?>
492
+ <span><a href="<?php echo site_url() . '/' . $pdf_data[$group_id_s[$www]]; ?>" download ><?php _e('Download PDF', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
493
  <?php } ?>
494
+ <span class="trash"><a href="<?php echo $delete_url; ?>" title="<?php _e("Edit submission", WDFMInstance(self::PLUGIN)->prefix); ?>" onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFMInstance(self::PLUGIN)->prefix)); ?>')) {return false;}"><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
495
 
496
+ <button class="toggle-row" type="button"><span class="screen-reader-text"><?php _e("Show more details", WDFMInstance(self::PLUGIN)->prefix); ?></span></button>
497
  </div>
498
  </td>
499
+ <td class="submitterip_fc sub-align" id="submitterip_fc" <?php echo $style_ip; ?> data-colname="<?php _e('Show submitter information', WDFMInstance(self::PLUGIN)->prefix);?>">
500
+ <p><a class="thickbox-preview" href="<?php echo $ip_infoin_popup_url; ?>" title="<?php _e("Show submitter information", WDFMInstance(self::PLUGIN)->prefix); ?>" <?php echo (!in_array($data->ip, $blocked_ips)) ? '' : 'style="color: #FF0000;"'; ?>><?php echo $data->ip; ?></a></p>
501
  <div class="row-actions">
502
  <?php if( !in_array($data->ip, $blocked_ips) ){ ?>
503
+ <span><a href="<?php echo $block_url; ?>" title="<?php _e("Block IP", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Block IP', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
504
  <?php } else { ?>
505
+ <span><a href="<?php echo $unblock_url; ?>" title="<?php _e("Unblock IP ", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Unblock IP', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
506
  <?php } ?>
507
  </div>
508
  </td>
509
+ <td class="table_large_col submitterusername_fc sub-align" id="submitterusername_fc" <?php echo $style_username; ?> data-colname="<?php _e('Submitter\'s Username', WDFMInstance(self::PLUGIN)->prefix);?>">
510
  <p><?php echo $username; ?></p>
511
  </td>
512
+ <td class="table_large_col submitteremail_fc sub-align" id="submitteremail_fc" <?php echo $style_useremail; ?> data-colname="<?php _e('Submitter\'s Email Address', WDFMInstance(self::PLUGIN)->prefix);?>">
513
  <p><?php echo $useremail; ?></p>
514
  </td>
515
+ <?php
516
  for ( $h = 0; $h < $m; $h++ ) {
517
  $ispaypal = false;
518
  if ( $sorted_label_types[$h] == 'type_stripe' ) {
529
  if ( strpos($temp[$g]->element_value, "***map***") ) {
530
  $map_params = explode('***map***', $temp[$g]->element_value);
531
  ?>
532
+ <td class="table_large_col <?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Show on Map', WDFMInstance(self::PLUGIN)->prefix);?>">
533
  <a class="thickbox-preview" href="<?php echo add_query_arg(array(
534
+ 'action' => 'FormMakerMapEditinPopup' . WDFMInstance(self::PLUGIN)->plugin_postfix,
535
  'long' => $map_params[0],
536
  'lat' => $map_params[1],
537
  'width' => '620',
538
  'height' => '550',
539
  'TB_iframe' => '1',
540
+ ), admin_url('admin-ajax.php')); ?>" title="<?php _e("Show on Map", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e("Show on Map", WDFMInstance(self::PLUGIN)->prefix); ?></a>
541
  </td>
542
  <?php
543
  }
544
  elseif ( strpos($temp[$g]->element_value, "*@@url@@*") ) {
545
  ?>
546
+ <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('URL', WDFMInstance(self::PLUGIN)->prefix);?>">
547
  <?php
548
  $new_files = explode("*@@url@@*", $temp[$g]->element_value);
549
  foreach ( $new_files as $new_file ) {
564
  $view_star_rating_array = $this->model->view_for_star_rating($temp[$g]->element_value, $temp[$g]->element_label);
565
  $stars = $view_star_rating_array[0];
566
  ?>
567
+ <td align="center" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Star rating', WDFMInstance(self::PLUGIN)->prefix);?>"><?php echo $stars; ?></td>
568
  <?php
569
  }
570
  elseif ( strpos($temp[$g]->element_value, "***matrix***") ) {
571
  ?>
572
+ <td class="table_large_col <?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Matrix', WDFMInstance(self::PLUGIN)->prefix);?>">
573
  <a class="thickbox-preview" href="<?php echo add_query_arg(array(
574
+ 'action' => 'show_matrix' . WDFMInstance(self::PLUGIN)->plugin_postfix,
575
  'matrix_params' => str_replace('#', '%23', urlencode($temp[$g]->element_value)),
576
  'width' => '620',
577
  'height' => '550',
578
  'TB_iframe' => '1',
579
+ ), admin_url('admin-ajax.php')); ?>" title="<?php _e("Show Matrix", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e("Show Matrix", WDFMInstance(self::PLUGIN)->prefix); ?></a>
580
  </td>
581
  <?php
582
  }
591
  $view_grading_array = $this->model->view_for_grading($temp[$g]->element_value);
592
  $items = $view_grading_array[0];
593
  ?>
594
+ <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php _e('Grading', WDFMInstance(self::PLUGIN)->prefix);?>">
595
  <p><?php echo $items; ?></p>
596
  </td>
597
  <?php
598
  }
599
+ else {
600
  // check is paypal status
601
  if($sorted_labels_id[$h] == 0 && !empty($temp[$g]->element_value) ) {
602
  $ispaypal = true;
619
  ?>
620
  <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
621
  <p><?php echo $temp[$g]->element_value; ?>
622
+ <span style="color:#2DA068;">( Verified <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/verified.png'; ?>" /> )</span>
623
  </p>
624
  </td>
625
  <?php }
653
  }
654
  if ( $ispaypal ) {
655
  ?>
656
+ <td class="payment_info_fc sub-align" id="payment_info_fc" <?php echo $style_payment_info; ?> data-colname="<?php _e('Paypal information', WDFMInstance(self::PLUGIN)->prefix); ?>">
657
  <a class="thickbox-preview" href="<?php echo add_query_arg(array(
658
+ 'action' => 'paypal_info' . WDFMInstance(self::PLUGIN)->plugin_postfix,
659
  'id' => $i,
660
  'width' => '600',
661
  'height' => '500',
662
  'TB_iframe' => '1',
663
+ ), admin_url('admin-ajax.php')); ?>" title="<?php _e("Paypal information", WDFMInstance(self::PLUGIN)->prefix); ?>">
664
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/info.png'; ?>" />
665
  </a>
666
  </td>
667
  <?php
673
  }
674
  }
675
  else {
676
+ echo WDW_FM_Library(self::PLUGIN)->no_items('submissions');
677
  }
678
  ?>
679
  </tbody>
690
  }
691
  }
692
  if ( $is_stats ) {
693
+ $ajax_nonce = wp_create_nonce( WDFMInstance(self::PLUGIN)->nonce );
694
+ ?>
695
  <div class="fm-statistics">
696
+ <h2><?php echo _e('Statistics', WDFMInstance(self::PLUGIN)->prefix);?></h2>
697
  <table class="stats">
698
  <tr>
699
  <td colspan="3">
700
  <select id="sorted_label_key">
701
+ <option value=""><?php echo _e('- Select -', WDFMInstance(self::PLUGIN)->prefix);?></option>
702
  <?php
703
  foreach ( $sorted_label_types as $key => $sorted_label_type ) {
704
  if ( $sorted_label_type == "type_checkbox" || $sorted_label_type == "type_radio" || $sorted_label_type == "type_own_select" || $sorted_label_type == "type_country" || $sorted_label_type == "type_paypal_select" || $sorted_label_type == "type_paypal_radio" || $sorted_label_type == "type_paypal_checkbox" || $sorted_label_type == "type_paypal_shipping" ) {
709
  }
710
  ?>
711
  </select>
712
+ <p class="fm_error_sorted_label_key"><?php echo _e('Please select the field!', WDFMInstance(self::PLUGIN)->prefix);?></p>
713
  </td>
714
  </tr>
715
  <tr>
716
  <td>
717
+ <label style="margin-left: 7px;"><?php echo _e('Date From:', WDFMInstance(self::PLUGIN)->prefix);?></label>
718
  </td>
719
  <td>
720
  <input class="inputbox" type="text" name="startstats" id="startstats" size="9" maxlength="9" />
721
+ <?php echo _e('To:', WDFMInstance(self::PLUGIN)->prefix);?>
722
  <input class="inputbox" type="text" name="endstats" id="endstats" size="9" maxlength="9" />
723
  </td>
724
  <td>
725
  <span class="fm-div_stats-loading spinner"></span>
726
+ <button class="button" onclick="show_stats(); return false;"><?php _e('Show', WDFMInstance(self::PLUGIN)->prefix); ?></button>
727
  </td>
728
  </tr>
729
  </table>
730
  <div id="div_stats"></div>
731
  </div>
732
+ <script>
733
+ show_stats_url = "<?php echo add_query_arg( array('action' => 'get_stats' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'task' => 'show_stats', 'current_id' => $form_id ), $page_url); ?>";
734
  </script>
735
  <?php
736
  }
801
  }
802
  </script>
803
  <div id="ChBDiv">
804
+ <p class="add-col-header"><?php _e('Select columns', WDFMInstance(self::PLUGIN)->prefix); ?></p>
805
  <div class="fm_check_labels">
806
  <input type="checkbox" <?php echo ( !$lists['hide_label_list'] ) ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll" />
807
+ <label for="ChBAll"><?php _e('All', WDFMInstance(self::PLUGIN)->prefix); ?></label>
808
  </div>
809
  <?php
810
  foreach ( $templabels as $key => $curlabel ) {
835
  ?>
836
  <div class="fm_check_labels">
837
  <input type="checkbox" onclick="clickLabChB('payment_info', this)" id="fm_check_payment_info" <?php echo (strpos($lists['hide_label_list'], '@payment_info@') === FALSE) ? 'checked="checked"' : ''; ?> />
838
+ <label for="fm_check_payment_info"><?php _e('Payment info', WDFMInstance(self::PLUGIN)->prefix); ?></label>
839
  </div>
840
  <?php
841
  }
842
  ?>
843
  <div class="done-cont">
844
+ <button onclick="toggleChBDiv(false); return false;" class="button button-primary"><?php _e('Done', WDFMInstance(self::PLUGIN)->prefix); ?></button>
845
  </div>
846
  </div>
847
  <script type="text/javascript">
856
  url: "<?php echo add_query_arg(array(
857
  'form_id' => $form_id,
858
  'send_header' => 0,
859
+ ), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "<?php echo WDFMInstance(self::PLUGIN)->plugin_postfix; ?>&limitstart=" + limit,
860
  data: {search_labels: '<?php echo $searched_ids; ?>', verified_emails: jQuery('#verified_emails').val()},
861
  beforeSend: function () {
862
  if (<?php echo $subs_count; ?> >=
894
  window.location = "<?php echo add_query_arg(array(
895
  'form_id' => $form_id,
896
  'send_header' => 1,
897
+ ), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "<?php echo WDFMInstance(self::PLUGIN)->plugin_postfix; ?>&limitstart=" + limit;
898
  }
899
  }
900
  });
1009
  <table class="adminlist">
1010
  <thead>
1011
  <tr>
1012
+ <th width="20%"><?php _e('Choices', WDFMInstance(self::PLUGIN)->prefix); ?></th>
1013
+ <th><?php _e('Percentage', WDFMInstance(self::PLUGIN)->prefix); ?></th>
1014
+ <th width="10%" style="text-align: left;"><?php _e('Count', WDFMInstance(self::PLUGIN)->prefix); ?></th>
1015
  </tr>
1016
  </thead>
1017
  <?php
1051
  if ( $unanswered ) {
1052
  ?>
1053
  <tr>
1054
+ <td colspan="2" style="text-align:right; color: #000;"><?php _e('Unanswered', WDFMInstance(self::PLUGIN)->prefix); ?></td>
1055
  <td><strong style="margin-left:10px;"><?php echo $unanswered; ?></strong></td>
1056
  </tr>
1057
  <?php
1058
  }
1059
  ?>
1060
  <tr>
1061
+ <td colspan="2" style="text-align:right; color: #000;"><strong><?php _e('Total', WDFMInstance(self::PLUGIN)->prefix); ?></strong></td>
1062
  <td><strong style="margin-left:10px;"><?php echo $all; ?></strong></td>
1063
  </tr>
1064
  </table>
1083
  <div class="wrap">
1084
  <?php
1085
  // Generate message container by message id or directly by message.
1086
+ $message_id = WDW_FM_Library(self::PLUGIN)->get('message', 0);
1087
+ $message = WDW_FM_Library(self::PLUGIN)->get('msg', '');
1088
+ echo WDW_FM_Library(self::PLUGIN)->message_id($message_id, $message);
1089
  ?>
1090
+ <form action="admin.php?page=submissions<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>" method="post" id="adminForm" name="adminForm" class="form_maker_submissions_edit wd-form">
1091
  <div class="wd-page-title wd-header">
1092
+ <h1 class="wp-heading-inline"><?php _e('Edit Submission', WDFMInstance(self::PLUGIN)->prefix); ?></h1>
1093
  </div>
1094
  <div class="wd-buttons">
1095
+ <button class="button button-primary button-large" onclick="fm_set_input_value('task', 'save'); fm_set_input_value('current_id', <?php echo $current_id; ?>); fm_form_submit(event, 'adminForm');"><?php _e('Save', WDFMInstance(self::PLUGIN)->prefix); ?></button>
1096
  </div>
1097
  <div class="wd-table">
1098
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
1099
  <div class="wd-box-section">
1100
  <div class="wd-box-content non-editable">
1101
  <div class="wd-group">
1102
+ <label class="wd-label" for="id"><?php _e('Form', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1103
  <span><?php echo $form->title; ?></span>
1104
  </div>
1105
  <div class="wd-group">
1106
+ <label class="wd-label" for="id"><?php _e('ID', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1107
  <span><?php echo $rows[0]->group_id; ?></span>
1108
  </div>
1109
  <div class="wd-group">
1110
+ <label class="wd-label" for="id"><?php _e('Date', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1111
  <span><?php echo $rows[0]->date; ?></span>
1112
  </div>
1113
  <div class="wd-group">
1114
+ <label class="wd-label" for="id"><?php _e('IP', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1115
  <span><?php echo $rows[0]->ip; ?></span>
1116
  </div>
1117
  <div class="wd-group">
1118
+ <label class="wd-label" for="id"><?php _e('Submitter\'s Username', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1119
  <span><?php echo $username; ?></span>
1120
  </div>
1121
  <div class="wd-group">
1122
+ <label class="wd-label" for="id"><?php _e('Submitter\'s Email Address', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1123
  <span><?php echo $useremail; ?></span>
1124
  </div>
1125
  </div>
1154
  <label class="wd-label"><?php echo $labels_name[$key]; ?></label>
1155
  <select name="submission_0" id="submission_0">
1156
  <option value=""></option>
1157
+ <option value="Canceled"><?php echo _e('Canceled', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1158
+ <option value="Cleared"><?php echo _e('Cleared', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1159
+ <option value="Cleared by payment review"><?php echo _e('Cleared by payment review', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1160
+ <option value="Completed"><?php echo _e('Completed', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1161
+ <option value="Denied"><?php echo _e('Denied', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1162
+ <option value="Failed"><?php echo _e('Failed', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1163
+ <option value="Held"><?php echo _e('Held', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1164
+ <option value="In progress"><?php echo _e('In progress', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1165
+ <option value="On hold"><?php echo _e('On hold', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1166
+ <option value="Paid"><?php echo _e('Paid', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1167
+ <option value="Partially refunded"><?php echo _e('Partially refunded', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1168
+ <option value="Pending verification"><?php echo _e('Pending verification', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1169
+ <option value="Placed"><?php echo _e('Placed', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1170
+ <option value="Processing"><?php echo _e('Processing', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1171
+ <option value="Refunded"><?php echo _e('Refunded', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1172
+ <option value="Refused"><?php echo _e('Refused', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1173
+ <option value="Removed"><?php echo _e('Removed', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1174
+ <option value="Returned"><?php echo _e('Returned', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1175
+ <option value="Reversed"><?php echo _e('Reversed', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1176
+ <option value="Temporary hold"><?php echo _e('Temporary hold', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1177
+ <option value="Unclaimed"><?php echo _e('Unclaimed', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1178
  </select>
1179
  <script>
1180
  var element = document.getElementById("submission_0");
1284
  </div>
1285
  </div>
1286
  </div>
1287
+ <?php wp_nonce_field(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce); ?>
1288
  <input type="hidden" name="option" value="com_formmaker" />
1289
  <input type="hidden" id="current_id" name="current_id" value="<?php echo $rows[0]->group_id; ?>" />
1290
  <input type="hidden" name="form_id" value="<?php echo $rows[0]->form_id; ?>" />
1291
  <input type="hidden" name="date" value="<?php echo $rows[0]->date; ?>" />
1292
  <input type="hidden" name="ip" value="<?php echo $rows[0]->ip; ?>" />
1293
  <input type="hidden" id="task" name="task" value="" />
1294
+ <input type="hidden" value="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>" id="form_plugins_url" />
1295
  </form>
1296
  </div>
1297
  <?php
1307
  $page_url = $params['page_url'];
1308
  ?>
1309
  <select name="form_id" id="form_id">
1310
+ <option value="0"><?php _e('- Select a form -', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1311
  <?php
1312
  foreach ( $params['forms'] as $form ) {
1313
  $selected = ( $form->id == $params['id'] ) ? 'selected="selected"' : '';
admin/views/Themes_fm.php CHANGED
@@ -4,10 +4,10 @@ class FMViewThemes_fm extends FMAdminView {
4
  * FMViewThemes_fm constructor.
5
  */
6
  public function __construct() {
7
- wp_enqueue_style('fm-tables');
8
- wp_enqueue_style('fm-first');
9
  wp_enqueue_script('jquery');
10
- wp_enqueue_script('fm-admin');
11
  }
12
 
13
  /**
@@ -20,10 +20,10 @@ class FMViewThemes_fm extends FMAdminView {
20
  echo $this->body($params);
21
  // Pass the content to form.
22
  $form_attr = array(
23
- 'id' => WDFM()->prefix . '_themes',
24
- 'name' => WDFM()->prefix . '_themes',
25
- 'class' => WDFM()->prefix . '_themes wd-form',
26
- 'action' => add_query_arg(array( 'page' => 'themes' . WDFM()->menu_postfix ), 'admin.php'),
27
  );
28
  echo $this->form(ob_get_clean(), $form_attr);
29
  }
@@ -43,7 +43,7 @@ class FMViewThemes_fm extends FMAdminView {
43
  $rows_data = $params['rows_data'];
44
  $page_url = add_query_arg(array(
45
  'page' => $page,
46
- WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
47
  ), admin_url('admin.php'));
48
  echo $this->title(array(
49
  'title' => $params['page_title'],
@@ -64,11 +64,11 @@ class FMViewThemes_fm extends FMAdminView {
64
  <thead>
65
  <tr>
66
  <td id="cb" class="column-cb check-column">
67
- <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFM()->prefix); ?></label>
68
  <input id="check_all" type="checkbox" />
69
  </td>
70
- <?php echo WDW_FM_Library::ordering('title', $orderby, $order, __('Title', WDFM()->prefix), $page_url, 'column-primary'); ?>
71
- <?php echo WDW_FM_Library::ordering('default', $orderby, $order, __('Default', WDFM()->prefix), $page_url, 'column-primary'); ?>
72
  </tr>
73
  </thead>
74
  <tbody>
@@ -86,20 +86,20 @@ class FMViewThemes_fm extends FMAdminView {
86
  <th class="check-column">
87
  <input id="check_<?php echo $row_data->id; ?>" name="check[<?php echo $row_data->id; ?>]" type="checkbox" />
88
  </th>
89
- <td class="column-primary" data-colname="<?php _e('Title', WDFM()->prefix); ?>">
90
  <strong>
91
  <a href="<?php echo $edit_url; ?>"><?php echo $row_data->title; ?></a>
92
  </strong>
93
  <div class="row-actions">
94
- <span><a href="<?php echo $edit_url; ?>"><?php _e('Edit', WDFM()->prefix); ?></a> |</span>
95
- <span><a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', WDFM()->prefix); ?></a> |</span>
96
- <span class="trash"><a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFM()->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', WDFM()->prefix); ?></a></span>
97
  </div>
98
  <button class="toggle-row" type="button">
99
- <span class="screen-reader-text"><?php _e('Show more details', WDFM()->prefix); ?></span>
100
  </button>
101
  </td>
102
- <td class="col_default" data-colname="<?php _e('Default', WDFM()->prefix); ?>">
103
  <?php
104
  $default = ($row_data->default) ? 1 : 0;
105
  $default_image = ($row_data->default) ? 'default' : 'notdefault';
@@ -109,7 +109,7 @@ class FMViewThemes_fm extends FMAdminView {
109
  <?php
110
  }
111
  ?>
112
- <img src="<?php echo WDFM()->plugin_url . '/images/' . $default_image . '.png?ver=' . WDFM()->plugin_version . ''; ?>" />
113
  <?php
114
  if ($default) {
115
  ?>
@@ -123,7 +123,7 @@ class FMViewThemes_fm extends FMAdminView {
123
  }
124
  }
125
  else {
126
- echo WDW_FM_Library::no_items('themes');
127
  }
128
  ?>
129
  </tbody>
@@ -140,15 +140,15 @@ class FMViewThemes_fm extends FMAdminView {
140
  ob_start();
141
  $buttons = array(
142
  'save' => array(
143
- 'title' => __('Save', WDFM()->prefix),
144
  'value' => 'save',
145
- 'onclick' => 'if (fm_check_required(\'title\', \'' . __('Title', WDFM()->prefix) . '\') || !fm_theme_submit_button(\'' . WDFM()->prefix . '_themes\', ' . $params['row']->version . ')) {return false;}; fm_set_input_value(\'task\', \'apply\');',
146
  'class' => 'button-primary',
147
  ),
148
  );
149
  echo $this->buttons($buttons);
150
  echo $this->title(array(
151
- 'title' => __('Title: ', WDFM()->prefix),
152
  'title_name' => 'title',
153
  'title_id' => 'title',
154
  'title_value' => $params['page_title'],
@@ -158,11 +158,11 @@ class FMViewThemes_fm extends FMAdminView {
158
  echo $this->edit_body($params);
159
  // Pass the content to form.
160
  $form_attr = array(
161
- 'id' => WDFM()->prefix . '_themes',
162
  'current_id' => $params['id'],
163
- 'name' => WDFM()->prefix . '_themes',
164
- 'class' => WDFM()->prefix . '_themes wd-form',
165
- 'action' => add_query_arg(array( 'page' => 'themes' . WDFM()->menu_postfix ), 'admin.php'),
166
  );
167
  echo $this->form(ob_get_clean(), $form_attr);
168
  }
@@ -173,24 +173,24 @@ class FMViewThemes_fm extends FMAdminView {
173
  * @param $params
174
  */
175
  public function edit_body( $params ) {
176
- wp_enqueue_style('fm-bootstrap');
177
- wp_enqueue_style('fm-style');
178
- wp_enqueue_style('fm-colorpicker');
179
- wp_enqueue_script('fm-colorpicker');
180
- wp_enqueue_script('fm-ng-js');
181
- wp_enqueue_script('fm-themes');
182
 
183
  $row = $params['row'];
184
  $param_values = $params['param_values'];
185
  $fonts = $params['fonts'];
186
 
187
- wp_enqueue_style('fm_googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
188
 
189
  $tabs = $params['tabs'];
190
  $all_params = $params['all_params'];
191
 
192
- $active_tab = WDW_FM_Library::get('active_tab', ($row->version == 1 ? 'custom_css' : 'global'));
193
- $pagination = WDW_FM_Library::get('pagination', 'none');
194
  ?>
195
  <div ng-app="ThemeParams" class="fm-table">
196
  <div ng-controller="FMTheme">
@@ -221,7 +221,7 @@ class FMViewThemes_fm extends FMAdminView {
221
  $show_hide_class = $active_tab == $pkey ? '' : 'fm-hide';
222
  echo '<div id="'.$pkey.'-content" class="fm-themes-container '.$show_hide_class.'">';
223
  if ($row->version == 1 && $pkey == 'custom_css') {
224
- echo '<div class="error inline"><p>' . __('This theme is outdated. Theme Options are only available in new themes provided by Form Maker. You can use Custom CSS panel to edit form styling, or alternatively select a new theme for your form.', WDFM()->prefix) . '</p></div>';
225
  }
226
  foreach($params as $param){
227
  if($param["type"] == 'panel') {
@@ -302,16 +302,16 @@ class FMViewThemes_fm extends FMAdminView {
302
  </div>
303
  <div class="fm-preview-form col-md-6 col-sm-7" style="display:none;">
304
  <div class="form-example-preview fm-sidebar col-md-12">
305
- <p><?php _e('Preview', WDFM()->prefix); ?></p>
306
  <div class="fm-row">
307
- <label><?php _e('Pagination Type: ', WDFM()->prefix); ?></label>
308
  <div class="pagination-type" ng-init="pagination='<?php echo $pagination; ?>'">
309
  <input type="radio" id="step" name="pagination-type" value="step" ng-model="pagination"/>
310
- <label for="step"><?php _e('Step', WDFM()->prefix); ?></label>
311
  <input type="radio" id="percentage" name="pagination-type" value="percentage" ng-model="pagination" />
312
- <label for="percentage"><?php _e('Percentage', WDFM()->prefix); ?></label>
313
  <input type="radio" id="none" name="pagination-type" value="none" ng-model="pagination" />
314
- <label for="none"><?php _e('None', WDFM()->prefix); ?></label>
315
  </div>
316
  </div>
317
  <div class="fm-clear"></div>
@@ -339,14 +339,14 @@ class FMViewThemes_fm extends FMAdminView {
339
  <div class="fm-form" ng-class="{borderRight : AGPBorderRight, borderLeft : AGPBorderLeft, borderBottom : AGPBorderBottom, borderTop : AGPBorderTop}">
340
  <div ng-show="HPAlign != 'bottom' && HPAlign != 'right'" ng-class="{borderRight : HPBorderRight, borderLeft : HPBorderLeft, borderBottom : HPBorderBottom, borderTop : HPBorderTop, alignLeft : HPAlign == 'left'}" class="fm-form-header">
341
  <div ng-show="HIPAlign != 'bottom' && HIPAlign != 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
342
- <img src="<?php echo WDFM()->plugin_url; ?>/images/preview_header.png" />
343
  </div>
344
  <div ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="htext">
345
- <div class="htitle"><?php _e('Subscribe to our newsletter ', WDFM()->prefix); ?></div>
346
- <div class="hdescription"><?php _e('Join our mailing list to receive the latest news from our team.', WDFM()->prefix); ?></div>
347
  </div>
348
  <div ng-show="HIPAlign == 'bottom' || HIPAlign == 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
349
- <img src="<?php echo WDFM()->plugin_url; ?>/images/preview_header.png" />
350
  </div>
351
  </div>
352
  <div class="fm-form-content" ng-class="{isBG : GPBackground != '', borderRight : GPBorderRight, borderLeft : GPBorderLeft, borderBottom : GPBorderBottom, borderTop : GPBorderTop, alignLeft : HPAlign == 'left' || HPAlign == 'right'}">
@@ -356,7 +356,7 @@ class FMViewThemes_fm extends FMAdminView {
356
  <div class="fm-column">
357
  <div class="fm-row">
358
  <div type="type_submitter_mail" class="wdform-field">
359
- <div class="wdform-label-section" style="float: left; width: 90px;"><span class="wdform-label"><?php _e('E-mail:', WDFM()->prefix); ?></span><span class="wdform-required">*</span>
360
  </div>
361
  <div class="wdform-element-section" style="width: 150px;">
362
  <input type="text" value="example@example.com" style="width: 100%;" ng-class="{borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}" />
@@ -366,11 +366,11 @@ class FMViewThemes_fm extends FMAdminView {
366
  <div class="fm-row">
367
  <div type="type_country" class="wdform-field">
368
  <div class="wdform-label-section" style="float: left; width: 90px;">
369
- <span class="wdform-label"><?php _e('Country:', WDFM()->prefix); ?></span>
370
  </div>
371
  <div class="wdform-element-section wdform_select" style=" width: 150px;">
372
  <select style="width: 100%;" ng-class="{isBG : SBPBackground != '', borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}">
373
- <option value="Armenia"><?php _e('Armenia', WDFM()->prefix); ?></option>
374
  </select>
375
  </div>
376
  </div>
@@ -379,7 +379,7 @@ class FMViewThemes_fm extends FMAdminView {
379
  <div class="fm-row">
380
  <div type="type_radio" class="wdform-field">
381
  <div class="wdform-label-section" style="float: left; width: 90px;">
382
- <span class="wdform-label"><?php _e('Radio:', WDFM()->prefix); ?></span>
383
  </div>
384
  <div class="wdform-element-section " style="display:table;">
385
  <div style="display: table-row; vertical-align:top">
@@ -387,7 +387,7 @@ class FMViewThemes_fm extends FMAdminView {
387
  <div class="radio-div check-rad">
388
  <input type="radio" id="em-rad-op-1" value="option 1" ng-hide="{{DefaultVar}}">
389
  <label for="em-rad-op-1" class="mini_label">
390
- <span ng-class="{borderRight : SCPBorderRight, borderLeft : SCPBorderLeft, borderBottom : SCPBorderBottom, borderTop : SCPBorderTop}"></span><?php _e('option 1', WDFM()->prefix); ?>
391
  </label>
392
  </div>
393
  </div>
@@ -398,14 +398,14 @@ class FMViewThemes_fm extends FMAdminView {
398
  <div class="fm-row">
399
  <div type="type_checkbox" class="wdform-field">
400
  <div class="wdform-label-section" style="float: left; width: 90px;">
401
- <span class="wdform-label"><?php _e('Checkbox:', WDFM()->prefix); ?></span>
402
  </div>
403
  <div class="wdform-element-section" style="display: table;">
404
  <div style="display: table-row; vertical-align:top">
405
  <div style="display: table-cell;">
406
  <div class="checkbox-div forlabs" ng-class="{isBG : MCCPBackground != ''}">
407
  <input type="checkbox" id="em-ch-op-1" value="option 1" ng-hide="{{DefaultVar}}">
408
- <label for="em-ch-op-1" class="mini_label"><span ng-class="{borderRight : MCPBorderRight, borderLeft : MCPBorderLeft, borderBottom : MCPBorderBottom, borderTop : MCPBorderTop}"></span><?php _e('option 1', WDFM()->prefix); ?></label>
409
  </div>
410
  </div>
411
  </div>
@@ -416,8 +416,8 @@ class FMViewThemes_fm extends FMAdminView {
416
  <div type="type_submit_reset" class="wdform-field subscribe-reset">
417
  <div class="wdform-label-section" style="display: table-cell;"></div>
418
  <div class="wdform-element-section" style="display: table-cell;">
419
- <button type="button" class="button button-large fm-button-subscribe" ng-class="{borderRight : SPBorderRight, borderLeft : SPBorderLeft, borderBottom : SPBorderBottom, borderTop : SPBorderTop, borderHoverRight : SHPBorderRight, borderHoverLeft : SHPBorderLeft, borderHoverBottom : SHPBorderBottom, borderHoverTop : SHPBorderTop}" ><?php _e('Submit', WDFM()->prefix); ?></button>
420
- <button type="button" class="button button-large fm-button-reset" ng-class="{borderRight : BPBorderRight, borderLeft : BPBorderLeft, borderBottom : BPBorderBottom, borderTop : BPBorderTop, borderHoverRight : BHPBorderRight, borderHoverLeft : BHPBorderLeft, borderHoverBottom : BHPBorderBottom, borderHoverTop : BHPBorderTop}"><?php _e('Reset', WDFM()->prefix); ?></button>
421
  </div>
422
  </div>
423
  </div>
@@ -434,13 +434,13 @@ class FMViewThemes_fm extends FMAdminView {
434
  <div style="display: table-row-group;">
435
  <div style="display: table-row;">
436
  <div class="fm-previous-page" style="display: table-cell; width: 45%;">
437
- <div class="fm-wdform-page-button" ng-class="{borderRight : PBPBorderRight, borderLeft : PBPBorderLeft, borderBottom : PBPBorderBottom, borderTop : PBPBorderTop, borderHoverRight : PBHPBorderRight, borderHoverLeft : PBHPBorderLeft, borderHoverBottom : PBHPBorderBottom, borderHoverTop : PBHPBorderTop}"><span class="dashicons dashicons-arrow-left-alt2"></span><?php _e('Previous', WDFM()->prefix); ?></div>
438
  </div>
439
  <div class="page-numbers text-center" style="display: table-cell;">
440
  <span>2/3</span>
441
  </div>
442
  <div class="fm-next-page" style="display: table-cell; width: 45%; text-align: right;">
443
- <div class="fm-wdform-page-button" ng-class="{borderRight : NBPBorderRight, borderLeft : NBPBorderLeft, borderBottom : NBPBorderBottom, borderTop : NBPBorderTop, borderHoverRight : NBHPBorderRight, borderHoverLeft : NBHPBorderLeft, borderHoverBottom : NBHPBorderBottom, borderHoverTop : NBHPBorderTop}"><?php _e('Next', WDFM()->prefix); ?><span class="dashicons dashicons-arrow-right-alt2"></span></div>
444
  </div>
445
  </div>
446
  </div>
@@ -452,14 +452,14 @@ class FMViewThemes_fm extends FMAdminView {
452
  </div>
453
  <div ng-show="HPAlign == 'bottom' || HPAlign == 'right'" ng-class="{borderRight : HPBorderRight, borderLeft : HPBorderLeft, borderBottom : HPBorderBottom, borderTop : HPBorderTop, alignLeft : HPAlign == 'right'}" class="fm-form-header">
454
  <div ng-show="HIPAlign != 'bottom' && HIPAlign != 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
455
- <img src="<?php echo WDFM()->plugin_url; ?>/images/preview_header.png" />
456
  </div>
457
  <div ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="htext">
458
- <div class="htitle"><?php _e('Subscribe to our newsletter', WDFM()->prefix); ?></div>
459
- <div class="hdescription"><?php _e('Join our mailing list to receive the latest news from our team.', WDFM()->prefix); ?></div>
460
  </div>
461
  <div ng-show="HIPAlign == 'bottom' || HIPAlign == 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
462
- <img src="<?php echo WDFM()->plugin_url; ?>/images/preview_header.png" />
463
  </div>
464
  </div>
465
  </div>
@@ -513,7 +513,7 @@ class FMViewThemes_fm extends FMAdminView {
513
  }
514
 
515
  .fm-form-content.isBG{
516
- background:url(<?php echo WDFM()->plugin_url; ?>/{{GPBackground}}) {{GPBackgroundRepeat}} {{GPBGPosition1}} {{GPBGPosition2}} !important;
517
  background-size: {{GPBGSize1}} {{GPPBGSize2}} !important;
518
  }
519
 
@@ -593,7 +593,7 @@ class FMViewThemes_fm extends FMAdminView {
593
 
594
  .fm-form-content select.isBG{
595
  background-color: {{IPBGColor}} !important;
596
- background-image: url(<?php echo WDFM()->plugin_url; ?>/{{SBPBackground}}) !important;
597
  background-repeat: {{SBPBGRepeat}} !important;
598
  }
599
 
@@ -880,7 +880,7 @@ class FMViewThemes_fm extends FMAdminView {
880
  }
881
 
882
  .checkbox-div.isBG input[type='checkbox']:checked + label span:after{
883
- background:{{MCCPBGColor}} url(<?php echo WDFM()->plugin_url; ?>/{{MCCPBackground}}) {{MCCPBGRepeat}} {{MCCPBGPos1}} {{MCCPBGPos2}} !important;
884
  }
885
 
886
  .checkbox-div label span.borderRight {
4
  * FMViewThemes_fm constructor.
5
  */
6
  public function __construct() {
7
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
8
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-first');
9
  wp_enqueue_script('jquery');
10
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
11
  }
12
 
13
  /**
20
  echo $this->body($params);
21
  // Pass the content to form.
22
  $form_attr = array(
23
+ 'id' => WDFMInstance(self::PLUGIN)->prefix . '_themes',
24
+ 'name' => WDFMInstance(self::PLUGIN)->prefix . '_themes',
25
+ 'class' => WDFMInstance(self::PLUGIN)->prefix . '_themes wd-form',
26
+ 'action' => add_query_arg(array( 'page' => 'themes' . WDFMInstance(self::PLUGIN)->menu_postfix ), 'admin.php'),
27
  );
28
  echo $this->form(ob_get_clean(), $form_attr);
29
  }
43
  $rows_data = $params['rows_data'];
44
  $page_url = add_query_arg(array(
45
  'page' => $page,
46
+ WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce),
47
  ), admin_url('admin.php'));
48
  echo $this->title(array(
49
  'title' => $params['page_title'],
64
  <thead>
65
  <tr>
66
  <td id="cb" class="column-cb check-column">
67
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix); ?></label>
68
  <input id="check_all" type="checkbox" />
69
  </td>
70
+ <?php echo WDW_FM_Library(self::PLUGIN)->ordering('title', $orderby, $order, __('Title', WDFMInstance(self::PLUGIN)->prefix), $page_url, 'column-primary'); ?>
71
+ <?php echo WDW_FM_Library(self::PLUGIN)->ordering('default', $orderby, $order, __('Default', WDFMInstance(self::PLUGIN)->prefix), $page_url, 'column-primary'); ?>
72
  </tr>
73
  </thead>
74
  <tbody>
86
  <th class="check-column">
87
  <input id="check_<?php echo $row_data->id; ?>" name="check[<?php echo $row_data->id; ?>]" type="checkbox" />
88
  </th>
89
+ <td class="column-primary" data-colname="<?php _e('Title', WDFMInstance(self::PLUGIN)->prefix); ?>">
90
  <strong>
91
  <a href="<?php echo $edit_url; ?>"><?php echo $row_data->title; ?></a>
92
  </strong>
93
  <div class="row-actions">
94
+ <span><a href="<?php echo $edit_url; ?>"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
95
+ <span><a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
96
+ <span class="trash"><a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFMInstance(self::PLUGIN)->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
97
  </div>
98
  <button class="toggle-row" type="button">
99
+ <span class="screen-reader-text"><?php _e('Show more details', WDFMInstance(self::PLUGIN)->prefix); ?></span>
100
  </button>
101
  </td>
102
+ <td class="col_default" data-colname="<?php _e('Default', WDFMInstance(self::PLUGIN)->prefix); ?>">
103
  <?php
104
  $default = ($row_data->default) ? 1 : 0;
105
  $default_image = ($row_data->default) ? 'default' : 'notdefault';
109
  <?php
110
  }
111
  ?>
112
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/' . $default_image . '.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . ''; ?>" />
113
  <?php
114
  if ($default) {
115
  ?>
123
  }
124
  }
125
  else {
126
+ echo WDW_FM_Library(self::PLUGIN)->no_items('themes');
127
  }
128
  ?>
129
  </tbody>
140
  ob_start();
141
  $buttons = array(
142
  'save' => array(
143
+ 'title' => __('Save', WDFMInstance(self::PLUGIN)->prefix),
144
  'value' => 'save',
145
+ 'onclick' => 'if (fm_check_required(\'title\', \'' . __('Title', WDFMInstance(self::PLUGIN)->prefix) . '\') || !fm_theme_submit_button(\'' . WDFMInstance(self::PLUGIN)->prefix . '_themes\', ' . $params['row']->version . ')) {return false;}; fm_set_input_value(\'task\', \'apply\');',
146
  'class' => 'button-primary',
147
  ),
148
  );
149
  echo $this->buttons($buttons);
150
  echo $this->title(array(
151
+ 'title' => __('Title: ', WDFMInstance(self::PLUGIN)->prefix),
152
  'title_name' => 'title',
153
  'title_id' => 'title',
154
  'title_value' => $params['page_title'],
158
  echo $this->edit_body($params);
159
  // Pass the content to form.
160
  $form_attr = array(
161
+ 'id' => WDFMInstance(self::PLUGIN)->prefix . '_themes',
162
  'current_id' => $params['id'],
163
+ 'name' => WDFMInstance(self::PLUGIN)->prefix . '_themes',
164
+ 'class' => WDFMInstance(self::PLUGIN)->prefix . '_themes wd-form',
165
+ 'action' => add_query_arg(array( 'page' => 'themes' . WDFMInstance(self::PLUGIN)->menu_postfix ), 'admin.php'),
166
  );
167
  echo $this->form(ob_get_clean(), $form_attr);
168
  }
173
  * @param $params
174
  */
175
  public function edit_body( $params ) {
176
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-bootstrap');
177
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
178
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
179
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
180
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-ng-js');
181
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-themes');
182
 
183
  $row = $params['row'];
184
  $param_values = $params['param_values'];
185
  $fonts = $params['fonts'];
186
 
187
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
188
 
189
  $tabs = $params['tabs'];
190
  $all_params = $params['all_params'];
191
 
192
+ $active_tab = WDW_FM_Library(self::PLUGIN)->get('active_tab', ($row->version == 1 ? 'custom_css' : 'global'));
193
+ $pagination = WDW_FM_Library(self::PLUGIN)->get('pagination', 'none');
194
  ?>
195
  <div ng-app="ThemeParams" class="fm-table">
196
  <div ng-controller="FMTheme">
221
  $show_hide_class = $active_tab == $pkey ? '' : 'fm-hide';
222
  echo '<div id="'.$pkey.'-content" class="fm-themes-container '.$show_hide_class.'">';
223
  if ($row->version == 1 && $pkey == 'custom_css') {
224
+ echo '<div class="error inline"><p>' . __('This theme is outdated. Theme Options are only available in new themes provided by Form Maker. You can use Custom CSS panel to edit form styling, or alternatively select a new theme for your form.', WDFMInstance(self::PLUGIN)->prefix) . '</p></div>';
225
  }
226
  foreach($params as $param){
227
  if($param["type"] == 'panel') {
302
  </div>
303
  <div class="fm-preview-form col-md-6 col-sm-7" style="display:none;">
304
  <div class="form-example-preview fm-sidebar col-md-12">
305
+ <p><?php _e('Preview', WDFMInstance(self::PLUGIN)->prefix); ?></p>
306
  <div class="fm-row">
307
+ <label><?php _e('Pagination Type: ', WDFMInstance(self::PLUGIN)->prefix); ?></label>
308
  <div class="pagination-type" ng-init="pagination='<?php echo $pagination; ?>'">
309
  <input type="radio" id="step" name="pagination-type" value="step" ng-model="pagination"/>
310
+ <label for="step"><?php _e('Step', WDFMInstance(self::PLUGIN)->prefix); ?></label>
311
  <input type="radio" id="percentage" name="pagination-type" value="percentage" ng-model="pagination" />
312
+ <label for="percentage"><?php _e('Percentage', WDFMInstance(self::PLUGIN)->prefix); ?></label>
313
  <input type="radio" id="none" name="pagination-type" value="none" ng-model="pagination" />
314
+ <label for="none"><?php _e('None', WDFMInstance(self::PLUGIN)->prefix); ?></label>
315
  </div>
316
  </div>
317
  <div class="fm-clear"></div>
339
  <div class="fm-form" ng-class="{borderRight : AGPBorderRight, borderLeft : AGPBorderLeft, borderBottom : AGPBorderBottom, borderTop : AGPBorderTop}">
340
  <div ng-show="HPAlign != 'bottom' && HPAlign != 'right'" ng-class="{borderRight : HPBorderRight, borderLeft : HPBorderLeft, borderBottom : HPBorderBottom, borderTop : HPBorderTop, alignLeft : HPAlign == 'left'}" class="fm-form-header">
341
  <div ng-show="HIPAlign != 'bottom' && HIPAlign != 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
342
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/images/preview_header.png" />
343
  </div>
344
  <div ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="htext">
345
+ <div class="htitle"><?php _e('Subscribe to our newsletter ', WDFMInstance(self::PLUGIN)->prefix); ?></div>
346
+ <div class="hdescription"><?php _e('Join our mailing list to receive the latest news from our team.', WDFMInstance(self::PLUGIN)->prefix); ?></div>
347
  </div>
348
  <div ng-show="HIPAlign == 'bottom' || HIPAlign == 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
349
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/images/preview_header.png" />
350
  </div>
351
  </div>
352
  <div class="fm-form-content" ng-class="{isBG : GPBackground != '', borderRight : GPBorderRight, borderLeft : GPBorderLeft, borderBottom : GPBorderBottom, borderTop : GPBorderTop, alignLeft : HPAlign == 'left' || HPAlign == 'right'}">
356
  <div class="fm-column">
357
  <div class="fm-row">
358
  <div type="type_submitter_mail" class="wdform-field">
359
+ <div class="wdform-label-section" style="float: left; width: 90px;"><span class="wdform-label"><?php _e('E-mail:', WDFMInstance(self::PLUGIN)->prefix); ?></span><span class="wdform-required">*</span>
360
  </div>
361
  <div class="wdform-element-section" style="width: 150px;">
362
  <input type="text" value="example@example.com" style="width: 100%;" ng-class="{borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}" />
366
  <div class="fm-row">
367
  <div type="type_country" class="wdform-field">
368
  <div class="wdform-label-section" style="float: left; width: 90px;">
369
+ <span class="wdform-label"><?php _e('Country:', WDFMInstance(self::PLUGIN)->prefix); ?></span>
370
  </div>
371
  <div class="wdform-element-section wdform_select" style=" width: 150px;">
372
  <select style="width: 100%;" ng-class="{isBG : SBPBackground != '', borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}">
373
+ <option value="Armenia"><?php _e('Armenia', WDFMInstance(self::PLUGIN)->prefix); ?></option>
374
  </select>
375
  </div>
376
  </div>
379
  <div class="fm-row">
380
  <div type="type_radio" class="wdform-field">
381
  <div class="wdform-label-section" style="float: left; width: 90px;">
382
+ <span class="wdform-label"><?php _e('Radio:', WDFMInstance(self::PLUGIN)->prefix); ?></span>
383
  </div>
384
  <div class="wdform-element-section " style="display:table;">
385
  <div style="display: table-row; vertical-align:top">
387
  <div class="radio-div check-rad">
388
  <input type="radio" id="em-rad-op-1" value="option 1" ng-hide="{{DefaultVar}}">
389
  <label for="em-rad-op-1" class="mini_label">
390
+ <span ng-class="{borderRight : SCPBorderRight, borderLeft : SCPBorderLeft, borderBottom : SCPBorderBottom, borderTop : SCPBorderTop}"></span><?php _e('option 1', WDFMInstance(self::PLUGIN)->prefix); ?>
391
  </label>
392
  </div>
393
  </div>
398
  <div class="fm-row">
399
  <div type="type_checkbox" class="wdform-field">
400
  <div class="wdform-label-section" style="float: left; width: 90px;">
401
+ <span class="wdform-label"><?php _e('Checkbox:', WDFMInstance(self::PLUGIN)->prefix); ?></span>
402
  </div>
403
  <div class="wdform-element-section" style="display: table;">
404
  <div style="display: table-row; vertical-align:top">
405
  <div style="display: table-cell;">
406
  <div class="checkbox-div forlabs" ng-class="{isBG : MCCPBackground != ''}">
407
  <input type="checkbox" id="em-ch-op-1" value="option 1" ng-hide="{{DefaultVar}}">
408
+ <label for="em-ch-op-1" class="mini_label"><span ng-class="{borderRight : MCPBorderRight, borderLeft : MCPBorderLeft, borderBottom : MCPBorderBottom, borderTop : MCPBorderTop}"></span><?php _e('option 1', WDFMInstance(self::PLUGIN)->prefix); ?></label>
409
  </div>
410
  </div>
411
  </div>
416
  <div type="type_submit_reset" class="wdform-field subscribe-reset">
417
  <div class="wdform-label-section" style="display: table-cell;"></div>
418
  <div class="wdform-element-section" style="display: table-cell;">
419
+ <button type="button" class="button button-large fm-button-subscribe" ng-class="{borderRight : SPBorderRight, borderLeft : SPBorderLeft, borderBottom : SPBorderBottom, borderTop : SPBorderTop, borderHoverRight : SHPBorderRight, borderHoverLeft : SHPBorderLeft, borderHoverBottom : SHPBorderBottom, borderHoverTop : SHPBorderTop}" ><?php _e('Submit', WDFMInstance(self::PLUGIN)->prefix); ?></button>
420
+ <button type="button" class="button button-large fm-button-reset" ng-class="{borderRight : BPBorderRight, borderLeft : BPBorderLeft, borderBottom : BPBorderBottom, borderTop : BPBorderTop, borderHoverRight : BHPBorderRight, borderHoverLeft : BHPBorderLeft, borderHoverBottom : BHPBorderBottom, borderHoverTop : BHPBorderTop}"><?php _e('Reset', WDFMInstance(self::PLUGIN)->prefix); ?></button>
421
  </div>
422
  </div>
423
  </div>
434
  <div style="display: table-row-group;">
435
  <div style="display: table-row;">
436
  <div class="fm-previous-page" style="display: table-cell; width: 45%;">
437
+ <div class="fm-wdform-page-button" ng-class="{borderRight : PBPBorderRight, borderLeft : PBPBorderLeft, borderBottom : PBPBorderBottom, borderTop : PBPBorderTop, borderHoverRight : PBHPBorderRight, borderHoverLeft : PBHPBorderLeft, borderHoverBottom : PBHPBorderBottom, borderHoverTop : PBHPBorderTop}"><span class="dashicons dashicons-arrow-left-alt2"></span><?php _e('Previous', WDFMInstance(self::PLUGIN)->prefix); ?></div>
438
  </div>
439
  <div class="page-numbers text-center" style="display: table-cell;">
440
  <span>2/3</span>
441
  </div>
442
  <div class="fm-next-page" style="display: table-cell; width: 45%; text-align: right;">
443
+ <div class="fm-wdform-page-button" ng-class="{borderRight : NBPBorderRight, borderLeft : NBPBorderLeft, borderBottom : NBPBorderBottom, borderTop : NBPBorderTop, borderHoverRight : NBHPBorderRight, borderHoverLeft : NBHPBorderLeft, borderHoverBottom : NBHPBorderBottom, borderHoverTop : NBHPBorderTop}"><?php _e('Next', WDFMInstance(self::PLUGIN)->prefix); ?><span class="dashicons dashicons-arrow-right-alt2"></span></div>
444
  </div>
445
  </div>
446
  </div>
452
  </div>
453
  <div ng-show="HPAlign == 'bottom' || HPAlign == 'right'" ng-class="{borderRight : HPBorderRight, borderLeft : HPBorderLeft, borderBottom : HPBorderBottom, borderTop : HPBorderTop, alignLeft : HPAlign == 'right'}" class="fm-form-header">
454
  <div ng-show="HIPAlign != 'bottom' && HIPAlign != 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
455
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/images/preview_header.png" />
456
  </div>
457
  <div ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="htext">
458
+ <div class="htitle"><?php _e('Subscribe to our newsletter', WDFMInstance(self::PLUGIN)->prefix); ?></div>
459
+ <div class="hdescription"><?php _e('Join our mailing list to receive the latest news from our team.', WDFMInstance(self::PLUGIN)->prefix); ?></div>
460
  </div>
461
  <div ng-show="HIPAlign == 'bottom' || HIPAlign == 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
462
+ <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/images/preview_header.png" />
463
  </div>
464
  </div>
465
  </div>
513
  }
514
 
515
  .fm-form-content.isBG{
516
+ background:url(<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/{{GPBackground}}) {{GPBackgroundRepeat}} {{GPBGPosition1}} {{GPBGPosition2}} !important;
517
  background-size: {{GPBGSize1}} {{GPPBGSize2}} !important;
518
  }
519
 
593
 
594
  .fm-form-content select.isBG{
595
  background-color: {{IPBGColor}} !important;
596
+ background-image: url(<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/{{SBPBackground}}) !important;
597
  background-repeat: {{SBPBGRepeat}} !important;
598
  }
599
 
880
  }
881
 
882
  .checkbox-div.isBG input[type='checkbox']:checked + label span:after{
883
+ background:{{MCCPBGColor}} url(<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>/{{MCCPBackground}}) {{MCCPBGRepeat}} {{MCCPBGPos1}} {{MCCPBGPos2}} !important;
884
  }
885
 
886
  .checkbox-div label span.borderRight {
admin/views/Uninstall_fm.php CHANGED
@@ -1,15 +1,15 @@
1
  <?php
2
 
3
- class FMViewUninstall_fm {
4
  /**
5
  * FMViewUninstall_fm constructor.
6
  */
7
  public function __construct() {
8
- wp_enqueue_style('fm-tables');
9
- wp_enqueue_script('fm-admin');
10
- if (WDFM()->is_free) {
11
- wp_enqueue_style('fm-deactivate-css');
12
- wp_enqueue_script('fm-deactivate-popup');
13
  }
14
  }
15
 
@@ -18,13 +18,13 @@ class FMViewUninstall_fm {
18
  $prefix = $wpdb->prefix;
19
  $addons = $params['addons'];
20
  ?>
21
- <form method="post" action="admin.php?page=uninstall<?php echo WDFM()->menu_postfix; ?>" style="width:95%;">
22
- <?php wp_nonce_field(WDFM()->nonce, WDFM()->nonce); ?>
23
  <div class="wrap">
24
  <div class="uninstall-banner">
25
  <div class="uninstall_icon">
26
  </div>
27
- <div class="fm-logo-title">Uninstall Form Maker</div>
28
  </div>
29
  <br />
30
  <div class="goodbye-text">
@@ -34,10 +34,10 @@ class FMViewUninstall_fm {
34
  <a href="https://web-dorado.com/support/contact-us.html" target='_blank'>Contact us</a> and tell what you didn't like for our plugins further improvement and development. Thank you !!!
35
  </div>
36
  <div class="goodbye-text" style="color: red;">
37
- Note, that uninstalling Form Maker will remove all forms, submissions and other data on the plugin.<br />Please make sure you don't have any important information before you proceed.
38
  </div>
39
  <p>
40
- Deactivating Form Maker plugin does not remove any data that may have been created, such as the Forms and the Submissions. To completely remove this plugin, you can uninstall it here.
41
  </p>
42
  <p style="color: red;">
43
  <strong>WARNING:</strong>
@@ -84,13 +84,13 @@ class FMViewUninstall_fm {
84
  </tr>
85
  </table>
86
  <p style="text-align: center;">
87
- Do you really want to uninstall Form Maker?
88
  </p>
89
  <p style="text-align: center;">
90
  <input type="checkbox" name="Form Maker" id="check_yes" value="yes" />&nbsp;<label for="check_yes">Yes</label>
91
  </p>
92
  <p style="text-align: center;">
93
- <input type="submit" value="UNINSTALL" class="button-primary" onclick="if (check_yes.checked) { if (confirm('You are About to Uninstall Form Maker from WordPress.\nThis Action Is Not Reversible.')) { fm_set_input_value('task', 'uninstall'); } else { return false; } } else { return false; }" />
94
  </p>
95
  </div>
96
  <input id="task" name="task" type="hidden" value="" />
@@ -103,9 +103,9 @@ class FMViewUninstall_fm {
103
  $addons = $params['addons']; //array
104
  $deactivate_url = add_query_arg(array(
105
  'action' => 'deactivate',
106
- 'plugin' => WDFM()->main_file,
107
  ), admin_url('plugins.php'));
108
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WDFM()->main_file);
109
  ?>
110
  <div id="message" class="updated fade">
111
  <p>The following Database Tables successfully deleted:</p>
@@ -135,7 +135,7 @@ class FMViewUninstall_fm {
135
  ?>
136
  </div>
137
  <div class="wrap">
138
- <h2>Uninstall Form Maker</h2>
139
  <p>
140
  <strong><a href="<?php echo $deactivate_url; ?>" class="fm_deactivate_link" data-uninstall="1">Click Here</a> To Finish the Uninstallation and Form Maker
141
  will be Deactivated Automatically.</strong></p>
1
  <?php
2
 
3
+ class FMViewUninstall_fm extends FMAdminView {
4
  /**
5
  * FMViewUninstall_fm constructor.
6
  */
7
  public function __construct() {
8
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
9
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
10
+ if (WDFMInstance(self::PLUGIN)->is_free) {
11
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-deactivate-css');
12
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-deactivate-popup');
13
  }
14
  }
15
 
18
  $prefix = $wpdb->prefix;
19
  $addons = $params['addons'];
20
  ?>
21
+ <form method="post" action="admin.php?page=uninstall<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>" style="width:95%;">
22
+ <?php wp_nonce_field(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce); ?>
23
  <div class="wrap">
24
  <div class="uninstall-banner">
25
  <div class="uninstall_icon">
26
  </div>
27
+ <div class="fm-logo-title">Uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?></div>
28
  </div>
29
  <br />
30
  <div class="goodbye-text">
34
  <a href="https://web-dorado.com/support/contact-us.html" target='_blank'>Contact us</a> and tell what you didn't like for our plugins further improvement and development. Thank you !!!
35
  </div>
36
  <div class="goodbye-text" style="color: red;">
37
+ Note, that uninstalling <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> will remove all forms, submissions and other data on the plugin.<br />Please make sure you don't have any important information before you proceed.
38
  </div>
39
  <p>
40
+ Deactivating <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> plugin does not remove any data that may have been created, such as the Forms and the Submissions. To completely remove this plugin, you can uninstall it here.
41
  </p>
42
  <p style="color: red;">
43
  <strong>WARNING:</strong>
84
  </tr>
85
  </table>
86
  <p style="text-align: center;">
87
+ Do you really want to uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?>?
88
  </p>
89
  <p style="text-align: center;">
90
  <input type="checkbox" name="Form Maker" id="check_yes" value="yes" />&nbsp;<label for="check_yes">Yes</label>
91
  </p>
92
  <p style="text-align: center;">
93
+ <input type="submit" value="UNINSTALL" class="button-primary" onclick="if (check_yes.checked) { if (confirm('You are About to Uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> from WordPress.\nThis Action Is Not Reversible.')) { fm_set_input_value('task', 'uninstall'); } else { return false; } } else { return false; }" />
94
  </p>
95
  </div>
96
  <input id="task" name="task" type="hidden" value="" />
103
  $addons = $params['addons']; //array
104
  $deactivate_url = add_query_arg(array(
105
  'action' => 'deactivate',
106
+ 'plugin' => WDFMInstance(self::PLUGIN)->main_file,
107
  ), admin_url('plugins.php'));
108
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WDFMInstance(self::PLUGIN)->main_file);
109
  ?>
110
  <div id="message" class="updated fade">
111
  <p>The following Database Tables successfully deleted:</p>
135
  ?>
136
  </div>
137
  <div class="wrap">
138
+ <h2>Uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?></h2>
139
  <p>
140
  <strong><a href="<?php echo $deactivate_url; ?>" class="fm_deactivate_link" data-uninstall="1">Click Here</a> To Finish the Uninstallation and Form Maker
141
  will be Deactivated Automatically.</strong></p>
admin/views/view.php CHANGED
@@ -5,6 +5,10 @@ defined('ABSPATH') || die('Access Denied');
5
  * Admin view class.
6
  */
7
  class FMAdminView {
 
 
 
 
8
 
9
  private $premium_link = 'https://web-dorado.com/files/fromFormMaker.php';
10
 
@@ -22,18 +26,18 @@ class FMAdminView {
22
  // Form.
23
  $action = isset($attr['action']) ? esc_attr($attr['action']) : '';
24
  $method = isset($attr['method']) ? esc_attr($attr['method']) : 'post';
25
- $name = isset($attr['name']) ? esc_attr($attr['name']) : WDFM()->prefix . '_form';
26
  $id = isset($attr['id']) ? esc_attr($attr['id']) : '';
27
- $class = isset($attr['class']) ? esc_attr($attr['class']) : WDFM()->prefix . '_form';
28
  $style = isset($attr['style']) ? esc_attr($attr['style']) : '';
29
  $current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
30
  ?>
31
- <div class="wrap">
32
  <?php
33
  // Generate message container by message id or directly by message.
34
- $message_id = WDW_FM_Library::get('message', 0);
35
- $message = WDW_FM_Library::get('msg', '');
36
- echo WDW_FM_Library::message_id($message_id, $message);
37
  ?>
38
  <form
39
  <?php echo $action ? 'action="' . $action . '"' : ''; ?>
@@ -45,7 +49,7 @@ class FMAdminView {
45
  ><?php
46
  echo $content;
47
  // Add nonce to form.
48
- wp_nonce_field(WDFM()->nonce, WDFM()->nonce);
49
  ?>
50
  <input id="task" name="task" type="hidden" value=""/>
51
  <input id="current_id" name="current_id" type="hidden" value="<?php echo $current_id; ?>"/>
@@ -89,7 +93,7 @@ class FMAdminView {
89
  if ( $add_new_button ) {
90
  ?>
91
  <a class="page-title-action" <?php echo $attributes; ?>>
92
- <?php _e('Add New', WDFM()->prefix); ?>
93
  </a>
94
  <?php
95
  }
@@ -153,12 +157,12 @@ class FMAdminView {
153
  * @return string
154
  */
155
  protected function search() {
156
- $search = WDW_FM_Library::get('s', '');
157
  ob_start();
158
  ?>
159
  <p class="search-box">
160
  <input name="s" value="<?php echo $search; ?>" type="search" onkeypress="return input_search(event, this)" />
161
- <input class="button" value="<?php _e('Search', WDFM()->prefix); ?>" type="button" onclick="search(this)" />
162
  </p>
163
  <?php
164
 
@@ -175,10 +179,10 @@ class FMAdminView {
175
  * @return string
176
  */
177
  protected function pagination($page_url, $total, $items_per_page = 20) {
178
- $page_number = WDW_FM_Library::get('paged', 1);
179
- $search = WDW_FM_Library::get('s', '');
180
- $orderby = WDW_FM_Library::get('orderby', '');
181
- $order = WDW_FM_Library::get('order', '');
182
  $url_arg = array();
183
  if( !empty($search) ) {
184
  $url_arg['s'] = $search;
@@ -206,7 +210,7 @@ class FMAdminView {
206
  ?>
207
  <div class="tablenav-pages">
208
  <span class="displaying-num">
209
- <?php printf(_n('%s item', '%s items', $total, WDFM()->prefix), $total); ?>
210
  </span>
211
  <?php
212
  if ( $total > $items_per_page ) {
@@ -221,16 +225,16 @@ class FMAdminView {
221
  }
222
  else {
223
  ?>
224
- <a href="<?php echo add_query_arg(array('paged' => 1), $page_url); ?>" class="first-page"><span class="screen-reader-text"><?php _e('First page', WDFM()->prefix); ?></span><span aria-hidden="true">«</span></a>
225
- <a href="<?php echo add_query_arg(array('paged' => ($page_number == 1 ? 1 : ($page_number - 1))), $page_url); ?>" class="previous-page"><span class="screen-reader-text"><?php _e('Previous page', WDFM()->prefix); ?></span><span aria-hidden="true">‹</span></a>
226
  <?php
227
  }
228
  ?>
229
  <span class="paging-input">
230
- <label for="current-page-selector" class="screen-reader-text"><?php _e('Current Page', WDFM()->prefix); ?></label>
231
  <input type="text" class="current-page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return input_pagination(event, this)" size="1" />
232
  <span class="tablenav-paging-text">
233
- <?php _e('of', WDFM()->prefix); ?>
234
  <span class="total-pages"><?php echo $pages_count; ?></span>
235
  </span>
236
  </span>
@@ -243,8 +247,8 @@ class FMAdminView {
243
  }
244
  else {
245
  ?>
246
- <a href="<?php echo add_query_arg(array('paged' => ($page_number >= $pages_count ? $pages_count : ($page_number + 1))), $page_url); ?>" class="next-page"><span class="screen-reader-text"><?php _e('Next page', WDFM()->prefix); ?></span><span aria-hidden="true">›</span></a>
247
- <a href="<?php echo add_query_arg(array('paged' => $pages_count), $page_url); ?>" class="last-page"><span class="screen-reader-text"><?php _e('Last page', WDFM()->prefix); ?></span><span aria-hidden="true">»</span></a>
248
  <?php
249
  }
250
  ?>
@@ -262,9 +266,9 @@ class FMAdminView {
262
  ob_start();
263
  ?>
264
  <div class="alignleft actions bulkactions">
265
- <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e('Select bulk action', WDFM()->prefix); ?></label>
266
  <select name="bulk_action" id="bulk-action-selector-top">
267
- <option value="-1"><?php _e('Bulk Actions', WDFM()->prefix); ?></option>
268
  <?php
269
  foreach ( $actions as $key => $action ) {
270
  ?>
@@ -273,7 +277,7 @@ class FMAdminView {
273
  }
274
  ?>
275
  </select>
276
- <input type="button" id="doaction" class="button action" onclick="wd_bulk_action(this)" value="<?php _e('Apply', WDFM()->prefix); ?>" />
277
  </div>
278
  <?php
279
 
@@ -281,7 +285,7 @@ class FMAdminView {
281
  }
282
 
283
  function import_popup_div() {
284
- if (WDFM()->is_free != 2) {
285
  do_action('fm_popup_import_content');
286
  }
287
  }
@@ -293,7 +297,7 @@ class FMAdminView {
293
  */
294
  protected function topbar() {
295
  $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
296
- $page = str_replace(WDFM()->menu_postfix, '', $page);
297
  $task = isset($_REQUEST['task']) ? esc_html($_REQUEST['task']) : '';
298
  $user_guide_link = 'https://web-dorado.com/wordpress-form-maker/';
299
  $show_content = true;
@@ -358,11 +362,11 @@ class FMAdminView {
358
  return '';
359
  }
360
  }
361
- $show_content = $show_content && WDFM()->is_free;
362
- $support_forum_link = 'https://wordpress.org/support/plugin/form-maker';
363
  $premium_link = $this->premium_link;
364
- wp_enqueue_style('fm-roboto');
365
- wp_enqueue_style('fm-pricing');
366
  ob_start();
367
  ?>
368
  <div class="wrap">
@@ -374,14 +378,14 @@ class FMAdminView {
374
  <div class="fm-topbar fm-topbar-content">
375
  <div class="fm-topbar-content-container">
376
  <div class="fm-topbar-content-title">
377
- <?php _e('Form Maker Premium', WDFM()->prefix); ?>
378
  </div>
379
  <div class="fm-topbar-content-body">
380
- <?php _e('Add unlimited fields, create multi-page forms with fully customizable themes and much more.', WDFM()->prefix); ?>
381
  </div>
382
  </div>
383
  <div class="fm-topbar-content-button-container">
384
- <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-topbar-upgrade-button"><?php _e( 'Upgrade', WDFM()->prefix ); ?></a>
385
  </div>
386
  </div>
387
  <?php
@@ -392,19 +396,19 @@ class FMAdminView {
392
  <?php if ( $show_guide_link ) { ?>
393
  <a href="<?php echo $user_guide_link; ?>" target="_blank">
394
  <div class="fm-topbar-links-item">
395
- <?php _e('User guide', WDFM()->prefix); ?>
396
  </div>
397
  </a>
398
  <?php
399
  }
400
- if (WDFM()->is_free) {
401
  if ( $show_guide_link ) {
402
  ?>
403
  <span class="fm-topbar-separator"></span>
404
  <?php } ?>
405
  <a href="<?php echo $support_forum_link; ?>" target="_blank">
406
  <div class="fm-topbar-links-item">
407
- <?php _e('Support Forum', WDFM()->prefix); ?>
408
  </div>
409
  </a>
410
  <?php
@@ -416,33 +420,33 @@ class FMAdminView {
416
  <?php if ( $show_head ) {
417
  $menus = array(
418
  'manage' => array(
419
- 'href' => add_query_arg( array('page' => 'manage' . WDFM()->menu_postfix ), admin_url('admin.php')),
420
- 'name' => __('Forms', WDFM()->prefix)
421
  ),
422
  'addons' => array(
423
- 'href' => add_query_arg( array('page' => 'addons' . WDFM()->menu_postfix ), admin_url('admin.php')),
424
- 'name' => __('Add-ons', WDFM()->prefix)
425
  ),
426
  'pricing' => array(
427
- 'href' => add_query_arg( array('page' => 'pricing' . WDFM()->menu_postfix ), admin_url('admin.php')),
428
- 'name' => __('Premium Version', WDFM()->prefix) .' <span class="fm-upgrade">' . __('Upgrade', WDFM()->prefix) . '</span>'
429
  ),
430
  );
431
  ?>
432
  <style>#wpbody-content>div:not(.wrap), .wrap .notice:not(#wd_bp_notice_cont) { display: none; }</style>
433
  <div class="fm-head">
434
- <div><img src="<?php echo WDFM()->plugin_url . '/images/FormMaker.png'; ?>"></div>
435
  <ul class="fm-breadcrumbs">
436
  <?php
437
  foreach ( $menus as $key => $item ) {
438
- if ( !WDFM()->is_free && $key == 'pricing' ) {
439
  continue;
440
  }
441
- ?>
442
- <li class="fm-breadcrumb-item">
443
- <a class="fm-breadcrumb-item-link<?php echo ( $key == $page ) ? ' fm-breadcrumb-item-link-active' : ''; ?>" href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a>
444
- </li>
445
- <?php
446
  }
447
  ?>
448
  </ul>
@@ -465,7 +469,7 @@ class FMAdminView {
465
  $premium_link = $this->premium_link;
466
  }
467
  if ('' == $premium_link_text) {
468
- $premium_link_text = __( 'Upgrade', WDFM()->prefix );
469
  $upgrade = true;
470
  }
471
  ob_start();
@@ -500,7 +504,7 @@ class FMAdminView {
500
  <?php echo $message; ?>
501
  </div>
502
  <div class="fm-free-message-button-container">
503
- <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button"><?php _e( 'Upgrade', WDFM()->prefix ); ?></a>
504
  </div>
505
  <div class="fm-free-message-body fm-free-message-huge">
506
  &
@@ -509,7 +513,7 @@ class FMAdminView {
509
  <?php echo $addon_message; ?>
510
  </div>
511
  <div class="fm-free-message-button-container">
512
- <a href="<?php echo $addon_link; ?>" target="_blank" class="fm-free-message-upgrade-button fm-free-message-promo-button"><?php _e( 'Buy', WDFM()->prefix ); ?></a>
513
  </div>
514
  </div>
515
  <?php
@@ -530,24 +534,24 @@ class FMAdminView {
530
  <div class="fm-limitation-alert">
531
  <span class="dashicons dashicons-no-alt"></span>
532
  <div class="fm-limitation-alert-header">
533
- <?php _e('The free version is limited up to 7 fields.', WDFM()->prefix); ?>
534
  </div>
535
  <div class="fm-limitation-alert-header">
536
- <?php _e('Upgrade to Premium version to add unlimited fields.', WDFM()->prefix); ?>
537
  </div>
538
  <div class="fm-limitation-alert-body">
539
  <div class="fm-limitation-alert-header">
540
- <?php _e('Premium Plan also includes:', WDFM()->prefix); ?>
541
  </div>
542
  <ul>
543
- <li><?php _e('Payment integration fields', WDFM()->prefix); ?></li>
544
- <li><?php _e('File upload field', WDFM()->prefix); ?></li>
545
- <li><?php _e('Google Maps API Integration', WDFM()->prefix); ?></li>
546
- <li><?php _e('Front-end Submissions', WDFM()->prefix); ?></li>
547
  </ul>
548
  </div>
549
  <div class="fm-free-message-button-container">
550
- <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button"><?php _e( 'Upgrade', WDFM()->prefix ); ?></a>
551
  </div>
552
  </div>
553
  </div>
5
  * Admin view class.
6
  */
7
  class FMAdminView {
8
+ /**
9
+ * PLUGIN = 2 points to Contact Form Maker
10
+ */
11
+ const PLUGIN = 1;
12
 
13
  private $premium_link = 'https://web-dorado.com/files/fromFormMaker.php';
14
 
26
  // Form.
27
  $action = isset($attr['action']) ? esc_attr($attr['action']) : '';
28
  $method = isset($attr['method']) ? esc_attr($attr['method']) : 'post';
29
+ $name = isset($attr['name']) ? esc_attr($attr['name']) : WDFMInstance(self::PLUGIN)->prefix . '_form';
30
  $id = isset($attr['id']) ? esc_attr($attr['id']) : '';
31
+ $class = isset($attr['class']) ? esc_attr($attr['class']) : WDFMInstance(self::PLUGIN)->prefix . '_form';
32
  $style = isset($attr['style']) ? esc_attr($attr['style']) : '';
33
  $current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
34
  ?>
35
+ <div id="fm-form-admin" class="wrap">
36
  <?php
37
  // Generate message container by message id or directly by message.
38
+ $message_id = WDW_FM_Library(self::PLUGIN)->get('message', 0);
39
+ $message = WDW_FM_Library(self::PLUGIN)->get('msg', '');
40
+ echo WDW_FM_Library(self::PLUGIN)->message_id($message_id, $message);
41
  ?>
42
  <form
43
  <?php echo $action ? 'action="' . $action . '"' : ''; ?>
49
  ><?php
50
  echo $content;
51
  // Add nonce to form.
52
+ wp_nonce_field(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
53
  ?>
54
  <input id="task" name="task" type="hidden" value=""/>
55
  <input id="current_id" name="current_id" type="hidden" value="<?php echo $current_id; ?>"/>
93
  if ( $add_new_button ) {
94
  ?>
95
  <a class="page-title-action" <?php echo $attributes; ?>>
96
+ <?php _e('Add New', WDFMInstance(self::PLUGIN)->prefix); ?>
97
  </a>
98
  <?php
99
  }
157
  * @return string
158
  */
159
  protected function search() {
160
+ $search = WDW_FM_Library(self::PLUGIN)->get('s', '');
161
  ob_start();
162
  ?>
163
  <p class="search-box">
164
  <input name="s" value="<?php echo $search; ?>" type="search" onkeypress="return input_search(event, this)" />
165
+ <input class="button" value="<?php _e('Search', WDFMInstance(self::PLUGIN)->prefix); ?>" type="button" onclick="search(this)" />
166
  </p>
167
  <?php
168
 
179
  * @return string
180
  */
181
  protected function pagination($page_url, $total, $items_per_page = 20) {
182
+ $page_number = WDW_FM_Library(self::PLUGIN)->get('paged', 1);
183
+ $search = WDW_FM_Library(self::PLUGIN)->get('s', '');
184
+ $orderby = WDW_FM_Library(self::PLUGIN)->get('orderby', '');
185
+ $order = WDW_FM_Library(self::PLUGIN)->get('order', '');
186
  $url_arg = array();
187
  if( !empty($search) ) {
188
  $url_arg['s'] = $search;
210
  ?>
211
  <div class="tablenav-pages">
212
  <span class="displaying-num">
213
+ <?php printf(_n('%s item', '%s items', $total, WDFMInstance(self::PLUGIN)->prefix), $total); ?>
214
  </span>
215
  <?php
216
  if ( $total > $items_per_page ) {
225
  }
226
  else {
227
  ?>
228
+ <a href="<?php echo add_query_arg(array('paged' => 1), $page_url); ?>" class="first-page"><span class="screen-reader-text"><?php _e('First page', WDFMInstance(self::PLUGIN)->prefix); ?></span><span aria-hidden="true">«</span></a>
229
+ <a href="<?php echo add_query_arg(array('paged' => ($page_number == 1 ? 1 : ($page_number - 1))), $page_url); ?>" class="previous-page"><span class="screen-reader-text"><?php _e('Previous page', WDFMInstance(self::PLUGIN)->prefix); ?></span><span aria-hidden="true">‹</span></a>
230
  <?php
231
  }
232
  ?>
233
  <span class="paging-input">
234
+ <label for="current-page-selector" class="screen-reader-text"><?php _e('Current Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
235
  <input type="text" class="current-page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return input_pagination(event, this)" size="1" />
236
  <span class="tablenav-paging-text">
237
+ <?php _e('of', WDFMInstance(self::PLUGIN)->prefix); ?>
238
  <span class="total-pages"><?php echo $pages_count; ?></span>
239
  </span>
240
  </span>
247
  }
248
  else {
249
  ?>
250
+ <a href="<?php echo add_query_arg(array('paged' => ($page_number >= $pages_count ? $pages_count : ($page_number + 1))), $page_url); ?>" class="next-page"><span class="screen-reader-text"><?php _e('Next page', WDFMInstance(self::PLUGIN)->prefix); ?></span><span aria-hidden="true">›</span></a>
251
+ <a href="<?php echo add_query_arg(array('paged' => $pages_count), $page_url); ?>" class="last-page"><span class="screen-reader-text"><?php _e('Last page', WDFMInstance(self::PLUGIN)->prefix); ?></span><span aria-hidden="true">»</span></a>
252
  <?php
253
  }
254
  ?>
266
  ob_start();
267
  ?>
268
  <div class="alignleft actions bulkactions">
269
+ <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e('Select bulk action', WDFMInstance(self::PLUGIN)->prefix); ?></label>
270
  <select name="bulk_action" id="bulk-action-selector-top">
271
+ <option value="-1"><?php _e('Bulk Actions', WDFMInstance(self::PLUGIN)->prefix); ?></option>
272
  <?php
273
  foreach ( $actions as $key => $action ) {
274
  ?>
277
  }
278
  ?>
279
  </select>
280
+ <input type="button" id="doaction" class="button action" onclick="wd_bulk_action(this)" value="<?php _e('Apply', WDFMInstance(self::PLUGIN)->prefix); ?>" />
281
  </div>
282
  <?php
283
 
285
  }
286
 
287
  function import_popup_div() {
288
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
289
  do_action('fm_popup_import_content');
290
  }
291
  }
297
  */
298
  protected function topbar() {
299
  $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
300
+ $page = str_replace(WDFMInstance(self::PLUGIN)->menu_postfix, '', $page);
301
  $task = isset($_REQUEST['task']) ? esc_html($_REQUEST['task']) : '';
302
  $user_guide_link = 'https://web-dorado.com/wordpress-form-maker/';
303
  $show_content = true;
362
  return '';
363
  }
364
  }
365
+ $show_content = $show_content && WDFMInstance(self::PLUGIN)->is_free;
366
+ $support_forum_link = 'https://wordpress.org/support/plugin/' . (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'contact-form-maker' : 'form-maker');
367
  $premium_link = $this->premium_link;
368
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-roboto');
369
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-pricing');
370
  ob_start();
371
  ?>
372
  <div class="wrap">
378
  <div class="fm-topbar fm-topbar-content">
379
  <div class="fm-topbar-content-container">
380
  <div class="fm-topbar-content-title">
381
+ <?php _e('Form Maker Premium', WDFMInstance(self::PLUGIN)->prefix); ?>
382
  </div>
383
  <div class="fm-topbar-content-body">
384
+ <?php _e('Add unlimited fields, create multi-page forms with fully customizable themes and much more.', WDFMInstance(self::PLUGIN)->prefix); ?>
385
  </div>
386
  </div>
387
  <div class="fm-topbar-content-button-container">
388
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-topbar-upgrade-button"><?php _e( 'Upgrade', WDFMInstance(self::PLUGIN)->prefix ); ?></a>
389
  </div>
390
  </div>
391
  <?php
396
  <?php if ( $show_guide_link ) { ?>
397
  <a href="<?php echo $user_guide_link; ?>" target="_blank">
398
  <div class="fm-topbar-links-item">
399
+ <?php _e('User guide', WDFMInstance(self::PLUGIN)->prefix); ?>
400
  </div>
401
  </a>
402
  <?php
403
  }
404
+ if (WDFMInstance(self::PLUGIN)->is_free) {
405
  if ( $show_guide_link ) {
406
  ?>
407
  <span class="fm-topbar-separator"></span>
408
  <?php } ?>
409
  <a href="<?php echo $support_forum_link; ?>" target="_blank">
410
  <div class="fm-topbar-links-item">
411
+ <?php _e('Support Forum', WDFMInstance(self::PLUGIN)->prefix); ?>
412
  </div>
413
  </a>
414
  <?php
420
  <?php if ( $show_head ) {
421
  $menus = array(
422
  'manage' => array(
423
+ 'href' => add_query_arg( array('page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
424
+ 'name' => __('Forms', WDFMInstance(self::PLUGIN)->prefix)
425
  ),
426
  'addons' => array(
427
+ 'href' => add_query_arg( array('page' => 'addons' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
428
+ 'name' => __('Add-ons', WDFMInstance(self::PLUGIN)->prefix)
429
  ),
430
  'pricing' => array(
431
+ 'href' => add_query_arg( array('page' => 'pricing' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
432
+ 'name' => __('Premium Version', WDFMInstance(self::PLUGIN)->prefix) .' <span class="fm-upgrade">' . __('Upgrade', WDFMInstance(self::PLUGIN)->prefix) . '</span>'
433
  ),
434
  );
435
  ?>
436
  <style>#wpbody-content>div:not(.wrap), .wrap .notice:not(#wd_bp_notice_cont) { display: none; }</style>
437
  <div class="fm-head">
438
+ <div><img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/FormMaker.png'; ?>"></div>
439
  <ul class="fm-breadcrumbs">
440
  <?php
441
  foreach ( $menus as $key => $item ) {
442
+ if ( !WDFMInstance(self::PLUGIN)->is_free && $key == 'pricing' ) {
443
  continue;
444
  }
445
+ ?>
446
+ <li class="fm-breadcrumb-item">
447
+ <a class="fm-breadcrumb-item-link<?php echo ( $key == $page ) ? ' fm-breadcrumb-item-link-active' : ''; ?>" href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a>
448
+ </li>
449
+ <?php
450
  }
451
  ?>
452
  </ul>
469
  $premium_link = $this->premium_link;
470
  }
471
  if ('' == $premium_link_text) {
472
+ $premium_link_text = __( 'Upgrade', WDFMInstance(self::PLUGIN)->prefix );
473
  $upgrade = true;
474
  }
475
  ob_start();
504
  <?php echo $message; ?>
505
  </div>
506
  <div class="fm-free-message-button-container">
507
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button"><?php _e( 'Upgrade', WDFMInstance(self::PLUGIN)->prefix ); ?></a>
508
  </div>
509
  <div class="fm-free-message-body fm-free-message-huge">
510
  &
513
  <?php echo $addon_message; ?>
514
  </div>
515
  <div class="fm-free-message-button-container">
516
+ <a href="<?php echo $addon_link; ?>" target="_blank" class="fm-free-message-upgrade-button fm-free-message-promo-button"><?php _e( 'Buy', WDFMInstance(self::PLUGIN)->prefix ); ?></a>
517
  </div>
518
  </div>
519
  <?php
534
  <div class="fm-limitation-alert">
535
  <span class="dashicons dashicons-no-alt"></span>
536
  <div class="fm-limitation-alert-header">
537
+ <?php _e('The free version is limited up to 7 fields.', WDFMInstance(self::PLUGIN)->prefix); ?>
538
  </div>
539
  <div class="fm-limitation-alert-header">
540
+ <?php _e('Upgrade to Premium version to add unlimited fields.', WDFMInstance(self::PLUGIN)->prefix); ?>
541
  </div>
542
  <div class="fm-limitation-alert-body">
543
  <div class="fm-limitation-alert-header">
544
+ <?php _e('Premium Plan also includes:', WDFMInstance(self::PLUGIN)->prefix); ?>
545
  </div>
546
  <ul>
547
+ <li><?php _e('Payment integration fields', WDFMInstance(self::PLUGIN)->prefix); ?></li>
548
+ <li><?php _e('File upload field', WDFMInstance(self::PLUGIN)->prefix); ?></li>
549
+ <li><?php _e('Google Maps API Integration', WDFMInstance(self::PLUGIN)->prefix); ?></li>
550
+ <li><?php _e('Front-end Submissions', WDFMInstance(self::PLUGIN)->prefix); ?></li>
551
  </ul>
552
  </div>
553
  <div class="fm-free-message-button-container">
554
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button"><?php _e( 'Upgrade', WDFMInstance(self::PLUGIN)->prefix ); ?></a>
555
  </div>
556
  </div>
557
  </div>
css/form_maker_tables.css CHANGED
@@ -1906,10 +1906,12 @@ button:focus {
1906
  font-size: 15px;
1907
  }
1908
 
1909
- .form_maker_themes th.col_default {
 
1910
  width:80px;
1911
  }
1912
- .form_maker_themes td.col_default {
 
1913
  padding-left:20px;
1914
  }
1915
 
@@ -2377,7 +2379,8 @@ button:focus {
2377
  text-align: center;
2378
  }
2379
 
2380
- .form_maker_themes .dashicons {
 
2381
  font-size: 20px;
2382
  }
2383
 
1906
  font-size: 15px;
1907
  }
1908
 
1909
+ .form_maker_themes th.col_default,
1910
+ .form_maker_fmc_themes th.col_default {
1911
  width:80px;
1912
  }
1913
+ .form_maker_themes td.col_default,
1914
+ .form_maker_fmc_themes td.col_default {
1915
  padding-left:20px;
1916
  }
1917
 
2379
  text-align: center;
2380
  }
2381
 
2382
+ .form_maker_themes .dashicons,
2383
+ .form_maker_fmc_themes .dashicons {
2384
  font-size: 20px;
2385
  }
2386
 
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.12.27
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -12,6 +12,11 @@
12
  defined('ABSPATH') || die('Access Denied');
13
 
14
  final class WDFM {
 
 
 
 
 
15
  /**
16
  * The single instance of the class.
17
  */
@@ -71,13 +76,12 @@ final class WDFM {
71
  return self::$_instance;
72
  }
73
 
74
- /**
75
- * WDFM Constructor.
76
- */
77
  public function __construct() {
78
  $this->define_constants();
79
  require_once($this->plugin_dir . '/framework/WDW_FM_Library.php');
80
  if (is_admin()) {
 
 
81
  require_once(wp_normalize_path($this->plugin_dir . '/admin/views/view.php'));
82
  }
83
  $this->add_actions();
@@ -87,19 +91,20 @@ final class WDFM {
87
  * Define Constants.
88
  */
89
  private function define_constants() {
90
- $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
91
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
92
  $this->front_urls = $this->get_front_urls();
93
  $this->main_file = plugin_basename(__FILE__);
94
- $this->plugin_version = '1.12.27';
95
- $this->db_version = '2.12.27';
96
- $this->menu_slug = 'manage_fm';
97
- $this->prefix = 'form_maker';
 
 
98
  $this->css_prefix = 'fm_';
99
  $this->js_prefix = 'fm_';
100
- $this->nicename = __('Form Maker', $this->prefix);
101
- $this->menu_postfix = '_fm';
102
- $this->plugin_postfix = '';
103
  }
104
 
105
  /**
@@ -196,7 +201,7 @@ final class WDFM {
196
  add_action('admin_notices', array($this, 'fm_check_addons_compatibility'));
197
  }
198
 
199
- add_action('plugins_loaded', array($this, 'plugins_loaded'));
200
 
201
  add_filter('wpseo_whitelist_permalink_vars', array($this, 'add_query_vars_seo'));
202
 
@@ -212,10 +217,10 @@ final class WDFM {
212
  return;
213
  }
214
 
215
- $content = __( 'All data submitted by website visitors is stored in website database. With every form submission Form Maker plugin collects users’ IP address and WordPress user ID for logged in users.<br />In the following forms <b>[List of Forms that collect personal data]</b> we collect personal data, such as <b>[Types of personal data collected]</b>. We need this information to <b>[purpose of collecting personal data]</b>. Please see sections <b>[Links to sections]</b> on how your personal data is handled.', WDFM()->prefix );
216
 
217
  wp_add_privacy_policy_content(
218
- WDFM()->nicename,
219
  wp_kses_post( wpautop( $content, false ) )
220
  );
221
  }
@@ -233,14 +238,20 @@ final class WDFM {
233
  }
234
 
235
  public function enqueue_block_editor_assets() {
236
- $key = 'tw/form-maker';
237
- $key_submissions = 'tw/fm-submissions';
 
 
 
 
 
 
238
  $plugin_name = $this->nicename;
239
- $plugin_name_submissions = __('Submissions', WDFM()->prefix);
240
  $icon_url = $this->plugin_url . '/images/tw-gb/icon_colored.svg';
241
  $icon_svg = $this->plugin_url . '/images/tw-gb/icon.svg';
242
  $url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions'), admin_url('admin-ajax.php'));
243
- $data = WDW_FM_Library::get_shortcode_data();
244
  ?>
245
  <script>
246
  if ( !window['tw_gb'] ) {
@@ -319,6 +330,11 @@ final class WDFM {
319
  public function plugins_loaded() {
320
  // Languages localization.
321
  load_plugin_textdomain($this->prefix, FALSE, basename(dirname(__FILE__)) . '/languages');
 
 
 
 
 
322
  // Initialize add-ons.
323
  if ($this->is_free != 2) {
324
  do_action('fm_init_addons');
@@ -330,7 +346,7 @@ final class WDFM {
330
  */
331
  public function form_maker_options_panel() {
332
  $parent_slug = !$this->is_free ? $this->menu_slug : null;
333
- if( !$this->is_free || get_option( "fm_subscribe_done" ) == 1 ) {
334
  add_menu_page($this->nicename, $this->nicename, 'manage_options', $this->menu_slug, array( $this, 'form_maker' ), $this->plugin_url . '/images/FormMakerLogo-16.png');
335
  $parent_slug = $this->menu_slug;
336
  }
@@ -427,7 +443,7 @@ final class WDFM {
427
  else {
428
  die('Access Denied');
429
  }
430
- $page = WDW_FM_Library::get('page');
431
  if (($page != '') && (($page == 'manage' . $this->menu_postfix) || ($page == 'options' . $this->menu_postfix) || ($page == 'submissions' . $this->menu_postfix) || ($page == 'blocked_ips' . $this->menu_postfix) || ($page == 'themes' . $this->menu_postfix) || ($page == 'uninstall' . $this->menu_postfix) || ($page == 'addons' . $this->menu_postfix) || ($this->is_free && $page == 'pricing' . $this->menu_postfix))) {
432
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->menu_postfix)));
433
  // This ugly span is here to hide admin output while css files are not loaded. Temporary.
@@ -441,7 +457,7 @@ final class WDFM {
441
  echo '</span>';
442
  }
443
  }
444
-
445
  /**
446
  * Register widgets.
447
  */
@@ -455,40 +471,40 @@ final class WDFM {
455
  */
456
  public function register_admin_scripts() {
457
  // Admin styles.
458
- wp_register_style('fm-tables', $this->plugin_url . '/css/form_maker_tables.css', array(), $this->plugin_version);
459
- wp_register_style('fm-first', $this->plugin_url . '/css/form_maker_first.css', array(), $this->plugin_version);
460
- wp_register_style('fm-phone_field_css', $this->plugin_url . '/css/intlTelInput.css', array(), $this->plugin_version);
461
- wp_register_style('fm-jquery-ui', $this->plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
462
- wp_register_style('fm-style', $this->plugin_url . '/css/style.css', array(), $this->plugin_version);
463
- wp_register_style('fm-codemirror', $this->plugin_url . '/css/codemirror.css', array(), $this->plugin_version);
464
- wp_register_style('fm-layout', $this->plugin_url . '/css/form_maker_layout.css', array(), $this->plugin_version);
465
- wp_register_style('fm-bootstrap', $this->plugin_url . '/css/fm-bootstrap.css', array(), $this->plugin_version);
466
- wp_register_style('fm-colorpicker', $this->plugin_url . '/css/spectrum.css', array(), $this->plugin_version);
467
  // Roboto font for top bar.
468
- wp_register_style('fm-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
469
 
470
  if (!$this->is_free) {
471
  wp_register_style('jquery.fancybox', $this->plugin_url . '/js/fancybox/jquery.fancybox.css', array(), '2.1.5');
472
  }
473
  // Admin scripts.
474
- $fm_settings = get_option('fm_settings');
475
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
476
 
477
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
478
- wp_register_script('fm-gmap_form', $this->plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
479
-
480
- wp_register_script('fm-phone_field', $this->plugin_url . '/js/intlTelInput.js', array(), '11.0.0');
481
-
482
- wp_register_script('fm-admin', $this->plugin_url . '/js/form_maker_admin.js', array(), $this->plugin_version);
483
- wp_register_script('fm-manage', $this->plugin_url . '/js/form_maker_manage.js', array(), $this->plugin_version);
484
- wp_register_script('fm-manage-edit', $this->plugin_url . '/js/form_maker_manage_edit.js', array(), $this->plugin_version);
485
- wp_register_script('fm-formmaker_div', $this->plugin_url . '/js/formmaker_div.js', array(), $this->plugin_version);
486
- wp_register_script('fm-form-options', $this->plugin_url . '/js/form_maker_form_options.js', array(), $this->plugin_version);
487
- wp_register_script('fm-form-advanced-layout', $this->plugin_url . '/js/form_maker_form_advanced_layout.js', array(), $this->plugin_version);
488
- wp_register_script('fm-add-fields', $this->plugin_url . '/js/add_field.js', array('fm-formmaker_div'), $this->plugin_version);
489
- wp_localize_script('fm-add-fields', 'form_maker', array(
490
- 'countries' => WDW_FM_Library::get_countries(),
491
- 'states' => WDW_FM_Library::get_states(),
492
  'plugin_url' => $this->plugin_url,
493
  'nothing_found' => __('Nothing found.', $this->prefix),
494
  'captcha_created' => __('The captcha already has been created.', $this->prefix),
@@ -549,24 +565,24 @@ final class WDFM {
549
  'type_stripe_description' => __('This field adds the credit card details inputs (card number, expiration date, etc.) and allows you to accept direct payments made by credit cards.', $this->prefix),
550
  ));
551
 
552
- wp_register_script('fm-codemirror', $this->plugin_url . '/js/layout/codemirror.js', array(), '2.3');
553
- wp_register_script('fm-clike', $this->plugin_url . '/js/layout/clike.js', array(), '1.0.0');
554
- wp_register_script('fm-formatting', $this->plugin_url . '/js/layout/formatting.js', array(), '1.0.0');
555
- wp_register_script('fm-css', $this->plugin_url . '/js/layout/css.js', array(), '1.0.0');
556
- wp_register_script('fm-javascript', $this->plugin_url . '/js/layout/javascript.js', array(), '1.0.0');
557
- wp_register_script('fm-xml', $this->plugin_url . '/js/layout/xml.js', array(), '1.0.0');
558
- wp_register_script('fm-php', $this->plugin_url . '/js/layout/php.js', array(), '1.0.0');
559
- wp_register_script('fm-htmlmixed', $this->plugin_url . '/js/layout/htmlmixed.js', array(), '1.0.0');
560
 
561
- wp_register_script('fm-colorpicker', $this->plugin_url . '/js/spectrum.js', array(), $this->plugin_version);
562
 
563
- wp_register_script('fm-themes', $this->plugin_url . '/js/themes.js', array(), $this->plugin_version);
564
 
565
- wp_register_script('fm-submissions', $this->plugin_url . '/js/form_maker_submissions.js', array(), $this->plugin_version);
566
- wp_register_script('fm-ng-js', 'https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js', array(), '1.5.0');
567
 
568
- wp_localize_script('fm-admin', 'form_maker', array(
569
- 'countries' => WDW_FM_Library::get_countries(),
570
  'delete_confirmation' => __('Do you want to delete selected items?', $this->prefix),
571
  'select_at_least_one_item' => __('You must select at least one item.', $this->prefix),
572
  'add_placeholder' => __('Add placeholder', $this->prefix),
@@ -575,49 +591,49 @@ final class WDFM {
575
  wp_register_script('jquery.fancybox.pack', $this->plugin_url . '/js/fancybox/jquery.fancybox.pack.js', array(), '2.1.5');
576
  }
577
  else {
578
- wp_register_style('fm-deactivate-css', $this->plugin_url . '/wd/assets/css/deactivate_popup.css', array(), $this->plugin_version);
579
- wp_register_script('fm-deactivate-popup', $this->plugin_url . '/wd/assets/js/deactivate_popup.js', array(), $this->plugin_version, true );
580
  $admin_data = wp_get_current_user();
581
- wp_localize_script( 'fm-deactivate-popup', 'fmWDDeactivateVars', array(
582
  "prefix" => "fm" ,
583
  "deactivate_class" => 'fm_deactivate_link',
584
  "email" => $admin_data->data->user_email,
585
  "plugin_wd_url" => "https://web-dorado.com/files/fromFormMaker.php",
586
  ));
587
  }
588
- wp_register_style('fm-pricing', $this->plugin_url . '/css/pricing.css', array(), $this->plugin_version);
589
  }
590
 
591
  /**
592
  * Admin ajax scripts.
593
  */
594
  public function register_admin_ajax_scripts() {
595
- wp_register_style('fm-tables', $this->plugin_url . '/css/form_maker_tables.css', array(), $this->plugin_version);
596
- wp_register_style('fm-style', $this->plugin_url . '/css/style.css', array(), $this->plugin_version);
597
- wp_register_style('fm-jquery-ui', $this->plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
598
 
599
- wp_register_script('fm-shortcode' . $this->menu_postfix, $this->plugin_url . '/js/shortcode.js', array('jquery'), $this->plugin_version);
600
 
601
- $fm_settings = get_option('fm_settings');
602
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
603
 
604
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
605
- wp_register_script('fm-gmap_form', $this->plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
606
 
607
- wp_localize_script('fm-shortcode' . $this->menu_postfix, 'form_maker', array(
608
  'insert_form' => __('You must select a form', $this->prefix),
609
  'update' => __('Update', $this->prefix),
610
  ));
611
- wp_register_style('fm-pricing', $this->plugin_url . '/css/pricing.css', array(), $this->plugin_version);
612
  // Roboto font for submissions shortcode.
613
- wp_register_style('fm-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
614
  }
615
 
616
  /**
617
  * admin-ajax actions for admin.
618
  */
619
  public function form_maker_ajax() {
620
- $page = WDW_FM_Library::get('action');
621
  if ( $page != 'formmakerwdcaptcha' . $this->plugin_postfix && $page != 'formmakerwdmathcaptcha' . $this->plugin_postfix && $page != 'checkpaypal' . $this->plugin_postfix ) {
622
  if ( function_exists('current_user_can') ) {
623
  if ( !current_user_can('manage_options') ) {
@@ -630,9 +646,6 @@ final class WDFM {
630
  }
631
  if ( $page != '' ) {
632
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->plugin_postfix)));
633
- if ( !is_file($this->plugin_dir . '/admin/controllers/' . $page . '.php') ) {
634
- die('The file <b> ' . $page . ' </b> not found.');
635
- }
636
  $this->register_admin_ajax_scripts();
637
  require_once($this->plugin_dir . '/admin/controllers/' . $page . '.php');
638
  $controller_class = 'FMController' . $page . $this->plugin_postfix;
@@ -657,8 +670,8 @@ final class WDFM {
657
  'get_frontend_stats',
658
  );
659
 
660
- $action = WDW_FM_Library::get('action');
661
- $page = WDW_FM_Library::get('page');
662
  if ( !empty($page) && in_array($page, $allowed_pages)
663
  && !empty($action) && in_array($action, $allowed_actions) ) {
664
  $this->register_frontend_ajax_scripts();
@@ -711,8 +724,8 @@ final class WDFM {
711
  echo __('Sorry, you are not allowed to access this page.', $this->prefix);
712
  }
713
  else {
714
- $id = WDW_FM_Library::get('wdform_id', 0);
715
- $display_options = WDW_FM_Library::display_options( $id );
716
  $type = $display_options->type;
717
 
718
  $attrs = array( 'id' => $id );
@@ -746,7 +759,12 @@ final class WDFM {
746
  public function FM_front_end_main($params = array(), $type = '') {
747
  if ( !isset($params['type']) ) {
748
  $form_id = isset($params['id']) ? (int) $params['id'] : 0;
749
- wd_form_maker($form_id, $type);
 
 
 
 
 
750
  }
751
  else if (!$this->is_free) {
752
  $shortcode_deafults = array(
@@ -764,7 +782,7 @@ final class WDFM {
764
 
765
  require_once($this->plugin_dir . '/frontend/controllers/form_submissions.php');
766
  $controller = new FMControllerForm_submissions();
767
-
768
  $submissions = $controller->execute($params);
769
 
770
  echo $submissions;
@@ -777,7 +795,7 @@ final class WDFM {
777
  */
778
  public function fm_email_verification_shortcode() {
779
  require_once($this->plugin_dir . '/frontend/controllers/verify_email.php');
780
- $controller_class = 'FMControllerVerify_email';
781
  $controller = new $controller_class();
782
  $controller->execute();
783
  }
@@ -799,9 +817,9 @@ final class WDFM {
799
  )
800
  );
801
 
802
- register_post_type('fmemailverification', $args);
803
  }
804
-
805
  /**
806
  * Register form preview custom post type.
807
  */
@@ -820,29 +838,29 @@ final class WDFM {
820
  );
821
 
822
  register_post_type('form-maker' . $this->plugin_postfix, $args);
823
- }
824
-
825
  /**
826
  * Frontend scripts/styles.
827
  */
828
  public function register_frontend_scripts() {
829
  $front_plugin_url = $this->front_urls['plugin_url'];
830
- wp_register_style('fm-jquery-ui', $front_plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
831
 
832
- $fm_settings = get_option('fm_settings');
833
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
834
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
835
 
836
- wp_register_script('fm-phone_field', $front_plugin_url . '/js/intlTelInput.js', array(), $this->plugin_version);
837
 
838
- wp_register_style('fm-phone_field_css', $front_plugin_url . '/css/intlTelInput.css', array(), $this->plugin_version);
839
- wp_register_style('fm-frontend', $front_plugin_url . '/css/form_maker_frontend.css', array(), $this->plugin_version);
840
 
841
- wp_register_script('fm-frontend', $front_plugin_url . '/js/main_div_front_end.js', array(), $this->plugin_version);
842
- wp_register_script('fm-gmap_form', $front_plugin_url . '/js/if_gmap_front_end.js', array(), $this->plugin_version);
843
 
844
- wp_localize_script('fm-frontend', 'fm_objectL10n', array(
845
- 'states' => WDW_FM_Library::get_states(),
846
  'plugin_url' => $front_plugin_url,
847
  'form_maker_admin_ajax' => admin_url('admin-ajax.php'),
848
  'fm_file_type_error' => addslashes(__('Can not upload this type of file', $this->prefix)),
@@ -858,20 +876,20 @@ final class WDFM {
858
  'year_validation' => addslashes(sprintf(__('The year must be between %s and %s', $this->prefix), '%%start%%', '%%end%%')),
859
  ));
860
 
861
- $google_fonts = WDW_FM_Library::get_google_fonts();
862
  $fonts = implode("|", str_replace(' ', '+', $google_fonts));
863
- wp_register_style('fm-googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
864
 
865
- wp_register_style('fm-animate', $front_plugin_url . '/css/fm-animate.css', array(), $this->plugin_version);
866
 
867
- wp_register_script('fm-g-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=fmRecaptchaInit&render=explicit');
868
 
869
  // Register admin styles to use in frontend submissions.
870
  wp_register_script('gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
871
 
872
  if (!$this->is_free) {
873
- wp_register_script('fm-file-upload', $front_plugin_url . '/js/file-upload.js', array(), $this->plugin_version);
874
- wp_register_style('fm-submissions_css', $front_plugin_url . '/css/style_submissions.css', array(), $this->plugin_version);
875
  }
876
  }
877
 
@@ -880,10 +898,10 @@ final class WDFM {
880
  */
881
  public function register_frontend_ajax_scripts() {
882
  $front_plugin_url = $this->front_urls['plugin_url'];
883
- $fm_settings = get_option('fm_settings');
884
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
885
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
886
- wp_register_script('fm-gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
887
  }
888
 
889
  /**
@@ -891,7 +909,12 @@ final class WDFM {
891
  */
892
  public function form_maker_on_activate() {
893
  $this->form_maker_activate();
894
- WDFMInsert::install_demo_forms();
 
 
 
 
 
895
  $this->init();
896
  flush_rewrite_rules();
897
  }
@@ -915,17 +938,22 @@ final class WDFM {
915
  }
916
  else {
917
  add_option("wd_form_maker_version", $new_version, '', 'no');
918
- WDFMInsert::form_maker_insert();
 
 
 
 
 
919
  $email_verification_post = array(
920
  'post_title' => 'Email Verification',
921
  'post_content' => '[email_verification]',
922
  'post_status' => 'publish',
923
  'post_author' => 1,
924
- 'post_type' => 'fmemailverification',
925
  );
926
  $mail_verification_post_id = wp_insert_post($email_verification_post);
927
 
928
- add_option('fm_settings', array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ',', 'map_key' => ''));
929
  $wpdb->update($wpdb->prefix . "formmaker", array(
930
  'mail_verification_post_id' => $mail_verification_post_id,
931
  ), array('id' => 1), array(
@@ -941,19 +969,24 @@ final class WDFM {
941
  foreach ($mail_verification_post_ids as $mail_verification_post_id) {
942
  $update_email_ver_post_type = array(
943
  'ID' => (int)$mail_verification_post_id->mail_verification_post_id,
944
- 'post_type' => 'fmemailverification',
945
  );
946
  wp_update_post($update_email_ver_post_type);
947
  }
948
  }
949
- WDFMUpdate::form_maker_update($version);
 
 
 
 
 
950
  update_option("wd_form_maker_version", $new_version);
951
 
952
- if (FALSE === $fm_settings = get_option('fm_settings')) {
953
  $recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
954
  $public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
955
  $private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
956
- add_option('fm_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => ''));
957
  }
958
  }
959
  }
@@ -968,13 +1001,13 @@ final class WDFM {
968
  }
969
  global $fm_options;
970
  $fm_options = array(
971
- "prefix" => "fm",
972
- "wd_plugin_id" => 31,
973
- "plugin_title" => "Form Maker",
974
- "plugin_wordpress_slug" => "form-maker",
975
  "plugin_dir" => $this->plugin_dir,
976
  "plugin_main_file" => __FILE__,
977
- "description" => __('Form Maker plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.', $this->prefix),
978
  // from web-dorado.com
979
  "plugin_features" => array(
980
  0 => array(
@@ -1050,7 +1083,7 @@ final class WDFM {
1050
  "plugin_wd_url" => "https://web-dorado.com/files/fromFormMaker.php",
1051
  "plugin_wd_demo_link" => "http://wpdemo.web-dorado.com",
1052
  "plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-form/add-ons.html",
1053
- "after_subscribe" => admin_url('admin.php?page=overview' . $this->menu_postfix), // this can be plagin overview page or set up page
1054
  "plugin_wizard_link" => '',
1055
  "plugin_menu_title" => $this->nicename,
1056
  "plugin_menu_icon" => $this->plugin_url . '/images/FormMakerLogo-16.png',
@@ -1157,11 +1190,25 @@ final class WDFM {
1157
  *
1158
  * @return WDFM The main instance to prevent the need to use globals.
1159
  */
1160
- function WDFM() {
1161
- return WDFM::instance();
 
 
 
 
 
1162
  }
1163
 
1164
- WDFM();
 
 
 
 
 
 
 
 
 
1165
 
1166
  /**
1167
  * Form maker output.
@@ -1170,7 +1217,7 @@ WDFM();
1170
  * @param string $type
1171
  */
1172
  function wd_form_maker($id, $type = 'embedded') {
1173
- require_once (WDFM()->plugin_dir . '/frontend/controllers/form_maker.php');
1174
  $controller = new FMControllerForm_maker();
1175
  $form = $controller->execute($id, $type);
1176
  echo $form;
@@ -1193,9 +1240,9 @@ function fm_bp_install_notice() {
1193
  $meta_value = get_option('wd_bk_notice_status');
1194
  if ( $meta_value === '' || $meta_value === FALSE ) {
1195
  ob_start();
1196
- $prefix = WDFM()->prefix;
1197
- $nicename = WDFM()->nicename;
1198
- $url = WDFM()->plugin_url;
1199
  $dismiss_url = add_query_arg(array( 'action' => 'wd_bp_dismiss' ), admin_url('admin-ajax.php'));
1200
  $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd'));
1201
  ?>
@@ -1266,7 +1313,7 @@ if ( !function_exists('wd_bps_install_notice_status') ) {
1266
  function fm_add_plugin_meta_links($meta_fields, $file) {
1267
  if ( plugin_basename(__FILE__) == $file ) {
1268
  $plugin_url = "https://wordpress.org/support/plugin/form-maker";
1269
- $prefix = WDFM()->prefix;
1270
  $meta_fields[] = "<a href='" . $plugin_url . "' target='_blank'>" . __('Support Forum', $prefix) . "</a>";
1271
  $meta_fields[] = "<a href='" . $plugin_url . "/reviews#new-post' target='_blank' title='" . __('Rate', $prefix) . "'>
1272
  <i class='wdi-rate-stars'>"
@@ -1290,6 +1337,6 @@ function fm_add_plugin_meta_links($meta_fields, $file) {
1290
  return $meta_fields;
1291
  }
1292
 
1293
- if ( WDFM()->is_free ) {
1294
  add_filter("plugin_row_meta", 'fm_add_plugin_meta_links', 10, 2);
1295
  }
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.12.28
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
12
  defined('ABSPATH') || die('Access Denied');
13
 
14
  final class WDFM {
15
+ /**
16
+ * PLUGIN = 2 points to Contact Form Maker
17
+ */
18
+ const PLUGIN = 1;
19
+
20
  /**
21
  * The single instance of the class.
22
  */
76
  return self::$_instance;
77
  }
78
 
 
 
 
79
  public function __construct() {
80
  $this->define_constants();
81
  require_once($this->plugin_dir . '/framework/WDW_FM_Library.php');
82
  if (is_admin()) {
83
+ require_once(wp_normalize_path($this->plugin_dir . '/admin/controllers/controller.php'));
84
+ require_once(wp_normalize_path($this->plugin_dir . '/admin/models/model.php'));
85
  require_once(wp_normalize_path($this->plugin_dir . '/admin/views/view.php'));
86
  }
87
  $this->add_actions();
91
  * Define Constants.
92
  */
93
  private function define_constants() {
94
+ $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
95
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
96
  $this->front_urls = $this->get_front_urls();
97
  $this->main_file = plugin_basename(__FILE__);
98
+ $this->plugin_version = '1.12.28';
99
+ $this->db_version = '2.12.28';
100
+ $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
101
+ $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
102
+ $this->menu_slug = 'manage' . $this->menu_postfix;
103
+ $this->prefix = 'form_maker' . $this->plugin_postfix;
104
  $this->css_prefix = 'fm_';
105
  $this->js_prefix = 'fm_';
106
+ $this->handle_prefix = ($this->is_free == 2 ? 'fmc' : 'fm');
107
+ $this->nicename = ($this->is_free == 2 ? __('Contact Form', $this->prefix) : __('Form Maker', $this->prefix));
 
108
  }
109
 
110
  /**
201
  add_action('admin_notices', array($this, 'fm_check_addons_compatibility'));
202
  }
203
 
204
+ add_action('plugins_loaded', array($this, 'plugins_loaded'), 9);
205
 
206
  add_filter('wpseo_whitelist_permalink_vars', array($this, 'add_query_vars_seo'));
207
 
217
  return;
218
  }
219
 
220
+ $content = __( 'All data submitted by website visitors is stored in website database. With every form submission Form Maker plugin collects users’ IP address and WordPress user ID for logged in users.<br />In the following forms <b>[List of Forms that collect personal data]</b> we collect personal data, such as <b>[Types of personal data collected]</b>. We need this information to <b>[purpose of collecting personal data]</b>. Please see sections <b>[Links to sections]</b> on how your personal data is handled.', WDFMInstance(self::PLUGIN)->prefix );
221
 
222
  wp_add_privacy_policy_content(
223
+ WDFMInstance(self::PLUGIN)->nicename,
224
  wp_kses_post( wpautop( $content, false ) )
225
  );
226
  }
238
  }
239
 
240
  public function enqueue_block_editor_assets() {
241
+ if ($this->is_free == 2) {
242
+ $key = 'tw/contact-form-maker';
243
+ $key_submissions = 'tw/cfm-submissions';
244
+ }
245
+ else {
246
+ $key = 'tw/form-maker';
247
+ $key_submissions = 'tw/fm-submissions';
248
+ }
249
  $plugin_name = $this->nicename;
250
+ $plugin_name_submissions = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
251
  $icon_url = $this->plugin_url . '/images/tw-gb/icon_colored.svg';
252
  $icon_svg = $this->plugin_url . '/images/tw-gb/icon.svg';
253
  $url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions'), admin_url('admin-ajax.php'));
254
+ $data = WDW_FM_Library(self::PLUGIN)->get_shortcode_data();
255
  ?>
256
  <script>
257
  if ( !window['tw_gb'] ) {
330
  public function plugins_loaded() {
331
  // Languages localization.
332
  load_plugin_textdomain($this->prefix, FALSE, basename(dirname(__FILE__)) . '/languages');
333
+
334
+ if ($this->is_free != 2 && !function_exists('WDFM')) {
335
+ require_once($this->plugin_dir . '/WDFM.php');
336
+ }
337
+
338
  // Initialize add-ons.
339
  if ($this->is_free != 2) {
340
  do_action('fm_init_addons');
346
  */
347
  public function form_maker_options_panel() {
348
  $parent_slug = !$this->is_free ? $this->menu_slug : null;
349
+ if( !$this->is_free || ($this->is_free == 1 && get_option( "fm_subscribe_done" ) == 1) || ($this->is_free == 2 && get_option( "cfm_subscribe_done" ) == 1) ) {
350
  add_menu_page($this->nicename, $this->nicename, 'manage_options', $this->menu_slug, array( $this, 'form_maker' ), $this->plugin_url . '/images/FormMakerLogo-16.png');
351
  $parent_slug = $this->menu_slug;
352
  }
443
  else {
444
  die('Access Denied');
445
  }
446
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
447
  if (($page != '') && (($page == 'manage' . $this->menu_postfix) || ($page == 'options' . $this->menu_postfix) || ($page == 'submissions' . $this->menu_postfix) || ($page == 'blocked_ips' . $this->menu_postfix) || ($page == 'themes' . $this->menu_postfix) || ($page == 'uninstall' . $this->menu_postfix) || ($page == 'addons' . $this->menu_postfix) || ($this->is_free && $page == 'pricing' . $this->menu_postfix))) {
448
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->menu_postfix)));
449
  // This ugly span is here to hide admin output while css files are not loaded. Temporary.
457
  echo '</span>';
458
  }
459
  }
460
+
461
  /**
462
  * Register widgets.
463
  */
471
  */
472
  public function register_admin_scripts() {
473
  // Admin styles.
474
+ wp_register_style($this->handle_prefix . '-tables', $this->plugin_url . '/css/form_maker_tables.css', array(), $this->plugin_version);
475
+ wp_register_style($this->handle_prefix . '-first', $this->plugin_url . '/css/form_maker_first.css', array(), $this->plugin_version);
476
+ wp_register_style($this->handle_prefix . '-phone_field_css', $this->plugin_url . '/css/intlTelInput.css', array(), $this->plugin_version);
477
+ wp_register_style($this->handle_prefix . '-jquery-ui', $this->plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
478
+ wp_register_style($this->handle_prefix . '-style', $this->plugin_url . '/css/style.css', array(), $this->plugin_version);
479
+ wp_register_style($this->handle_prefix . '-codemirror', $this->plugin_url . '/css/codemirror.css', array(), $this->plugin_version);
480
+ wp_register_style($this->handle_prefix . '-layout', $this->plugin_url . '/css/form_maker_layout.css', array(), $this->plugin_version);
481
+ wp_register_style($this->handle_prefix . '-bootstrap', $this->plugin_url . '/css/fm-bootstrap.css', array(), $this->plugin_version);
482
+ wp_register_style($this->handle_prefix . '-colorpicker', $this->plugin_url . '/css/spectrum.css', array(), $this->plugin_version);
483
  // Roboto font for top bar.
484
+ wp_register_style($this->handle_prefix . '-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
485
 
486
  if (!$this->is_free) {
487
  wp_register_style('jquery.fancybox', $this->plugin_url . '/js/fancybox/jquery.fancybox.css', array(), '2.1.5');
488
  }
489
  // Admin scripts.
490
+ $fm_settings = get_option($this->is_free == 2 ? 'fmc_settings' : 'fm_settings');
491
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
492
 
493
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
494
+ wp_register_script($this->handle_prefix . '-gmap_form', $this->plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
495
+
496
+ wp_register_script($this->handle_prefix . '-phone_field', $this->plugin_url . '/js/intlTelInput.js', array(), '11.0.0');
497
+
498
+ wp_register_script($this->handle_prefix . '-admin', $this->plugin_url . '/js/form_maker_admin.js', array(), $this->plugin_version);
499
+ wp_register_script($this->handle_prefix . '-manage', $this->plugin_url . '/js/form_maker_manage.js', array(), $this->plugin_version);
500
+ wp_register_script($this->handle_prefix . '-manage-edit', $this->plugin_url . '/js/form_maker_manage_edit.js', array(), $this->plugin_version);
501
+ wp_register_script($this->handle_prefix . '-formmaker_div', $this->plugin_url . '/js/formmaker_div.js', array(), $this->plugin_version);
502
+ wp_register_script($this->handle_prefix . '-form-options', $this->plugin_url . '/js/form_maker_form_options.js', array(), $this->plugin_version);
503
+ wp_register_script($this->handle_prefix . '-form-advanced-layout', $this->plugin_url . '/js/form_maker_form_advanced_layout.js', array(), $this->plugin_version);
504
+ wp_register_script($this->handle_prefix . '-add-fields', $this->plugin_url . '/js/add_field.js', array($this->handle_prefix . '-formmaker_div'), $this->plugin_version);
505
+ wp_localize_script($this->handle_prefix . '-add-fields', 'form_maker', array(
506
+ 'countries' => WDW_FM_Library(self::PLUGIN)->get_countries(),
507
+ 'states' => WDW_FM_Library(self::PLUGIN)->get_states(),
508
  'plugin_url' => $this->plugin_url,
509
  'nothing_found' => __('Nothing found.', $this->prefix),
510
  'captcha_created' => __('The captcha already has been created.', $this->prefix),
565
  'type_stripe_description' => __('This field adds the credit card details inputs (card number, expiration date, etc.) and allows you to accept direct payments made by credit cards.', $this->prefix),
566
  ));
567
 
568
+ wp_register_script($this->handle_prefix . '-codemirror', $this->plugin_url . '/js/layout/codemirror.js', array(), '2.3');
569
+ wp_register_script($this->handle_prefix . '-clike', $this->plugin_url . '/js/layout/clike.js', array(), '1.0.0');
570
+ wp_register_script($this->handle_prefix . '-formatting', $this->plugin_url . '/js/layout/formatting.js', array(), '1.0.0');
571
+ wp_register_script($this->handle_prefix . '-css', $this->plugin_url . '/js/layout/css.js', array(), '1.0.0');
572
+ wp_register_script($this->handle_prefix . '-javascript', $this->plugin_url . '/js/layout/javascript.js', array(), '1.0.0');
573
+ wp_register_script($this->handle_prefix . '-xml', $this->plugin_url . '/js/layout/xml.js', array(), '1.0.0');
574
+ wp_register_script($this->handle_prefix . '-php', $this->plugin_url . '/js/layout/php.js', array(), '1.0.0');
575
+ wp_register_script($this->handle_prefix . '-htmlmixed', $this->plugin_url . '/js/layout/htmlmixed.js', array(), '1.0.0');
576
 
577
+ wp_register_script($this->handle_prefix . '-colorpicker', $this->plugin_url . '/js/spectrum.js', array(), $this->plugin_version);
578
 
579
+ wp_register_script($this->handle_prefix . '-themes', $this->plugin_url . '/js/themes.js', array(), $this->plugin_version);
580
 
581
+ wp_register_script($this->handle_prefix . '-submissions', $this->plugin_url . '/js/form_maker_submissions.js', array(), $this->plugin_version);
582
+ wp_register_script($this->handle_prefix . '-ng-js', 'https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js', array(), '1.5.0');
583
 
584
+ wp_localize_script($this->handle_prefix . '-admin', 'form_maker', array(
585
+ 'countries' => WDW_FM_Library(self::PLUGIN)->get_countries(),
586
  'delete_confirmation' => __('Do you want to delete selected items?', $this->prefix),
587
  'select_at_least_one_item' => __('You must select at least one item.', $this->prefix),
588
  'add_placeholder' => __('Add placeholder', $this->prefix),
591
  wp_register_script('jquery.fancybox.pack', $this->plugin_url . '/js/fancybox/jquery.fancybox.pack.js', array(), '2.1.5');
592
  }
593
  else {
594
+ wp_register_style($this->handle_prefix . '-deactivate-css', $this->plugin_url . '/wd/assets/css/deactivate_popup.css', array(), $this->plugin_version);
595
+ wp_register_script($this->handle_prefix . '-deactivate-popup', $this->plugin_url . '/wd/assets/js/deactivate_popup.js', array(), $this->plugin_version, true );
596
  $admin_data = wp_get_current_user();
597
+ wp_localize_script( $this->handle_prefix . '-deactivate-popup', ($this->is_free == 2 ? 'cfmWDDeactivateVars' : 'fmWDDeactivateVars'), array(
598
  "prefix" => "fm" ,
599
  "deactivate_class" => 'fm_deactivate_link',
600
  "email" => $admin_data->data->user_email,
601
  "plugin_wd_url" => "https://web-dorado.com/files/fromFormMaker.php",
602
  ));
603
  }
604
+ wp_register_style($this->handle_prefix . '-pricing', $this->plugin_url . '/css/pricing.css', array(), $this->plugin_version);
605
  }
606
 
607
  /**
608
  * Admin ajax scripts.
609
  */
610
  public function register_admin_ajax_scripts() {
611
+ wp_register_style($this->handle_prefix . '-tables', $this->plugin_url . '/css/form_maker_tables.css', array(), $this->plugin_version);
612
+ wp_register_style($this->handle_prefix . '-style', $this->plugin_url . '/css/style.css', array(), $this->plugin_version);
613
+ wp_register_style($this->handle_prefix . '-jquery-ui', $this->plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
614
 
615
+ wp_register_script($this->handle_prefix . '-shortcode' . $this->menu_postfix, $this->plugin_url . '/js/shortcode.js', array('jquery'), $this->plugin_version);
616
 
617
+ $fm_settings = get_option($this->is_free == 2 ? 'fmc_settings' : 'fm_settings');
618
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
619
 
620
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
621
+ wp_register_script($this->handle_prefix . '-gmap_form', $this->plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
622
 
623
+ wp_localize_script($this->handle_prefix . '-shortcode' . $this->menu_postfix, 'form_maker', array(
624
  'insert_form' => __('You must select a form', $this->prefix),
625
  'update' => __('Update', $this->prefix),
626
  ));
627
+ wp_register_style($this->handle_prefix . '-pricing', $this->plugin_url . '/css/pricing.css', array(), $this->plugin_version);
628
  // Roboto font for submissions shortcode.
629
+ wp_register_style($this->handle_prefix . '-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
630
  }
631
 
632
  /**
633
  * admin-ajax actions for admin.
634
  */
635
  public function form_maker_ajax() {
636
+ $page = WDW_FM_Library(self::PLUGIN)->get('action');
637
  if ( $page != 'formmakerwdcaptcha' . $this->plugin_postfix && $page != 'formmakerwdmathcaptcha' . $this->plugin_postfix && $page != 'checkpaypal' . $this->plugin_postfix ) {
638
  if ( function_exists('current_user_can') ) {
639
  if ( !current_user_can('manage_options') ) {
646
  }
647
  if ( $page != '' ) {
648
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->plugin_postfix)));
 
 
 
649
  $this->register_admin_ajax_scripts();
650
  require_once($this->plugin_dir . '/admin/controllers/' . $page . '.php');
651
  $controller_class = 'FMController' . $page . $this->plugin_postfix;
670
  'get_frontend_stats',
671
  );
672
 
673
+ $action = WDW_FM_Library(self::PLUGIN)->get('action');
674
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
675
  if ( !empty($page) && in_array($page, $allowed_pages)
676
  && !empty($action) && in_array($action, $allowed_actions) ) {
677
  $this->register_frontend_ajax_scripts();
724
  echo __('Sorry, you are not allowed to access this page.', $this->prefix);
725
  }
726
  else {
727
+ $id = WDW_FM_Library(self::PLUGIN)->get('wdform_id', 0);
728
+ $display_options = WDW_FM_Library(self::PLUGIN)->display_options( $id );
729
  $type = $display_options->type;
730
 
731
  $attrs = array( 'id' => $id );
759
  public function FM_front_end_main($params = array(), $type = '') {
760
  if ( !isset($params['type']) ) {
761
  $form_id = isset($params['id']) ? (int) $params['id'] : 0;
762
+ if ($this->is_free == 2) {
763
+ wd_contact_form_maker($form_id, $type);
764
+ }
765
+ else {
766
+ wd_form_maker( $form_id, $type );
767
+ }
768
  }
769
  else if (!$this->is_free) {
770
  $shortcode_deafults = array(
782
 
783
  require_once($this->plugin_dir . '/frontend/controllers/form_submissions.php');
784
  $controller = new FMControllerForm_submissions();
785
+
786
  $submissions = $controller->execute($params);
787
 
788
  echo $submissions;
795
  */
796
  public function fm_email_verification_shortcode() {
797
  require_once($this->plugin_dir . '/frontend/controllers/verify_email.php');
798
+ $controller_class = 'FMControllerVerify_email' . $this->plugin_postfix;
799
  $controller = new $controller_class();
800
  $controller->execute();
801
  }
817
  )
818
  );
819
 
820
+ register_post_type(($this->is_free == 2 ? 'cfmemailverification' : 'fmemailverification'), $args);
821
  }
822
+
823
  /**
824
  * Register form preview custom post type.
825
  */
838
  );
839
 
840
  register_post_type('form-maker' . $this->plugin_postfix, $args);
841
+ }
842
+
843
  /**
844
  * Frontend scripts/styles.
845
  */
846
  public function register_frontend_scripts() {
847
  $front_plugin_url = $this->front_urls['plugin_url'];
848
+ wp_register_style($this->handle_prefix . '-jquery-ui', $front_plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
849
 
850
+ $fm_settings = get_option($this->is_free == 2 ? 'fmc_settings' : 'fm_settings');
851
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
852
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
853
 
854
+ wp_register_script($this->handle_prefix . '-phone_field', $front_plugin_url . '/js/intlTelInput.js', array(), $this->plugin_version);
855
 
856
+ wp_register_style($this->handle_prefix . '-phone_field_css', $front_plugin_url . '/css/intlTelInput.css', array(), $this->plugin_version);
857
+ wp_register_style($this->handle_prefix . '-frontend', $front_plugin_url . '/css/form_maker_frontend.css', array(), $this->plugin_version);
858
 
859
+ wp_register_script($this->handle_prefix . '-frontend', $front_plugin_url . '/js/main_div_front_end.js', array(), $this->plugin_version);
860
+ wp_register_script($this->handle_prefix . '-gmap_form', $front_plugin_url . '/js/if_gmap_front_end.js', array(), $this->plugin_version);
861
 
862
+ wp_localize_script($this->handle_prefix . '-frontend', 'fm_objectL10n', array(
863
+ 'states' => WDW_FM_Library(self::PLUGIN)->get_states(),
864
  'plugin_url' => $front_plugin_url,
865
  'form_maker_admin_ajax' => admin_url('admin-ajax.php'),
866
  'fm_file_type_error' => addslashes(__('Can not upload this type of file', $this->prefix)),
876
  'year_validation' => addslashes(sprintf(__('The year must be between %s and %s', $this->prefix), '%%start%%', '%%end%%')),
877
  ));
878
 
879
+ $google_fonts = WDW_FM_Library(self::PLUGIN)->get_google_fonts();
880
  $fonts = implode("|", str_replace(' ', '+', $google_fonts));
881
+ wp_register_style($this->handle_prefix . '-googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
882
 
883
+ wp_register_style($this->handle_prefix . '-animate', $front_plugin_url . '/css/fm-animate.css', array(), $this->plugin_version);
884
 
885
+ wp_register_script($this->handle_prefix . '-g-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=fmRecaptchaInit&render=explicit');
886
 
887
  // Register admin styles to use in frontend submissions.
888
  wp_register_script('gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
889
 
890
  if (!$this->is_free) {
891
+ wp_register_script($this->handle_prefix . '-file-upload', $front_plugin_url . '/js/file-upload.js', array(), $this->plugin_version);
892
+ wp_register_style($this->handle_prefix . '-submissions_css', $front_plugin_url . '/css/style_submissions.css', array(), $this->plugin_version);
893
  }
894
  }
895
 
898
  */
899
  public function register_frontend_ajax_scripts() {
900
  $front_plugin_url = $this->front_urls['plugin_url'];
901
+ $fm_settings = get_option($this->is_free == 2 ? 'fmc_settings' : 'fm_settings');
902
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
903
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
904
+ wp_register_script($this->handle_prefix . '-gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
905
  }
906
 
907
  /**
909
  */
910
  public function form_maker_on_activate() {
911
  $this->form_maker_activate();
912
+ if ($this->is_free == 2) {
913
+ WDCFMInsert::install_demo_forms();
914
+ }
915
+ else {
916
+ WDFMInsert::install_demo_forms();
917
+ }
918
  $this->init();
919
  flush_rewrite_rules();
920
  }
938
  }
939
  else {
940
  add_option("wd_form_maker_version", $new_version, '', 'no');
941
+ if ($this->is_free == 2) {
942
+ WDCFMInsert::form_maker_insert();
943
+ }
944
+ else {
945
+ WDFMInsert::form_maker_insert();
946
+ }
947
  $email_verification_post = array(
948
  'post_title' => 'Email Verification',
949
  'post_content' => '[email_verification]',
950
  'post_status' => 'publish',
951
  'post_author' => 1,
952
+ 'post_type' => ($this->is_free == 2 ? 'cfmemailverification' : 'fmemailverification'),
953
  );
954
  $mail_verification_post_id = wp_insert_post($email_verification_post);
955
 
956
+ add_option(($this->is_free == 2 ? 'fmc_settings' : 'fm_settings'), array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ',', 'map_key' => ''));
957
  $wpdb->update($wpdb->prefix . "formmaker", array(
958
  'mail_verification_post_id' => $mail_verification_post_id,
959
  ), array('id' => 1), array(
969
  foreach ($mail_verification_post_ids as $mail_verification_post_id) {
970
  $update_email_ver_post_type = array(
971
  'ID' => (int)$mail_verification_post_id->mail_verification_post_id,
972
+ 'post_type' => ($this->is_free == 2 ? 'cfmemailverification' : 'fmemailverification'),
973
  );
974
  wp_update_post($update_email_ver_post_type);
975
  }
976
  }
977
+ if ($this->is_free == 2) {
978
+ WDCFMUpdate::form_maker_update($version);
979
+ }
980
+ else {
981
+ WDFMUpdate::form_maker_update($version);
982
+ }
983
  update_option("wd_form_maker_version", $new_version);
984
 
985
+ if (FALSE === $fm_settings = get_option($this->is_free == 2 ? 'fmc_settings' : 'fm_settings')) {
986
  $recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
987
  $public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
988
  $private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
989
+ add_option(($this->is_free == 2 ? 'fmc_settings' : 'fm_settings'), array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => ''));
990
  }
991
  }
992
  }
1001
  }
1002
  global $fm_options;
1003
  $fm_options = array(
1004
+ "prefix" => ($this->is_free == 2 ? 'cfm' : 'fm'),
1005
+ "wd_plugin_id" => ($this->is_free == 2 ? 183 : 31),
1006
+ "plugin_title" => ($this->is_free == 2 ? 'Contact Form Maker' : 'Form Maker'),
1007
+ "plugin_wordpress_slug" => ($this->is_free == 2 ? 'contact-form-maker' : 'form-maker'),
1008
  "plugin_dir" => $this->plugin_dir,
1009
  "plugin_main_file" => __FILE__,
1010
+ "description" => ($this->is_free == 2 ? __('WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.', $this->prefix) : __('Form Maker plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.', $this->prefix)),
1011
  // from web-dorado.com
1012
  "plugin_features" => array(
1013
  0 => array(
1083
  "plugin_wd_url" => "https://web-dorado.com/files/fromFormMaker.php",
1084
  "plugin_wd_demo_link" => "http://wpdemo.web-dorado.com",
1085
  "plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-form/add-ons.html",
1086
+ "after_subscribe" => admin_url('admin.php?page=overview_' . ($this->is_free == 2 ? 'cfm' : 'fm')), // this can be plagin overview page or set up page
1087
  "plugin_wizard_link" => '',
1088
  "plugin_menu_title" => $this->nicename,
1089
  "plugin_menu_icon" => $this->plugin_url . '/images/FormMakerLogo-16.png',
1190
  *
1191
  * @return WDFM The main instance to prevent the need to use globals.
1192
  */
1193
+ if (!function_exists('WDFMInstance')) {
1194
+ function WDFMInstance( $version ) {
1195
+ if ( $version == 2 ) {
1196
+ return WDCFM::instance();
1197
+ }
1198
+ return WDFM::instance();
1199
+ }
1200
  }
1201
 
1202
+ WDFMInstance(1);
1203
+
1204
+ if (!function_exists('WDW_FM_Library')) {
1205
+ function WDW_FM_Library( $version = 1 ) {
1206
+ if ( $version == 2 ) {
1207
+ return WDW_FMC_Library::instance();
1208
+ }
1209
+ return WDW_FM_Library::instance();
1210
+ }
1211
+ }
1212
 
1213
  /**
1214
  * Form maker output.
1217
  * @param string $type
1218
  */
1219
  function wd_form_maker($id, $type = 'embedded') {
1220
+ require_once (WDFMInstance(1)->plugin_dir . '/frontend/controllers/form_maker.php');
1221
  $controller = new FMControllerForm_maker();
1222
  $form = $controller->execute($id, $type);
1223
  echo $form;
1240
  $meta_value = get_option('wd_bk_notice_status');
1241
  if ( $meta_value === '' || $meta_value === FALSE ) {
1242
  ob_start();
1243
+ $prefix = WDFMInstance(1)->prefix;
1244
+ $nicename = WDFMInstance(1)->nicename;
1245
+ $url = WDFMInstance(1)->plugin_url;
1246
  $dismiss_url = add_query_arg(array( 'action' => 'wd_bp_dismiss' ), admin_url('admin-ajax.php'));
1247
  $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd'));
1248
  ?>
1313
  function fm_add_plugin_meta_links($meta_fields, $file) {
1314
  if ( plugin_basename(__FILE__) == $file ) {
1315
  $plugin_url = "https://wordpress.org/support/plugin/form-maker";
1316
+ $prefix = WDFMInstance(1)->prefix;
1317
  $meta_fields[] = "<a href='" . $plugin_url . "' target='_blank'>" . __('Support Forum', $prefix) . "</a>";
1318
  $meta_fields[] = "<a href='" . $plugin_url . "/reviews#new-post' target='_blank' title='" . __('Rate', $prefix) . "'>
1319
  <i class='wdi-rate-stars'>"
1337
  return $meta_fields;
1338
  }
1339
 
1340
+ if ( WDFMInstance(1)->is_free ) {
1341
  add_filter("plugin_row_meta", 'fm_add_plugin_meta_links', 10, 2);
1342
  }
form_maker_insert.php CHANGED
@@ -4,6 +4,11 @@
4
  * Class WDFMInsert
5
  */
6
  class WDFMInsert {
 
 
 
 
 
7
  public static function form_maker_insert() {
8
  global $wpdb;
9
  $charset_collate = $wpdb->get_charset_collate();
@@ -286,19 +291,20 @@ class WDFMInsert {
286
 
287
  public static function install_demo_forms() {
288
  global $wpdb;
289
- $form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
290
  if ( !$form_maker_row ) {
291
  $insert_form_id = array();
292
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Contact Us', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Subject%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '6', '1', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*5*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Contact Us', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '', 'none', '0', '0');");
293
  $insert_form_id[] = $wpdb->insert_id;
294
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Client List Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - First Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Last Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Phone%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Website%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Address%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '13', '1', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street1form_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street2form_id_temp#**id**##**label**##****#7_cityform_id_temp#**id**#undefined#**label**#undefined#****#7_stateform_id_temp#**id**#undefined#**label**#undefined#****#7_postalform_id_temp#**id**#undefined#**label**#undefined#****#7_countryform_id_temp#**id**#undefined#**label**#undefined#****#', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*First Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Last Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_text*:*type*:*Phone*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*6*:*id*:*type_text*:*type*:*Website*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:*http://example.com*:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*7*:*id*:*type_address*:*type*:*Address*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', '', '', '', 'none', '0', '0');");
295
  $insert_form_id[] = $wpdb->insert_id;
296
- if ( WDFM()->is_free != 2 ) {
297
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Feedback Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%5 - CMS%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Extension%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Plugin%</div><div wdid=\"2\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%2 - Subject%</div><div wdid=\"8\" class=\"wdform_row\">%8 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '3', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '9', '1', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#Text#**label**#type_text#****#', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', '0', '', 'USD', '0', '3*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:*First***Last*******:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*CMS*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*hor*:*w_flow*:*Joomla!***Wordpress*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*yes*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Joomla!***Wordpress*:*w_choices_value*:*****:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_own_select*:*type*:*Extension*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select extension***Form Maker***Gallery WD***Spider Calendar*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Gallery WD***Spider Calendar*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*7*:*id*:*type_own_select*:*type*:*Plugin*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select plugin***Form Maker***Photo Gallery***Ecommerce WD*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Photo Gallery***Ecommerce WD*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*8*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '1*:*show_hide*:*6*:*field_label*:*and*:*all_any*:*5***==***Joomla!*:*next_condition*:**:*new_condition*:*1*:*show_hide*:*7*:*field_label*:*and*:*all_any*:*5***==***Wordpress*:*next_condition*:**:*new_condition*:*', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '110', '1', 'Feedback Form', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '" . WDFM()->plugin_url . "/images/demo/2.png', 'flash', '0', '0');");
 
298
  $insert_form_id[] = $wpdb->insert_id;
299
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Business Demographic Survey', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - What is your employment status?%</div><div wdid=\"3\" class=\"wdform_row\">%3 - What is your level of education?%</div><div wdid=\"4\" class=\"wdform_row\">%4 - In which industry do you work?%</div><div wdid=\"6\" class=\"wdform_row\">%6 - What is the annual revenue of your company?%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Enter characters for verification.%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '4', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '7', '1', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp0#**id**#What is your employment status?#**label**#type_radio#****#6_elementform_id_temp1#**id**#What is your level of education?#**label**#type_radio#****#6_elementform_id_temp2#**id**#In which industry do you work?#**label**#type_own_select#****#6_elementform_id_temp3#**id**#Enter characters for verification.#**label**#type_captcha#****#6_elementform_id_temp4#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp5#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp6#**id**##**label**##****#6_elementform_id_temp7#**id**#undefined#**label**#undefined#****#6_elementform_id_temp8#**id**#undefined#**label**#undefined#****#6_elementform_id_temp9#**id**#undefined#**label**#undefined#****#6_elementform_id_temp10#**id**#undefined#**label**#undefined#****#6_elementform_id_temp11#**id**#undefined#**label**#undefined#****#6_elementform_id_temp12#**id**#undefined#**label**#undefined#****#6_elementform_id_temp13#**id**#undefined#**label**#undefined#****#6_elementform_id_temp14#**id**#undefined#**label**#undefined#****#6_elementform_id_temp15#**id**#undefined#**label**#undefined#****#6_elementform_id_temp16#**id**#undefined#**label**#undefined#****#6_elementform_id_temp17#**id**#undefined#**label**#undefined#****#6_elementform_id_temp18#**id**#undefined#**label**#undefined#****#6_elementform_id_temp19#**id**#undefined#**label**#undefined#****#6_elementform_id_temp20#**id**#undefined#**label**#undefined#****#6_elementform_id_temp21#**id**#undefined#**label**#undefined#****#6_elementform_id_temp22#**id**#undefined#**label**#undefined#****#6_elementform_id_temp23#**id**#undefined#**label**#undefined#****#6_elementform_id_temp24#**id**#undefined#**label**#undefined#****#6_elementform_id_temp25#**id**#undefined#**label**#undefined#****#6_elementform_id_temp26#**id**#undefined#**label**#undefined#****#6_elementform_id_temp27#**id**#undefined#**label**#undefined#****#6_elementform_id_temp28#**id**#undefined#**label**#undefined#****#6_elementform_id_temp29#**id**#undefined#**label**#undefined#****#6_elementform_id_temp30#**id**#undefined#**label**#undefined#****#6_elementform_id_temp31#**id**#undefined#**label**#undefined#****#6_elementform_id_temp32#**id**#undefined#**label**#undefined#****#6_elementform_id_temp33#**id**#undefined#**label**#undefined#****#6_elementform_id_temp34#**id**#undefined#**label**#undefined#****#6_elementform_id_temp35#**id**#undefined#**label**#undefined#****#6_elementform_id_temp36#**id**#undefined#**label**#undefined#****#6_elementform_id_temp37#**id**#undefined#**label**#undefined#****#6_elementform_id_temp38#**id**#undefined#**label**#undefined#****#6_elementform_id_temp39#**id**#undefined#**label**#undefined#****#6_elementform_id_temp40#**id**#undefined#**label**#undefined#****#6_elementform_id_temp41#**id**#undefined#**label**#undefined#****#6_elementform_id_temp42#**id**#undefined#**label**#undefined#****#6_elementform_id_temp43#**id**#undefined#**label**#undefined#****#6_elementform_id_temp44#**id**#undefined#**label**#undefined#****#6_elementform_id_temp45#**id**#undefined#**label**#undefined#****#6_elementform_id_temp46#**id**#undefined#**label**#undefined#****#6_elementform_id_temp47#**id**#undefined#**label**#undefined#****#6_elementform_id_temp48#**id**#undefined#**label**#undefined#****#6_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_radio*:*type*:*What is your employment status?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*What is your level of education?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*In which industry do you work?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select industry***Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices*:*true***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*no*:*w_value_disabled*:****Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices_value*:*****************:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_radio*:*type*:*What is the annual revenue of your company?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices_value*:**************************:*w_choices_params*:**:*w_class*:**:*new_field*:*5*:*id*:*type_captcha*:*type*:*Enter characters for verification.*:*w_field_label*:**:*w_field_label_size*:*left*:*w_field_label_pos*:*yes*:*w_hide_label*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Business Demographic Survey', 'Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.', '', 'none', '1', '0');");
300
  $insert_form_id[] = $wpdb->insert_id;
301
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Cupcake Order Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Date%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Cupcakes Flavors (1 doz. minimum)%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Quantity%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Details (if any)%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '6', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '8', '1', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp0#**id**#Name#**label**#type_name#****#5_elementform_id_temp1#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp2#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp3#**id**#Name:* Email:* Date* Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#5_elementform_id_temp4#**id**#Quantity#**label**#type_spinner#****#5_elementform_id_temp5#**id**#Details (if any)#**label**#type_textarea#****#5_elementform_id_temp6#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp7#**id**#Name#**label**#type_name#****#5_elementform_id_temp8#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp9#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp10#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp11#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp12#**id**#undefined#**label**#undefined#****#5_elementform_id_temp13#**id**#undefined#**label**#undefined#****#5_elementform_id_temp14#**id**#undefined#**label**#undefined#****#5_elementform_id_temp15#**id**#undefined#**label**#undefined#****#5_elementform_id_temp16#**id**#undefined#**label**#undefined#****#5_elementform_id_temp17#**id**#undefined#**label**#undefined#****#5_elementform_id_temp18#**id**#undefined#**label**#undefined#****#5_elementform_id_temp19#**id**#undefined#**label**#undefined#****#5_elementform_id_temp20#**id**#undefined#**label**#undefined#****#5_elementform_id_temp21#**id**#undefined#**label**#undefined#****#5_elementform_id_temp22#**id**#undefined#**label**#undefined#****#5_elementform_id_temp23#**id**#undefined#**label**#undefined#****#5_elementform_id_temp24#**id**#undefined#**label**#undefined#****#5_elementform_id_temp25#**id**#undefined#**label**#undefined#****#5_elementform_id_temp26#**id**#undefined#**label**#undefined#****#5_elementform_id_temp27#**id**#undefined#**label**#undefined#****#5_elementform_id_temp28#**id**#undefined#**label**#undefined#****#5_elementform_id_temp29#**id**#undefined#**label**#undefined#****#5_elementform_id_temp30#**id**#undefined#**label**#undefined#****#5_elementform_id_temp31#**id**#undefined#**label**#undefined#****#5_elementform_id_temp32#**id**#undefined#**label**#undefined#****#5_elementform_id_temp33#**id**#undefined#**label**#undefined#****#5_elementform_id_temp34#**id**#undefined#**label**#undefined#****#5_elementform_id_temp35#**id**#undefined#**label**#undefined#****#5_elementform_id_temp36#**id**#undefined#**label**#undefined#****#5_elementform_id_temp37#**id**#undefined#**label**#undefined#****#5_elementform_id_temp38#**id**#undefined#**label**#undefined#****#5_elementform_id_temp39#**id**#undefined#**label**#undefined#****#5_elementform_id_temp40#**id**#undefined#**label**#undefined#****#5_elementform_id_temp41#**id**#undefined#**label**#undefined#****#5_elementform_id_temp42#**id**#undefined#**label**#undefined#****#5_elementform_id_temp43#**id**#undefined#**label**#undefined#****#5_elementform_id_temp44#**id**#undefined#**label**#undefined#****#5_elementform_id_temp45#**id**#undefined#**label**#undefined#****#5_elementform_id_temp46#**id**#undefined#**label**#undefined#****#5_elementform_id_temp47#**id**#undefined#**label**#undefined#****#5_elementform_id_temp48#**id**#undefined#**label**#undefined#****#5_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:***********:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_date_new*:*type*:*Date*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_date*:*yes*:*w_required*:*yes*:*w_show_image*:**:*w_class*:*mm/dd/yy*:*w_format*:*0*:*w_start_day*:**:*w_default_date*:**:*w_min_date*:**:*w_max_date*:**:*w_invalid_dates*:*yes***yes***yes***yes***yes***yes***yes*:*w_show_days*:*yes*:*w_hide_time*:*...*:*w_but_val*:*no*:*w_disable_past_days*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Cupcakes Flavors (1 doz. minimum)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices_value*:********************:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_spinner*:*type*:*Quantity*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:*60*:*w_field_width*:**:*w_field_min_value*:**:*w_field_max_value*:*1*:*w_field_step*:*null*:*w_field_value*:*no*:*w_required*:**:*w_class*:**:*new_field*:*7*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Cupcake Order Form', '', '', 'none', '1', '0');");
302
  $insert_form_id[] = $wpdb->insert_id;
303
  }
304
  else {
4
  * Class WDFMInsert
5
  */
6
  class WDFMInsert {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  public static function form_maker_insert() {
13
  global $wpdb;
14
  $charset_collate = $wpdb->get_charset_collate();
291
 
292
  public static function install_demo_forms() {
293
  global $wpdb;
294
+ $form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
295
  if ( !$form_maker_row ) {
296
  $insert_form_id = array();
297
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Contact Us', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Subject%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}\r\n// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', '1', '{all}', '{all}', '6', '1', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*5*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Contact Us', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '', 'none', '0', '0');");
298
  $insert_form_id[] = $wpdb->insert_id;
299
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Client List Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - First Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Last Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Phone%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Website%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Address%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', '1', '{all}', '{all}', '13', '1', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street1form_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street2form_id_temp#**id**##**label**##****#7_cityform_id_temp#**id**#undefined#**label**#undefined#****#7_stateform_id_temp#**id**#undefined#**label**#undefined#****#7_postalform_id_temp#**id**#undefined#**label**#undefined#****#7_countryform_id_temp#**id**#undefined#**label**#undefined#****#', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*First Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Last Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_text*:*type*:*Phone*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*6*:*id*:*type_text*:*type*:*Website*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:*http://example.com*:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*7*:*id*:*type_address*:*type*:*Address*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', '', '', '', 'none', '0', '0');");
300
  $insert_form_id[] = $wpdb->insert_id;
301
+
302
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
303
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Feedback Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%5 - CMS%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Extension%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Plugin%</div><div wdid=\"2\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%2 - Subject%</div><div wdid=\"8\" class=\"wdform_row\">%8 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '3', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', '1', '{all}', '{all}', '9', '1', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#Text#**label**#type_text#****#', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', '0', '', 'USD', '0', '3*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:*First***Last*******:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*CMS*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*hor*:*w_flow*:*Joomla!***Wordpress*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*yes*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Joomla!***Wordpress*:*w_choices_value*:*****:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_own_select*:*type*:*Extension*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select extension***Form Maker***Gallery WD***Spider Calendar*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Gallery WD***Spider Calendar*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*7*:*id*:*type_own_select*:*type*:*Plugin*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select plugin***Form Maker***Photo Gallery***Ecommerce WD*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Photo Gallery***Ecommerce WD*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*8*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '1*:*show_hide*:*6*:*field_label*:*and*:*all_any*:*5***==***Joomla!*:*next_condition*:**:*new_condition*:*1*:*show_hide*:*7*:*field_label*:*and*:*all_any*:*5***==***Wordpress*:*next_condition*:**:*new_condition*:*', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '110', '1', 'Feedback Form', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '" . WDFMInstance(self::PLUGIN)->plugin_url . "/images/demo/2.png', 'flash', '0', '0');");
304
  $insert_form_id[] = $wpdb->insert_id;
305
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Business Demographic Survey', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - What is your employment status?%</div><div wdid=\"3\" class=\"wdform_row\">%3 - What is your level of education?%</div><div wdid=\"4\" class=\"wdform_row\">%4 - In which industry do you work?%</div><div wdid=\"6\" class=\"wdform_row\">%6 - What is the annual revenue of your company?%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Enter characters for verification.%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '4', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', '1', '{all}', '{all}', '7', '1', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp0#**id**#What is your employment status?#**label**#type_radio#****#6_elementform_id_temp1#**id**#What is your level of education?#**label**#type_radio#****#6_elementform_id_temp2#**id**#In which industry do you work?#**label**#type_own_select#****#6_elementform_id_temp3#**id**#Enter characters for verification.#**label**#type_captcha#****#6_elementform_id_temp4#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp5#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp6#**id**##**label**##****#6_elementform_id_temp7#**id**#undefined#**label**#undefined#****#6_elementform_id_temp8#**id**#undefined#**label**#undefined#****#6_elementform_id_temp9#**id**#undefined#**label**#undefined#****#6_elementform_id_temp10#**id**#undefined#**label**#undefined#****#6_elementform_id_temp11#**id**#undefined#**label**#undefined#****#6_elementform_id_temp12#**id**#undefined#**label**#undefined#****#6_elementform_id_temp13#**id**#undefined#**label**#undefined#****#6_elementform_id_temp14#**id**#undefined#**label**#undefined#****#6_elementform_id_temp15#**id**#undefined#**label**#undefined#****#6_elementform_id_temp16#**id**#undefined#**label**#undefined#****#6_elementform_id_temp17#**id**#undefined#**label**#undefined#****#6_elementform_id_temp18#**id**#undefined#**label**#undefined#****#6_elementform_id_temp19#**id**#undefined#**label**#undefined#****#6_elementform_id_temp20#**id**#undefined#**label**#undefined#****#6_elementform_id_temp21#**id**#undefined#**label**#undefined#****#6_elementform_id_temp22#**id**#undefined#**label**#undefined#****#6_elementform_id_temp23#**id**#undefined#**label**#undefined#****#6_elementform_id_temp24#**id**#undefined#**label**#undefined#****#6_elementform_id_temp25#**id**#undefined#**label**#undefined#****#6_elementform_id_temp26#**id**#undefined#**label**#undefined#****#6_elementform_id_temp27#**id**#undefined#**label**#undefined#****#6_elementform_id_temp28#**id**#undefined#**label**#undefined#****#6_elementform_id_temp29#**id**#undefined#**label**#undefined#****#6_elementform_id_temp30#**id**#undefined#**label**#undefined#****#6_elementform_id_temp31#**id**#undefined#**label**#undefined#****#6_elementform_id_temp32#**id**#undefined#**label**#undefined#****#6_elementform_id_temp33#**id**#undefined#**label**#undefined#****#6_elementform_id_temp34#**id**#undefined#**label**#undefined#****#6_elementform_id_temp35#**id**#undefined#**label**#undefined#****#6_elementform_id_temp36#**id**#undefined#**label**#undefined#****#6_elementform_id_temp37#**id**#undefined#**label**#undefined#****#6_elementform_id_temp38#**id**#undefined#**label**#undefined#****#6_elementform_id_temp39#**id**#undefined#**label**#undefined#****#6_elementform_id_temp40#**id**#undefined#**label**#undefined#****#6_elementform_id_temp41#**id**#undefined#**label**#undefined#****#6_elementform_id_temp42#**id**#undefined#**label**#undefined#****#6_elementform_id_temp43#**id**#undefined#**label**#undefined#****#6_elementform_id_temp44#**id**#undefined#**label**#undefined#****#6_elementform_id_temp45#**id**#undefined#**label**#undefined#****#6_elementform_id_temp46#**id**#undefined#**label**#undefined#****#6_elementform_id_temp47#**id**#undefined#**label**#undefined#****#6_elementform_id_temp48#**id**#undefined#**label**#undefined#****#6_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_radio*:*type*:*What is your employment status?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*What is your level of education?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*In which industry do you work?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select industry***Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices*:*true***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*no*:*w_value_disabled*:****Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices_value*:*****************:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_radio*:*type*:*What is the annual revenue of your company?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices_value*:**************************:*w_choices_params*:**:*w_class*:**:*new_field*:*5*:*id*:*type_captcha*:*type*:*Enter characters for verification.*:*w_field_label*:**:*w_field_label_size*:*left*:*w_field_label_pos*:*yes*:*w_hide_label*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Business Demographic Survey', 'Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.', '', 'none', '1', '0');");
306
  $insert_form_id[] = $wpdb->insert_id;
307
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Cupcake Order Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Date%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Cupcakes Flavors (1 doz. minimum)%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Quantity%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Details (if any)%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '6', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', '1', '{all}', '{all}', '8', '1', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp0#**id**#Name#**label**#type_name#****#5_elementform_id_temp1#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp2#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp3#**id**#Name:* Email:* Date* Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#5_elementform_id_temp4#**id**#Quantity#**label**#type_spinner#****#5_elementform_id_temp5#**id**#Details (if any)#**label**#type_textarea#****#5_elementform_id_temp6#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp7#**id**#Name#**label**#type_name#****#5_elementform_id_temp8#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp9#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp10#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp11#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp12#**id**#undefined#**label**#undefined#****#5_elementform_id_temp13#**id**#undefined#**label**#undefined#****#5_elementform_id_temp14#**id**#undefined#**label**#undefined#****#5_elementform_id_temp15#**id**#undefined#**label**#undefined#****#5_elementform_id_temp16#**id**#undefined#**label**#undefined#****#5_elementform_id_temp17#**id**#undefined#**label**#undefined#****#5_elementform_id_temp18#**id**#undefined#**label**#undefined#****#5_elementform_id_temp19#**id**#undefined#**label**#undefined#****#5_elementform_id_temp20#**id**#undefined#**label**#undefined#****#5_elementform_id_temp21#**id**#undefined#**label**#undefined#****#5_elementform_id_temp22#**id**#undefined#**label**#undefined#****#5_elementform_id_temp23#**id**#undefined#**label**#undefined#****#5_elementform_id_temp24#**id**#undefined#**label**#undefined#****#5_elementform_id_temp25#**id**#undefined#**label**#undefined#****#5_elementform_id_temp26#**id**#undefined#**label**#undefined#****#5_elementform_id_temp27#**id**#undefined#**label**#undefined#****#5_elementform_id_temp28#**id**#undefined#**label**#undefined#****#5_elementform_id_temp29#**id**#undefined#**label**#undefined#****#5_elementform_id_temp30#**id**#undefined#**label**#undefined#****#5_elementform_id_temp31#**id**#undefined#**label**#undefined#****#5_elementform_id_temp32#**id**#undefined#**label**#undefined#****#5_elementform_id_temp33#**id**#undefined#**label**#undefined#****#5_elementform_id_temp34#**id**#undefined#**label**#undefined#****#5_elementform_id_temp35#**id**#undefined#**label**#undefined#****#5_elementform_id_temp36#**id**#undefined#**label**#undefined#****#5_elementform_id_temp37#**id**#undefined#**label**#undefined#****#5_elementform_id_temp38#**id**#undefined#**label**#undefined#****#5_elementform_id_temp39#**id**#undefined#**label**#undefined#****#5_elementform_id_temp40#**id**#undefined#**label**#undefined#****#5_elementform_id_temp41#**id**#undefined#**label**#undefined#****#5_elementform_id_temp42#**id**#undefined#**label**#undefined#****#5_elementform_id_temp43#**id**#undefined#**label**#undefined#****#5_elementform_id_temp44#**id**#undefined#**label**#undefined#****#5_elementform_id_temp45#**id**#undefined#**label**#undefined#****#5_elementform_id_temp46#**id**#undefined#**label**#undefined#****#5_elementform_id_temp47#**id**#undefined#**label**#undefined#****#5_elementform_id_temp48#**id**#undefined#**label**#undefined#****#5_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:***********:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_date_new*:*type*:*Date*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_date*:*yes*:*w_required*:*yes*:*w_show_image*:**:*w_class*:*mm/dd/yy*:*w_format*:*0*:*w_start_day*:**:*w_default_date*:**:*w_min_date*:**:*w_max_date*:**:*w_invalid_dates*:*yes***yes***yes***yes***yes***yes***yes*:*w_show_days*:*yes*:*w_hide_time*:*...*:*w_but_val*:*no*:*w_disable_past_days*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Cupcakes Flavors (1 doz. minimum)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices_value*:********************:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_spinner*:*type*:*Quantity*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:*60*:*w_field_width*:**:*w_field_min_value*:**:*w_field_max_value*:*1*:*w_field_step*:*null*:*w_field_value*:*no*:*w_required*:**:*w_class*:**:*new_field*:*7*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Cupcake Order Form', '', '', 'none', '1', '0');");
308
  $insert_form_id[] = $wpdb->insert_id;
309
  }
310
  else {
framework/WDW_FM_Library.php CHANGED
@@ -1,6 +1,30 @@
1
  <?php
2
 
3
  class WDW_FM_Library {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  public static $qpKeys = array(
6
  "\x00",
@@ -519,7 +543,7 @@ class WDW_FM_Library {
519
  ?>
520
  <th id="<?php echo $id; ?>" class="<?php echo implode(' ', $class); ?>">
521
  <a href="<?php echo add_query_arg( array('orderby' => $id, 'order' => $order), $page_url ); ?>"
522
- title="<?php _e('Click to sort by this item', WDFM()->prefix); ?>">
523
  <span><?php echo $text; ?></span><span class="sorting-indicator"></span>
524
  </a>
525
  </th>
@@ -839,7 +863,7 @@ class WDW_FM_Library {
839
  }
840
 
841
  public static function fm_redirect($url) {
842
- $url = html_entity_decode(wp_nonce_url($url, WDFM()->nonce, WDFM()->nonce));
843
  ?>
844
  <script>
845
  window.location = "<?php echo $url; ?>";
@@ -914,11 +938,11 @@ class WDW_FM_Library {
914
  $frontend_dir = '/form-maker-frontend/';
915
  if ( !is_dir($wp_upload_dir['basedir'] . $frontend_dir) ) {
916
  mkdir($wp_upload_dir['basedir'] . $frontend_dir);
917
- file_put_contents($wp_upload_dir['basedir'] . $frontend_dir . 'index.html', WDW_FM_Library::forbidden_template());
918
  }
919
  if ( !is_dir($wp_upload_dir['basedir'] . $frontend_dir . 'js') ) {
920
  mkdir($wp_upload_dir['basedir'] . $frontend_dir . 'js');
921
- file_put_contents($wp_upload_dir['basedir'] . $frontend_dir . 'js/index.html', WDW_FM_Library::forbidden_template());
922
  }
923
  $frontend_js = $wp_upload_dir['basedir'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
924
  if ( !$force_rewrite && file_exists($frontend_js) ) {
@@ -934,10 +958,11 @@ class WDW_FM_Library {
934
  $jsfile = fopen($frontend_js, "w");
935
  $pattern = '/\/\/(.+)(\r\n|\r|\n)/';
936
 
937
- $row_display = WDW_FM_Library::display_options($form_id);
938
  $row->javascript = str_replace('function before_reset()', 'function before_reset' . $form_id . '()', $row->javascript);
939
  $row->javascript = str_replace('function before_load()', 'function before_load' . $form_id . '()', $row->javascript);
940
  $row->javascript = str_replace('function before_submit()', 'function before_submit' . $form_id . '()', $row->javascript);
 
941
  $check_js = '';
942
  $onload_js = '';
943
  $onsubmit_js = '';
@@ -2529,7 +2554,7 @@ class WDW_FM_Library {
2529
  if ( $disable_past_days == 'true' ) {
2530
  $check_js .= '
2531
  if( Date.parse(jQuery("#wdform_' . $id1 . '_element' . $form_id . '").val() + " 23:59:59") < fm_currentDate.getTime() ) {
2532
- alert("' . __('You cannot select former dates. Choose a date starting from the current one.', WDFM()->prefix) . '");
2533
  return false;
2534
  }';
2535
  }
@@ -2941,7 +2966,7 @@ class WDW_FM_Library {
2941
  array_push($req_fields, $id1);
2942
  }
2943
  $file_upload_check[$id1] = $param['w_extension'];
2944
- if ( WDFM()->is_demo ) {
2945
  $onsubmit_js .= 'alert( "You can\'t upload file in demo.");';
2946
  }
2947
  break;
@@ -3107,7 +3132,7 @@ class WDW_FM_Library {
3107
  $check_js .= '
3108
  if(x.find(jQuery("div[wdid=' . $id1 . ']")).length != 0 && x.find(jQuery("div[wdid=' . $id1 . ']")).css("display") != "none") {
3109
  if(jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").val() == "' . $w_title[0] . '" || jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").val() == "") {
3110
- alert("' . addslashes($label . ' ' . __('field is required.', WDFM()->prefix)) . '");
3111
  old_bg=x.find(jQuery("div[wdid=' . $id1 . ']")).css("background-color");
3112
  x.find(jQuery("div[wdid=' . $id1 . ']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
3113
  jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").focus();
@@ -3137,7 +3162,7 @@ class WDW_FM_Library {
3137
  var range_max=' . ($param['w_range_max'] ? $param['w_range_max'] : -1) . ';
3138
  if(' . ($required ? 'true' : 'false') . ' || jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").val() != "' . $w_title[0] . '" || jQuery("#wdform_' . $id1 . '_element_cents' . $form_id . '").val() != "' . $w_title[1] . '") {
3139
  if((range_max!=-1 && parseFloat(price)>range_max) || parseFloat(price)<range_min) {
3140
- alert("' . addslashes((__('The', WDFM()->prefix)) . $label . (__('value must be between', WDFM()->prefix)) . ($param['w_range_min'] ? $param['w_range_min'] : 0) . '-' . ($param['w_range_max'] ? $param['w_range_max'] : "any")) . '");
3141
  old_bg=x.find(jQuery("div[wdid=' . $id1 . ']")).css("background-color");
3142
  x.find(jQuery("div[wdid=' . $id1 . ']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
3143
  jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").focus();
@@ -3263,7 +3288,7 @@ class WDW_FM_Library {
3263
  $onsubmit_js .= '
3264
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("#wdform_' . $id1 . '_element' . $form_id . ' option:selected").text()).appendTo("#form' . $form_id . '");';
3265
  $onsubmit_js .= '
3266
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFM()->prefix)) . '").appendTo("#form' . $form_id . '");';
3267
  foreach ( $param['w_property'] as $key => $property ) {
3268
  $onsubmit_js .= '
3269
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
@@ -3345,7 +3370,7 @@ class WDW_FM_Library {
3345
  $onsubmit_js .= '
3346
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val((jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").length != 0) ? jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").attr("id").replace("element", "elementlabel_") : "").appendTo("#form' . $form_id . '");';
3347
  $onsubmit_js .= '
3348
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFM()->prefix)) . '").appendTo("#form' . $form_id . '");';
3349
  foreach ( $param['w_property'] as $key => $property ) {
3350
  $onsubmit_js .= '
3351
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
@@ -3427,7 +3452,7 @@ class WDW_FM_Library {
3427
  $onsubmit_js .= '
3428
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("label[for=\'"+jQuery("input[name^=\'wdform_' . $id1 . '_element' . $form_id . '\']:checked").attr("id")+"\']").eq(0).text()).appendTo("#form' . $form_id . '");';
3429
  $onsubmit_js .= '
3430
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFM()->prefix)) . '").appendTo("#form' . $form_id . '");';
3431
  foreach ( $param['w_property'] as $key => $property ) {
3432
  $onsubmit_js .= '
3433
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
@@ -3764,7 +3789,7 @@ class WDW_FM_Library {
3764
  var isAllowdedSubmit = true;
3765
  if(x.find(jQuery("div[wdid=' . $id1 . ']")).length != 0 && x.find(jQuery("div[wdid=' . $id1 . ']")).css("display") != "none") {
3766
  if(parseInt(jQuery("#wdform_' . $id1 . '_sum_element' . $form_id . '").html()) > ' . $param['w_total'] . ') {
3767
- alert("' . addslashes(__("Your score should be less than", WDFM()->prefix)) . ' ' . $param['w_total'] . '");
3768
  return false;
3769
  }
3770
  }';
@@ -3880,7 +3905,7 @@ class WDW_FM_Library {
3880
  });
3881
  <?php
3882
  $js_content = ob_get_clean();
3883
- WDW_FM_Library::$fm_js_content = $js_content;
3884
  fwrite($jsfile, $js_content);
3885
  fclose($jsfile);
3886
  clearstatcache();
@@ -3898,7 +3923,7 @@ class WDW_FM_Library {
3898
  $group_id_s = array();
3899
  $form_id = (int) $_REQUEST['form_id'];
3900
  $limitstart = (int) $_REQUEST['limitstart'];
3901
- $search_labels = WDW_FM_Library::get('search_labels', '');
3902
  $verified_emails = isset($_REQUEST['verified_emails']) ? json_decode(stripslashes($_REQUEST['verified_emails']), TRUE) : array();
3903
  $paypal_info_fields = array(
3904
  'currency',
@@ -4180,7 +4205,7 @@ class WDW_FM_Library {
4180
  $title = ($title != '') ? strtolower($title) : 'items';
4181
  ob_start();
4182
  ?><tr class="no-items">
4183
- <td class="colspanchange" colspan="0"><?php echo sprintf(__('No %s found.', WDFM()->prefix), $title); ?></td>
4184
  </tr><?php
4185
  return ob_get_clean();
4186
  }
@@ -4225,7 +4250,7 @@ class WDW_FM_Library {
4225
  */
4226
  public static function deactivate_all_addons() {
4227
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
4228
- $addons = WDW_FM_Library::get_all_addons_path();
4229
  foreach ( $addons as $addon ) {
4230
  if( is_plugin_active( $addon ) ) {
4231
  deactivate_plugins( $addon );
@@ -4241,203 +4266,203 @@ class WDW_FM_Library {
4241
  public static function get_countries() {
4242
  $countries = array(
4243
  "" => "",
4244
- "Afghanistan" => __("Afghanistan", WDFM()->prefix),
4245
- "Albania" => __("Albania", WDFM()->prefix),
4246
- "Algeria" => __("Algeria", WDFM()->prefix),
4247
- "Andorra" => __("Andorra", WDFM()->prefix),
4248
- "Angola" => __("Angola", WDFM()->prefix),
4249
- "Antigua and Barbuda" => __("Antigua and Barbuda", WDFM()->prefix),
4250
- "Argentina" => __("Argentina", WDFM()->prefix),
4251
- "Armenia" => __("Armenia", WDFM()->prefix),
4252
- "Australia" => __("Australia", WDFM()->prefix),
4253
- "Austria" => __("Austria", WDFM()->prefix),
4254
- "Azerbaijan" => __("Azerbaijan", WDFM()->prefix),
4255
- "Bahamas" => __("Bahamas", WDFM()->prefix),
4256
- "Bahrain" => __("Bahrain", WDFM()->prefix),
4257
- "Bangladesh" => __("Bangladesh", WDFM()->prefix),
4258
- "Barbados" => __("Barbados", WDFM()->prefix),
4259
- "Belarus" => __("Belarus", WDFM()->prefix),
4260
- "Belgium" => __("Belgium", WDFM()->prefix),
4261
- "Belize" => __("Belize", WDFM()->prefix),
4262
- "Benin" => __("Benin", WDFM()->prefix),
4263
- "Bhutan" => __("Bhutan", WDFM()->prefix),
4264
- "Bolivia" => __("Bolivia", WDFM()->prefix),
4265
- "Bosnia and Herzegovina" => __("Bosnia and Herzegovina", WDFM()->prefix),
4266
- "Botswana" => __("Botswana", WDFM()->prefix),
4267
- "Brazil" => __("Brazil", WDFM()->prefix),
4268
- "Brunei" => __("Brunei", WDFM()->prefix),
4269
- "Bulgaria" => __("Bulgaria", WDFM()->prefix),
4270
- "Burkina" => __("Burkina Faso", WDFM()->prefix),
4271
- "Burundi" => __("Burundi", WDFM()->prefix),
4272
- "Cambodia" => __("Cambodia", WDFM()->prefix),
4273
- "Cameroon" => __("Cameroon", WDFM()->prefix),
4274
- "Canada" => __("Canada", WDFM()->prefix),
4275
- "Cape Verde" => __("Cape Verde", WDFM()->prefix),
4276
- "Central African Republic" => __("Central African Republic", WDFM()->prefix),
4277
- "Chad" => __("Chad", WDFM()->prefix),
4278
- "Chile" => __("Chile", WDFM()->prefix),
4279
- "China" => __("China", WDFM()->prefix),
4280
- "Colombia" => __("Colombia", WDFM()->prefix),
4281
- "Comoros" => __("Comoros", WDFM()->prefix),
4282
- "Congo (Brazzaville)" => __("Congo (Brazzaville)", WDFM()->prefix),
4283
- "Congo" => __("Congo", WDFM()->prefix),
4284
- "Costa Rica" => __("Costa Rica", WDFM()->prefix),
4285
- "Cote d'Ivoire" => __("Cote d'Ivoire", WDFM()->prefix),
4286
- "Croatia" => __("Croatia", WDFM()->prefix),
4287
- "Cuba" => __("Cuba", WDFM()->prefix),
4288
- "Curacao" => __("Curacao", WDFM()->prefix),
4289
- "Cyprus" => __("Cyprus", WDFM()->prefix),
4290
- "Czech Republic" => __("Czech Republic", WDFM()->prefix),
4291
- "Denmark" => __("Denmark", WDFM()->prefix),
4292
- "Djibouti" => __("Djibouti", WDFM()->prefix),
4293
- "Dominica" => __("Dominica", WDFM()->prefix),
4294
- "Dominican Republic" => __("Dominican Republic", WDFM()->prefix),
4295
- "East Timor (Timor Timur" => __("East Timor (Timor Timur)", WDFM()->prefix),
4296
- "Ecuador" => __("Ecuador", WDFM()->prefix),
4297
- "Egypt" => __("Egypt", WDFM()->prefix),
4298
- "El Salvador" => __("El Salvador", WDFM()->prefix),
4299
- "Equatorial" => __("Equatorial Guinea", WDFM()->prefix),
4300
- "Eritrea" => __("Eritrea", WDFM()->prefix),
4301
- "Estonia" => __("Estonia", WDFM()->prefix),
4302
- "Ethiopia" => __("Ethiopia", WDFM()->prefix),
4303
- "Fiji" => __("Fiji", WDFM()->prefix),
4304
- "Finland" => __("Finland", WDFM()->prefix),
4305
- "France" => __("France", WDFM()->prefix),
4306
- "Gabon" => __("Gabon", WDFM()->prefix),
4307
- "Gambia, The" => __("Gambia, The", WDFM()->prefix),
4308
- "Georgia" => __("Georgia", WDFM()->prefix),
4309
- "Germany" => __("Germany", WDFM()->prefix),
4310
- "Ghana" => __("Ghana", WDFM()->prefix),
4311
- "Greece" => __("Greece", WDFM()->prefix),
4312
- "Grenada" => __("Grenada", WDFM()->prefix),
4313
- "Guatemala" => __("Guatemala", WDFM()->prefix),
4314
- "Guinea" => __("Guinea", WDFM()->prefix),
4315
- "Guinea-Bissau" => __("Guinea-Bissau", WDFM()->prefix),
4316
- "Guyana" => __("Guyana", WDFM()->prefix),
4317
- "Haiti" => __("Haiti", WDFM()->prefix),
4318
- "Honduras" => __("Honduras", WDFM()->prefix),
4319
- "Hong Kong" => __("Hong Kong", WDFM()->prefix),
4320
- "Hungary" => __("Hungary", WDFM()->prefix),
4321
- "Iceland" => __("Iceland", WDFM()->prefix),
4322
- "India" => __("India", WDFM()->prefix),
4323
- "Indonesia" => __("Indonesia", WDFM()->prefix),
4324
- "Iran" => __("Iran", WDFM()->prefix),
4325
- "Iraq" => __("Iraq", WDFM()->prefix),
4326
- "Ireland" => __("Ireland", WDFM()->prefix),
4327
- "Israel" => __("Israel", WDFM()->prefix),
4328
- "Italy" => __("Italy", WDFM()->prefix),
4329
- "Jamaica" => __("Jamaica", WDFM()->prefix),
4330
- "Japan" => __("Japan", WDFM()->prefix),
4331
- "Jordan" => __("Jordan", WDFM()->prefix),
4332
- "Kazakhstan" => __("Kazakhstan", WDFM()->prefix),
4333
- "Kenya" => __("Kenya", WDFM()->prefix),
4334
- "Kiribati" => __("Kiribati", WDFM()->prefix),
4335
- "Korea, North" => __("Korea, North", WDFM()->prefix),
4336
- "Korea, South" => __("Korea, South", WDFM()->prefix),
4337
- "Kuwait" => __("Kuwait", WDFM()->prefix),
4338
- "Kyrgyzstan" => __("Kyrgyzstan", WDFM()->prefix),
4339
- "Laos" => __("Laos", WDFM()->prefix),
4340
- "Latvia" => __("Latvia", WDFM()->prefix),
4341
- "Lebanon" => __("Lebanon", WDFM()->prefix),
4342
- "Lesotho" => __("Lesotho", WDFM()->prefix),
4343
- "Liberia" => __("Liberia", WDFM()->prefix),
4344
- "Libya" => __("Libya", WDFM()->prefix),
4345
- "Liechtenstein" => __("Liechtenstein", WDFM()->prefix),
4346
- "Lithuania" => __("Lithuania", WDFM()->prefix),
4347
- "Luxembourg" => __("Luxembourg", WDFM()->prefix),
4348
- "Macedonia" => __("Macedonia", WDFM()->prefix),
4349
- "Madagascar" => __("Madagascar", WDFM()->prefix),
4350
- "Malawi" => __("Malawi", WDFM()->prefix),
4351
- "Malaysia" => __("Malaysia", WDFM()->prefix),
4352
- "Maldives" => __("Maldives", WDFM()->prefix),
4353
- "Mali" => __("Mali", WDFM()->prefix),
4354
- "Malta" => __("Malta", WDFM()->prefix),
4355
- "Marshall Islands" => __("Marshall Islands", WDFM()->prefix),
4356
- "Mauritania" => __("Mauritania", WDFM()->prefix),
4357
- "Mauritius" => __("Mauritius", WDFM()->prefix),
4358
- "Mexico" => __("Mexico", WDFM()->prefix),
4359
- "Micronesia" => __("Micronesia", WDFM()->prefix),
4360
- "Moldova" => __("Moldova", WDFM()->prefix),
4361
- "Monaco" => __("Monaco", WDFM()->prefix),
4362
- "Mongolia" => __("Mongolia", WDFM()->prefix),
4363
- "Morocco" => __("Morocco", WDFM()->prefix),
4364
- "Mozambique" => __("Mozambique", WDFM()->prefix),
4365
- "Myanmar" => __("Myanmar", WDFM()->prefix),
4366
- "Namibia" => __("Namibia", WDFM()->prefix),
4367
- "Nauru" => __("Nauru", WDFM()->prefix),
4368
- "Nepal" => __("Nepal", WDFM()->prefix),
4369
- "Netherlands" => __("Netherlands", WDFM()->prefix),
4370
- "New Zealand" => __("New Zealand", WDFM()->prefix),
4371
- "Nicaragua" => __("Nicaragua", WDFM()->prefix),
4372
- "Niger" => __("Niger", WDFM()->prefix),
4373
- "Nigeria" => __("Nigeria", WDFM()->prefix),
4374
- "Norway" => __("Norway", WDFM()->prefix),
4375
- "Oman" => __("Oman", WDFM()->prefix),
4376
- "Pakistan" => __("Pakistan", WDFM()->prefix),
4377
- "Palau" => __("Palau", WDFM()->prefix),
4378
- "Panama" => __("Panama", WDFM()->prefix),
4379
- "Papua New Guinea" => __("Papua New Guinea", WDFM()->prefix),
4380
- "Paraguay" => __("Paraguay", WDFM()->prefix),
4381
- "Peru" => __("Peru", WDFM()->prefix),
4382
- "Philippines" => __("Philippines", WDFM()->prefix),
4383
- "Poland" => __("Poland", WDFM()->prefix),
4384
- "Portugal" => __("Portugal", WDFM()->prefix),
4385
- "Puerto Rico" => __("Puerto Rico", WDFM()->prefix),
4386
- "Qatar" => __("Qatar", WDFM()->prefix),
4387
- "Romania" => __("Romania", WDFM()->prefix),
4388
- "Russia" => __("Russia", WDFM()->prefix),
4389
- "Rwanda" => __("Rwanda", WDFM()->prefix),
4390
- "Saint Kitts and Nevis" => __("Saint Kitts and Nevis", WDFM()->prefix),
4391
- "Saint Lucia" => __("Saint Lucia", WDFM()->prefix),
4392
- "Saint Vincent" => __("Saint Vincent", WDFM()->prefix),
4393
- "Samoa" => __("Samoa", WDFM()->prefix),
4394
- "San Marino" => __("San Marino", WDFM()->prefix),
4395
- "Sao Tome and Principe" => __("Sao Tome and Principe", WDFM()->prefix),
4396
- "Saudi Arabia" => __("Saudi Arabia", WDFM()->prefix),
4397
- "Senegal" => __("Senegal", WDFM()->prefix),
4398
- "Serbia and Montenegro" => __("Serbia and Montenegro", WDFM()->prefix),
4399
- "Seychelles" => __("Seychelles", WDFM()->prefix),
4400
- "Sierra Leone" => __("Sierra Leone", WDFM()->prefix),
4401
- "Singapore" => __("Singapore", WDFM()->prefix),
4402
- "Slovakia" => __("Slovakia", WDFM()->prefix),
4403
- "Slovenia" => __("Slovenia", WDFM()->prefix),
4404
- "Solomon Islands" => __("Solomon Islands", WDFM()->prefix),
4405
- "Somalia" => __("Somalia", WDFM()->prefix),
4406
- "South Africa" => __("South Africa", WDFM()->prefix),
4407
- "Spain" => __("Spain", WDFM()->prefix),
4408
- "Sri Lanka" => __("Sri Lanka", WDFM()->prefix),
4409
- "Sudan" => __("Sudan", WDFM()->prefix),
4410
- "Suriname" => __("Suriname", WDFM()->prefix),
4411
- "Swaziland" => __("Swaziland", WDFM()->prefix),
4412
- "Sweden" => __("Sweden", WDFM()->prefix),
4413
- "Switzerland" => __("Switzerland", WDFM()->prefix),
4414
- "Syria" => __("Syria", WDFM()->prefix),
4415
- "Taiwan" => __("Taiwan", WDFM()->prefix),
4416
- "Tajikistan" => __("Tajikistan", WDFM()->prefix),
4417
- "Tanzania" => __("Tanzania", WDFM()->prefix),
4418
- "Thailand" => __("Thailand", WDFM()->prefix),
4419
- "Togo" => __("Togo", WDFM()->prefix),
4420
- "Tonga" => __("Tonga", WDFM()->prefix),
4421
- "Trinidad and Tobago" => __("Trinidad and Tobago", WDFM()->prefix),
4422
- "Tunisia" => __("Tunisia", WDFM()->prefix),
4423
- "Turkey" => __("Turkey", WDFM()->prefix),
4424
- "Turkmenistan" => __("Turkmenistan", WDFM()->prefix),
4425
- "Tuvalu" => __("Tuvalu", WDFM()->prefix),
4426
- "Uganda" => __("Uganda", WDFM()->prefix),
4427
- "Ukraine" => __("Ukraine", WDFM()->prefix),
4428
- "United Arab Emirates" => __("United Arab Emirates", WDFM()->prefix),
4429
- "United Kingdom" => __("United Kingdom", WDFM()->prefix),
4430
- "United States" => __("United States", WDFM()->prefix),
4431
- "Uruguay" => __("Uruguay", WDFM()->prefix),
4432
- "Uzbekistan" => __("Uzbekistan", WDFM()->prefix),
4433
- "Vanuatu" => __("Vanuatu", WDFM()->prefix),
4434
- "Vatican City" => __("Vatican City", WDFM()->prefix),
4435
- "Venezuela" => __("Venezuela", WDFM()->prefix),
4436
- "Vietnam" => __("Vietnam", WDFM()->prefix),
4437
- "Wales" => __("Wales", WDFM()->prefix),
4438
- "Yemen" => __("Yemen", WDFM()->prefix),
4439
- "Zambia" => __("Zambia", WDFM()->prefix),
4440
- "Zimbabwe" => __("Zimbabwe", WDFM()->prefix),
4441
  );
4442
 
4443
  return $countries;
@@ -4451,57 +4476,57 @@ class WDW_FM_Library {
4451
  public static function get_states() {
4452
  $states = array(
4453
  "" => "",
4454
- "Alabama" => __("Alabama", WDFM()->prefix),
4455
- "Alaska" => __("Alaska", WDFM()->prefix),
4456
- "Arizona" => __("Arizona", WDFM()->prefix),
4457
- "Arkansas" => __("Arkansas", WDFM()->prefix),
4458
- "California" => __("California", WDFM()->prefix),
4459
- "Colorado" => __("Colorado", WDFM()->prefix),
4460
- "Connecticut" => __("Connecticut", WDFM()->prefix),
4461
- "Delaware" => __("Delaware", WDFM()->prefix),
4462
- "District Of Columbia" => __("District Of Columbia", WDFM()->prefix),
4463
- "Florida" => __("Florida", WDFM()->prefix),
4464
- "Georgia" => __("Georgia", WDFM()->prefix),
4465
- "Hawaii" => __("Hawaii", WDFM()->prefix),
4466
- "Idaho" => __("Idaho", WDFM()->prefix),
4467
- "Illinois" => __("Illinois", WDFM()->prefix),
4468
- "Indiana" => __("Indiana", WDFM()->prefix),
4469
- "Iowa" => __("Iowa", WDFM()->prefix),
4470
- "Kansas" => __("Kansas", WDFM()->prefix),
4471
- "Kentucky" => __("Kentucky", WDFM()->prefix),
4472
- "Louisiana" => __("Louisiana", WDFM()->prefix),
4473
- "Maine" => __("Maine", WDFM()->prefix),
4474
- "Maryland" => __("Maryland", WDFM()->prefix),
4475
- "Massachusetts" => __("Massachusetts", WDFM()->prefix),
4476
- "Michigan" => __("Michigan", WDFM()->prefix),
4477
- "Minnesota" => __("Minnesota", WDFM()->prefix),
4478
- "Mississippi" => __("Mississippi", WDFM()->prefix),
4479
- "Missouri" => __("Missouri", WDFM()->prefix),
4480
- "Montana" => __("Montana", WDFM()->prefix),
4481
- "Nebraska" => __("Nebraska", WDFM()->prefix),
4482
- "Nevada" => __("Nevada", WDFM()->prefix),
4483
- "New Hampshire" => __("New Hampshire", WDFM()->prefix),
4484
- "New Jersey" => __("New Jersey", WDFM()->prefix),
4485
- "New Mexico" => __("New Mexico", WDFM()->prefix),
4486
- "New York" => __("New York", WDFM()->prefix),
4487
- "North Carolina" => __("North Carolina", WDFM()->prefix),
4488
- "North Dakota" => __("North Dakota", WDFM()->prefix),
4489
- "Ohio" => __("Ohio", WDFM()->prefix),
4490
- "Oklahoma" => __("Oklahoma", WDFM()->prefix),
4491
- "Oregon" => __("Oregon", WDFM()->prefix),
4492
- "Pennsylvania" => __("Pennsylvania", WDFM()->prefix),
4493
- "Rhode Island" => __("Rhode Island", WDFM()->prefix),
4494
- "South Carolina" => __("South Carolina", WDFM()->prefix),
4495
- "South Dakota" => __("South Dakota", WDFM()->prefix),
4496
- "Tennessee" => __("Tennessee", WDFM()->prefix),
4497
- "Texas" => __("Texas", WDFM()->prefix),
4498
- "Utah" => __("Utah", WDFM()->prefix),
4499
- "Vermont" => __("Vermont", WDFM()->prefix),
4500
- "Virginia" => __("Virginia", WDFM()->prefix),
4501
- "Washington" => __("Washington", WDFM()->prefix),
4502
- "West Virginia" => __("West Virginia", WDFM()->prefix),
4503
- "Wisconsin" => __("Wisconsin", WDFM()->prefix),
4504
- "Wyoming" => __("Wyoming", WDFM()->prefix),
4505
  );
4506
 
4507
  return $states;
@@ -4515,15 +4540,15 @@ class WDW_FM_Library {
4515
  public static function localize_ui_datepicker() {
4516
  return 'jQuery(document).ready(function(jQuery){
4517
  jQuery.datepicker.setDefaults( {
4518
- "closeText":"' . __('Done', WDFM()->prefix) . '",
4519
- "prevText":"' . __('Prev', WDFM()->prefix) . '",
4520
- "nextText":"' . __('Next', WDFM()->prefix) . '",
4521
- "currentText":"' . __('Today', WDFM()->prefix) . '",
4522
- "monthNames":["' . __('January', WDFM()->prefix) . '","' . __('February', WDFM()->prefix) . '","' . __('March', WDFM()->prefix) . '","' . __('April', WDFM()->prefix) . '","' . __('May', WDFM()->prefix) . '","' . __('June', WDFM()->prefix) . '","' . __('July', WDFM()->prefix) . '","' . __('August', WDFM()->prefix) . '","' . __('September', WDFM()->prefix) . '","' . __('October', WDFM()->prefix) . '","' . __('November', WDFM()->prefix) . '","' . __('December', WDFM()->prefix) . '"],
4523
- "monthNamesShort":["' . __('Jan', WDFM()->prefix) . '","' . __('Feb', WDFM()->prefix) . '","' . __('Mar', WDFM()->prefix) . '","' . __('Apr', WDFM()->prefix) . '","' . __('May', WDFM()->prefix) . '","' . __('Jun', WDFM()->prefix) . '","' . __('Jul', WDFM()->prefix) . '","' . __('Aug', WDFM()->prefix) . '","' . __('Sep', WDFM()->prefix) . '","' . __('Oct', WDFM()->prefix) . '","' . __('Nov', WDFM()->prefix) . '","' . __('Dec', WDFM()->prefix) . '"],
4524
- "dayNames":["' . __('Sunday', WDFM()->prefix) . '","' . __('Monday', WDFM()->prefix) . '","' . __('Tuesday', WDFM()->prefix) . '","' . __('Wednesday', WDFM()->prefix) . '","' . __('Thursday', WDFM()->prefix) . '","' . __('Friday', WDFM()->prefix) . '","' . __('Saturday', WDFM()->prefix) . '"],
4525
- "dayNamesShort":["' . __('Sun', WDFM()->prefix) . '","' . __('Mon', WDFM()->prefix) . '","' . __('Tue', WDFM()->prefix) . '","' . __('Wed', WDFM()->prefix) . '","' . __('Thu', WDFM()->prefix) . '","' . __('Fri', WDFM()->prefix) . '","' . __('Sat', WDFM()->prefix) . '"],
4526
- "dayNamesMin":["' . __('Su', WDFM()->prefix) . '","' . __('Mo', WDFM()->prefix) . '","' . __('Tu', WDFM()->prefix) . '","' . __('We', WDFM()->prefix) . '","' . __('Th', WDFM()->prefix) . '","' . __('Fr', WDFM()->prefix) . '","' . __('Sa', WDFM()->prefix) . '"]
4527
  });
4528
  })';
4529
  }
@@ -5020,7 +5045,7 @@ class WDW_FM_Library {
5020
  $form_inputs = array();
5021
  $continue_types = array('type_submit_reset', 'type_editor', 'type_map', 'type_mark_map', 'type_captcha', 'type_recaptcha', 'type_button', 'type_send_copy');
5022
  $inputs = array(
5023
- array('value' => 'all', 'title' => __('All fields list', WDFM()->prefix)),
5024
  );
5025
  if ( !empty($labels) ) {
5026
  foreach($labels as $key => $label) {
@@ -5033,18 +5058,18 @@ class WDW_FM_Library {
5033
  $form_inputs[] = array('value' => $key, 'title' => $label['name'] );
5034
  }
5035
  }
5036
- $data[__('Form fields', WDFM()->prefix)] = array_merge($inputs, $form_inputs);
5037
- $data[__('Misc', WDFM()->prefix)] = array(
5038
- array('value' => 'formtitle', 'title' => __('Form Title', WDFM()->prefix)),
5039
- array('value' => 'subid', 'title' => __('Submission ID', WDFM()->prefix)),
5040
- array('value' => 'ip', 'title' => __('IP', WDFM()->prefix)),
5041
- array('value' => 'adminemail', 'title' => __('Admin Email', WDFM()->prefix)),
5042
- array('value' => 'useremail', 'title' => __('User Email', WDFM()->prefix)),
5043
- array('value' => 'username', 'title' => __('User Name', WDFM()->prefix)),
5044
- array('value' => 'pageurl', 'title' => __('Page Url', WDFM()->prefix)),
5045
- array('value' => 'verificationlink', 'title' => __('Verification Link', WDFM()->prefix)),
5046
  );
5047
- $data[__('Misc', WDFM()->prefix)] = apply_filters('fm_placeholders_misc', $data[__('Misc', WDFM()->prefix)]);
5048
  return $data;
5049
  }
5050
 
@@ -5055,13 +5080,13 @@ class WDW_FM_Library {
5055
  */
5056
  public static function get_shortcode_data() {
5057
  global $wpdb;
5058
- $rows = $wpdb->get_results("SELECT `id`, `title` as name FROM `" . $wpdb->prefix . "formmaker`" . (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ') ORDER BY `title`'));
5059
  $data = array();
5060
- $data['shortcode_prefix'] = WDFM()->is_free == 2 ? 'wd_contact_form' : 'Form';
5061
  $data['inputs'][] = array(
5062
  'type' => 'select',
5063
- 'id' => WDFM()->prefix . '_id',
5064
- 'name' => WDFM()->prefix . '_id',
5065
  'shortcode_attibute_name' => 'id',
5066
  'options' => $rows,
5067
  );
1
  <?php
2
 
3
  class WDW_FM_Library {
4
+ /**
5
+ * PLUGIN = 2 points to Contact Form Maker
6
+ */
7
+ const PLUGIN = 1;
8
+
9
+ /**
10
+ * The single instance of the class.
11
+ */
12
+ protected static $_instance = null;
13
+
14
+ /**
15
+ * Main WDW_FM_Library Instance.
16
+ *
17
+ * Ensures only one instance is loaded or can be loaded.
18
+ *
19
+ * @static
20
+ * @return WDW_FM_Library - Main instance.
21
+ */
22
+ public static function instance() {
23
+ if ( is_null( self::$_instance ) ) {
24
+ self::$_instance = new self();
25
+ }
26
+ return self::$_instance;
27
+ }
28
 
29
  public static $qpKeys = array(
30
  "\x00",
543
  ?>
544
  <th id="<?php echo $id; ?>" class="<?php echo implode(' ', $class); ?>">
545
  <a href="<?php echo add_query_arg( array('orderby' => $id, 'order' => $order), $page_url ); ?>"
546
+ title="<?php _e('Click to sort by this item', WDFMInstance(self::PLUGIN)->prefix); ?>">
547
  <span><?php echo $text; ?></span><span class="sorting-indicator"></span>
548
  </a>
549
  </th>
863
  }
864
 
865
  public static function fm_redirect($url) {
866
+ $url = html_entity_decode(wp_nonce_url($url, WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce));
867
  ?>
868
  <script>
869
  window.location = "<?php echo $url; ?>";
938
  $frontend_dir = '/form-maker-frontend/';
939
  if ( !is_dir($wp_upload_dir['basedir'] . $frontend_dir) ) {
940
  mkdir($wp_upload_dir['basedir'] . $frontend_dir);
941
+ file_put_contents($wp_upload_dir['basedir'] . $frontend_dir . 'index.html', self::forbidden_template());
942
  }
943
  if ( !is_dir($wp_upload_dir['basedir'] . $frontend_dir . 'js') ) {
944
  mkdir($wp_upload_dir['basedir'] . $frontend_dir . 'js');
945
+ file_put_contents($wp_upload_dir['basedir'] . $frontend_dir . 'js/index.html', self::forbidden_template());
946
  }
947
  $frontend_js = $wp_upload_dir['basedir'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
948
  if ( !$force_rewrite && file_exists($frontend_js) ) {
958
  $jsfile = fopen($frontend_js, "w");
959
  $pattern = '/\/\/(.+)(\r\n|\r|\n)/';
960
 
961
+ $row_display = self::display_options($form_id);
962
  $row->javascript = str_replace('function before_reset()', 'function before_reset' . $form_id . '()', $row->javascript);
963
  $row->javascript = str_replace('function before_load()', 'function before_load' . $form_id . '()', $row->javascript);
964
  $row->javascript = str_replace('function before_submit()', 'function before_submit' . $form_id . '()', $row->javascript);
965
+ $row->javascript = str_replace('function after_submit()', 'function after_submit' . $form_id . '()', $row->javascript);
966
  $check_js = '';
967
  $onload_js = '';
968
  $onsubmit_js = '';
2554
  if ( $disable_past_days == 'true' ) {
2555
  $check_js .= '
2556
  if( Date.parse(jQuery("#wdform_' . $id1 . '_element' . $form_id . '").val() + " 23:59:59") < fm_currentDate.getTime() ) {
2557
+ alert("' . __('You cannot select former dates. Choose a date starting from the current one.', WDFMInstance(self::PLUGIN)->prefix) . '");
2558
  return false;
2559
  }';
2560
  }
2966
  array_push($req_fields, $id1);
2967
  }
2968
  $file_upload_check[$id1] = $param['w_extension'];
2969
+ if ( WDFMInstance(self::PLUGIN)->is_demo ) {
2970
  $onsubmit_js .= 'alert( "You can\'t upload file in demo.");';
2971
  }
2972
  break;
3132
  $check_js .= '
3133
  if(x.find(jQuery("div[wdid=' . $id1 . ']")).length != 0 && x.find(jQuery("div[wdid=' . $id1 . ']")).css("display") != "none") {
3134
  if(jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").val() == "' . $w_title[0] . '" || jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").val() == "") {
3135
+ alert("' . addslashes($label . ' ' . __('field is required.', WDFMInstance(self::PLUGIN)->prefix)) . '");
3136
  old_bg=x.find(jQuery("div[wdid=' . $id1 . ']")).css("background-color");
3137
  x.find(jQuery("div[wdid=' . $id1 . ']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
3138
  jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").focus();
3162
  var range_max=' . ($param['w_range_max'] ? $param['w_range_max'] : -1) . ';
3163
  if(' . ($required ? 'true' : 'false') . ' || jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").val() != "' . $w_title[0] . '" || jQuery("#wdform_' . $id1 . '_element_cents' . $form_id . '").val() != "' . $w_title[1] . '") {
3164
  if((range_max!=-1 && parseFloat(price)>range_max) || parseFloat(price)<range_min) {
3165
+ alert("' . addslashes((__('The', WDFMInstance(self::PLUGIN)->prefix)) . $label . (__('value must be between', WDFMInstance(self::PLUGIN)->prefix)) . ($param['w_range_min'] ? $param['w_range_min'] : 0) . '-' . ($param['w_range_max'] ? $param['w_range_max'] : "any")) . '");
3166
  old_bg=x.find(jQuery("div[wdid=' . $id1 . ']")).css("background-color");
3167
  x.find(jQuery("div[wdid=' . $id1 . ']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
3168
  jQuery("#wdform_' . $id1 . '_element_dollars' . $form_id . '").focus();
3288
  $onsubmit_js .= '
3289
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("#wdform_' . $id1 . '_element' . $form_id . ' option:selected").text()).appendTo("#form' . $form_id . '");';
3290
  $onsubmit_js .= '
3291
+ jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
3292
  foreach ( $param['w_property'] as $key => $property ) {
3293
  $onsubmit_js .= '
3294
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
3370
  $onsubmit_js .= '
3371
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val((jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").length != 0) ? jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").attr("id").replace("element", "elementlabel_") : "").appendTo("#form' . $form_id . '");';
3372
  $onsubmit_js .= '
3373
+ jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
3374
  foreach ( $param['w_property'] as $key => $property ) {
3375
  $onsubmit_js .= '
3376
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
3452
  $onsubmit_js .= '
3453
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("label[for=\'"+jQuery("input[name^=\'wdform_' . $id1 . '_element' . $form_id . '\']:checked").attr("id")+"\']").eq(0).text()).appendTo("#form' . $form_id . '");';
3454
  $onsubmit_js .= '
3455
+ jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
3456
  foreach ( $param['w_property'] as $key => $property ) {
3457
  $onsubmit_js .= '
3458
  jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
3789
  var isAllowdedSubmit = true;
3790
  if(x.find(jQuery("div[wdid=' . $id1 . ']")).length != 0 && x.find(jQuery("div[wdid=' . $id1 . ']")).css("display") != "none") {
3791
  if(parseInt(jQuery("#wdform_' . $id1 . '_sum_element' . $form_id . '").html()) > ' . $param['w_total'] . ') {
3792
+ alert("' . addslashes(__("Your score should be less than", WDFMInstance(self::PLUGIN)->prefix)) . ' ' . $param['w_total'] . '");
3793
  return false;
3794
  }
3795
  }';
3905
  });
3906
  <?php
3907
  $js_content = ob_get_clean();
3908
+ self::$fm_js_content = $js_content;
3909
  fwrite($jsfile, $js_content);
3910
  fclose($jsfile);
3911
  clearstatcache();
3923
  $group_id_s = array();
3924
  $form_id = (int) $_REQUEST['form_id'];
3925
  $limitstart = (int) $_REQUEST['limitstart'];
3926
+ $search_labels = WDW_FM_Library(self::PLUGIN)->get('search_labels', '');
3927
  $verified_emails = isset($_REQUEST['verified_emails']) ? json_decode(stripslashes($_REQUEST['verified_emails']), TRUE) : array();
3928
  $paypal_info_fields = array(
3929
  'currency',
4205
  $title = ($title != '') ? strtolower($title) : 'items';
4206
  ob_start();
4207
  ?><tr class="no-items">
4208
+ <td class="colspanchange" colspan="0"><?php echo sprintf(__('No %s found.', WDFMInstance(self::PLUGIN)->prefix), $title); ?></td>
4209
  </tr><?php
4210
  return ob_get_clean();
4211
  }
4250
  */
4251
  public static function deactivate_all_addons() {
4252
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
4253
+ $addons = self::get_all_addons_path();
4254
  foreach ( $addons as $addon ) {
4255
  if( is_plugin_active( $addon ) ) {
4256
  deactivate_plugins( $addon );
4266
  public static function get_countries() {
4267
  $countries = array(
4268
  "" => "",
4269
+ "Afghanistan" => __("Afghanistan", WDFMInstance(self::PLUGIN)->prefix),
4270
+ "Albania" => __("Albania", WDFMInstance(self::PLUGIN)->prefix),
4271
+ "Algeria" => __("Algeria", WDFMInstance(self::PLUGIN)->prefix),
4272
+ "Andorra" => __("Andorra", WDFMInstance(self::PLUGIN)->prefix),
4273
+ "Angola" => __("Angola", WDFMInstance(self::PLUGIN)->prefix),
4274
+ "Antigua and Barbuda" => __("Antigua and Barbuda", WDFMInstance(self::PLUGIN)->prefix),
4275
+ "Argentina" => __("Argentina", WDFMInstance(self::PLUGIN)->prefix),
4276
+ "Armenia" => __("Armenia", WDFMInstance(self::PLUGIN)->prefix),
4277
+ "Australia" => __("Australia", WDFMInstance(self::PLUGIN)->prefix),
4278
+ "Austria" => __("Austria", WDFMInstance(self::PLUGIN)->prefix),
4279
+ "Azerbaijan" => __("Azerbaijan", WDFMInstance(self::PLUGIN)->prefix),
4280
+ "Bahamas" => __("Bahamas", WDFMInstance(self::PLUGIN)->prefix),
4281
+ "Bahrain" => __("Bahrain", WDFMInstance(self::PLUGIN)->prefix),
4282
+ "Bangladesh" => __("Bangladesh", WDFMInstance(self::PLUGIN)->prefix),
4283
+ "Barbados" => __("Barbados", WDFMInstance(self::PLUGIN)->prefix),
4284
+ "Belarus" => __("Belarus", WDFMInstance(self::PLUGIN)->prefix),
4285
+ "Belgium" => __("Belgium", WDFMInstance(self::PLUGIN)->prefix),
4286
+ "Belize" => __("Belize", WDFMInstance(self::PLUGIN)->prefix),
4287
+ "Benin" => __("Benin", WDFMInstance(self::PLUGIN)->prefix),
4288
+ "Bhutan" => __("Bhutan", WDFMInstance(self::PLUGIN)->prefix),
4289
+ "Bolivia" => __("Bolivia", WDFMInstance(self::PLUGIN)->prefix),
4290
+ "Bosnia and Herzegovina" => __("Bosnia and Herzegovina", WDFMInstance(self::PLUGIN)->prefix),
4291
+ "Botswana" => __("Botswana", WDFMInstance(self::PLUGIN)->prefix),
4292
+ "Brazil" => __("Brazil", WDFMInstance(self::PLUGIN)->prefix),
4293
+ "Brunei" => __("Brunei", WDFMInstance(self::PLUGIN)->prefix),
4294
+ "Bulgaria" => __("Bulgaria", WDFMInstance(self::PLUGIN)->prefix),
4295
+ "Burkina" => __("Burkina Faso", WDFMInstance(self::PLUGIN)->prefix),
4296
+ "Burundi" => __("Burundi", WDFMInstance(self::PLUGIN)->prefix),
4297
+ "Cambodia" => __("Cambodia", WDFMInstance(self::PLUGIN)->prefix),
4298
+ "Cameroon" => __("Cameroon", WDFMInstance(self::PLUGIN)->prefix),
4299
+ "Canada" => __("Canada", WDFMInstance(self::PLUGIN)->prefix),
4300
+ "Cape Verde" => __("Cape Verde", WDFMInstance(self::PLUGIN)->prefix),
4301
+ "Central African Republic" => __("Central African Republic", WDFMInstance(self::PLUGIN)->prefix),
4302
+ "Chad" => __("Chad", WDFMInstance(self::PLUGIN)->prefix),
4303
+ "Chile" => __("Chile", WDFMInstance(self::PLUGIN)->prefix),
4304
+ "China" => __("China", WDFMInstance(self::PLUGIN)->prefix),
4305
+ "Colombia" => __("Colombia", WDFMInstance(self::PLUGIN)->prefix),
4306
+ "Comoros" => __("Comoros", WDFMInstance(self::PLUGIN)->prefix),
4307
+ "Congo (Brazzaville)" => __("Congo (Brazzaville)", WDFMInstance(self::PLUGIN)->prefix),
4308
+ "Congo" => __("Congo", WDFMInstance(self::PLUGIN)->prefix),
4309
+ "Costa Rica" => __("Costa Rica", WDFMInstance(self::PLUGIN)->prefix),
4310
+ "Cote d'Ivoire" => __("Cote d'Ivoire", WDFMInstance(self::PLUGIN)->prefix),
4311
+ "Croatia" => __("Croatia", WDFMInstance(self::PLUGIN)->prefix),
4312
+ "Cuba" => __("Cuba", WDFMInstance(self::PLUGIN)->prefix),
4313
+ "Curacao" => __("Curacao", WDFMInstance(self::PLUGIN)->prefix),
4314
+ "Cyprus" => __("Cyprus", WDFMInstance(self::PLUGIN)->prefix),
4315
+ "Czech Republic" => __("Czech Republic", WDFMInstance(self::PLUGIN)->prefix),
4316
+ "Denmark" => __("Denmark", WDFMInstance(self::PLUGIN)->prefix),
4317
+ "Djibouti" => __("Djibouti", WDFMInstance(self::PLUGIN)->prefix),
4318
+ "Dominica" => __("Dominica", WDFMInstance(self::PLUGIN)->prefix),
4319
+ "Dominican Republic" => __("Dominican Republic", WDFMInstance(self::PLUGIN)->prefix),
4320
+ "East Timor (Timor Timur" => __("East Timor (Timor Timur)", WDFMInstance(self::PLUGIN)->prefix),
4321
+ "Ecuador" => __("Ecuador", WDFMInstance(self::PLUGIN)->prefix),
4322
+ "Egypt" => __("Egypt", WDFMInstance(self::PLUGIN)->prefix),
4323
+ "El Salvador" => __("El Salvador", WDFMInstance(self::PLUGIN)->prefix),
4324
+ "Equatorial" => __("Equatorial Guinea", WDFMInstance(self::PLUGIN)->prefix),
4325
+ "Eritrea" => __("Eritrea", WDFMInstance(self::PLUGIN)->prefix),
4326
+ "Estonia" => __("Estonia", WDFMInstance(self::PLUGIN)->prefix),
4327
+ "Ethiopia" => __("Ethiopia", WDFMInstance(self::PLUGIN)->prefix),
4328
+ "Fiji" => __("Fiji", WDFMInstance(self::PLUGIN)->prefix),
4329
+ "Finland" => __("Finland", WDFMInstance(self::PLUGIN)->prefix),
4330
+ "France" => __("France", WDFMInstance(self::PLUGIN)->prefix),
4331
+ "Gabon" => __("Gabon", WDFMInstance(self::PLUGIN)->prefix),
4332
+ "Gambia, The" => __("Gambia, The", WDFMInstance(self::PLUGIN)->prefix),
4333
+ "Georgia" => __("Georgia", WDFMInstance(self::PLUGIN)->prefix),
4334
+ "Germany" => __("Germany", WDFMInstance(self::PLUGIN)->prefix),
4335
+ "Ghana" => __("Ghana", WDFMInstance(self::PLUGIN)->prefix),
4336
+ "Greece" => __("Greece", WDFMInstance(self::PLUGIN)->prefix),
4337
+ "Grenada" => __("Grenada", WDFMInstance(self::PLUGIN)->prefix),
4338
+ "Guatemala" => __("Guatemala", WDFMInstance(self::PLUGIN)->prefix),
4339
+ "Guinea" => __("Guinea", WDFMInstance(self::PLUGIN)->prefix),
4340
+ "Guinea-Bissau" => __("Guinea-Bissau", WDFMInstance(self::PLUGIN)->prefix),
4341
+ "Guyana" => __("Guyana", WDFMInstance(self::PLUGIN)->prefix),
4342
+ "Haiti" => __("Haiti", WDFMInstance(self::PLUGIN)->prefix),
4343
+ "Honduras" => __("Honduras", WDFMInstance(self::PLUGIN)->prefix),
4344
+ "Hong Kong" => __("Hong Kong", WDFMInstance(self::PLUGIN)->prefix),
4345
+ "Hungary" => __("Hungary", WDFMInstance(self::PLUGIN)->prefix),
4346
+ "Iceland" => __("Iceland", WDFMInstance(self::PLUGIN)->prefix),
4347
+ "India" => __("India", WDFMInstance(self::PLUGIN)->prefix),
4348
+ "Indonesia" => __("Indonesia", WDFMInstance(self::PLUGIN)->prefix),
4349
+ "Iran" => __("Iran", WDFMInstance(self::PLUGIN)->prefix),
4350
+ "Iraq" => __("Iraq", WDFMInstance(self::PLUGIN)->prefix),
4351
+ "Ireland" => __("Ireland", WDFMInstance(self::PLUGIN)->prefix),
4352
+ "Israel" => __("Israel", WDFMInstance(self::PLUGIN)->prefix),
4353
+ "Italy" => __("Italy", WDFMInstance(self::PLUGIN)->prefix),
4354
+ "Jamaica" => __("Jamaica", WDFMInstance(self::PLUGIN)->prefix),
4355
+ "Japan" => __("Japan", WDFMInstance(self::PLUGIN)->prefix),
4356
+ "Jordan" => __("Jordan", WDFMInstance(self::PLUGIN)->prefix),
4357
+ "Kazakhstan" => __("Kazakhstan", WDFMInstance(self::PLUGIN)->prefix),
4358
+ "Kenya" => __("Kenya", WDFMInstance(self::PLUGIN)->prefix),
4359
+ "Kiribati" => __("Kiribati", WDFMInstance(self::PLUGIN)->prefix),
4360
+ "Korea, North" => __("Korea, North", WDFMInstance(self::PLUGIN)->prefix),
4361
+ "Korea, South" => __("Korea, South", WDFMInstance(self::PLUGIN)->prefix),
4362
+ "Kuwait" => __("Kuwait", WDFMInstance(self::PLUGIN)->prefix),
4363
+ "Kyrgyzstan" => __("Kyrgyzstan", WDFMInstance(self::PLUGIN)->prefix),
4364
+ "Laos" => __("Laos", WDFMInstance(self::PLUGIN)->prefix),
4365
+ "Latvia" => __("Latvia", WDFMInstance(self::PLUGIN)->prefix),
4366
+ "Lebanon" => __("Lebanon", WDFMInstance(self::PLUGIN)->prefix),
4367
+ "Lesotho" => __("Lesotho", WDFMInstance(self::PLUGIN)->prefix),
4368
+ "Liberia" => __("Liberia", WDFMInstance(self::PLUGIN)->prefix),
4369
+ "Libya" => __("Libya", WDFMInstance(self::PLUGIN)->prefix),
4370
+ "Liechtenstein" => __("Liechtenstein", WDFMInstance(self::PLUGIN)->prefix),
4371
+ "Lithuania" => __("Lithuania", WDFMInstance(self::PLUGIN)->prefix),
4372
+ "Luxembourg" => __("Luxembourg", WDFMInstance(self::PLUGIN)->prefix),
4373
+ "Macedonia" => __("Macedonia", WDFMInstance(self::PLUGIN)->prefix),
4374
+ "Madagascar" => __("Madagascar", WDFMInstance(self::PLUGIN)->prefix),
4375
+ "Malawi" => __("Malawi", WDFMInstance(self::PLUGIN)->prefix),
4376
+ "Malaysia" => __("Malaysia", WDFMInstance(self::PLUGIN)->prefix),
4377
+ "Maldives" => __("Maldives", WDFMInstance(self::PLUGIN)->prefix),
4378
+ "Mali" => __("Mali", WDFMInstance(self::PLUGIN)->prefix),
4379
+ "Malta" => __("Malta", WDFMInstance(self::PLUGIN)->prefix),
4380
+ "Marshall Islands" => __("Marshall Islands", WDFMInstance(self::PLUGIN)->prefix),
4381
+ "Mauritania" => __("Mauritania", WDFMInstance(self::PLUGIN)->prefix),
4382
+ "Mauritius" => __("Mauritius", WDFMInstance(self::PLUGIN)->prefix),
4383
+ "Mexico" => __("Mexico", WDFMInstance(self::PLUGIN)->prefix),
4384
+ "Micronesia" => __("Micronesia", WDFMInstance(self::PLUGIN)->prefix),
4385
+ "Moldova" => __("Moldova", WDFMInstance(self::PLUGIN)->prefix),
4386
+ "Monaco" => __("Monaco", WDFMInstance(self::PLUGIN)->prefix),
4387
+ "Mongolia" => __("Mongolia", WDFMInstance(self::PLUGIN)->prefix),
4388
+ "Morocco" => __("Morocco", WDFMInstance(self::PLUGIN)->prefix),
4389
+ "Mozambique" => __("Mozambique", WDFMInstance(self::PLUGIN)->prefix),
4390
+ "Myanmar" => __("Myanmar", WDFMInstance(self::PLUGIN)->prefix),
4391
+ "Namibia" => __("Namibia", WDFMInstance(self::PLUGIN)->prefix),
4392
+ "Nauru" => __("Nauru", WDFMInstance(self::PLUGIN)->prefix),
4393
+ "Nepal" => __("Nepal", WDFMInstance(self::PLUGIN)->prefix),
4394
+ "Netherlands" => __("Netherlands", WDFMInstance(self::PLUGIN)->prefix),
4395
+ "New Zealand" => __("New Zealand", WDFMInstance(self::PLUGIN)->prefix),
4396
+ "Nicaragua" => __("Nicaragua", WDFMInstance(self::PLUGIN)->prefix),
4397
+ "Niger" => __("Niger", WDFMInstance(self::PLUGIN)->prefix),
4398
+ "Nigeria" => __("Nigeria", WDFMInstance(self::PLUGIN)->prefix),
4399
+ "Norway" => __("Norway", WDFMInstance(self::PLUGIN)->prefix),
4400
+ "Oman" => __("Oman", WDFMInstance(self::PLUGIN)->prefix),
4401
+ "Pakistan" => __("Pakistan", WDFMInstance(self::PLUGIN)->prefix),
4402
+ "Palau" => __("Palau", WDFMInstance(self::PLUGIN)->prefix),
4403
+ "Panama" => __("Panama", WDFMInstance(self::PLUGIN)->prefix),
4404
+ "Papua New Guinea" => __("Papua New Guinea", WDFMInstance(self::PLUGIN)->prefix),
4405
+ "Paraguay" => __("Paraguay", WDFMInstance(self::PLUGIN)->prefix),
4406
+ "Peru" => __("Peru", WDFMInstance(self::PLUGIN)->prefix),
4407
+ "Philippines" => __("Philippines", WDFMInstance(self::PLUGIN)->prefix),
4408
+ "Poland" => __("Poland", WDFMInstance(self::PLUGIN)->prefix),
4409
+ "Portugal" => __("Portugal", WDFMInstance(self::PLUGIN)->prefix),
4410
+ "Puerto Rico" => __("Puerto Rico", WDFMInstance(self::PLUGIN)->prefix),
4411
+ "Qatar" => __("Qatar", WDFMInstance(self::PLUGIN)->prefix),
4412
+ "Romania" => __("Romania", WDFMInstance(self::PLUGIN)->prefix),
4413
+ "Russia" => __("Russia", WDFMInstance(self::PLUGIN)->prefix),
4414
+ "Rwanda" => __("Rwanda", WDFMInstance(self::PLUGIN)->prefix),
4415
+ "Saint Kitts and Nevis" => __("Saint Kitts and Nevis", WDFMInstance(self::PLUGIN)->prefix),
4416
+ "Saint Lucia" => __("Saint Lucia", WDFMInstance(self::PLUGIN)->prefix),
4417
+ "Saint Vincent" => __("Saint Vincent", WDFMInstance(self::PLUGIN)->prefix),
4418
+ "Samoa" => __("Samoa", WDFMInstance(self::PLUGIN)->prefix),
4419
+ "San Marino" => __("San Marino", WDFMInstance(self::PLUGIN)->prefix),
4420
+ "Sao Tome and Principe" => __("Sao Tome and Principe", WDFMInstance(self::PLUGIN)->prefix),
4421
+ "Saudi Arabia" => __("Saudi Arabia", WDFMInstance(self::PLUGIN)->prefix),
4422
+ "Senegal" => __("Senegal", WDFMInstance(self::PLUGIN)->prefix),
4423
+ "Serbia and Montenegro" => __("Serbia and Montenegro", WDFMInstance(self::PLUGIN)->prefix),
4424
+ "Seychelles" => __("Seychelles", WDFMInstance(self::PLUGIN)->prefix),
4425
+ "Sierra Leone" => __("Sierra Leone", WDFMInstance(self::PLUGIN)->prefix),
4426
+ "Singapore" => __("Singapore", WDFMInstance(self::PLUGIN)->prefix),
4427
+ "Slovakia" => __("Slovakia", WDFMInstance(self::PLUGIN)->prefix),
4428
+ "Slovenia" => __("Slovenia", WDFMInstance(self::PLUGIN)->prefix),
4429
+ "Solomon Islands" => __("Solomon Islands", WDFMInstance(self::PLUGIN)->prefix),
4430
+ "Somalia" => __("Somalia", WDFMInstance(self::PLUGIN)->prefix),
4431
+ "South Africa" => __("South Africa", WDFMInstance(self::PLUGIN)->prefix),
4432
+ "Spain" => __("Spain", WDFMInstance(self::PLUGIN)->prefix),
4433
+ "Sri Lanka" => __("Sri Lanka", WDFMInstance(self::PLUGIN)->prefix),
4434
+ "Sudan" => __("Sudan", WDFMInstance(self::PLUGIN)->prefix),
4435
+ "Suriname" => __("Suriname", WDFMInstance(self::PLUGIN)->prefix),
4436
+ "Swaziland" => __("Swaziland", WDFMInstance(self::PLUGIN)->prefix),
4437
+ "Sweden" => __("Sweden", WDFMInstance(self::PLUGIN)->prefix),
4438
+ "Switzerland" => __("Switzerland", WDFMInstance(self::PLUGIN)->prefix),
4439
+ "Syria" => __("Syria", WDFMInstance(self::PLUGIN)->prefix),
4440
+ "Taiwan" => __("Taiwan", WDFMInstance(self::PLUGIN)->prefix),
4441
+ "Tajikistan" => __("Tajikistan", WDFMInstance(self::PLUGIN)->prefix),
4442
+ "Tanzania" => __("Tanzania", WDFMInstance(self::PLUGIN)->prefix),
4443
+ "Thailand" => __("Thailand", WDFMInstance(self::PLUGIN)->prefix),
4444
+ "Togo" => __("Togo", WDFMInstance(self::PLUGIN)->prefix),
4445
+ "Tonga" => __("Tonga", WDFMInstance(self::PLUGIN)->prefix),
4446
+ "Trinidad and Tobago" => __("Trinidad and Tobago", WDFMInstance(self::PLUGIN)->prefix),
4447
+ "Tunisia" => __("Tunisia", WDFMInstance(self::PLUGIN)->prefix),
4448
+ "Turkey" => __("Turkey", WDFMInstance(self::PLUGIN)->prefix),
4449
+ "Turkmenistan" => __("Turkmenistan", WDFMInstance(self::PLUGIN)->prefix),
4450
+ "Tuvalu" => __("Tuvalu", WDFMInstance(self::PLUGIN)->prefix),
4451
+ "Uganda" => __("Uganda", WDFMInstance(self::PLUGIN)->prefix),
4452
+ "Ukraine" => __("Ukraine", WDFMInstance(self::PLUGIN)->prefix),
4453
+ "United Arab Emirates" => __("United Arab Emirates", WDFMInstance(self::PLUGIN)->prefix),
4454
+ "United Kingdom" => __("United Kingdom", WDFMInstance(self::PLUGIN)->prefix),
4455
+ "United States" => __("United States", WDFMInstance(self::PLUGIN)->prefix),
4456
+ "Uruguay" => __("Uruguay", WDFMInstance(self::PLUGIN)->prefix),
4457
+ "Uzbekistan" => __("Uzbekistan", WDFMInstance(self::PLUGIN)->prefix),
4458
+ "Vanuatu" => __("Vanuatu", WDFMInstance(self::PLUGIN)->prefix),
4459
+ "Vatican City" => __("Vatican City", WDFMInstance(self::PLUGIN)->prefix),
4460
+ "Venezuela" => __("Venezuela", WDFMInstance(self::PLUGIN)->prefix),
4461
+ "Vietnam" => __("Vietnam", WDFMInstance(self::PLUGIN)->prefix),
4462
+ "Wales" => __("Wales", WDFMInstance(self::PLUGIN)->prefix),
4463
+ "Yemen" => __("Yemen", WDFMInstance(self::PLUGIN)->prefix),
4464
+ "Zambia" => __("Zambia", WDFMInstance(self::PLUGIN)->prefix),
4465
+ "Zimbabwe" => __("Zimbabwe", WDFMInstance(self::PLUGIN)->prefix),
4466
  );
4467
 
4468
  return $countries;
4476
  public static function get_states() {
4477
  $states = array(
4478
  "" => "",
4479
+ "Alabama" => __("Alabama", WDFMInstance(self::PLUGIN)->prefix),
4480
+ "Alaska" => __("Alaska", WDFMInstance(self::PLUGIN)->prefix),
4481
+ "Arizona" => __("Arizona", WDFMInstance(self::PLUGIN)->prefix),
4482
+ "Arkansas" => __("Arkansas", WDFMInstance(self::PLUGIN)->prefix),
4483
+ "California" => __("California", WDFMInstance(self::PLUGIN)->prefix),
4484
+ "Colorado" => __("Colorado", WDFMInstance(self::PLUGIN)->prefix),
4485
+ "Connecticut" => __("Connecticut", WDFMInstance(self::PLUGIN)->prefix),
4486
+ "Delaware" => __("Delaware", WDFMInstance(self::PLUGIN)->prefix),
4487
+ "District Of Columbia" => __("District Of Columbia", WDFMInstance(self::PLUGIN)->prefix),
4488
+ "Florida" => __("Florida", WDFMInstance(self::PLUGIN)->prefix),
4489
+ "Georgia" => __("Georgia", WDFMInstance(self::PLUGIN)->prefix),
4490
+ "Hawaii" => __("Hawaii", WDFMInstance(self::PLUGIN)->prefix),
4491
+ "Idaho" => __("Idaho", WDFMInstance(self::PLUGIN)->prefix),
4492
+ "Illinois" => __("Illinois", WDFMInstance(self::PLUGIN)->prefix),
4493
+ "Indiana" => __("Indiana", WDFMInstance(self::PLUGIN)->prefix),
4494
+ "Iowa" => __("Iowa", WDFMInstance(self::PLUGIN)->prefix),
4495
+ "Kansas" => __("Kansas", WDFMInstance(self::PLUGIN)->prefix),
4496
+ "Kentucky" => __("Kentucky", WDFMInstance(self::PLUGIN)->prefix),
4497
+ "Louisiana" => __("Louisiana", WDFMInstance(self::PLUGIN)->prefix),
4498
+ "Maine" => __("Maine", WDFMInstance(self::PLUGIN)->prefix),
4499
+ "Maryland" => __("Maryland", WDFMInstance(self::PLUGIN)->prefix),
4500
+ "Massachusetts" => __("Massachusetts", WDFMInstance(self::PLUGIN)->prefix),
4501
+ "Michigan" => __("Michigan", WDFMInstance(self::PLUGIN)->prefix),
4502
+ "Minnesota" => __("Minnesota", WDFMInstance(self::PLUGIN)->prefix),
4503
+ "Mississippi" => __("Mississippi", WDFMInstance(self::PLUGIN)->prefix),
4504
+ "Missouri" => __("Missouri", WDFMInstance(self::PLUGIN)->prefix),
4505
+ "Montana" => __("Montana", WDFMInstance(self::PLUGIN)->prefix),
4506
+ "Nebraska" => __("Nebraska", WDFMInstance(self::PLUGIN)->prefix),
4507
+ "Nevada" => __("Nevada", WDFMInstance(self::PLUGIN)->prefix),
4508
+ "New Hampshire" => __("New Hampshire", WDFMInstance(self::PLUGIN)->prefix),
4509
+ "New Jersey" => __("New Jersey", WDFMInstance(self::PLUGIN)->prefix),
4510
+ "New Mexico" => __("New Mexico", WDFMInstance(self::PLUGIN)->prefix),
4511
+ "New York" => __("New York", WDFMInstance(self::PLUGIN)->prefix),
4512
+ "North Carolina" => __("North Carolina", WDFMInstance(self::PLUGIN)->prefix),
4513
+ "North Dakota" => __("North Dakota", WDFMInstance(self::PLUGIN)->prefix),
4514
+ "Ohio" => __("Ohio", WDFMInstance(self::PLUGIN)->prefix),
4515
+ "Oklahoma" => __("Oklahoma", WDFMInstance(self::PLUGIN)->prefix),
4516
+ "Oregon" => __("Oregon", WDFMInstance(self::PLUGIN)->prefix),
4517
+ "Pennsylvania" => __("Pennsylvania", WDFMInstance(self::PLUGIN)->prefix),
4518
+ "Rhode Island" => __("Rhode Island", WDFMInstance(self::PLUGIN)->prefix),
4519
+ "South Carolina" => __("South Carolina", WDFMInstance(self::PLUGIN)->prefix),
4520
+ "South Dakota" => __("South Dakota", WDFMInstance(self::PLUGIN)->prefix),
4521
+ "Tennessee" => __("Tennessee", WDFMInstance(self::PLUGIN)->prefix),
4522
+ "Texas" => __("Texas", WDFMInstance(self::PLUGIN)->prefix),
4523
+ "Utah" => __("Utah", WDFMInstance(self::PLUGIN)->prefix),
4524
+ "Vermont" => __("Vermont", WDFMInstance(self::PLUGIN)->prefix),
4525
+ "Virginia" => __("Virginia", WDFMInstance(self::PLUGIN)->prefix),
4526
+ "Washington" => __("Washington", WDFMInstance(self::PLUGIN)->prefix),
4527
+ "West Virginia" => __("West Virginia", WDFMInstance(self::PLUGIN)->prefix),
4528
+ "Wisconsin" => __("Wisconsin", WDFMInstance(self::PLUGIN)->prefix),
4529
+ "Wyoming" => __("Wyoming", WDFMInstance(self::PLUGIN)->prefix),
4530
  );
4531
 
4532
  return $states;
4540
  public static function localize_ui_datepicker() {
4541
  return 'jQuery(document).ready(function(jQuery){
4542
  jQuery.datepicker.setDefaults( {
4543
+ "closeText":"' . __('Done', WDFMInstance(self::PLUGIN)->prefix) . '",
4544
+ "prevText":"' . __('Prev', WDFMInstance(self::PLUGIN)->prefix) . '",
4545
+ "nextText":"' . __('Next', WDFMInstance(self::PLUGIN)->prefix) . '",
4546
+ "currentText":"' . __('Today', WDFMInstance(self::PLUGIN)->prefix) . '",
4547
+ "monthNames":["' . __('January', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('February', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('March', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('April', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('May', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('June', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('July', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('August', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('September', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('October', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('November', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('December', WDFMInstance(self::PLUGIN)->prefix) . '"],
4548
+ "monthNamesShort":["' . __('Jan', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Feb', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Mar', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Apr', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('May', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Jun', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Jul', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Aug', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Sep', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Oct', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Nov', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Dec', WDFMInstance(self::PLUGIN)->prefix) . '"],
4549
+ "dayNames":["' . __('Sunday', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Monday', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Tuesday', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Wednesday', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Thursday', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Friday', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Saturday', WDFMInstance(self::PLUGIN)->prefix) . '"],
4550
+ "dayNamesShort":["' . __('Sun', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Mon', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Tue', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Wed', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Thu', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Fri', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Sat', WDFMInstance(self::PLUGIN)->prefix) . '"],
4551
+ "dayNamesMin":["' . __('Su', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Mo', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Tu', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('We', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Th', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Fr', WDFMInstance(self::PLUGIN)->prefix) . '","' . __('Sa', WDFMInstance(self::PLUGIN)->prefix) . '"]
4552
  });
4553
  })';
4554
  }
5045
  $form_inputs = array();
5046
  $continue_types = array('type_submit_reset', 'type_editor', 'type_map', 'type_mark_map', 'type_captcha', 'type_recaptcha', 'type_button', 'type_send_copy');
5047
  $inputs = array(
5048
+ array('value' => 'all', 'title' => __('All fields list', WDFMInstance(self::PLUGIN)->prefix)),
5049
  );
5050
  if ( !empty($labels) ) {
5051
  foreach($labels as $key => $label) {
5058
  $form_inputs[] = array('value' => $key, 'title' => $label['name'] );
5059
  }
5060
  }
5061
+ $data[__('Form fields', WDFMInstance(self::PLUGIN)->prefix)] = array_merge($inputs, $form_inputs);
5062
+ $data[__('Misc', WDFMInstance(self::PLUGIN)->prefix)] = array(
5063
+ array('value' => 'formtitle', 'title' => __('Form Title', WDFMInstance(self::PLUGIN)->prefix)),
5064
+ array('value' => 'subid', 'title' => __('Submission ID', WDFMInstance(self::PLUGIN)->prefix)),
5065
+ array('value' => 'ip', 'title' => __('IP', WDFMInstance(self::PLUGIN)->prefix)),
5066
+ array('value' => 'adminemail', 'title' => __('Admin Email', WDFMInstance(self::PLUGIN)->prefix)),
5067
+ array('value' => 'useremail', 'title' => __('User Email', WDFMInstance(self::PLUGIN)->prefix)),
5068
+ array('value' => 'username', 'title' => __('User Name', WDFMInstance(self::PLUGIN)->prefix)),
5069
+ array('value' => 'pageurl', 'title' => __('Page Url', WDFMInstance(self::PLUGIN)->prefix)),
5070
+ array('value' => 'verificationlink', 'title' => __('Verification Link', WDFMInstance(self::PLUGIN)->prefix)),
5071
  );
5072
+ $data[__('Misc', WDFMInstance(self::PLUGIN)->prefix)] = apply_filters('fm_placeholders_misc', $data[__('Misc', WDFMInstance(self::PLUGIN)->prefix)]);
5073
  return $data;
5074
  }
5075
 
5080
  */
5081
  public static function get_shortcode_data() {
5082
  global $wpdb;
5083
+ $rows = $wpdb->get_results("SELECT `id`, `title` as name FROM `" . $wpdb->prefix . "formmaker`" . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ') ORDER BY `title`'));
5084
  $data = array();
5085
+ $data['shortcode_prefix'] = WDFMInstance(self::PLUGIN)->is_free == 2 ? 'wd_contact_form' : 'Form';
5086
  $data['inputs'][] = array(
5087
  'type' => 'select',
5088
+ 'id' => WDFMInstance(self::PLUGIN)->prefix . '_id',
5089
+ 'name' => WDFMInstance(self::PLUGIN)->prefix . '_id',
5090
  'shortcode_attibute_name' => 'id',
5091
  'options' => $rows,
5092
  );
frontend/controllers/form_maker.php CHANGED
@@ -4,6 +4,11 @@
4
  * Class FMControllerForm_maker
5
  */
6
  class FMControllerForm_maker {
 
 
 
 
 
7
  private $view;
8
  private $model;
9
  private $form_preview = false;
@@ -18,10 +23,10 @@ class FMControllerForm_maker {
18
  $this->form_preview = true;
19
  }
20
 
21
- require_once WDFM()->plugin_dir . "/frontend/models/form_maker.php";
22
  $this->model = new FMModelForm_maker();
23
 
24
- require_once WDFM()->plugin_dir . "/frontend/views/form_maker.php";
25
  $this->view = new FMViewForm_maker($this->model);
26
  }
27
 
@@ -46,7 +51,7 @@ class FMControllerForm_maker {
46
  * @return string|void
47
  */
48
  public function display( $id, $type ) {
49
- $fm_settings = get_option('fm_settings');
50
  if ( $type == 'embedded' ) {
51
  $result = $this->model->showform($id, $type);
52
  if ( !$result ) {
@@ -173,7 +178,7 @@ class FMControllerForm_maker {
173
  }
174
  $show_for_admin = current_user_can('administrator') && $form->show_for_admin ? 'true' : 'false';
175
 
176
- if ( $this->form_preview && ($id == WDW_FM_Library::get('wdform_id', 0)) ) {
177
  $display_on_this = TRUE;
178
  }
179
 
4
  * Class FMControllerForm_maker
5
  */
6
  class FMControllerForm_maker {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  private $view;
13
  private $model;
14
  private $form_preview = false;
23
  $this->form_preview = true;
24
  }
25
 
26
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/frontend/models/form_maker.php";
27
  $this->model = new FMModelForm_maker();
28
 
29
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/frontend/views/form_maker.php";
30
  $this->view = new FMViewForm_maker($this->model);
31
  }
32
 
51
  * @return string|void
52
  */
53
  public function display( $id, $type ) {
54
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
55
  if ( $type == 'embedded' ) {
56
  $result = $this->model->showform($id, $type);
57
  if ( !$result ) {
178
  }
179
  $show_for_admin = current_user_can('administrator') && $form->show_for_admin ? 'true' : 'false';
180
 
181
+ if ( $this->form_preview && ($id == WDW_FM_Library(self::PLUGIN)->get('wdform_id', 0)) ) {
182
  $display_on_this = TRUE;
183
  }
184
 
frontend/controllers/verify_email.php CHANGED
@@ -4,6 +4,11 @@
4
  * Class FMControllerVerify_email
5
  */
6
  class FMControllerVerify_email {
 
 
 
 
 
7
  private $view;
8
  private $model;
9
 
@@ -11,10 +16,10 @@ class FMControllerVerify_email {
11
  * FMControllerVerify_email constructor.
12
  */
13
  public function __construct() {
14
- require_once WDFM()->plugin_dir . "/frontend/models/verify_email.php";
15
  $this->model = new FMModelVerify_email();
16
 
17
- require_once WDFM()->plugin_dir . "/frontend/views/verify_email.php";
18
  $this->view = new FMViewVerify_email();
19
  }
20
 
@@ -23,8 +28,8 @@ class FMControllerVerify_email {
23
  }
24
 
25
  public function display() {
26
- $gid = (int) WDW_FM_Library::get('gid', 0);
27
- $hashInfo = WDW_FM_Library::get('h', 0);
28
  $hashInfo = explode("@", $hashInfo);
29
  $md5 = $hashInfo[0];
30
  $recipient = isset($hashInfo[1]) ? $hashInfo[1] : '';
4
  * Class FMControllerVerify_email
5
  */
6
  class FMControllerVerify_email {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  private $view;
13
  private $model;
14
 
16
  * FMControllerVerify_email constructor.
17
  */
18
  public function __construct() {
19
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/frontend/models/verify_email.php";
20
  $this->model = new FMModelVerify_email();
21
 
22
+ require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/frontend/views/verify_email.php";
23
  $this->view = new FMViewVerify_email();
24
  }
25
 
28
  }
29
 
30
  public function display() {
31
+ $gid = (int) WDW_FM_Library(self::PLUGIN)->get('gid', 0);
32
+ $hashInfo = WDW_FM_Library(self::PLUGIN)->get('h', 0);
33
  $hashInfo = explode("@", $hashInfo);
34
  $md5 = $hashInfo[0];
35
  $recipient = isset($hashInfo[1]) ? $hashInfo[1] : '';
frontend/models/form_maker.php CHANGED
@@ -4,6 +4,10 @@
4
  * Class FMModelForm_maker
5
  */
6
  class FMModelForm_maker {
 
 
 
 
7
 
8
  public $fm_css_content;
9
 
@@ -17,25 +21,25 @@ class FMModelForm_maker {
17
  */
18
  public function showform( $id, $type = 'embedded' ) {
19
  global $wpdb;
20
- $row = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFM()->is_free ? '' : ' AND id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')'), $id ) );
21
 
22
  if ( !$row ) {
23
- echo WDW_FM_Library::message( __( 'Something went wrong when trying to display this form.', WDFM()->prefix ), 'fm-notice-error' );
24
  return FALSE;
25
  }
26
 
27
  if ( $row->type != $type ) {
28
- echo WDW_FM_Library::message( __( 'The form you are trying to view does not have Embedded display type.', WDFM()->prefix ), 'fm-notice-error' );
29
  return FALSE;
30
  }
31
 
32
- $form_preview = (WDW_FM_Library::get( 'wdform_id', '' ) == $id) ? TRUE : FALSE;
33
  if ( !$form_preview && !$row->published ) {
34
  // If the form has been unpublished.
35
- echo WDW_FM_Library::message( __( 'The form you are trying to view has been unpublished.', WDFM()->prefix ), 'fm-notice-error' );
36
  return FALSE;
37
  }
38
- $theme_id = WDW_FM_Library::get( 'test_theme', '' );
39
 
40
  if ( $theme_id == '' ) {
41
  $theme_id = $row->theme;
@@ -57,20 +61,20 @@ class FMModelForm_maker {
57
  }
58
  $cssver = isset( $form_theme[ 'version' ] ) ? $form_theme[ 'version' ] : 1;
59
  $this->create_css( $theme_id, $form_theme, $old );
60
- $front_urls = WDFM()->front_urls;
61
  $wp_upload_dir = wp_upload_dir();
62
  $frontend_dir = '/form-maker-frontend/';
63
  $fm_style_dir = $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
64
  $fm_style_url = $front_urls[ 'upload_url' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
65
- if ( !file_exists( $fm_style_dir ) ) {
66
- if ( function_exists( 'wp_add_inline_style' ) ) {
67
- wp_add_inline_style( 'fm-frontend', $this->fm_css_content );
68
  } else {
69
  echo '<style>' . $this->fm_css_content . '</style>';
70
  }
71
  } else {
72
- wp_register_style( 'fm-style-' . $theme_id, $fm_style_url, array(), $cssver );
73
- wp_enqueue_style( 'fm-style-' . $theme_id );
74
  }
75
 
76
  $label_id = array();
@@ -123,11 +127,11 @@ class FMModelForm_maker {
123
  $frontend_dir = '/form-maker-frontend/';
124
  if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir ) ) {
125
  mkdir( $wp_upload_dir[ 'basedir' ] . $frontend_dir );
126
- file_put_contents( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'index.html', WDW_FM_Library::forbidden_template() );
127
  }
128
  if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css' ) ) {
129
  mkdir( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css' );
130
- file_put_contents( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/index.html', WDW_FM_Library::forbidden_template() );
131
  }
132
  $frontend_css = $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
133
  if ( $theme_id && !$force_rewrite && file_exists( $frontend_css ) ) {
@@ -571,7 +575,7 @@ class FMModelForm_maker {
571
  '}';
572
 
573
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-picker {' .
574
- (!empty( $form_theme[ 'OPFBgUrl' ] ) ? 'display: inline-block; width: 22px; height: 22px; background: url("' . WDFM()->plugin_url . '/' . $form_theme[ 'OPFBgUrl' ] . '");' : '') .
575
  (!empty( $form_theme[ 'OPFBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'OPFBGRepeat' ] . ';' : '') .
576
  (!empty( $form_theme[ 'OPFPos1' ] ) ? 'background-position-x:' . $form_theme[ 'OPFPos1' ] . ';' : '') .
577
  (!empty( $form_theme[ 'OPFPos2' ] ) ? 'background-position-y:' . $form_theme[ 'OPFPos2' ] . ';' : '') .
@@ -685,7 +689,7 @@ class FMModelForm_maker {
685
  }
686
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
687
  (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
688
- (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-image: url("' . WDFM()->plugin_url . '/' . $form_theme[ 'SBPBackground' ] . '");' : '') .
689
  (!empty( $form_theme[ 'SBPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'SBPBGRepeat' ] . ';' : '') .
690
  (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-x: calc(100% - 8px);' : '') .
691
  (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-y: 50%;' : '') .
@@ -745,7 +749,7 @@ class FMModelForm_maker {
745
  (!empty( $form_theme[ 'MCCPHeight' ] ) ? 'height:' . $form_theme[ 'MCCPHeight' ] . 'px;' : '') .
746
  (!empty( $form_theme[ 'MCPMargin' ] ) ? 'margin:' . $form_theme[ 'MCCPMargin' ] . 'px;' : '') .
747
  (!empty( $form_theme[ 'MCCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MCCPBGColor' ] . ';' : '') .
748
- (!empty( $form_theme[ 'MCCPBackground' ] ) ? 'background-image: url("' . WDFM()->plugin_url . '/' . $form_theme[ 'MCCPBackground' ] . '");' : '') .
749
  (!empty( $form_theme[ 'MCCPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'MCCPBGRepeat' ] . ';' : '') .
750
  (!empty( $form_theme[ 'MCCPBGPos1' ] ) ? 'background-position-x:' . $form_theme[ 'MCCPBGPos1' ] . ';' : '') .
751
  (!empty( $form_theme[ 'MCCPBGPos2' ] ) ? 'background-position-y:' . $form_theme[ 'MCCPBGPos2' ] . ';' : '') .
@@ -1050,7 +1054,7 @@ class FMModelForm_maker {
1050
  }
1051
  $theme = implode( '{', $body_or_classes_implode );
1052
  $theme = preg_replace( $pattern, ' ', $theme );
1053
- $css_content .= str_replace( '[SITE_ROOT]', WDFM()->plugin_url, $theme );
1054
  }
1055
  $this->fm_css_content = $css_content;
1056
  file_put_contents( $frontend_css, $css_content );
@@ -1063,7 +1067,7 @@ class FMModelForm_maker {
1063
  * @return array|mixed
1064
  */
1065
  public function savedata( $form, $id ) {
1066
- $fm_settings = get_option( 'fm_settings' );
1067
  $all_files = array();
1068
  $correct = FALSE;
1069
  $id_for_old = $id;
@@ -1071,7 +1075,7 @@ class FMModelForm_maker {
1071
  $id = '';
1072
  }
1073
  if ( isset( $_POST[ "counter" . $id ] ) ) {
1074
- WDW_FM_Library::start_session();
1075
  if ( (isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] != 'save') ) {
1076
  if ( isset( $_POST[ "captcha_input" ] ) ) {
1077
  $captcha_input = esc_html( $_POST[ "captcha_input" ] );
@@ -1079,7 +1083,7 @@ class FMModelForm_maker {
1079
  if ( md5( $captcha_input ) == $session_wd_captcha_code ) {
1080
  $correct = TRUE;
1081
  } else {
1082
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFM()->prefix ) ) );
1083
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1084
  $_SESSION[ 'error_or_no' . $id ] = 1;
1085
  }
@@ -1089,7 +1093,7 @@ class FMModelForm_maker {
1089
  if ( md5( $arithmetic_captcha_input ) == $session_wd_arithmetic_captcha_code ) {
1090
  $correct = TRUE;
1091
  } else {
1092
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFM()->prefix ) ) );
1093
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1094
  $_SESSION[ 'error_or_no' . $id ] = 1;
1095
  }
@@ -1113,34 +1117,34 @@ class FMModelForm_maker {
1113
  switch ( $errorcode ) {
1114
  case 'missing-input-secret' :
1115
  case 'invalid-input-secret' : {
1116
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect secret code.', WDFM()->prefix ) ) );
1117
  break;
1118
  }
1119
  case 'missing-input-response' :
1120
  case 'invalid-input-response' :
1121
  case 'bad-request' :
1122
  default: {
1123
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFM()->prefix ) ) );
1124
  break;
1125
  }
1126
  }
1127
  }
1128
  } else {
1129
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFM()->prefix ) ) );
1130
  }
1131
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1132
  $_SESSION[ 'error_or_no' . $id ] = 1;
1133
  $correct = FALSE;
1134
  }
1135
  } else {
1136
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFM()->prefix ) ) );
1137
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1138
  $_SESSION[ 'error_or_no' . $id ] = 1;
1139
  $correct = FALSE;
1140
  }
1141
  } else {
1142
  if ( preg_match( '(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form->label_order_current ) === 1 ) {
1143
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFM()->prefix ) ) );
1144
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1145
  $_SESSION[ 'error_or_no' . $id ] = 1;
1146
  $correct = FALSE;
@@ -1156,18 +1160,18 @@ class FMModelForm_maker {
1156
  global $wpdb;
1157
  $blocked_ip = $wpdb->get_var( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip ) );
1158
  if ( $blocked_ip ) {
1159
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( __( 'Your ip is blacklisted. Please contact the website administrator.', WDFM()->prefix ) );
1160
  wp_redirect( $_SERVER[ "REQUEST_URI" ] );//to be checked
1161
  exit;
1162
  }
1163
  if ( isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] == 'save' ) {
1164
- if ( WDFM()->is_free != 2 ) {
1165
  $current_user = wp_get_current_user();
1166
  $userid = '';
1167
  $username = '';
1168
  $useremail = '';
1169
  $adminemail = get_option( 'admin_email' );
1170
- $current_page_url = WDW_FM_Library::get_current_page_url();
1171
  if ( $current_user->ID != 0 ) {
1172
  $userid = $current_user->ID;
1173
  $username = $current_user->display_name;
@@ -1195,7 +1199,7 @@ class FMModelForm_maker {
1195
  $_SESSION[ 'error_or_no' . $id ] = 1;
1196
  }
1197
  else {
1198
- if ( WDFM()->is_free != 2 ) {
1199
  do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'clear_data' ) );
1200
  }
1201
  $this->gen_mail( $result_temp['group_id'], $result_temp[ 'all_files' ], $id_for_old, $result_temp[ 'redirect_url' ] );
@@ -1300,19 +1304,19 @@ class FMModelForm_maker {
1300
  $form_currency = '$';
1301
  $ip = $_SERVER['REMOTE_ADDR'];
1302
  $adminemail = get_option('admin_email');
1303
- $current_page_url = WDW_FM_Library::get_current_page_url();
1304
  $form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
1305
  $formtitle = $form->title;
1306
  if ( !$form->form_front ) {
1307
  $id = '';
1308
  }
1309
  if ( $form->payment_currency ) {
1310
- $form_currency = WDW_FM_Library::replace_currency_code( $form->payment_currency );
1311
  }
1312
  $label_id = array();
1313
  $label_label = array();
1314
  $label_type = array();
1315
- $disabled_fields = explode( ',', WDW_FM_Library::get('disabled_fields', ''));
1316
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
1317
  $label_all = explode( '#****#', $form->label_order_current );
1318
  $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
@@ -1369,7 +1373,7 @@ class FMModelForm_maker {
1369
  case "type_send_copy":
1370
  case "type_spinner": {
1371
  $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1372
- if ( $required && $value === '' ) {
1373
  $missing_required_field = TRUE;
1374
  }
1375
  break;
@@ -1379,10 +1383,10 @@ class FMModelForm_maker {
1379
  $date_format = isset( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) : "";
1380
  if ( $value ) {
1381
  if ( !$this->fm_validateDate( $value, $date_format ) ) {
1382
- return array( 'error' => true, 'group_id' => $group_id, 'message' => __( "This is not a valid date format.", WDFM()->prefix ) );
1383
  }
1384
  }
1385
- if ( $required && $value === '' ) {
1386
  $missing_required_field = TRUE;
1387
  }
1388
  break;
@@ -1391,7 +1395,7 @@ class FMModelForm_maker {
1391
  $value0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) : "";
1392
  $value1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) : "";
1393
  $value = ($value0) . ' - ' . ($value1);
1394
- if ( $required && ( $value0 === '' || $value1 === '' ) ) {
1395
  $missing_required_field = TRUE;
1396
  }
1397
  break;
@@ -1409,7 +1413,7 @@ class FMModelForm_maker {
1409
  $value1 = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_month" . $id ] ) : "";
1410
  $value2 = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_year" . $id ] ) : "";
1411
  $value = ($value0) . '-' . ($value1) . '-' . ($value2);
1412
- if ( $required && ( $value0 === '' || $value1 === '' || $value2 === '' ) ) {
1413
  $missing_required_field = TRUE;
1414
  }
1415
  break;
@@ -1426,7 +1430,7 @@ class FMModelForm_maker {
1426
  if ( $value3 ) {
1427
  $value .= ' ' . $value3;
1428
  }
1429
- if ( $required && ( $value0 === '' || $value1 === '' ) ) {
1430
  $missing_required_field = TRUE;
1431
  }
1432
  break;
@@ -1435,7 +1439,7 @@ class FMModelForm_maker {
1435
  $value0 = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) : "";
1436
  $value1 = isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) : "";
1437
  $value = ($value0) . ' ' . ($value1);
1438
- if ( $required && ( $value0 === '' || $value1 === '' ) ) {
1439
  $missing_required_field = TRUE;
1440
  }
1441
  break;
@@ -1453,13 +1457,13 @@ class FMModelForm_maker {
1453
  if ( $value3 ) {
1454
  $value .= '@@@' . $value3;
1455
  }
1456
- if ( $required && ( $value0 === '' || $value1 === '' ) ) {
1457
  $missing_required_field = TRUE;
1458
  }
1459
  break;
1460
  }
1461
  case "type_file_upload": {
1462
- if ( WDFM()->is_demo ) {
1463
  $value = '';
1464
  } else {
1465
  if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
@@ -1495,7 +1499,7 @@ class FMModelForm_maker {
1495
  $fileName = $files[ 'name' ][ $file_key ];
1496
  $fileSize = $files[ 'size' ][ $file_key ];
1497
  if ( $fileSize > $max_size * 1024 ) {
1498
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes(sprintf( __('The file exceeds the allowed size of %s KB.', WDFM()->prefix ), $max_size )));
1499
  }
1500
  $uploadedFileNameParts = explode( '.', $fileName );
1501
  $uploadedFileExtension = array_pop( $uploadedFileNameParts );
@@ -1509,7 +1513,7 @@ class FMModelForm_maker {
1509
  }
1510
  }
1511
  if ( $extOk == FALSE ) {
1512
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Can not upload this type of file.', WDFM()->prefix ) ) );
1513
  }
1514
  $fileTemp = $files[ 'tmp_name' ][ $file_key ];
1515
  $p = 1;
@@ -1613,7 +1617,7 @@ class FMModelForm_maker {
1613
  }
1614
  if ( $form->save_uploads == 1 ) {
1615
  if ( !move_uploaded_file( $fileTemp, $upload_dir[ 'basedir' ] . '/' . $destination . '/' . $fileName ) ) {
1616
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Error, file cannot be moved.', WDFM()->prefix ) ) );
1617
  }
1618
  $value .= $upload_dir[ 'baseurl' ] . '/' . $destination . '/' . $fileName . '*@@url@@*';
1619
  $files[ 'tmp_name' ][ $file_key ] = '/' . $destination . '/' . $fileName;
@@ -1626,7 +1630,7 @@ class FMModelForm_maker {
1626
  }
1627
  array_push( $all_files, $temp_file );
1628
  }
1629
- if ( $required && $file_name === '' ) {
1630
  $missing_required_field = TRUE;
1631
  }
1632
  }
@@ -1682,9 +1686,9 @@ class FMModelForm_maker {
1682
  $value = $element;
1683
  break;
1684
  }
1685
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1686
 
1687
- if ( $required && $value === '' ) {
1688
  $missing_required_field = TRUE;
1689
  }
1690
  break;
@@ -1717,7 +1721,7 @@ class FMModelForm_maker {
1717
  }
1718
  }
1719
 
1720
- if ( $required && $value === '' ) {
1721
  $missing_required_field = TRUE;
1722
  }
1723
  break;
@@ -1725,7 +1729,7 @@ class FMModelForm_maker {
1725
  case "type_paypal_price": {
1726
  $value = isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) : 0;
1727
  $value = (int)preg_replace( '/\D/', '', $value );
1728
- if ( $required && $value === 0 ) {
1729
  $missing_required_field = TRUE;
1730
  break;
1731
  }
@@ -1747,7 +1751,7 @@ class FMModelForm_maker {
1747
  }
1748
  case "type_paypal_price_new": {
1749
  $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : 0;
1750
- if ( $required && $value === 0 ) {
1751
  $missing_required_field = TRUE;
1752
  break;
1753
  }
@@ -1769,7 +1773,7 @@ class FMModelForm_maker {
1769
  if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
1770
  $value = esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "");
1771
  }
1772
- if ( $required && $value === '' ) {
1773
  $missing_required_field = TRUE;
1774
  break;
1775
  }
@@ -1805,7 +1809,7 @@ class FMModelForm_maker {
1805
  if ( $element ) {
1806
  $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1807
  }
1808
- if ( $required && $element === '' ) {
1809
  $missing_required_field = TRUE;
1810
  break;
1811
  }
@@ -1837,7 +1841,7 @@ class FMModelForm_maker {
1837
  }
1838
  case "type_paypal_shipping": {
1839
  $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1840
- if ( $required && $element === '' ) {
1841
  $missing_required_field = TRUE;
1842
  break;
1843
  }
@@ -1906,7 +1910,7 @@ class FMModelForm_maker {
1906
  }
1907
  }
1908
  }
1909
- if ( $required && $value === '' ) {
1910
  $missing_required_field = TRUE;
1911
  }
1912
  break;
@@ -1915,7 +1919,7 @@ class FMModelForm_maker {
1915
  $value0 = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? (int) $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
1916
  $value1 = (isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) : "");
1917
  $value = $value0 . '/' . $value1;
1918
- if ( $required && $value0 === 0 ) {
1919
  $missing_required_field = TRUE;
1920
  }
1921
  break;
@@ -1924,14 +1928,14 @@ class FMModelForm_maker {
1924
  $value0 = (isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) : 0);
1925
  $value1 = (isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) : "");
1926
  $value = $value0 . '/' . $value1;
1927
- if ( $required && $value0 === 0 ) {
1928
  $missing_required_field = TRUE;
1929
  }
1930
  break;
1931
  }
1932
  case "type_slider": {
1933
  $value = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) : "";
1934
- if ( $required && $value === '' ) {
1935
  $missing_required_field = TRUE;
1936
  }
1937
  break;
@@ -1940,23 +1944,19 @@ class FMModelForm_maker {
1940
  $value0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) : "";
1941
  $value1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) : "";
1942
  $value = $value0 . '-' . $value1;
1943
- if ( $required && ( $value0 === '' || $value1 === '' ) ) {
1944
  $missing_required_field = TRUE;
1945
  }
1946
  break;
1947
  }
1948
  case "type_grading": {
1949
  $value = "";
1950
- $isset = FALSE;
1951
  $items = explode( ":", isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "" );
1952
  for ( $k = 0; $k < sizeof( $items ) - 1; $k++ ) {
1953
  $element = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) : "");
1954
- if ( $element ) {
1955
- $isset = TRUE;
1956
- }
1957
  $value .= $element . ':';
1958
  }
1959
- if ( $required && $isset === FALSE ) {
1960
  $missing_required_field = TRUE;
1961
  }
1962
  $value .= (isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "") . '***grading***';
@@ -2014,7 +2014,7 @@ class FMModelForm_maker {
2014
  }
2015
  }
2016
  }
2017
- if ( $required && $isset === FALSE ) {
2018
  $missing_required_field = TRUE;
2019
  }
2020
  $value = $rows_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) : "") . '***' . $columns_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) : "") . '***' . (isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) : "") . '***' . $input_value . '***matrix***';
@@ -2023,7 +2023,7 @@ class FMModelForm_maker {
2023
  }
2024
 
2025
  if ( $missing_required_field ) {
2026
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( '%s field is required.', WDFM()->prefix ), $label_label[ $key ] ) ) ) );
2027
  }
2028
 
2029
  if ( $type == "type_address" ) {
@@ -2052,7 +2052,7 @@ class FMModelForm_maker {
2052
  if ( $unique_element == 'yes' ) {
2053
  $unique = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes( $value ) ) );
2054
  if ( $unique ) {
2055
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( 'This field %s requires a unique entry.', WDFM()->prefix ), $label_label[ $key ] ) ) ) );
2056
  }
2057
  }
2058
  }
@@ -2076,7 +2076,7 @@ class FMModelForm_maker {
2076
  'form_id' => $id,
2077
  'element_label' => $i,
2078
  'element_value' => stripslashes( $value ),
2079
- 'group_id' => ($group_id),
2080
  'date' => date( 'Y-m-d H:i:s' ),
2081
  'ip' => $_SERVER[ 'REMOTE_ADDR' ],
2082
  'user_id_wd' => $current_user->ID,
@@ -2091,7 +2091,7 @@ class FMModelForm_maker {
2091
  ) );
2092
  }
2093
  if ( !$save_or_no ) {
2094
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2095
  }
2096
  $chgnac = FALSE;
2097
  } else {
@@ -2139,7 +2139,7 @@ class FMModelForm_maker {
2139
 
2140
  // Get stripe post value.
2141
  $stripe_post_key = 'stripeToken' . $id;
2142
- $stripeToken = WDW_FM_Library::get( $stripe_post_key, '' );
2143
  if ( $is_amount && $stripeToken ) {
2144
  $wdstripe_products_data = new stdClass();
2145
  $tax = $form->tax;
@@ -2182,7 +2182,7 @@ class FMModelForm_maker {
2182
  '%d',
2183
  ) );
2184
  if ( !$save_or_no ) {
2185
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2186
  }
2187
  $total = $total + ($total * $tax) / 100;
2188
  if ( isset( $paypal[ 'shipping' ] ) ) {
@@ -2207,7 +2207,7 @@ class FMModelForm_maker {
2207
  '%d',
2208
  ) );
2209
  if ( !$save_or_no ) {
2210
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2211
  }
2212
  $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
2213
  'form_id' => $id,
@@ -2227,7 +2227,7 @@ class FMModelForm_maker {
2227
  '%d',
2228
  ) );
2229
  if ( !$save_or_no ) {
2230
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2231
  }
2232
  $str = '';
2233
  if ( $form->checkout_mode == 1 || $form->checkout_mode == "production" ) {
@@ -2269,7 +2269,7 @@ class FMModelForm_maker {
2269
  }
2270
  }
2271
  if ( $form->mail_verify ) {
2272
- WDW_FM_Library::start_session();
2273
  unset( $_SESSION[ 'hash' ] );
2274
  unset( $_SESSION[ 'gid' ] );
2275
  $ip = $_SERVER[ 'REMOTE_ADDR' ];
@@ -2297,15 +2297,15 @@ class FMModelForm_maker {
2297
  '%d',
2298
  ) );
2299
  if ( !$save_or_no ) {
2300
- return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2301
  }
2302
  }
2303
  }
2304
  }
2305
  if ( $chgnac ) {
2306
- WDW_FM_Library::start_session();
2307
  if ( $form->submit_text_type != 4 ) {
2308
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Nothing was submitted.', WDFM()->prefix ) ) );
2309
  }
2310
  $_SESSION[ 'error_or_no' . $id ] = 1;
2311
  $_SESSION[ 'form_submit_type' . $id ] = $form->submit_text_type . ',' . $form->id . ',' . $group_id;
@@ -2313,7 +2313,7 @@ class FMModelForm_maker {
2313
  exit;
2314
  }
2315
 
2316
- if ( WDFM()->is_free != 2 ) {
2317
  $custom_fields = array(
2318
  "ip" => $ip,
2319
  "subid" => $group_id,
@@ -2386,7 +2386,7 @@ class FMModelForm_maker {
2386
  $row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id ) );
2387
  $ip = $_SERVER['REMOTE_ADDR'];
2388
  $adminemail = get_option( 'admin_email' );
2389
- $current_page_url = WDW_FM_Library::get_current_page_url();
2390
  $formtitle = $row->title;
2391
  $label_order_original = array();
2392
  $label_order_ids = array();
@@ -2470,7 +2470,7 @@ class FMModelForm_maker {
2470
  */
2471
  public function gen_mail( $group_id, $all_files, $id, $str ) {
2472
  global $wpdb;
2473
- WDW_FM_Library::start_session();
2474
  // checking save uploads option
2475
  $upload_dir = wp_upload_dir();
2476
  $save_uploads = $wpdb->get_var( "SELECT save_uploads FROM " . $wpdb->prefix . "formmaker WHERE id=" . $id );
@@ -2483,7 +2483,7 @@ class FMModelForm_maker {
2483
  $fileTemp = $all_file[ 'tmp_name' ];
2484
  $fileName = $all_file[ 'name' ];
2485
  if ( !move_uploaded_file( $fileTemp, $destination . '/' . $fileName ) ) {
2486
- return array( 1, addslashes( __( 'Error, file cannot be moved.', WDFM()->prefix ) ) );
2487
  }
2488
  $all_file[ 'tmp_name' ] = $destination . "/" . $fileName;
2489
  }
@@ -2494,7 +2494,7 @@ class FMModelForm_maker {
2494
  }
2495
  $ip = $_SERVER['REMOTE_ADDR'];
2496
  $adminemail = get_option( 'admin_email' );
2497
- $current_page_url = WDW_FM_Library::get_current_page_url();
2498
  $formtitle = $row->title;
2499
  $current_user = wp_get_current_user();
2500
  $username = '';
@@ -2509,7 +2509,7 @@ class FMModelForm_maker {
2509
  $total = 0;
2510
  $form_currency = '$';
2511
  if ( $row->payment_currency ) {
2512
- $form_currency = WDW_FM_Library::replace_currency_code( $row->payment_currency );
2513
  }
2514
  $this->custom_fields['ip'] = $ip;
2515
  $this->custom_fields['subid'] = $group_id;
@@ -2532,7 +2532,7 @@ class FMModelForm_maker {
2532
  array_push( $label_label, $label_order_each[ 0 ] );
2533
  array_push( $label_type, $label_order_each[ 1 ] );
2534
  }
2535
- $disabled_fields = explode( ',', WDW_FM_Library::get('disabled_fields', '') );
2536
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
2537
  $list = '<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
2538
  $list_text_mode = '';
@@ -3038,7 +3038,7 @@ class FMModelForm_maker {
3038
  $fromname = $row->mail_from_name_user;
3039
  $subject = !empty( $row->mail_subject_user ) ? $row->mail_subject_user : $row->title;
3040
  $attachment_user = array();
3041
- if ( !WDFM()->is_demo ) {
3042
  for ( $k = 0; $k < count( $all_files ); $k++ ) {
3043
  if ( isset( $all_files[ $k ][ 'tmp_name' ] ) ) {
3044
  if ( !isset( $attachment_user[ $all_files[ $k ][ 'field_key' ] ] ) ) {
@@ -3117,7 +3117,7 @@ class FMModelForm_maker {
3117
 
3118
  $body = $new_script;
3119
  $pdf_data = array('attach_to_admin' => 0, 'attach_to_user' => 0, 'pdf_url' => '');
3120
- if ( WDFM()->is_free != 2 ) {
3121
  $pdf_data = apply_filters( 'fm_pdf_data_frontend', $pdf_data, array( 'custom_fields' => $this->custom_fields, 'form_id' => $id ) );
3122
  }
3123
  if ( $pdf_data['attach_to_user'] ) {
@@ -3160,7 +3160,7 @@ class FMModelForm_maker {
3160
  } else {
3161
  $attachment_user = array();
3162
  }
3163
- WDW_FM_Library::mail( $recipient, $subject, $body, $header_arr, $attachment_user );
3164
  }
3165
  }
3166
  }
@@ -3173,7 +3173,7 @@ class FMModelForm_maker {
3173
 
3174
  $fromname = $row->from_name;
3175
  $attachment = array();
3176
- if ( !WDFM()->is_demo ) {
3177
  for ( $k = 0; $k < count( $all_files ); $k++ ) {
3178
  if ( isset( $all_files[ $k ][ 'tmp_name' ] ) ) {
3179
  if ( !isset( $attachment[ $all_files[ $k ][ 'field_key' ] ] ) ) {
@@ -3265,26 +3265,26 @@ class FMModelForm_maker {
3265
  // Replace pdf link in email body.
3266
  $admin_body = str_replace( '{PDF(link)}', site_url($pdf_data['pdf_url']), $admin_body );
3267
 
3268
- $send = WDW_FM_Library::mail( $recipient, $subject, $admin_body, $header_arr, $attachment );
3269
  }
3270
  $_SESSION[ 'error_or_no' . $id ] = 0;
3271
- $msg = addslashes( __( 'Your form was successfully submitted.', WDFM()->prefix ) );
3272
  if ( $row->sendemail ) {
3273
  if ( $row->mail || $row->send_to ) {
3274
  if ( $send ) {
3275
  if ( $send !== TRUE ) {
3276
  $_SESSION[ 'error_or_no' . $id ] = 1;
3277
- $msg = addslashes( __( 'Error, email was not sent.', WDFM()->prefix ) );
3278
  } else {
3279
  $_SESSION[ 'error_or_no' . $id ] = 0;
3280
- $msg = addslashes( __( 'Your form was successfully submitted.', WDFM()->prefix ) );
3281
  }
3282
  }
3283
  }
3284
  }
3285
 
3286
  // Add-on conditional email
3287
- if ( WDFM()->is_free != 2 ) {
3288
  $fm_email_params = $row->sendemail ? array(
3289
  'admin_body' => $admin_body,
3290
  'body' => $body,
@@ -3815,7 +3815,7 @@ class FMModelForm_maker {
3815
  */
3816
  public function all_forms() {
3817
  global $wpdb;
3818
- $q = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options as display INNER JOIN ' . $wpdb->prefix . 'formmaker as forms ON display.form_id = forms.id WHERE display.type != "embedded" and forms.published=1' . (!WDFM()->is_free ? '' : ' AND forms.id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')');
3819
  $forms = $wpdb->get_results( $q );
3820
  return $forms;
3821
  }
4
  * Class FMModelForm_maker
5
  */
6
  class FMModelForm_maker {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
 
12
  public $fm_css_content;
13
 
21
  */
22
  public function showform( $id, $type = 'embedded' ) {
23
  global $wpdb;
24
+ $row = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' AND id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')'), $id ) );
25
 
26
  if ( !$row ) {
27
+ echo WDW_FM_Library(self::PLUGIN)->message( __( 'Something went wrong when trying to display this form.', WDFMInstance(self::PLUGIN)->prefix ), 'fm-notice-error' );
28
  return FALSE;
29
  }
30
 
31
  if ( $row->type != $type ) {
32
+ echo WDW_FM_Library(self::PLUGIN)->message( __( 'The form you are trying to view does not have Embedded display type.', WDFMInstance(self::PLUGIN)->prefix ), 'fm-notice-error' );
33
  return FALSE;
34
  }
35
 
36
+ $form_preview = (WDW_FM_Library(self::PLUGIN)->get( 'wdform_id', '' ) == $id) ? TRUE : FALSE;
37
  if ( !$form_preview && !$row->published ) {
38
  // If the form has been unpublished.
39
+ echo WDW_FM_Library(self::PLUGIN)->message( __( 'The form you are trying to view has been unpublished.', WDFMInstance(self::PLUGIN)->prefix ), 'fm-notice-error' );
40
  return FALSE;
41
  }
42
+ $theme_id = WDW_FM_Library(self::PLUGIN)->get( 'test_theme', '' );
43
 
44
  if ( $theme_id == '' ) {
45
  $theme_id = $row->theme;
61
  }
62
  $cssver = isset( $form_theme[ 'version' ] ) ? $form_theme[ 'version' ] : 1;
63
  $this->create_css( $theme_id, $form_theme, $old );
64
+ $front_urls = WDFMInstance(self::PLUGIN)->front_urls;
65
  $wp_upload_dir = wp_upload_dir();
66
  $frontend_dir = '/form-maker-frontend/';
67
  $fm_style_dir = $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
68
  $fm_style_url = $front_urls[ 'upload_url' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
69
+ if (!file_exists($fm_style_dir)) {
70
+ if ( function_exists('wp_add_inline_style') ) {
71
+ wp_add_inline_style(WDFMInstance(self::PLUGIN)->handle_prefix . 'frontend', $this->fm_css_content);
72
  } else {
73
  echo '<style>' . $this->fm_css_content . '</style>';
74
  }
75
  } else {
76
+ wp_register_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style-' . $theme_id, $fm_style_url, array(), $cssver);
77
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style-' . $theme_id);
78
  }
79
 
80
  $label_id = array();
127
  $frontend_dir = '/form-maker-frontend/';
128
  if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir ) ) {
129
  mkdir( $wp_upload_dir[ 'basedir' ] . $frontend_dir );
130
+ file_put_contents( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'index.html', WDW_FM_Library(self::PLUGIN)->forbidden_template() );
131
  }
132
  if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css' ) ) {
133
  mkdir( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css' );
134
+ file_put_contents( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/index.html', WDW_FM_Library(self::PLUGIN)->forbidden_template() );
135
  }
136
  $frontend_css = $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
137
  if ( $theme_id && !$force_rewrite && file_exists( $frontend_css ) ) {
575
  '}';
576
 
577
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-picker {' .
578
+ (!empty( $form_theme[ 'OPFBgUrl' ] ) ? 'display: inline-block; width: 22px; height: 22px; background: url("' . WDFMInstance(self::PLUGIN)->plugin_url . '/' . $form_theme[ 'OPFBgUrl' ] . '");' : '') .
579
  (!empty( $form_theme[ 'OPFBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'OPFBGRepeat' ] . ';' : '') .
580
  (!empty( $form_theme[ 'OPFPos1' ] ) ? 'background-position-x:' . $form_theme[ 'OPFPos1' ] . ';' : '') .
581
  (!empty( $form_theme[ 'OPFPos2' ] ) ? 'background-position-y:' . $form_theme[ 'OPFPos2' ] . ';' : '') .
689
  }
690
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
691
  (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
692
+ (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-image: url("' . WDFMInstance(self::PLUGIN)->plugin_url . '/' . $form_theme[ 'SBPBackground' ] . '");' : '') .
693
  (!empty( $form_theme[ 'SBPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'SBPBGRepeat' ] . ';' : '') .
694
  (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-x: calc(100% - 8px);' : '') .
695
  (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-y: 50%;' : '') .
749
  (!empty( $form_theme[ 'MCCPHeight' ] ) ? 'height:' . $form_theme[ 'MCCPHeight' ] . 'px;' : '') .
750
  (!empty( $form_theme[ 'MCPMargin' ] ) ? 'margin:' . $form_theme[ 'MCCPMargin' ] . 'px;' : '') .
751
  (!empty( $form_theme[ 'MCCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MCCPBGColor' ] . ';' : '') .
752
+ (!empty( $form_theme[ 'MCCPBackground' ] ) ? 'background-image: url("' . WDFMInstance(self::PLUGIN)->plugin_url . '/' . $form_theme[ 'MCCPBackground' ] . '");' : '') .
753
  (!empty( $form_theme[ 'MCCPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'MCCPBGRepeat' ] . ';' : '') .
754
  (!empty( $form_theme[ 'MCCPBGPos1' ] ) ? 'background-position-x:' . $form_theme[ 'MCCPBGPos1' ] . ';' : '') .
755
  (!empty( $form_theme[ 'MCCPBGPos2' ] ) ? 'background-position-y:' . $form_theme[ 'MCCPBGPos2' ] . ';' : '') .
1054
  }
1055
  $theme = implode( '{', $body_or_classes_implode );
1056
  $theme = preg_replace( $pattern, ' ', $theme );
1057
+ $css_content .= str_replace( '[SITE_ROOT]', WDFMInstance(self::PLUGIN)->plugin_url, $theme );
1058
  }
1059
  $this->fm_css_content = $css_content;
1060
  file_put_contents( $frontend_css, $css_content );
1067
  * @return array|mixed
1068
  */
1069
  public function savedata( $form, $id ) {
1070
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
1071
  $all_files = array();
1072
  $correct = FALSE;
1073
  $id_for_old = $id;
1075
  $id = '';
1076
  }
1077
  if ( isset( $_POST[ "counter" . $id ] ) ) {
1078
+ WDW_FM_Library(self::PLUGIN)->start_session();
1079
  if ( (isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] != 'save') ) {
1080
  if ( isset( $_POST[ "captcha_input" ] ) ) {
1081
  $captcha_input = esc_html( $_POST[ "captcha_input" ] );
1083
  if ( md5( $captcha_input ) == $session_wd_captcha_code ) {
1084
  $correct = TRUE;
1085
  } else {
1086
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1087
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1088
  $_SESSION[ 'error_or_no' . $id ] = 1;
1089
  }
1093
  if ( md5( $arithmetic_captcha_input ) == $session_wd_arithmetic_captcha_code ) {
1094
  $correct = TRUE;
1095
  } else {
1096
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1097
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1098
  $_SESSION[ 'error_or_no' . $id ] = 1;
1099
  }
1117
  switch ( $errorcode ) {
1118
  case 'missing-input-secret' :
1119
  case 'invalid-input-secret' : {
1120
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect secret code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1121
  break;
1122
  }
1123
  case 'missing-input-response' :
1124
  case 'invalid-input-response' :
1125
  case 'bad-request' :
1126
  default: {
1127
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1128
  break;
1129
  }
1130
  }
1131
  }
1132
  } else {
1133
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1134
  }
1135
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1136
  $_SESSION[ 'error_or_no' . $id ] = 1;
1137
  $correct = FALSE;
1138
  }
1139
  } else {
1140
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1141
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1142
  $_SESSION[ 'error_or_no' . $id ] = 1;
1143
  $correct = FALSE;
1144
  }
1145
  } else {
1146
  if ( preg_match( '(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form->label_order_current ) === 1 ) {
1147
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1148
  $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1149
  $_SESSION[ 'error_or_no' . $id ] = 1;
1150
  $correct = FALSE;
1160
  global $wpdb;
1161
  $blocked_ip = $wpdb->get_var( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip ) );
1162
  if ( $blocked_ip ) {
1163
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( __( 'Your ip is blacklisted. Please contact the website administrator.', WDFMInstance(self::PLUGIN)->prefix ) );
1164
  wp_redirect( $_SERVER[ "REQUEST_URI" ] );//to be checked
1165
  exit;
1166
  }
1167
  if ( isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] == 'save' ) {
1168
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
1169
  $current_user = wp_get_current_user();
1170
  $userid = '';
1171
  $username = '';
1172
  $useremail = '';
1173
  $adminemail = get_option( 'admin_email' );
1174
+ $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
1175
  if ( $current_user->ID != 0 ) {
1176
  $userid = $current_user->ID;
1177
  $username = $current_user->display_name;
1199
  $_SESSION[ 'error_or_no' . $id ] = 1;
1200
  }
1201
  else {
1202
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
1203
  do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'clear_data' ) );
1204
  }
1205
  $this->gen_mail( $result_temp['group_id'], $result_temp[ 'all_files' ], $id_for_old, $result_temp[ 'redirect_url' ] );
1304
  $form_currency = '$';
1305
  $ip = $_SERVER['REMOTE_ADDR'];
1306
  $adminemail = get_option('admin_email');
1307
+ $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
1308
  $form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
1309
  $formtitle = $form->title;
1310
  if ( !$form->form_front ) {
1311
  $id = '';
1312
  }
1313
  if ( $form->payment_currency ) {
1314
+ $form_currency = WDW_FM_Library(self::PLUGIN)->replace_currency_code( $form->payment_currency );
1315
  }
1316
  $label_id = array();
1317
  $label_label = array();
1318
  $label_type = array();
1319
+ $disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields', ''));
1320
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
1321
  $label_all = explode( '#****#', $form->label_order_current );
1322
  $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
1373
  case "type_send_copy":
1374
  case "type_spinner": {
1375
  $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1376
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1377
  $missing_required_field = TRUE;
1378
  }
1379
  break;
1383
  $date_format = isset( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) : "";
1384
  if ( $value ) {
1385
  if ( !$this->fm_validateDate( $value, $date_format ) ) {
1386
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => __( "This is not a valid date format.", WDFMInstance(self::PLUGIN)->prefix ) );
1387
  }
1388
  }
1389
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1390
  $missing_required_field = TRUE;
1391
  }
1392
  break;
1395
  $value0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) : "";
1396
  $value1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) : "";
1397
  $value = ($value0) . ' - ' . ($value1);
1398
+ if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) || !isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ) ) {
1399
  $missing_required_field = TRUE;
1400
  }
1401
  break;
1413
  $value1 = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_month" . $id ] ) : "";
1414
  $value2 = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_year" . $id ] ) : "";
1415
  $value = ($value0) . '-' . ($value1) . '-' . ($value2);
1416
+ if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ) ) {
1417
  $missing_required_field = TRUE;
1418
  }
1419
  break;
1430
  if ( $value3 ) {
1431
  $value .= ' ' . $value3;
1432
  }
1433
+ if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ) ) {
1434
  $missing_required_field = TRUE;
1435
  }
1436
  break;
1439
  $value0 = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) : "";
1440
  $value1 = isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) : "";
1441
  $value = ($value0) . ' ' . ($value1);
1442
+ if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ) ) {
1443
  $missing_required_field = TRUE;
1444
  }
1445
  break;
1457
  if ( $value3 ) {
1458
  $value .= '@@@' . $value3;
1459
  }
1460
+ if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ) ) {
1461
  $missing_required_field = TRUE;
1462
  }
1463
  break;
1464
  }
1465
  case "type_file_upload": {
1466
+ if ( WDFMInstance(self::PLUGIN)->is_demo ) {
1467
  $value = '';
1468
  } else {
1469
  if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
1499
  $fileName = $files[ 'name' ][ $file_key ];
1500
  $fileSize = $files[ 'size' ][ $file_key ];
1501
  if ( $fileSize > $max_size * 1024 ) {
1502
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes(sprintf( __('The file exceeds the allowed size of %s KB.', WDFMInstance(self::PLUGIN)->prefix ), $max_size )));
1503
  }
1504
  $uploadedFileNameParts = explode( '.', $fileName );
1505
  $uploadedFileExtension = array_pop( $uploadedFileNameParts );
1513
  }
1514
  }
1515
  if ( $extOk == FALSE ) {
1516
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Can not upload this type of file.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1517
  }
1518
  $fileTemp = $files[ 'tmp_name' ][ $file_key ];
1519
  $p = 1;
1617
  }
1618
  if ( $form->save_uploads == 1 ) {
1619
  if ( !move_uploaded_file( $fileTemp, $upload_dir[ 'basedir' ] . '/' . $destination . '/' . $fileName ) ) {
1620
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Error, file cannot be moved.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1621
  }
1622
  $value .= $upload_dir[ 'baseurl' ] . '/' . $destination . '/' . $fileName . '*@@url@@*';
1623
  $files[ 'tmp_name' ][ $file_key ] = '/' . $destination . '/' . $fileName;
1630
  }
1631
  array_push( $all_files, $temp_file );
1632
  }
1633
+ if ( $required && !isset( $_FILES[ 'wdform_' . $i . '_file' . $id ] ) ) {
1634
  $missing_required_field = TRUE;
1635
  }
1636
  }
1686
  $value = $element;
1687
  break;
1688
  }
1689
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 'empty_value' ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1690
 
1691
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1692
  $missing_required_field = TRUE;
1693
  }
1694
  break;
1721
  }
1722
  }
1723
 
1724
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1725
  $missing_required_field = TRUE;
1726
  }
1727
  break;
1729
  case "type_paypal_price": {
1730
  $value = isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) : 0;
1731
  $value = (int)preg_replace( '/\D/', '', $value );
1732
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ) {
1733
  $missing_required_field = TRUE;
1734
  break;
1735
  }
1751
  }
1752
  case "type_paypal_price_new": {
1753
  $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : 0;
1754
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1755
  $missing_required_field = TRUE;
1756
  break;
1757
  }
1773
  if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
1774
  $value = esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "");
1775
  }
1776
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1777
  $missing_required_field = TRUE;
1778
  break;
1779
  }
1809
  if ( $element ) {
1810
  $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1811
  }
1812
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1813
  $missing_required_field = TRUE;
1814
  break;
1815
  }
1841
  }
1842
  case "type_paypal_shipping": {
1843
  $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1844
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1845
  $missing_required_field = TRUE;
1846
  break;
1847
  }
1910
  }
1911
  }
1912
  }
1913
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1914
  $missing_required_field = TRUE;
1915
  }
1916
  break;
1919
  $value0 = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? (int) $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
1920
  $value1 = (isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) : "");
1921
  $value = $value0 . '/' . $value1;
1922
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ) {
1923
  $missing_required_field = TRUE;
1924
  }
1925
  break;
1928
  $value0 = (isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) : 0);
1929
  $value1 = (isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) : "");
1930
  $value = $value0 . '/' . $value1;
1931
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ) {
1932
  $missing_required_field = TRUE;
1933
  }
1934
  break;
1935
  }
1936
  case "type_slider": {
1937
  $value = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) : "";
1938
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ) {
1939
  $missing_required_field = TRUE;
1940
  }
1941
  break;
1944
  $value0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) : "";
1945
  $value1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) : "";
1946
  $value = $value0 . '-' . $value1;
1947
+ if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) || !isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ) ) {
1948
  $missing_required_field = TRUE;
1949
  }
1950
  break;
1951
  }
1952
  case "type_grading": {
1953
  $value = "";
 
1954
  $items = explode( ":", isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "" );
1955
  for ( $k = 0; $k < sizeof( $items ) - 1; $k++ ) {
1956
  $element = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) : "");
 
 
 
1957
  $value .= $element . ':';
1958
  }
1959
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1960
  $missing_required_field = TRUE;
1961
  }
1962
  $value .= (isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "") . '***grading***';
2014
  }
2015
  }
2016
  }
2017
+ if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2018
  $missing_required_field = TRUE;
2019
  }
2020
  $value = $rows_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) : "") . '***' . $columns_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) : "") . '***' . (isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) : "") . '***' . $input_value . '***matrix***';
2023
  }
2024
 
2025
  if ( $missing_required_field ) {
2026
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( '%s field is required.', WDFMInstance(self::PLUGIN)->prefix ), $label_label[ $key ] ) ) ) );
2027
  }
2028
 
2029
  if ( $type == "type_address" ) {
2052
  if ( $unique_element == 'yes' ) {
2053
  $unique = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes( $value ) ) );
2054
  if ( $unique ) {
2055
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( 'This field %s requires a unique entry.', WDFMInstance(self::PLUGIN)->prefix ), $label_label[ $key ] ) ) ) );
2056
  }
2057
  }
2058
  }
2076
  'form_id' => $id,
2077
  'element_label' => $i,
2078
  'element_value' => stripslashes( $value ),
2079
+ 'group_id' => $group_id,
2080
  'date' => date( 'Y-m-d H:i:s' ),
2081
  'ip' => $_SERVER[ 'REMOTE_ADDR' ],
2082
  'user_id_wd' => $current_user->ID,
2091
  ) );
2092
  }
2093
  if ( !$save_or_no ) {
2094
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2095
  }
2096
  $chgnac = FALSE;
2097
  } else {
2139
 
2140
  // Get stripe post value.
2141
  $stripe_post_key = 'stripeToken' . $id;
2142
+ $stripeToken = WDW_FM_Library(self::PLUGIN)->get( $stripe_post_key, '' );
2143
  if ( $is_amount && $stripeToken ) {
2144
  $wdstripe_products_data = new stdClass();
2145
  $tax = $form->tax;
2182
  '%d',
2183
  ) );
2184
  if ( !$save_or_no ) {
2185
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2186
  }
2187
  $total = $total + ($total * $tax) / 100;
2188
  if ( isset( $paypal[ 'shipping' ] ) ) {
2207
  '%d',
2208
  ) );
2209
  if ( !$save_or_no ) {
2210
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2211
  }
2212
  $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
2213
  'form_id' => $id,
2227
  '%d',
2228
  ) );
2229
  if ( !$save_or_no ) {
2230
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2231
  }
2232
  $str = '';
2233
  if ( $form->checkout_mode == 1 || $form->checkout_mode == "production" ) {
2269
  }
2270
  }
2271
  if ( $form->mail_verify ) {
2272
+ WDW_FM_Library(self::PLUGIN)->start_session();
2273
  unset( $_SESSION[ 'hash' ] );
2274
  unset( $_SESSION[ 'gid' ] );
2275
  $ip = $_SERVER[ 'REMOTE_ADDR' ];
2297
  '%d',
2298
  ) );
2299
  if ( !$save_or_no ) {
2300
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2301
  }
2302
  }
2303
  }
2304
  }
2305
  if ( $chgnac ) {
2306
+ WDW_FM_Library(self::PLUGIN)->start_session();
2307
  if ( $form->submit_text_type != 4 ) {
2308
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Nothing was submitted.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2309
  }
2310
  $_SESSION[ 'error_or_no' . $id ] = 1;
2311
  $_SESSION[ 'form_submit_type' . $id ] = $form->submit_text_type . ',' . $form->id . ',' . $group_id;
2313
  exit;
2314
  }
2315
 
2316
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
2317
  $custom_fields = array(
2318
  "ip" => $ip,
2319
  "subid" => $group_id,
2386
  $row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id ) );
2387
  $ip = $_SERVER['REMOTE_ADDR'];
2388
  $adminemail = get_option( 'admin_email' );
2389
+ $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
2390
  $formtitle = $row->title;
2391
  $label_order_original = array();
2392
  $label_order_ids = array();
2470
  */
2471
  public function gen_mail( $group_id, $all_files, $id, $str ) {
2472
  global $wpdb;
2473
+ WDW_FM_Library(self::PLUGIN)->start_session();
2474
  // checking save uploads option
2475
  $upload_dir = wp_upload_dir();
2476
  $save_uploads = $wpdb->get_var( "SELECT save_uploads FROM " . $wpdb->prefix . "formmaker WHERE id=" . $id );
2483
  $fileTemp = $all_file[ 'tmp_name' ];
2484
  $fileName = $all_file[ 'name' ];
2485
  if ( !move_uploaded_file( $fileTemp, $destination . '/' . $fileName ) ) {
2486
+ return array( 1, addslashes( __( 'Error, file cannot be moved.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2487
  }
2488
  $all_file[ 'tmp_name' ] = $destination . "/" . $fileName;
2489
  }
2494
  }
2495
  $ip = $_SERVER['REMOTE_ADDR'];
2496
  $adminemail = get_option( 'admin_email' );
2497
+ $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
2498
  $formtitle = $row->title;
2499
  $current_user = wp_get_current_user();
2500
  $username = '';
2509
  $total = 0;
2510
  $form_currency = '$';
2511
  if ( $row->payment_currency ) {
2512
+ $form_currency = WDW_FM_Library(self::PLUGIN)->replace_currency_code( $row->payment_currency );
2513
  }
2514
  $this->custom_fields['ip'] = $ip;
2515
  $this->custom_fields['subid'] = $group_id;
2532
  array_push( $label_label, $label_order_each[ 0 ] );
2533
  array_push( $label_type, $label_order_each[ 1 ] );
2534
  }
2535
+ $disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields', '') );
2536
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
2537
  $list = '<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
2538
  $list_text_mode = '';
3038
  $fromname = $row->mail_from_name_user;
3039
  $subject = !empty( $row->mail_subject_user ) ? $row->mail_subject_user : $row->title;
3040
  $attachment_user = array();
3041
+ if ( !WDFMInstance(self::PLUGIN)->is_demo ) {
3042
  for ( $k = 0; $k < count( $all_files ); $k++ ) {
3043
  if ( isset( $all_files[ $k ][ 'tmp_name' ] ) ) {
3044
  if ( !isset( $attachment_user[ $all_files[ $k ][ 'field_key' ] ] ) ) {
3117
 
3118
  $body = $new_script;
3119
  $pdf_data = array('attach_to_admin' => 0, 'attach_to_user' => 0, 'pdf_url' => '');
3120
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
3121
  $pdf_data = apply_filters( 'fm_pdf_data_frontend', $pdf_data, array( 'custom_fields' => $this->custom_fields, 'form_id' => $id ) );
3122
  }
3123
  if ( $pdf_data['attach_to_user'] ) {
3160
  } else {
3161
  $attachment_user = array();
3162
  }
3163
+ WDW_FM_Library(self::PLUGIN)->mail( $recipient, $subject, $body, $header_arr, $attachment_user );
3164
  }
3165
  }
3166
  }
3173
 
3174
  $fromname = $row->from_name;
3175
  $attachment = array();
3176
+ if ( !WDFMInstance(self::PLUGIN)->is_demo ) {
3177
  for ( $k = 0; $k < count( $all_files ); $k++ ) {
3178
  if ( isset( $all_files[ $k ][ 'tmp_name' ] ) ) {
3179
  if ( !isset( $attachment[ $all_files[ $k ][ 'field_key' ] ] ) ) {
3265
  // Replace pdf link in email body.
3266
  $admin_body = str_replace( '{PDF(link)}', site_url($pdf_data['pdf_url']), $admin_body );
3267
 
3268
+ $send = WDW_FM_Library(self::PLUGIN)->mail( $recipient, $subject, $admin_body, $header_arr, $attachment );
3269
  }
3270
  $_SESSION[ 'error_or_no' . $id ] = 0;
3271
+ $msg = addslashes( __( 'Your form was successfully submitted.', WDFMInstance(self::PLUGIN)->prefix ) );
3272
  if ( $row->sendemail ) {
3273
  if ( $row->mail || $row->send_to ) {
3274
  if ( $send ) {
3275
  if ( $send !== TRUE ) {
3276
  $_SESSION[ 'error_or_no' . $id ] = 1;
3277
+ $msg = addslashes( __( 'Error, email was not sent.', WDFMInstance(self::PLUGIN)->prefix ) );
3278
  } else {
3279
  $_SESSION[ 'error_or_no' . $id ] = 0;
3280
+ $msg = addslashes( __( 'Your form was successfully submitted.', WDFMInstance(self::PLUGIN)->prefix ) );
3281
  }
3282
  }
3283
  }
3284
  }
3285
 
3286
  // Add-on conditional email
3287
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
3288
  $fm_email_params = $row->sendemail ? array(
3289
  'admin_body' => $admin_body,
3290
  'body' => $body,
3815
  */
3816
  public function all_forms() {
3817
  global $wpdb;
3818
+ $q = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options as display INNER JOIN ' . $wpdb->prefix . 'formmaker as forms ON display.form_id = forms.id WHERE display.type != "embedded" and forms.published=1' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' AND forms.id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')');
3819
  $forms = $wpdb->get_results( $q );
3820
  return $forms;
3821
  }
frontend/models/verify_email.php CHANGED
@@ -4,6 +4,11 @@
4
  * Class FMModelVerify_email
5
  */
6
  class FMModelVerify_email {
 
 
 
 
 
7
  /**
8
  * Set given email as validated and return message.
9
  *
@@ -24,7 +29,7 @@ class FMModelVerify_email {
24
  $message = '';
25
  foreach ( $submissions as $submission ) {
26
  if ( $submission->element_label == 'verifyInfo' ) {
27
- $message = __('Your email address is already verified.', WDFM()->prefix);
28
  continue;
29
  }
30
  elseif ( $submission->element_label == 'verifyInfo@' . $email ) {
@@ -38,7 +43,7 @@ class FMModelVerify_email {
38
  $now = time();
39
  $hourInterval = floor(($now - $date) / 3600);
40
  if ( $expHour > 0 && $hourInterval > $expHour ) {
41
- $message = __('Your email verification has timed out.', WDFM()->prefix);
42
  }
43
  else {
44
  $data = array(
@@ -53,12 +58,12 @@ class FMModelVerify_email {
53
  $updated = $wpdb->update($wpdb->prefix . "formmaker_submits", $data, $where);
54
 
55
  if ( $updated !== FALSE ) {
56
- $message = __('Your email has been successfully verified.', WDFM()->prefix);
57
  }
58
  }
59
  }
60
  else {
61
- $message = __('Verification link is invalid.', WDFM()->prefix);
62
  }
63
  break;
64
  }
4
  * Class FMModelVerify_email
5
  */
6
  class FMModelVerify_email {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  /**
13
  * Set given email as validated and return message.
14
  *
29
  $message = '';
30
  foreach ( $submissions as $submission ) {
31
  if ( $submission->element_label == 'verifyInfo' ) {
32
+ $message = __('Your email address is already verified.', WDFMInstance(self::PLUGIN)->prefix);
33
  continue;
34
  }
35
  elseif ( $submission->element_label == 'verifyInfo@' . $email ) {
43
  $now = time();
44
  $hourInterval = floor(($now - $date) / 3600);
45
  if ( $expHour > 0 && $hourInterval > $expHour ) {
46
+ $message = __('Your email verification has timed out.', WDFMInstance(self::PLUGIN)->prefix);
47
  }
48
  else {
49
  $data = array(
58
  $updated = $wpdb->update($wpdb->prefix . "formmaker_submits", $data, $where);
59
 
60
  if ( $updated !== FALSE ) {
61
+ $message = __('Your email has been successfully verified.', WDFMInstance(self::PLUGIN)->prefix);
62
  }
63
  }
64
  }
65
  else {
66
+ $message = __('Verification link is invalid.', WDFMInstance(self::PLUGIN)->prefix);
67
  }
68
  break;
69
  }
frontend/views/form_maker.php CHANGED
@@ -4,6 +4,11 @@
4
  * Class FMViewForm_maker
5
  */
6
  class FMViewForm_maker {
 
 
 
 
 
7
  private $model;
8
  /**
9
  * FMViewForm_maker constructor.
@@ -16,12 +21,12 @@ class FMViewForm_maker {
16
  wp_enqueue_script('jquery');
17
  wp_enqueue_script('jquery-ui-widget');
18
  wp_enqueue_script('jquery-effects-shake');
19
- wp_enqueue_script('fm-frontend');
20
 
21
- wp_enqueue_style('fm-jquery-ui');
22
- wp_enqueue_style('fm-frontend');
23
- wp_enqueue_style('fm-googlefonts');
24
- wp_enqueue_style('fm-animate');
25
  wp_enqueue_style('dashicons');
26
  }
27
 
@@ -50,7 +55,7 @@ class FMViewForm_maker {
50
  $row = $result[0];
51
  $form_theme = $result[4];
52
 
53
- $theme_id = WDW_FM_Library::get('test_theme', $row->theme);
54
  if ( $theme_id == '' ) {
55
  $theme_id = $row->theme;
56
  }
@@ -59,15 +64,14 @@ class FMViewForm_maker {
59
  $pagination_align = $row->pagination == 'steps' && isset($form_theme['PSAPAlign']) ? 'fm-align-' . $form_theme['PSAPAlign'] : '';
60
  $form_currency = '$';
61
  if ( $row->payment_currency ) {
62
- $form_currency = WDW_FM_Library::replace_currency_code( $row->payment_currency );
63
  }
64
-
65
  $form_maker_front_end = '';
66
  $form_maker_front_end .= '<div id="fm-pages' . $form_id . '" class="fm-pages wdform_page_navigation ' . $pagination_align . '" show_title="' . $row->show_title . '" show_numbers="' . $row->show_numbers . '" type="' . $row->pagination . '"></div>';
67
- $form_maker_front_end .= '<form name="form' . $form_id . '" action="' . $current_url . '" method="post" id="form' . $form_id . '" class="fm-form form' . $form_id . ' ' . $header_pos . '" enctype="multipart/form-data">';
68
  // Form messages.
69
  $fm_hide_form_after_submit = 0;
70
- WDW_FM_Library::start_session();
71
  if ( isset($_SESSION['form_submit_type' . $form_id]) ) {
72
  $type_and_id = $_SESSION['form_submit_type' . $form_id];
73
  $type_and_id = explode(',', $type_and_id);
@@ -78,7 +82,7 @@ class FMViewForm_maker {
78
  if ( $form_get_type == 3 ) {
79
  $_SESSION['massage_after_submit' . $form_id] = "";
80
  $after_submission_text = $this->model->get_after_submission_text($form_get_id, $group_id);
81
- $form_maker_front_end .= WDW_FM_Library::message(wpautop(html_entity_decode($after_submission_text)), '', $form_id);
82
  $fm_hide_form_after_submit = 1;
83
  }
84
  }
@@ -86,10 +90,10 @@ class FMViewForm_maker {
86
  $_SESSION['redirect_paypal' . $form_id] = 0;
87
  if ( isset($_GET['succes']) ) {
88
  if ( $_GET['succes'] == 0 ) {
89
- $form_maker_front_end .= WDW_FM_Library::message(__('Error, email was not sent.', WDFM()->prefix), 'fm-notice-error');
90
  }
91
  else {
92
- $form_maker_front_end .= WDW_FM_Library::message(__('Your form was successfully submitted.', WDFM()->prefix), 'fm-notice-success');
93
  }
94
  }
95
  }
@@ -103,7 +107,7 @@ class FMViewForm_maker {
103
  $error = 'fm-notice-success';
104
  }
105
  if ( !isset($_SESSION['message_captcha']) || $message != $_SESSION['message_captcha'] ) {
106
- $form_maker_front_end .= WDW_FM_Library::message($message, $error, $form_id);
107
  }
108
  }
109
  if ( isset($_SESSION['massage_after_save' . $form_id]) && $_SESSION['massage_after_save' . $form_id] != "" ) {
@@ -114,7 +118,7 @@ class FMViewForm_maker {
114
  }
115
  else {
116
  $save_error = $_SESSION['save_error' . $form_id] ? 'fm-notice-error' : 'fm-notice-success';
117
- $form_maker_front_end .= WDW_FM_Library::message($save_message, $save_error, $form_id);
118
  }
119
  }
120
  if ( isset($_SESSION['show_submit_text' . $form_id]) ) {
@@ -188,7 +192,7 @@ class FMViewForm_maker {
188
 
189
  // Get Add-on Calculator data.
190
  $calculator_data = array();
191
- if (WDFM()->is_free != 2) {
192
  $calculator_data = apply_filters('fm_calculator_get_data_init', $calculator_data, $form_id);
193
  }
194
  if ( !empty($calculator_data) ) {
@@ -491,7 +495,7 @@ class FMViewForm_maker {
491
  }
492
  $param['id'] = $id1;
493
 
494
- $message_confirm = addslashes(__("Password values don't match", WDFM()->prefix));
495
  $onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? ' onchange="wd_check_confirmation_pass(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')"' : "";
496
 
497
  $html = '<input type="password"
@@ -641,8 +645,8 @@ class FMViewForm_maker {
641
  break;
642
  }
643
  case 'type_phone_new': {
644
- wp_enqueue_script('fm-phone_field');
645
- wp_enqueue_style('fm-phone_field_css');
646
 
647
  $params_names = array(
648
  'w_field_label_size',
@@ -880,7 +884,7 @@ class FMViewForm_maker {
880
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no'
881
  && isset($w_disabled_fields[6]) && $w_disabled_fields[6] == 'yes'
882
  && $post_country == 'United States' ) {
883
- $w_states = WDW_FM_Library::get_states();
884
  $w_state_options = '';
885
  $post_state = isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "";
886
  foreach ( $w_states as $w_state_key => $w_state ) {
@@ -903,7 +907,7 @@ class FMViewForm_maker {
903
  <label for="wdform_' . $id1 . '_postal' . $form_id . '" class="mini_label">' . $w_mini_labels[4] . '</label></span>';
904
  }
905
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no' ) {
906
- $w_countries = WDW_FM_Library::get_countries();
907
  $w_options = '';
908
  foreach ( $w_countries as $w_country_key => $w_country ) {
909
  if ( $w_country_key == $post_country ) {
@@ -1010,8 +1014,8 @@ class FMViewForm_maker {
1010
  $param['id'] = $id1;
1011
  $param['w_class'] .= ' wd-flex-row';
1012
 
1013
- $message_confirm = addslashes(__("The email addresses don't match", WDFM()->prefix));
1014
- $message_check_email = addslashes(__('This is not a valid email address.', WDFM()->prefix));
1015
  $onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? '; wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')' : '';
1016
 
1017
  $html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" ' . $param['attributes'] . ' onchange="wd_check_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_check_email . '\')' . $onchange . '" />';
@@ -1054,10 +1058,10 @@ class FMViewForm_maker {
1054
  case 'type_date': { //Todo: Depricated.
1055
  wp_enqueue_script('jquery-ui-datepicker');
1056
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
1057
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
1058
  }
1059
  else {
1060
- echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
1061
  }
1062
 
1063
  $params_names = array(
@@ -1153,7 +1157,7 @@ class FMViewForm_maker {
1153
 
1154
  $html = '<img type="captcha"
1155
  digit="' . $param['w_digit'] . '"
1156
- src=" ' . add_query_arg(array('action' => 'formmakerwdcaptcha' . WDFM()->plugin_postfix, 'digit' => $param['w_digit'], 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1157
  id="wd_captcha' . $form_id . '"
1158
  class="captcha_img wd-hidden"
1159
  ' . $param['attributes'] . ' />';
@@ -1167,7 +1171,7 @@ class FMViewForm_maker {
1167
 
1168
  // Generate field.
1169
  $rep = $this->wdform_field($type, $param, $row, $html);
1170
- WDW_FM_Library::start_session();
1171
  if ( isset($_SESSION['message_captcha']) && $_SESSION['message_captcha'] != "" ) {
1172
  $rep .= '<div class="fm-not-filled message_captcha">' . $_SESSION['message_captcha'] . '</div>';
1173
  unset($_SESSION['message_captcha']);
@@ -1219,7 +1223,7 @@ class FMViewForm_maker {
1219
  $html = '<img type="captcha"
1220
  operations_count="' . $param['w_count'] . '"
1221
  operations="' . $param['w_operations'] . '"
1222
- src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha' . WDFM()->plugin_postfix, 'operations_count' => $param['w_count'], 'operations' => urlencode($param['w_operations']), 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1223
  id="wd_arithmetic_captcha' . $form_id . '"
1224
  class="arithmetic_captcha_img"
1225
  ' . $param['attributes'] . ' />';
@@ -1234,7 +1238,7 @@ class FMViewForm_maker {
1234
 
1235
  // Generate field.
1236
  $rep = $this->wdform_field($type, $param, $row, $html);
1237
- WDW_FM_Library::start_session();
1238
  if ( isset($_SESSION['message_captcha']) && $_SESSION['message_captcha'] != "" ) {
1239
  $rep .= '<div class="fm-not-filled message_captcha">' . $_SESSION['message_captcha'] . '</div>';
1240
  unset($_SESSION['message_captcha']);
@@ -1284,7 +1288,7 @@ class FMViewForm_maker {
1284
  $badge = 'inline';
1285
  $class = '';
1286
  }
1287
- wp_enqueue_script('fm-g-recaptcha');
1288
 
1289
  $param['id'] = '';
1290
  $param['w_class'] = 'wd-flex-row';
@@ -1293,7 +1297,7 @@ class FMViewForm_maker {
1293
 
1294
  // Generate field.
1295
  $rep = $this->wdform_field($type, $param, $row, $html);
1296
- WDW_FM_Library::start_session();
1297
  if ( isset($_SESSION['message_captcha']) && $_SESSION['message_captcha'] != "" ) {
1298
  $rep .= '<div class="fm-not-filled message_captcha">' . $_SESSION['message_captcha'] . '</div>';
1299
  unset($_SESSION['message_captcha']);
@@ -1330,7 +1334,7 @@ class FMViewForm_maker {
1330
  }
1331
  case 'type_mark_map': {
1332
  wp_enqueue_script('google-maps');
1333
- wp_enqueue_script('fm-gmap_form');
1334
 
1335
  $params_names = array(
1336
  'w_field_label_size',
@@ -1584,7 +1588,7 @@ class FMViewForm_maker {
1584
  case 'type_stripe': {
1585
  /* get stripe add-on form */
1586
  $stripe_data = array('form_view' => $this, 'form' => $row, 'attributes' => $params, 'input_index' => $id1, 'form_id' => $form_id, 'html' => '');
1587
- if (WDFM()->is_free != 2) {
1588
  $stripe_data = apply_filters('fm_addon_stripe_form_init', $stripe_data);
1589
  }
1590
  $rep .= !empty($stripe_data['html']) ? $stripe_data['html'] : '';
@@ -1630,36 +1634,36 @@ class FMViewForm_maker {
1630
  $form_maker_front_end .= '<div class="wdform_preload"></div>';
1631
  $form_maker_front_end .= '</form>';
1632
  $jsversion = $row->jsversion ? $row->jsversion : 1;
1633
- $front_urls = WDFM()->front_urls;
1634
  $frontend_dir ='/form-maker-frontend/';
1635
  $wp_upload_dir = wp_upload_dir();
1636
  $fm_script_dir = $wp_upload_dir['basedir'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
1637
  $fm_script_url = $front_urls['upload_url'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
1638
 
1639
- WDW_FM_Library::create_js($form_id);
1640
  if ( !file_exists($fm_script_dir) ) {
1641
  if ( function_exists('wp_add_inline_script') ) {
1642
- wp_add_inline_script('fm-frontend', WDW_FM_Library::$fm_js_content);
1643
  }
1644
  else {
1645
- echo '<script>' . WDW_FM_Library::$fm_js_content . '</script>';
1646
  }
1647
  }
1648
  else {
1649
- wp_register_script('fm-script-' . $form_id, $fm_script_url, array(), $jsversion);
1650
- wp_enqueue_script('fm-script-' . $form_id);
1651
  }
1652
 
1653
  $_GET['addon_view'] = 'frontend';
1654
  $_GET['form_id'] = $form_id;
1655
- if (WDFM()->is_free != 2) {
1656
- $save_progress_params = array();
1657
- $save_progress_params['form'] = $row;
1658
- $save_progress_params['form_id'] = $form_id;
1659
 
1660
  do_action('WD_FM_SAVE_PROG_init', $save_progress_params);
1661
  }
1662
- return $formType == 'embedded' ? WDW_FM_Library::fm_container($theme_id, $form_maker_front_end) : $form_maker_front_end;
1663
  }
1664
 
1665
  /**
@@ -1678,7 +1682,7 @@ class FMViewForm_maker {
1678
  $hide_duration = $form->topbar_hide_duration;
1679
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1680
  if ($display_on_this && $hide_mobile) {
1681
- WDW_FM_Library::start_session();
1682
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1683
  if ($error == 'success') {
1684
  if ($message) {
@@ -1732,7 +1736,7 @@ class FMViewForm_maker {
1732
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1733
  $left_right_class = $form->scrollbox_position ? 'float-right' : 'float-left';
1734
  if ($display_on_this && $hide_mobile) {
1735
- WDW_FM_Library::start_session();
1736
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1737
  if ($error == 'success') {
1738
  if ($message) {
@@ -1813,7 +1817,7 @@ class FMViewForm_maker {
1813
  $hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
1814
 
1815
  if ($display_on_this && $hide_mobile) {
1816
- WDW_FM_Library::start_session();
1817
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1818
  if ($error == 'success') {
1819
  if ($message) {
@@ -1904,7 +1908,7 @@ class FMViewForm_maker {
1904
  echo '<script>' . $onload_js . '</script>';
1905
  }
1906
 
1907
- return WDW_FM_Library::fm_container($form->theme, $fm_form);
1908
  }
1909
 
1910
  /**
@@ -2111,6 +2115,7 @@ class FMViewForm_maker {
2111
  $param['w_allow_other_num'] = $param['w_allow_other_num'] == $key ? $key1 : $param['w_allow_other_num'];
2112
  }
2113
  }
 
2114
  $html .= '</div>';
2115
  // Generate field.
2116
  $rep = $this->wdform_field($type, $param, $row, $html);
@@ -2266,6 +2271,7 @@ class FMViewForm_maker {
2266
  $param['w_allow_other_num'] = $param['w_allow_other_num'] == $key ? $key1 : $param['w_allow_other_num'];
2267
  }
2268
  }
 
2269
  $html .= '</div>';
2270
 
2271
  // Generate field.
@@ -2405,10 +2411,10 @@ class FMViewForm_maker {
2405
  private function type_date_new($params, $row, $form_id, $id1, $type, $param) {
2406
  wp_enqueue_script('jquery-ui-datepicker');
2407
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
2408
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
2409
  }
2410
  else {
2411
- echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
2412
  }
2413
 
2414
  $params_names = array(
@@ -2586,7 +2592,7 @@ class FMViewForm_maker {
2586
  $w_day_type .= '<label for="wdform_' . $id1 . '_day' . $form_id . '" class="mini_label">' . $param['w_day_label'] . '</label>';
2587
 
2588
  if ( $param['w_month_type'] == "SELECT" ) {
2589
- $w_month_type = '<select id="wdform_' . $id1 . '_month' . $form_id . '" name="wdform_' . $id1 . '_month' . $form_id . '" style="width: ' . $param['w_month_size'] . 'px;" ' . $param['attributes'] . '><option value=""></option><option value="01" ' . ($param['w_month'] == "01" ? "selected=\"selected\"" : "") . ' >' . (__("January", WDFM()->prefix)) . '</option><option value="02" ' . ($param['w_month'] == "02" ? "selected=\"selected\"" : "") . '>' . (__("February", WDFM()->prefix)) . '</option><option value="03" ' . ($param['w_month'] == "03" ? "selected=\"selected\"" : "") . '>' . (__("March", WDFM()->prefix)) . '</option><option value="04" ' . ($param['w_month'] == "04" ? "selected=\"selected\"" : "") . ' >' . (__("April", WDFM()->prefix)) . '</option><option value="05" ' . ($param['w_month'] == "05" ? "selected=\"selected\"" : "") . ' >' . (__("May", WDFM()->prefix)) . '</option><option value="06" ' . ($param['w_month'] == "06" ? "selected=\"selected\"" : "") . ' >' . (__("June", WDFM()->prefix)) . '</option><option value="07" ' . ($param['w_month'] == "07" ? "selected=\"selected\"" : "") . ' >' . (__("July", WDFM()->prefix)) . '</option><option value="08" ' . ($param['w_month'] == "08" ? "selected=\"selected\"" : "") . ' >' . (__("August", WDFM()->prefix)) . '</option><option value="09" ' . ($param['w_month'] == "09" ? "selected=\"selected\"" : "") . ' >' . (__("September", WDFM()->prefix)) . '</option><option value="10" ' . ($param['w_month'] == "10" ? "selected=\"selected\"" : "") . ' >' . (__("October", WDFM()->prefix)) . '</option><option value="11" ' . ($param['w_month'] == "11" ? "selected=\"selected\"" : "") . '>' . (__("November", WDFM()->prefix)) . '</option><option value="12" ' . ($param['w_month'] == "12" ? "selected=\"selected\"" : "") . ' >' . (__("December", WDFM()->prefix)) . '</option></select>';
2590
  }
2591
  else {
2592
  $w_month_type = '<input type="number"
@@ -2665,10 +2671,10 @@ class FMViewForm_maker {
2665
  private function type_date_range($params, $row, $form_id, $id1, $type, $param) {
2666
  wp_enqueue_script('jquery-ui-datepicker');
2667
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
2668
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
2669
  }
2670
  else {
2671
- echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
2672
  }
2673
 
2674
  $params_names = array(
@@ -2855,8 +2861,8 @@ class FMViewForm_maker {
2855
  $html .= '<div class="wd-flex wd-flex-column">&nbsp;&nbsp;</div>';
2856
  $html .= '<div class="wd-flex wd-flex-column">';
2857
  $html .= '<select class="am_pm_select" name="wdform_' . $id1 . '_am_pm' . $form_id . '" id="wdform_' . $id1 . '_am_pm' . $form_id . '" ' . $param['attributes'] . '>';
2858
- $html .= '<option value="am" ' . $am_ . '>' . __('AM', WDFM()->prefix) . '</option>';
2859
- $html .= '<option value="pm" ' . $pm_ . '>' . __('PM', WDFM()->prefix) . '</option>';
2860
  $html .= '</select>';
2861
  $html .= '<label class="mini_label">' . $w_mini_labels[3] . '</label>';
2862
  $html .= '</div>';
@@ -3030,7 +3036,7 @@ class FMViewForm_maker {
3030
  }
3031
  $images = '';
3032
  for ( $i = 0; $i < $param['w_star_amount']; $i++ ) {
3033
- $images .= '<img id="wdform_' . $id1 . '_star_' . $i . '_' . $form_id . '" src="' . WDFM()->plugin_url . '/images/star.png" />';
3034
  }
3035
 
3036
  $param['id'] = '';
@@ -3038,7 +3044,7 @@ class FMViewForm_maker {
3038
 
3039
  $html = '<div id="wdform_' . $id1 . '_element' . $form_id . '" ' . $param['attributes'] . '>';
3040
  for ( $i = 0; $i < $param['w_star_amount']; $i++ ) {
3041
- $html .= '<img id="wdform_' . $id1 . '_star_' . $i . '_' . $form_id . '" src="' . WDFM()->plugin_url . '/images/star.png" />';
3042
  }
3043
  $html .= '</div>';
3044
  $html .= '<input type="hidden" value="" id="wdform_' . $id1 . '_selected_star_amount' . $form_id . '" name="wdform_' . $id1 . '_selected_star_amount' . $form_id . '" />';
@@ -3304,12 +3310,13 @@ class FMViewForm_maker {
3304
  $html .= '</div>';
3305
  }
3306
  $html .= '<div id="wdform_' . $id1 . '_element_total_div' . $form_id . '" class="grading_div' . ($param['w_total'] == '0' ? ' wd-hidden' : '') . '">';
3307
- $html .= __('Total', WDFM()->prefix) . ': ';
3308
  $html .= '<span id="wdform_' . $id1 . '_sum_element' . $form_id . '">0</span>';
3309
  $html .= '/';
3310
  $html .= '<span id="wdform_' . $id1 . '_total_element' . $form_id . '">' . $param['w_total'] . '</span>';
3311
  $html .= '<span id="wdform_' . $id1 . '_text_element' . $form_id . '"></span>';
3312
  $html .= '</div>';
 
3313
  $html .= '</div>';
3314
 
3315
  // Generate field.
@@ -3413,6 +3420,7 @@ class FMViewForm_maker {
3413
  $html .= '</div>';
3414
  $html .= $rows_columns;
3415
  $html .= '</div>';
 
3416
  $html .= '</div>';
3417
 
3418
  // Generate field.
4
  * Class FMViewForm_maker
5
  */
6
  class FMViewForm_maker {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  private $model;
13
  /**
14
  * FMViewForm_maker constructor.
21
  wp_enqueue_script('jquery');
22
  wp_enqueue_script('jquery-ui-widget');
23
  wp_enqueue_script('jquery-effects-shake');
24
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-frontend');
25
 
26
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
27
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-frontend');
28
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-googlefonts');
29
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-animate');
30
  wp_enqueue_style('dashicons');
31
  }
32
 
55
  $row = $result[0];
56
  $form_theme = $result[4];
57
 
58
+ $theme_id = WDW_FM_Library(self::PLUGIN)->get('test_theme', $row->theme);
59
  if ( $theme_id == '' ) {
60
  $theme_id = $row->theme;
61
  }
64
  $pagination_align = $row->pagination == 'steps' && isset($form_theme['PSAPAlign']) ? 'fm-align-' . $form_theme['PSAPAlign'] : '';
65
  $form_currency = '$';
66
  if ( $row->payment_currency ) {
67
+ $form_currency = WDW_FM_Library(self::PLUGIN)->replace_currency_code( $row->payment_currency );
68
  }
69
+ WDW_FM_Library(self::PLUGIN)->start_session();
70
  $form_maker_front_end = '';
71
  $form_maker_front_end .= '<div id="fm-pages' . $form_id . '" class="fm-pages wdform_page_navigation ' . $pagination_align . '" show_title="' . $row->show_title . '" show_numbers="' . $row->show_numbers . '" type="' . $row->pagination . '"></div>';
72
+ $form_maker_front_end .= '<form name="form' . $form_id . '" action="' . $current_url . '" method="post" id="form' . $form_id . '" class="fm-form form' . $form_id . ' ' . $header_pos . ' ' . (((isset($_SESSION['form_submit_type' . $form_id]) && $_SESSION['form_submit_type' . $form_id]) || (isset($_SESSION['massage_after_submit' . $form_id]) && $_SESSION['massage_after_submit' . $form_id])) ? 'fm-form-submitted' : '') . '" enctype="multipart/form-data">';
73
  // Form messages.
74
  $fm_hide_form_after_submit = 0;
 
75
  if ( isset($_SESSION['form_submit_type' . $form_id]) ) {
76
  $type_and_id = $_SESSION['form_submit_type' . $form_id];
77
  $type_and_id = explode(',', $type_and_id);
82
  if ( $form_get_type == 3 ) {
83
  $_SESSION['massage_after_submit' . $form_id] = "";
84
  $after_submission_text = $this->model->get_after_submission_text($form_get_id, $group_id);
85
+ $form_maker_front_end .= WDW_FM_Library(self::PLUGIN)->message(wpautop(html_entity_decode($after_submission_text)), '', $form_id);
86
  $fm_hide_form_after_submit = 1;
87
  }
88
  }
90
  $_SESSION['redirect_paypal' . $form_id] = 0;
91
  if ( isset($_GET['succes']) ) {
92
  if ( $_GET['succes'] == 0 ) {
93
+ $form_maker_front_end .= WDW_FM_Library(self::PLUGIN)->message(__('Error, email was not sent.', WDFMInstance(self::PLUGIN)->prefix), 'fm-notice-error');
94
  }
95
  else {
96
+ $form_maker_front_end .= WDW_FM_Library(self::PLUGIN)->message(__('Your form was successfully submitted.', WDFMInstance(self::PLUGIN)->prefix), 'fm-notice-success');
97
  }
98
  }
99
  }
107
  $error = 'fm-notice-success';
108
  }
109
  if ( !isset($_SESSION['message_captcha']) || $message != $_SESSION['message_captcha'] ) {
110
+ $form_maker_front_end .= WDW_FM_Library(self::PLUGIN)->message($message, $error, $form_id);
111
  }
112
  }
113
  if ( isset($_SESSION['massage_after_save' . $form_id]) && $_SESSION['massage_after_save' . $form_id] != "" ) {
118
  }
119
  else {
120
  $save_error = $_SESSION['save_error' . $form_id] ? 'fm-notice-error' : 'fm-notice-success';
121
+ $form_maker_front_end .= WDW_FM_Library(self::PLUGIN)->message($save_message, $save_error, $form_id);
122
  }
123
  }
124
  if ( isset($_SESSION['show_submit_text' . $form_id]) ) {
192
 
193
  // Get Add-on Calculator data.
194
  $calculator_data = array();
195
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
196
  $calculator_data = apply_filters('fm_calculator_get_data_init', $calculator_data, $form_id);
197
  }
198
  if ( !empty($calculator_data) ) {
495
  }
496
  $param['id'] = $id1;
497
 
498
+ $message_confirm = addslashes(__("Password values don't match", WDFMInstance(self::PLUGIN)->prefix));
499
  $onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? ' onchange="wd_check_confirmation_pass(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')"' : "";
500
 
501
  $html = '<input type="password"
645
  break;
646
  }
647
  case 'type_phone_new': {
648
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field');
649
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field_css');
650
 
651
  $params_names = array(
652
  'w_field_label_size',
884
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no'
885
  && isset($w_disabled_fields[6]) && $w_disabled_fields[6] == 'yes'
886
  && $post_country == 'United States' ) {
887
+ $w_states = WDW_FM_Library(self::PLUGIN)->get_states();
888
  $w_state_options = '';
889
  $post_state = isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "";
890
  foreach ( $w_states as $w_state_key => $w_state ) {
907
  <label for="wdform_' . $id1 . '_postal' . $form_id . '" class="mini_label">' . $w_mini_labels[4] . '</label></span>';
908
  }
909
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no' ) {
910
+ $w_countries = WDW_FM_Library(self::PLUGIN)->get_countries();
911
  $w_options = '';
912
  foreach ( $w_countries as $w_country_key => $w_country ) {
913
  if ( $w_country_key == $post_country ) {
1014
  $param['id'] = $id1;
1015
  $param['w_class'] .= ' wd-flex-row';
1016
 
1017
+ $message_confirm = addslashes(__("The email addresses don't match", WDFMInstance(self::PLUGIN)->prefix));
1018
+ $message_check_email = addslashes(__('This is not a valid email address.', WDFMInstance(self::PLUGIN)->prefix));
1019
  $onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? '; wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')' : '';
1020
 
1021
  $html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" ' . $param['attributes'] . ' onchange="wd_check_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_check_email . '\')' . $onchange . '" />';
1058
  case 'type_date': { //Todo: Depricated.
1059
  wp_enqueue_script('jquery-ui-datepicker');
1060
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
1061
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker());
1062
  }
1063
  else {
1064
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker() . '</script>';
1065
  }
1066
 
1067
  $params_names = array(
1157
 
1158
  $html = '<img type="captcha"
1159
  digit="' . $param['w_digit'] . '"
1160
+ src=" ' . add_query_arg(array('action' => 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'digit' => $param['w_digit'], 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1161
  id="wd_captcha' . $form_id . '"
1162
  class="captcha_img wd-hidden"
1163
  ' . $param['attributes'] . ' />';
1171
 
1172
  // Generate field.
1173
  $rep = $this->wdform_field($type, $param, $row, $html);
1174
+ WDW_FM_Library(self::PLUGIN)->start_session();
1175
  if ( isset($_SESSION['message_captcha']) && $_SESSION['message_captcha'] != "" ) {
1176
  $rep .= '<div class="fm-not-filled message_captcha">' . $_SESSION['message_captcha'] . '</div>';
1177
  unset($_SESSION['message_captcha']);
1223
  $html = '<img type="captcha"
1224
  operations_count="' . $param['w_count'] . '"
1225
  operations="' . $param['w_operations'] . '"
1226
+ src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'operations_count' => $param['w_count'], 'operations' => urlencode($param['w_operations']), 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1227
  id="wd_arithmetic_captcha' . $form_id . '"
1228
  class="arithmetic_captcha_img"
1229
  ' . $param['attributes'] . ' />';
1238
 
1239
  // Generate field.
1240
  $rep = $this->wdform_field($type, $param, $row, $html);
1241
+ WDW_FM_Library(self::PLUGIN)->start_session();
1242
  if ( isset($_SESSION['message_captcha']) && $_SESSION['message_captcha'] != "" ) {
1243
  $rep .= '<div class="fm-not-filled message_captcha">' . $_SESSION['message_captcha'] . '</div>';
1244
  unset($_SESSION['message_captcha']);
1288
  $badge = 'inline';
1289
  $class = '';
1290
  }
1291
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-g-recaptcha');
1292
 
1293
  $param['id'] = '';
1294
  $param['w_class'] = 'wd-flex-row';
1297
 
1298
  // Generate field.
1299
  $rep = $this->wdform_field($type, $param, $row, $html);
1300
+ WDW_FM_Library(self::PLUGIN)->start_session();
1301
  if ( isset($_SESSION['message_captcha']) && $_SESSION['message_captcha'] != "" ) {
1302
  $rep .= '<div class="fm-not-filled message_captcha">' . $_SESSION['message_captcha'] . '</div>';
1303
  unset($_SESSION['message_captcha']);
1334
  }
1335
  case 'type_mark_map': {
1336
  wp_enqueue_script('google-maps');
1337
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
1338
 
1339
  $params_names = array(
1340
  'w_field_label_size',
1588
  case 'type_stripe': {
1589
  /* get stripe add-on form */
1590
  $stripe_data = array('form_view' => $this, 'form' => $row, 'attributes' => $params, 'input_index' => $id1, 'form_id' => $form_id, 'html' => '');
1591
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
1592
  $stripe_data = apply_filters('fm_addon_stripe_form_init', $stripe_data);
1593
  }
1594
  $rep .= !empty($stripe_data['html']) ? $stripe_data['html'] : '';
1634
  $form_maker_front_end .= '<div class="wdform_preload"></div>';
1635
  $form_maker_front_end .= '</form>';
1636
  $jsversion = $row->jsversion ? $row->jsversion : 1;
1637
+ $front_urls = WDFMInstance(self::PLUGIN)->front_urls;
1638
  $frontend_dir ='/form-maker-frontend/';
1639
  $wp_upload_dir = wp_upload_dir();
1640
  $fm_script_dir = $wp_upload_dir['basedir'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
1641
  $fm_script_url = $front_urls['upload_url'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
1642
 
1643
+ WDW_FM_Library(self::PLUGIN)->create_js($form_id);
1644
  if ( !file_exists($fm_script_dir) ) {
1645
  if ( function_exists('wp_add_inline_script') ) {
1646
+ wp_add_inline_script('fm-frontend', WDW_FM_Library(self::PLUGIN)->$fm_js_content);
1647
  }
1648
  else {
1649
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->$fm_js_content . '</script>';
1650
  }
1651
  }
1652
  else {
1653
+ wp_register_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $form_id, $fm_script_url, array(), $jsversion);
1654
+ wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $form_id);
1655
  }
1656
 
1657
  $_GET['addon_view'] = 'frontend';
1658
  $_GET['form_id'] = $form_id;
1659
+ if (WDFMInstance(self::PLUGIN)->is_free != 2) {
1660
+ $save_progress_params = array();
1661
+ $save_progress_params['form'] = $row;
1662
+ $save_progress_params['form_id'] = $form_id;
1663
 
1664
  do_action('WD_FM_SAVE_PROG_init', $save_progress_params);
1665
  }
1666
+ return $formType == 'embedded' ? WDW_FM_Library(self::PLUGIN)->fm_container($theme_id, $form_maker_front_end) : $form_maker_front_end;
1667
  }
1668
 
1669
  /**
1682
  $hide_duration = $form->topbar_hide_duration;
1683
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1684
  if ($display_on_this && $hide_mobile) {
1685
+ WDW_FM_Library(self::PLUGIN)->start_session();
1686
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1687
  if ($error == 'success') {
1688
  if ($message) {
1736
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1737
  $left_right_class = $form->scrollbox_position ? 'float-right' : 'float-left';
1738
  if ($display_on_this && $hide_mobile) {
1739
+ WDW_FM_Library(self::PLUGIN)->start_session();
1740
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1741
  if ($error == 'success') {
1742
  if ($message) {
1817
  $hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
1818
 
1819
  if ($display_on_this && $hide_mobile) {
1820
+ WDW_FM_Library(self::PLUGIN)->start_session();
1821
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1822
  if ($error == 'success') {
1823
  if ($message) {
1908
  echo '<script>' . $onload_js . '</script>';
1909
  }
1910
 
1911
+ return WDW_FM_Library(self::PLUGIN)->fm_container($form->theme, $fm_form);
1912
  }
1913
 
1914
  /**
2115
  $param['w_allow_other_num'] = $param['w_allow_other_num'] == $key ? $key1 : $param['w_allow_other_num'];
2116
  }
2117
  }
2118
+ $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="empty_value" />';
2119
  $html .= '</div>';
2120
  // Generate field.
2121
  $rep = $this->wdform_field($type, $param, $row, $html);
2271
  $param['w_allow_other_num'] = $param['w_allow_other_num'] == $key ? $key1 : $param['w_allow_other_num'];
2272
  }
2273
  }
2274
+ $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="empty_value" />';
2275
  $html .= '</div>';
2276
 
2277
  // Generate field.
2411
  private function type_date_new($params, $row, $form_id, $id1, $type, $param) {
2412
  wp_enqueue_script('jquery-ui-datepicker');
2413
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
2414
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker());
2415
  }
2416
  else {
2417
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker() . '</script>';
2418
  }
2419
 
2420
  $params_names = array(
2592
  $w_day_type .= '<label for="wdform_' . $id1 . '_day' . $form_id . '" class="mini_label">' . $param['w_day_label'] . '</label>';
2593
 
2594
  if ( $param['w_month_type'] == "SELECT" ) {
2595
+ $w_month_type = '<select id="wdform_' . $id1 . '_month' . $form_id . '" name="wdform_' . $id1 . '_month' . $form_id . '" style="width: ' . $param['w_month_size'] . 'px;" ' . $param['attributes'] . '><option value=""></option><option value="01" ' . ($param['w_month'] == "01" ? "selected=\"selected\"" : "") . ' >' . (__("January", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="02" ' . ($param['w_month'] == "02" ? "selected=\"selected\"" : "") . '>' . (__("February", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="03" ' . ($param['w_month'] == "03" ? "selected=\"selected\"" : "") . '>' . (__("March", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="04" ' . ($param['w_month'] == "04" ? "selected=\"selected\"" : "") . ' >' . (__("April", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="05" ' . ($param['w_month'] == "05" ? "selected=\"selected\"" : "") . ' >' . (__("May", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="06" ' . ($param['w_month'] == "06" ? "selected=\"selected\"" : "") . ' >' . (__("June", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="07" ' . ($param['w_month'] == "07" ? "selected=\"selected\"" : "") . ' >' . (__("July", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="08" ' . ($param['w_month'] == "08" ? "selected=\"selected\"" : "") . ' >' . (__("August", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="09" ' . ($param['w_month'] == "09" ? "selected=\"selected\"" : "") . ' >' . (__("September", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="10" ' . ($param['w_month'] == "10" ? "selected=\"selected\"" : "") . ' >' . (__("October", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="11" ' . ($param['w_month'] == "11" ? "selected=\"selected\"" : "") . '>' . (__("November", WDFMInstance(self::PLUGIN)->prefix)) . '</option><option value="12" ' . ($param['w_month'] == "12" ? "selected=\"selected\"" : "") . ' >' . (__("December", WDFMInstance(self::PLUGIN)->prefix)) . '</option></select>';
2596
  }
2597
  else {
2598
  $w_month_type = '<input type="number"
2671
  private function type_date_range($params, $row, $form_id, $id1, $type, $param) {
2672
  wp_enqueue_script('jquery-ui-datepicker');
2673
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
2674
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker());
2675
  }
2676
  else {
2677
+ echo '<script>' . WDW_FM_Library(self::PLUGIN)->localize_ui_datepicker() . '</script>';
2678
  }
2679
 
2680
  $params_names = array(
2861
  $html .= '<div class="wd-flex wd-flex-column">&nbsp;&nbsp;</div>';
2862
  $html .= '<div class="wd-flex wd-flex-column">';
2863
  $html .= '<select class="am_pm_select" name="wdform_' . $id1 . '_am_pm' . $form_id . '" id="wdform_' . $id1 . '_am_pm' . $form_id . '" ' . $param['attributes'] . '>';
2864
+ $html .= '<option value="am" ' . $am_ . '>' . __('AM', WDFMInstance(self::PLUGIN)->prefix) . '</option>';
2865
+ $html .= '<option value="pm" ' . $pm_ . '>' . __('PM', WDFMInstance(self::PLUGIN)->prefix) . '</option>';
2866
  $html .= '</select>';
2867
  $html .= '<label class="mini_label">' . $w_mini_labels[3] . '</label>';
2868
  $html .= '</div>';
3036
  }
3037
  $images = '';
3038
  for ( $i = 0; $i < $param['w_star_amount']; $i++ ) {
3039
+ $images .= '<img id="wdform_' . $id1 . '_star_' . $i . '_' . $form_id . '" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star.png" />';
3040
  }
3041
 
3042
  $param['id'] = '';
3044
 
3045
  $html = '<div id="wdform_' . $id1 . '_element' . $form_id . '" ' . $param['attributes'] . '>';
3046
  for ( $i = 0; $i < $param['w_star_amount']; $i++ ) {
3047
+ $html .= '<img id="wdform_' . $id1 . '_star_' . $i . '_' . $form_id . '" src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/star.png" />';
3048
  }
3049
  $html .= '</div>';
3050
  $html .= '<input type="hidden" value="" id="wdform_' . $id1 . '_selected_star_amount' . $form_id . '" name="wdform_' . $id1 . '_selected_star_amount' . $form_id . '" />';
3310
  $html .= '</div>';
3311
  }
3312
  $html .= '<div id="wdform_' . $id1 . '_element_total_div' . $form_id . '" class="grading_div' . ($param['w_total'] == '0' ? ' wd-hidden' : '') . '">';
3313
+ $html .= __('Total', WDFMInstance(self::PLUGIN)->prefix) . ': ';
3314
  $html .= '<span id="wdform_' . $id1 . '_sum_element' . $form_id . '">0</span>';
3315
  $html .= '/';
3316
  $html .= '<span id="wdform_' . $id1 . '_total_element' . $form_id . '">' . $param['w_total'] . '</span>';
3317
  $html .= '<span id="wdform_' . $id1 . '_text_element' . $form_id . '"></span>';
3318
  $html .= '</div>';
3319
+ $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="empty_value" />';
3320
  $html .= '</div>';
3321
 
3322
  // Generate field.
3420
  $html .= '</div>';
3421
  $html .= $rows_columns;
3422
  $html .= '</div>';
3423
+ $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="empty_value" />';
3424
  $html .= '</div>';
3425
 
3426
  // Generate field.
frontend/views/verify_email.php CHANGED
@@ -4,12 +4,17 @@
4
  * Class FMViewVerify_email
5
  */
6
  class FMViewVerify_email {
 
 
 
 
 
7
  /**
8
  * Display message.
9
  *
10
  * @param $message
11
  */
12
  public function display($message) {
13
- echo WDW_FM_Library::message($message, 'fm-notice-success');
14
  }
15
  }
4
  * Class FMViewVerify_email
5
  */
6
  class FMViewVerify_email {
7
+ /**
8
+ * PLUGIN = 2 points to Contact Form Maker
9
+ */
10
+ const PLUGIN = 1;
11
+
12
  /**
13
  * Display message.
14
  *
15
  * @param $message
16
  */
17
  public function display($message) {
18
+ echo WDW_FM_Library(self::PLUGIN)->message($message, 'fm-notice-success');
19
  }
20
  }
js/form_maker_admin.js CHANGED
@@ -785,7 +785,7 @@ function fm_insert_blocked_ip() {
785
  "last_id" : 1
786
  },
787
  success: function (response) {
788
- jQuery('.wrap').load(url + ' #blocked_ips',function() {
789
  window.history.pushState(null, null, url);
790
  if (jQuery(".updated").length != 0) {
791
  jQuery(".updated p strong").html("Items Successfully Saved");
785
  "last_id" : 1
786
  },
787
  success: function (response) {
788
+ jQuery('#fm-form-admin').load(url + ' #blocked_ips',function() {
789
  window.history.pushState(null, null, url);
790
  if (jQuery(".updated").length != 0) {
791
  jQuery(".updated p strong").html("Items Successfully Saved");
js/main_div_front_end.js CHANGED
@@ -1995,6 +1995,11 @@ function formOnload(form_id) {
1995
  }
1996
 
1997
  function fm_document_ready(form_id) {
 
 
 
 
 
1998
  var pagebreak_count = jQuery("#form"+form_id+" .wdform-page-and-images").length;
1999
  window['form_view_count' + form_id] = pagebreak_count;
2000
  var maxid = jQuery("#form"+form_id+" .wdform_page").last().attr("id");
1995
  }
1996
 
1997
  function fm_document_ready(form_id) {
1998
+ // Form after submit event.
1999
+ if (jQuery("#form"+form_id).hasClass('fm-form-submitted') && typeof window["after_submit" + form_id] == 'function') {
2000
+ window["after_submit" + form_id]();
2001
+ }
2002
+
2003
  var pagebreak_count = jQuery("#form"+form_id+" .wdform-page-and-images").length;
2004
  window['form_view_count' + form_id] = pagebreak_count;
2005
  var maxid = jQuery("#form"+form_id+" .wdform_page").last().attr("id");
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
3
  Tags: form, form builder, contact form, custom form, feedback, contact, web contact form, captcha, email, form manager, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
- Stable tag: 1.12.27
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -453,6 +453,12 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
453
 
454
  == Changelog ==
455
 
 
 
 
 
 
 
456
  = 1.12.27 =
457
  * Added: Help and suggestions text for Privacy Policy (for GDPR compliance)
458
  * Added: Privacy related text to readme.
3
  Tags: form, form builder, contact form, custom form, feedback, contact, web contact form, captcha, email, form manager, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 1.12.28
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
453
 
454
  == Changelog ==
455
 
456
+ = 2.12.28 =
457
+ * Added: Custom javascript event, occurs after form is submitted.
458
+ * Changed: Code structure refactoring.
459
+ * Fixed: Bug on required fields PHP validation.
460
+ * Fixed: Bug on saving a theme.
461
+
462
  = 1.12.27 =
463
  * Added: Help and suggestions text for Privacy Policy (for GDPR compliance)
464
  * Added: Privacy related text to readme.
wd/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Version: 1.0.13
2
 
3
 
4
 
1
+ Version: 1.0.15
2
 
3
 
4
 
wd/assets/css/deactivate_popup.css CHANGED
@@ -63,12 +63,20 @@
63
  margin: 14px 0px 5px;
64
  }
65
  .wd-popup-active1{
66
- height: 523px !important;
67
  }
68
 
69
  .wd-popup-active2{
70
  height: 426px !important
71
  }
 
 
 
 
 
 
 
 
72
  .wd-deactivate-popup-opacity{
73
  width: 100%;
74
  height: 100%;
@@ -87,4 +95,17 @@
87
  bottom: 0;
88
  margin: auto;
89
  z-index: 63;
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  }
63
  margin: 14px 0px 5px;
64
  }
65
  .wd-popup-active1{
66
+ height: 583px !important;
67
  }
68
 
69
  .wd-popup-active2{
70
  height: 426px !important
71
  }
72
+
73
+ .wd-popup-active3{
74
+ height: 479px !important
75
+ }
76
+
77
+ .wd-popup-active4{
78
+ height: 340px !important
79
+ }
80
  .wd-deactivate-popup-opacity{
81
  width: 100%;
82
  height: 100%;
95
  bottom: 0;
96
  margin: auto;
97
  z-index: 63;
98
+ }
99
+
100
+ .wd-deactivate-popup-close-btn{
101
+ background-image: url(img/close.svg);
102
+ background-repeat: no-repeat;
103
+ background-size: 16px;
104
+ display: inline-block;
105
+ width: 16px;
106
+ height: 16px;
107
+ position: absolute;
108
+ top: 7px;
109
+ right: 8px;
110
+ cursor: pointer;
111
  }
wd/assets/js/deactivate_popup.js CHANGED
@@ -21,7 +21,13 @@ var btnVal = 3;
21
  ////////////////////////////////////////////////////////////////////////////////////////
22
  function wdReady(prefix){
23
 
 
 
24
  jQuery(document).on("click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function(){
 
 
 
 
25
  jQuery(".wd-" + prefix + "-opacity").show();
26
  jQuery(".wd-" + prefix + "-deactivate-popup").show();
27
  if(jQuery(this).attr("data-uninstall") == "1"){
@@ -30,17 +36,19 @@ function wdReady(prefix){
30
 
31
  return false;
32
  });
33
-
34
- jQuery(document).on("change", "[name=" + prefix + "_reasons]", function(){
35
 
36
- jQuery("." + prefix + "_additional_details_wrap").html("");
37
- jQuery(".wd-" + prefix + "-deactivate-popup").removeClass("wd-popup-active1 wd-popup-active2");
 
 
 
 
38
  if(jQuery(this).val() == "reason_plugin_is_hard_to_use_technical_problems"){
39
 
40
  additionalInfo = '<div class="wd-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
41
  '<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
42
  '<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>'+
43
- '<br><div><button class="button button-primary wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
44
  jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
45
  jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active1");
46
 
@@ -57,11 +65,22 @@ function wdReady(prefix){
57
  additionalInfo = '<div class="wd-additional-active">' +
58
  '<div><strong>We have a special offer for you.</strong></div>' +
59
  '<div>Submit this form to get the offer to <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"></div>' +
60
- '<br><div><button class="button button-primary wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit</button></div></div>';
61
 
62
  jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
63
- jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active2");
64
- }
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  jQuery("#wd-" + prefix + "-deactivate").hide();
67
  jQuery("#wd-" + prefix + "-submit-and-deactivate").show();
@@ -78,7 +97,27 @@ function wdReady(prefix){
78
  }
79
 
80
  });
81
- jQuery(document).on("click", ".wd-" + prefix + "-deactivate", function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  jQuery(".wd-deactivate-popup-opacity-" + prefix).show();
83
  if(jQuery(this).hasClass("wd-clicked") == false){
84
  jQuery(this).addClass("wd-clicked");
@@ -88,12 +127,25 @@ function wdReady(prefix){
88
  return false;
89
  });
90
 
91
- jQuery(document).on("click", ".wd-" + prefix + "-cancel, .wd-opacity", function(){
92
  jQuery(".wd-" + prefix + "-opacity").hide();
93
  jQuery(".wd-" + prefix + "-deactivate-popup").hide();
 
 
94
  return false;
95
  });
96
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
 
99
  ////////////////////////////////////////////////////////////////////////////////////////
21
  ////////////////////////////////////////////////////////////////////////////////////////
22
  function wdReady(prefix){
23
 
24
+ var agree_with_pp = false;
25
+
26
  jQuery(document).on("click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function(){
27
+ agree_with_pp = false;
28
+ if (!jQuery('#wd-' + prefix + '-submit-and-deactivate').hasClass('button-primary-disabled')) {
29
+ jQuery('#wd-' + prefix + '-submit-and-deactivate').addClass('button-primary-disabled')
30
+ }
31
  jQuery(".wd-" + prefix + "-opacity").show();
32
  jQuery(".wd-" + prefix + "-deactivate-popup").show();
33
  if(jQuery(this).attr("data-uninstall") == "1"){
36
 
37
  return false;
38
  });
 
 
39
 
40
+ jQuery(document).on("change", "[name=" + prefix + "_reasons]", function(){
41
+
42
+ var disabled_class = (agree_with_pp === false) ? "button-primary-disabled" : "";
43
+
44
+ jQuery("." + prefix + "_additional_details_wrap").html("");
45
+ jQuery(".wd-" + prefix + "-deactivate-popup").removeClass("wd-popup-active1 wd-popup-active2 wd-popup-active3 wd-popup-active4");
46
  if(jQuery(this).val() == "reason_plugin_is_hard_to_use_technical_problems"){
47
 
48
  additionalInfo = '<div class="wd-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
49
  '<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
50
  '<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>'+
51
+ '<br><div><button class="button button-primary ' + disabled_class + ' wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
52
  jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
53
  jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active1");
54
 
65
  additionalInfo = '<div class="wd-additional-active">' +
66
  '<div><strong>We have a special offer for you.</strong></div>' +
67
  '<div>Submit this form to get the offer to <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"></div>' +
68
+ '<br><div><button class="button button-primary ' + disabled_class + ' wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit</button></div></div>';
69
 
70
  jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
71
+ jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active3");
72
+ }else{
73
+ jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active4");
74
+ }
75
+
76
+ var checked = (agree_with_pp === true) ? "checked" : "";
77
+ var agree_checkbox =
78
+ "<div style='margin-top: 5px;'>" +
79
+ "<input type='checkbox' " + checked + " name='" + prefix + "_agree_with_pp" + "' id='" + prefix + "_agree_with_pp" + "'/>" +
80
+ "By submitting this form your email and website URL will be sent to Web-Dorado. Click the checkbox if you consent to usage of mentioned data by Web-Dorado in accordance with our <a target='_blank' href='https://web-dorado.com/web-dorado-privacy-statement.html'>Privacy Policy</a>."+
81
+ "</div>";
82
+
83
+ jQuery("." + prefix + "_additional_details_wrap").prepend(agree_checkbox);
84
 
85
  jQuery("#wd-" + prefix + "-deactivate").hide();
86
  jQuery("#wd-" + prefix + "-submit-and-deactivate").show();
97
  }
98
 
99
  });
100
+
101
+ jQuery(document).on("change", "[name=" + prefix + "_agree_with_pp]", function () {
102
+ if(jQuery(this).prop('checked')){
103
+ jQuery(".wd-" + prefix + "-deactivate").removeClass('button-primary-disabled');
104
+ agree_with_pp = true;
105
+ }else{
106
+ jQuery(".wd-" + prefix + "-deactivate").addClass('button-primary-disabled');
107
+ agree_with_pp = false;
108
+ }
109
+ });
110
+
111
+ jQuery(document).on("click", ".wd-" + prefix + "-deactivate", function(e){
112
+
113
+ var data_val = jQuery(this).data('val');
114
+ var checkbox = jQuery("#" + prefix + "_agree_with_pp");
115
+
116
+
117
+ if (data_val !== 1 && (checkbox.length === 0 || checkbox.prop('checked') === false)) {
118
+ return false;
119
+ }
120
+
121
  jQuery(".wd-deactivate-popup-opacity-" + prefix).show();
122
  if(jQuery(this).hasClass("wd-clicked") == false){
123
  jQuery(this).addClass("wd-clicked");
127
  return false;
128
  });
129
 
130
+ jQuery(document).on("click", ".wd-" + prefix + "-cancel, .wd-opacity, .wd-deactivate-popup-close-btn", function(){
131
  jQuery(".wd-" + prefix + "-opacity").hide();
132
  jQuery(".wd-" + prefix + "-deactivate-popup").hide();
133
+ reset_popup();
134
+
135
  return false;
136
  });
137
 
138
+ function reset_popup() {
139
+ jQuery("." + prefix + "_additional_details_wrap").html("");
140
+ jQuery(".wd-" + prefix + "-deactivate-popup").removeClass("wd-popup-active1 wd-popup-active2 wd-popup-active3 wd-popup-active4");
141
+
142
+ jQuery("#wd-" + prefix + "-deactivate").removeClass("button-primary-disabled");
143
+ jQuery("#wd-" + prefix + "-deactivate").show();
144
+ jQuery("#wd-" + prefix + "-submit-and-deactivate").hide();
145
+ jQuery('#' + prefix + '_deactivate_form input[name="' + prefix + '_reasons' + '"]').prop('checked', false);
146
+
147
+ }
148
+
149
  }
150
 
151
  ////////////////////////////////////////////////////////////////////////////////////////
wd/config.php CHANGED
@@ -36,6 +36,7 @@
36
  public $custom_post = null;
37
  public $menu_capability = null;
38
  public $menu_position = null;
 
39
 
40
  public function set_options( $options ){
41
 
@@ -108,7 +109,10 @@
108
  }
109
  if(isset( $options["menu_position"] )) {
110
  $this->menu_position = $options["menu_position"];
111
- }
 
 
 
112
 
113
  // directories
114
  $this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
36
  public $custom_post = null;
37
  public $menu_capability = null;
38
  public $menu_position = null;
39
+ public $start_using_url = null;
40
 
41
  public function set_options( $options ){
42
 
109
  }
110
  if(isset( $options["menu_position"] )) {
111
  $this->menu_position = $options["menu_position"];
112
+ }
113
+ if(isset( $options["start_using_url"] )) {
114
+ $this->start_using_url = $options["start_using_url"];
115
+ }
116
 
117
  // directories
118
  $this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
wd/includes/overview.php CHANGED
@@ -66,6 +66,9 @@
66
  $start_using_url = menu_page_url($this->config->custom_post, false);
67
  }
68
  }
 
 
 
69
  require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
70
  }
71
  public function wd_overview_welcome(){
66
  $start_using_url = menu_page_url($this->config->custom_post, false);
67
  }
68
  }
69
+ if(!empty($this->config->start_using_url)){
70
+ $start_using_url = $this->config->start_using_url;
71
+ }
72
  require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
73
  }
74
  public function wd_overview_welcome(){
wd/templates/display_deactivation_popup.php CHANGED
@@ -5,7 +5,8 @@
5
  </div>
6
  <form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
7
  <div class="wd-deactivate-popup-header">
8
- <?php _e( "Please let us know why you are deactivating. Your answer will help us to serve you better (Optional)", $wd_options->prefix ); ?>:
 
9
  </div>
10
 
11
  <div class="wd-deactivate-popup-body">
@@ -19,7 +20,7 @@
19
  </div>
20
  <div class="wd-btns">
21
  <a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
22
- <a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate" style="display:none;"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
23
  </div>
24
  <input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
25
  <?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
5
  </div>
6
  <form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
7
  <div class="wd-deactivate-popup-header">
8
+ <?php _e( "Please let us know why you are deactivating. Your answer will help us to provide you support or sometimes offer discounts. (Optional)", $wd_options->prefix ); ?>:
9
+ <span class="wd-deactivate-popup-close-btn"></span>
10
  </div>
11
 
12
  <div class="wd-deactivate-popup-body">
20
  </div>
21
  <div class="wd-btns">
22
  <a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
23
+ <a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-primary-disabled button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate" style="display:none;"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
24
  </div>
25
  <input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
26
  <?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
wd/templates/display_overview_support.php CHANGED
@@ -27,8 +27,24 @@
27
  echo '&#13;&#10;&#13;&#10;';
28
  foreach( $gd_info as $key => $val ){
29
  echo $key . ": " . $val . '&#13;&#10;';
30
- }
31
- ?></textarea>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
  </div>
34
  <?php
27
  echo '&#13;&#10;&#13;&#10;';
28
  foreach( $gd_info as $key => $val ){
29
  echo $key . ": " . $val . '&#13;&#10;';
30
+ }
31
+ echo '&#13;&#10;';
32
+ _e("Active Plugins", $wd_options->prefix);
33
+ echo '&#13;&#10;';
34
+ $activepl = get_option('active_plugins');
35
+ $plugins = get_plugins();
36
+ $activated_plugins = array();
37
+ foreach ( $activepl as $p ) {
38
+ if ( isset($plugins[$p]) ) {
39
+ array_push($activated_plugins, $plugins[$p]);
40
+ echo '&#13;&#10;' . $plugins[$p]['Name'];
41
+ }
42
+ }
43
+ echo '&#13;&#10;&#13;&#10;';
44
+ _e("Active theme", $wd_options->prefix);
45
+ echo '&#13;&#10;&#13;&#10;';
46
+ echo wp_get_theme();
47
+ ?></textarea>
48
  </div>
49
  </div>
50
  <?php
wd/templates/display_subscribe.php CHANGED
@@ -8,7 +8,10 @@
8
  <div class="texts">
9
  <p><?php _e( "Hi there", $wd_options->prefix ); ?>,</p>
10
  <p>
11
- <?php echo sprintf( __( "Allow %s to collect some usage data. This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), '<strong>Web-Dorado</strong>', $wd_options->plugin_title ); ?>
 
 
 
12
  </p>
13
  </div>
14
  <div class="btns">
8
  <div class="texts">
9
  <p><?php _e( "Hi there", $wd_options->prefix ); ?>,</p>
10
  <p>
11
+ <?php
12
+ $pp_text = "<a target='_blank' href='https://web-dorado.com/web-dorado-privacy-statement.html'>" . __("Privacy Policy", $wd_options->prefix) . "</a>";
13
+ echo sprintf(__("Allow %s to collect some usage data, to be able to provide you more out of your plugin experience - awesome customer support and more. Check how we handle your personal data in our %s. You can always customize your preferences from the emails your receive from us. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix), '<strong>Web-Dorado</strong>', $pp_text, $wd_options->plugin_title);
14
+ ?>
15
  </p>
16
  </div>
17
  <div class="btns">
wd/wd.php CHANGED
@@ -17,7 +17,7 @@
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
- private $version = "1.0.13";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
+ private $version = "1.0.15";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //