Popup Builder – Responsive WordPress Pop up - Version 4.0.8

Version Description

Download this release

Release Info

Developer Sygnoos
Plugin Icon 128x128 Popup Builder – Responsive WordPress Pop up
Version 4.0.8
Comparing to
See all releases

Code changes from version 4.0.7 to 4.0.8

Files changed (47) hide show
  1. com/classes/Actions.php +17 -15
  2. com/classes/Ajax.php +24 -16
  3. com/classes/ConditionCreator.php +8 -8
  4. com/classes/Feedback.php +1 -1
  5. com/classes/NotificationCenter.php +1 -1
  6. com/classes/PopupChecker.php +6 -1
  7. com/classes/ScriptsLoader.php +4 -4
  8. com/classes/components/Menu.php +4 -4
  9. com/classes/dataTable/Subscribers.php +2 -2
  10. com/classes/extension/SgpbPopupExtension.php +0 -2
  11. com/classes/popups/FblikePopup.php +4 -4
  12. com/classes/popups/SGPopup.php +10 -0
  13. com/classes/popups/SubscriptionPopup.php +9 -9
  14. com/config/configPackage.php +1 -1
  15. com/helpers/AdminHelper.php +3 -3
  16. com/helpers/Functions.php +1 -1
  17. com/libs/Importer.php +3 -3
  18. com/libs/ListTable.php +7 -7
  19. com/libs/Table.php +2 -2
  20. com/libs/WOOSL_CodeAutoUpdate.php +5 -1
  21. com/libs/parsers.php +2 -2
  22. popup-builder.php +1 -1
  23. public/css/popupAdminStyles.css +1 -1
  24. public/js/Backend.js +2 -2
  25. public/js/bootstrap.min.js +0 -6
  26. public/js/sgPopupRangeSlider.js +0 -1
  27. public/views/allMetaboxesView.php +5 -5
  28. public/views/closeSettingsView.php +18 -18
  29. public/views/conditionsView.php +2 -2
  30. public/views/customEditor.php +10 -10
  31. public/views/dimensionsView.php +3 -3
  32. public/views/floatingButton.php +7 -7
  33. public/views/htmlCustomButtonElement.php +9 -9
  34. public/views/importConfigView.php +1 -1
  35. public/views/license.php +5 -5
  36. public/views/newsletter.php +3 -3
  37. public/views/options/facebook.php +1 -1
  38. public/views/options/subscription.php +8 -8
  39. public/views/optionsView.php +19 -19
  40. public/views/otherConditionsView.php +1 -1
  41. public/views/popupDesignView.php +10 -10
  42. public/views/popupOpeningCounter.php +3 -3
  43. public/views/popupTypes.php +2 -2
  44. public/views/settings.php +3 -3
  45. public/views/subscribers.php +1 -1
  46. public/views/targetView.php +1 -1
  47. readme.txt +5 -2
com/classes/Actions.php CHANGED
@@ -84,7 +84,7 @@ class Actions
84
  $response = wp_remote_get($requestUri);
85
  if (!is_wp_error($response) || 200 == wp_remote_retrieve_response_code($response)) {
86
  $licenseData = json_decode(wp_remote_retrieve_body($response));
87
- $status = isset($licenseData[0]->licence_status) && $licenseData[0]->licence_status === 'active' ? 'valid' : $licenseData[0]->licence_status;
88
  update_option('sgpb-license-status-'.$key, $status);
89
  set_transient($transient, $licenseData[0]->status_code, WEEK_IN_SECONDS);
90
  }
@@ -266,7 +266,7 @@ class Actions
266
 
267
  }
268
  $licenseSectionUrl = menu_page_url(SGPB_POPUP_LICENSE, false);
269
- $partOfContent = '<br><br>'.__('<a href="'.$licenseSectionUrl.'">Follow the link</a> to finalize the activation.', SG_POPUP_TEXT_DOMAIN);
270
  if (function_exists('get_current_screen')) {
271
  $screen = get_current_screen();
272
  $screenId = $screen->id;
@@ -369,7 +369,7 @@ class Actions
369
  'recentSales',
370
  'video',
371
  'ageRestriction',
372
- 'social',
373
  'video',
374
  'subscription',
375
  'countdown',
@@ -933,14 +933,14 @@ class Actions
933
  public function postTypeInit()
934
  {
935
  if (isset($_POST['sgpb-is-preview']) && $_POST['sgpb-is-preview'] == 1) {
936
- $postId = $_POST['post_ID'];
937
  $post = get_post($postId);
938
  $this->savePost($postId, $post, false);
939
  }
940
  $adminUrl = admin_url();
941
 
942
  if (isset($_GET['page']) && $_GET['page'] == 'PopupBuilder') {
943
- _e('<span>Popup Builder plugin has been successfully updated. Please <a href="'.esc_attr($adminUrl).'edit.php?post_type='.SG_POPUP_POST_TYPE.'">click here</a> to go to the new Dashboard of the plugin.</span>', SG_POPUP_TEXT_DOMAIN);
944
  wp_die();
945
  }
946
 
@@ -961,13 +961,13 @@ class Actions
961
  }
962
  $args = array();
963
  if (isset($_GET['sgpbUnsubscribe'])) {
964
- $args['token'] = $_GET['sgpbUnsubscribe'];
965
  }
966
  if (isset($_GET['email'])) {
967
- $args['email'] = $_GET['email'];
968
  }
969
  if (isset($_GET['popup'])) {
970
- $args['popup'] = $_GET['popup'];
971
  }
972
 
973
  return $args;
@@ -1002,6 +1002,7 @@ class Actions
1002
  }
1003
  $allowToAction = AdminHelper::userCanAccessTo();
1004
  Functions::clearAllTransients();
 
1005
  $postData = SGPopup::parsePopupDataFromData($_POST);
1006
  $saveMode = '';
1007
  $postData['sgpb-post-id'] = $postId;
@@ -1098,7 +1099,7 @@ class Actions
1098
 
1099
  public function popupsTableColumnsValues($column, $postId)
1100
  {
1101
- $postId = (int)$postId;// Convert to int for security reasons
1102
  global $post_type;
1103
  if ($postId) {
1104
  $args['status'] = array('publish', 'draft', 'pending', 'private', 'trash');
@@ -1110,14 +1111,14 @@ class Actions
1110
  }
1111
 
1112
  if ($column == 'shortcode') {
1113
- echo '<input type="text" onfocus="this.select();" readonly value="[sg_popup id='.$postId.']" class="large-text code">';
1114
  }
1115
  if ($column == 'className') {
1116
  echo '<input type="text" onfocus="this.select();" readonly value="sg-popup-id-'.esc_attr($postId).'" class="large-text code">';
1117
  }
1118
  else if ($column == 'counter') {
1119
  $count = $popup->getPopupOpeningCountById($postId);
1120
- echo '<div ><span>'.$count.'</span>'.'<input onclick="SGPBBackend.resetCount('.$postId.', true);" type="button" name="" class="sgpb-btn sgpb-btn-dark-outline" value="'.__('reset', SG_POPUP_TEXT_DOMAIN).'"></div>';
1121
  }
1122
  else if ($column == 'type') {
1123
  global $SGPB_POPUP_TYPES;
@@ -1134,7 +1135,7 @@ class Actions
1134
  }
1135
  $checked = isset($isActive) && $isActive ? 'checked' : '';
1136
  echo '<label class="sgpb-switch">
1137
- <input class="sg-switch-checkbox sgpb-popup-status-js" value="1" data-switch-id="'.$postId.'" type="checkbox" '.$checked.'>
1138
  <div class="sgpb-slider sgpb-round"></div>
1139
  </label>';
1140
  }
@@ -1148,7 +1149,7 @@ class Actions
1148
  <img src="'.SG_POPUP_PUBLIC_URL.'icons/iconEdit.png" alt="Edit" class="icon_edit" onclick="location.href=\''.get_edit_post_link($postId).'\'">
1149
  </div>';
1150
  $actionButtons .= '<div class="icon icon_blue">
1151
- <img src="'.SG_POPUP_PUBLIC_URL.'icons/iconClone.png" alt="Clone" class="icon_clone" onclick="location.href=\''.$cloneUrl.'\'">
1152
  </div>';
1153
  $actionButtons .= '<div class="icon icon_pink">
1154
  <img src="'.SG_POPUP_PUBLIC_URL.'icons/recycle-bin.svg" alt="Remove" class="icon_remove" onclick="location.href=\''.get_delete_post_link($postId).'\'">
@@ -1168,7 +1169,7 @@ class Actions
1168
  wp_die(esc_html__('No post to duplicate has been supplied!', SG_POPUP_TEXT_DOMAIN));
1169
  }
1170
  // Get the original post
1171
- $id = (isset($_GET['post']) ? $_GET['post'] : $_POST['post']);
1172
 
1173
  check_admin_referer('duplicate-post_'.$id);
1174
 
@@ -1433,7 +1434,7 @@ class Actions
1433
  wp_redirect(get_home_url());
1434
  exit();
1435
  }
1436
- $query .= ' ORDER BY '.esc_sql($orderBy).' '.esc_sql($_GET['order']);
1437
  }
1438
  }
1439
  $content = '';
@@ -1499,6 +1500,7 @@ class Actions
1499
  exit();
1500
  }
1501
 
 
1502
  $postData = $_POST;
1503
  $deleteData = 0;
1504
  $enableDebugMode = 0;
84
  $response = wp_remote_get($requestUri);
85
  if (!is_wp_error($response) || 200 == wp_remote_retrieve_response_code($response)) {
86
  $licenseData = json_decode(wp_remote_retrieve_body($response));
87
+ $status = (isset($licenseData[0]->licence_status) && $licenseData[0]->licence_status === 'active') ? 'valid' : $licenseData[0]->licence_status;
88
  update_option('sgpb-license-status-'.$key, $status);
89
  set_transient($transient, $licenseData[0]->status_code, WEEK_IN_SECONDS);
90
  }
266
 
267
  }
268
  $licenseSectionUrl = menu_page_url(SGPB_POPUP_LICENSE, false);
269
+ $partOfContent = '<br><br>'.__('<a href="'.esc_url($licenseSectionUrl).'">Follow the link</a> to finalize the activation.', SG_POPUP_TEXT_DOMAIN);
270
  if (function_exists('get_current_screen')) {
271
  $screen = get_current_screen();
272
  $screenId = $screen->id;
369
  'recentSales',
370
  'video',
371
  'ageRestriction',
372
+ 'social',
373
  'video',
374
  'subscription',
375
  'countdown',
933
  public function postTypeInit()
934
  {
935
  if (isset($_POST['sgpb-is-preview']) && $_POST['sgpb-is-preview'] == 1) {
936
+ $postId = sanitize_text_field($_POST['post_ID']);
937
  $post = get_post($postId);
938
  $this->savePost($postId, $post, false);
939
  }
940
  $adminUrl = admin_url();
941
 
942
  if (isset($_GET['page']) && $_GET['page'] == 'PopupBuilder') {
943
+ _e('<span>Popup Builder plugin has been successfully updated. Please <a href="'.esc_url($adminUrl).'edit.php?post_type='.SG_POPUP_POST_TYPE.'">click here</a> to go to the new Dashboard of the plugin.</span>', SG_POPUP_TEXT_DOMAIN);
944
  wp_die();
945
  }
946
 
961
  }
962
  $args = array();
963
  if (isset($_GET['sgpbUnsubscribe'])) {
964
+ $args['token'] = sanitize_text_field($_GET['sgpbUnsubscribe']);
965
  }
966
  if (isset($_GET['email'])) {
967
+ $args['email'] = sanitize_email($_GET['email']);
968
  }
969
  if (isset($_GET['popup'])) {
970
+ $args['popup'] = sanitize_text_field($_GET['popup']);
971
  }
972
 
973
  return $args;
1002
  }
1003
  $allowToAction = AdminHelper::userCanAccessTo();
1004
  Functions::clearAllTransients();
1005
+ array_walk_recursive($_POST, 'sanitize_text_field');
1006
  $postData = SGPopup::parsePopupDataFromData($_POST);
1007
  $saveMode = '';
1008
  $postData['sgpb-post-id'] = $postId;
1099
 
1100
  public function popupsTableColumnsValues($column, $postId)
1101
  {
1102
+ $postId = (int)sanitize_text_field($postId);// Convert to int for security reasons
1103
  global $post_type;
1104
  if ($postId) {
1105
  $args['status'] = array('publish', 'draft', 'pending', 'private', 'trash');
1111
  }
1112
 
1113
  if ($column == 'shortcode') {
1114
+ echo '<input type="text" onfocus="this.select();" readonly value="[sg_popup id='.esc_attr($postId).']" class="large-text code">';
1115
  }
1116
  if ($column == 'className') {
1117
  echo '<input type="text" onfocus="this.select();" readonly value="sg-popup-id-'.esc_attr($postId).'" class="large-text code">';
1118
  }
1119
  else if ($column == 'counter') {
1120
  $count = $popup->getPopupOpeningCountById($postId);
1121
+ echo '<div ><span>'.$count.'</span>'.'<input onclick="SGPBBackend.resetCount('.esc_attr($postId).', true);" type="button" name="" class="sgpb-btn sgpb-btn-dark-outline" value="'.__('reset', SG_POPUP_TEXT_DOMAIN).'"></div>';
1122
  }
1123
  else if ($column == 'type') {
1124
  global $SGPB_POPUP_TYPES;
1135
  }
1136
  $checked = isset($isActive) && $isActive ? 'checked' : '';
1137
  echo '<label class="sgpb-switch">
1138
+ <input class="sg-switch-checkbox sgpb-popup-status-js" value="1" data-switch-id="'.esc_attr($postId).'" type="checkbox" '.esc_html($checked).'>
1139
  <div class="sgpb-slider sgpb-round"></div>
1140
  </label>';
1141
  }
1149
  <img src="'.SG_POPUP_PUBLIC_URL.'icons/iconEdit.png" alt="Edit" class="icon_edit" onclick="location.href=\''.get_edit_post_link($postId).'\'">
1150
  </div>';
1151
  $actionButtons .= '<div class="icon icon_blue">
1152
+ <img src="'.SG_POPUP_PUBLIC_URL.'icons/iconClone.png" alt="Clone" class="icon_clone" onclick="location.href=\''.esc_url($cloneUrl).'\'">
1153
  </div>';
1154
  $actionButtons .= '<div class="icon icon_pink">
1155
  <img src="'.SG_POPUP_PUBLIC_URL.'icons/recycle-bin.svg" alt="Remove" class="icon_remove" onclick="location.href=\''.get_delete_post_link($postId).'\'">
1169
  wp_die(esc_html__('No post to duplicate has been supplied!', SG_POPUP_TEXT_DOMAIN));
1170
  }
1171
  // Get the original post
1172
+ $id = (isset($_GET['post']) ? sanitize_text_field($_GET['post']) : sanitize_text_field($_POST['post']));
1173
 
1174
  check_admin_referer('duplicate-post_'.$id);
1175
 
1434
  wp_redirect(get_home_url());
1435
  exit();
1436
  }
1437
+ $query .= ' ORDER BY '.$orderBy.' '.$_GET['order'];
1438
  }
1439
  }
1440
  $content = '';
1500
  exit();
1501
  }
1502
 
1503
+ array_walk_recursive($_POST, 'sanitize_text_field');
1504
  $postData = $_POST;
1505
  $deleteData = 0;
1506
  $enableDebugMode = 0;
com/classes/Ajax.php CHANGED
@@ -93,7 +93,7 @@ class Ajax
93
  }
94
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
95
 
96
- $popupId = @(int)$_POST['post_ID'];
97
  $postStatus = get_post_status($popupId);
98
  if($postStatus == 'publish') {
99
  wp_die('');
@@ -102,7 +102,9 @@ class Ajax
102
  if(!isset($_POST['allPopupData'])) {
103
  wp_die(true);
104
  }
105
- $popupData = SGPopup::parsePopupDataFromData($_POST['allPopupData']);
 
 
106
  do_action('save_post_popupbuilder');
107
  $popupType = $popupData['sgpb-type'];
108
  $popupClassName = SGPopup::getPopupClassNameFormType($popupType);
@@ -166,7 +168,7 @@ class Ajax
166
  global $wpdb;
167
 
168
  $tableName = $wpdb->prefix.'sgpb_analytics';
169
- $popupId = (int)$_POST['popupId'];
170
  $allPopupsCount = get_option('SgpbCounter');
171
  if($wpdb->get_var("SHOW TABLES LIKE '$tableName'") == $tableName) {
172
  SGPopup::deleteAnalyticsDataByPopupId($popupId);
@@ -235,8 +237,8 @@ class Ajax
235
  }
236
 
237
  /* Sanitizing multidimensional array */
 
238
  $popupParams = $_POST['params'];
239
- array_walk($popupParams, 'sanitize_text_field');
240
 
241
  $popupsIdCollection = is_array($popupParams['popupsIdCollection']) ? $popupParams['popupsIdCollection'] : array();
242
  $popupsCounterData = get_option('SgpbCounter');
@@ -280,7 +282,8 @@ class Ajax
280
  $lastName = sanitize_text_field($_POST['lastName']);
281
  $email = sanitize_text_field($_POST['email']);
282
  $date = date('Y-m-d');
283
- $subscriptionPopupsId = array_map('sanitize_text_field', $_POST['popups']);
 
284
 
285
  foreach($subscriptionPopupsId as $subscriptionPopupId) {
286
  $selectSql = $wpdb->prepare('SELECT id FROM '.$wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME.' WHERE email = %s AND subscriptionType = %d', $email, $subscriptionPopupId);
@@ -337,6 +340,7 @@ class Ajax
337
  @ini_set('auto_detect_line_endings', '1');
338
  $formId = (int)sanitize_text_field($_POST['popupSubscriptionList']);
339
  $fileURL = sanitize_text_field($_POST['importListURL']);
 
340
  $mapping = $_POST['namesMapping'];
341
 
342
  $fileContent = AdminHelper::getFileFromURL($fileURL);
@@ -401,13 +405,13 @@ class Ajax
401
  {
402
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
403
 
404
- $url = esc_url($_POST['iframeUrl']);
405
  $status = SGPB_AJAX_STATUS_FALSE;
406
 
407
  $remoteGet = wp_remote_get($url);
408
 
409
  if(is_array($remoteGet) && !empty($remoteGet['headers']['x-frame-options'])) {
410
- $siteUrl = esc_url($_POST['siteUrl']);
411
  $xFrameOptions = $remoteGet['headers']['x-frame-options'];
412
  $mayNotShow = false;
413
 
@@ -442,7 +446,7 @@ class Ajax
442
 
443
  public function changePopupStatus()
444
  {
445
- $popupId = (int)$_POST['popupId'];
446
  $obj = SGPopup::find($popupId);
447
  $isDraft = '';
448
  $postStatus = get_post_status($popupId);
@@ -465,7 +469,9 @@ class Ajax
465
  public function subscriptionSubmission()
466
  {
467
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
468
- $this->setPostData($_POST);
 
 
469
  $submissionData = $this->getValueFromPost('formData');
470
  $popupPostId = (int)$this->getValueFromPost('popupPostId');
471
 
@@ -516,7 +522,9 @@ class Ajax
516
  public function sgpbSubsciptionFormSubmittedAction()
517
  {
518
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
519
- $this->setPostData($_POST);
 
 
520
 
521
  $submissionData = $this->getValueFromPost('formData');
522
  $popupPostId = (int)$this->getValueFromPost('popupPostId');
@@ -621,7 +629,7 @@ class Ajax
621
  check_ajax_referer(SG_AJAX_NONCE, 'nonce_ajax');
622
  global $SGPB_DATA_CONFIG_ARRAY;
623
 
624
- $groupId = (int)$_POST['groupId'];
625
  $targetType = sanitize_text_field($_POST['conditionName']);
626
  $addedObj = array();
627
 
@@ -646,8 +654,8 @@ class Ajax
646
  $targetType = sanitize_text_field($_POST['conditionName']);
647
  $builderObj = new ConditionBuilder();
648
 
649
- $groupId = (int)$_POST['groupId'];
650
- $ruleId = (int)$_POST['ruleId'];
651
 
652
  $builderObj->setGroupId($groupId);
653
  $builderObj->setRuleId($ruleId);
@@ -669,9 +677,9 @@ class Ajax
669
  $targetType = sanitize_text_field($_POST['conditionName']);
670
  $builderObj = new ConditionBuilder();
671
  $conditionConfig = $SGPB_DATA_CONFIG_ARRAY[$targetType];
672
- $groupId = (int)$_POST['groupId'];
673
- $ruleId = (int)$_POST['ruleId'];
674
- $popupId = (int)$_POST['popupId'];
675
  $paramName = sanitize_text_field($_POST['paramName']);
676
 
677
  $savedData = array(
93
  }
94
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
95
 
96
+ $popupId = @(int)sanitize_text_field($_POST['post_ID']);
97
  $postStatus = get_post_status($popupId);
98
  if($postStatus == 'publish') {
99
  wp_die('');
102
  if(!isset($_POST['allPopupData'])) {
103
  wp_die(true);
104
  }
105
+ array_walk_recursive($_POST['allPopupData'], 'sanitize_text_field');
106
+ $allPopupData = $_POST['allPopupData'];
107
+ $popupData = SGPopup::parsePopupDataFromData($allPopupData);
108
  do_action('save_post_popupbuilder');
109
  $popupType = $popupData['sgpb-type'];
110
  $popupClassName = SGPopup::getPopupClassNameFormType($popupType);
168
  global $wpdb;
169
 
170
  $tableName = $wpdb->prefix.'sgpb_analytics';
171
+ $popupId = (int)sanitize_text_field($_POST['popupId']);
172
  $allPopupsCount = get_option('SgpbCounter');
173
  if($wpdb->get_var("SHOW TABLES LIKE '$tableName'") == $tableName) {
174
  SGPopup::deleteAnalyticsDataByPopupId($popupId);
237
  }
238
 
239
  /* Sanitizing multidimensional array */
240
+ array_walk_recursive($_POST['params'], 'sanitize_text_field');
241
  $popupParams = $_POST['params'];
 
242
 
243
  $popupsIdCollection = is_array($popupParams['popupsIdCollection']) ? $popupParams['popupsIdCollection'] : array();
244
  $popupsCounterData = get_option('SgpbCounter');
282
  $lastName = sanitize_text_field($_POST['lastName']);
283
  $email = sanitize_text_field($_POST['email']);
284
  $date = date('Y-m-d');
285
+ array_walk_recursive($_POST['popups'], 'sanitize_text_field');
286
+ $subscriptionPopupsId = $_POST['popups'];
287
 
288
  foreach($subscriptionPopupsId as $subscriptionPopupId) {
289
  $selectSql = $wpdb->prepare('SELECT id FROM '.$wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME.' WHERE email = %s AND subscriptionType = %d', $email, $subscriptionPopupId);
340
  @ini_set('auto_detect_line_endings', '1');
341
  $formId = (int)sanitize_text_field($_POST['popupSubscriptionList']);
342
  $fileURL = sanitize_text_field($_POST['importListURL']);
343
+ array_walk_recursive($_POST['namesMapping'], 'sanitize_text_field' );
344
  $mapping = $_POST['namesMapping'];
345
 
346
  $fileContent = AdminHelper::getFileFromURL($fileURL);
405
  {
406
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
407
 
408
+ $url = esc_url_raw($_POST['iframeUrl']);
409
  $status = SGPB_AJAX_STATUS_FALSE;
410
 
411
  $remoteGet = wp_remote_get($url);
412
 
413
  if(is_array($remoteGet) && !empty($remoteGet['headers']['x-frame-options'])) {
414
+ $siteUrl = esc_url_raw($_POST['siteUrl']);
415
  $xFrameOptions = $remoteGet['headers']['x-frame-options'];
416
  $mayNotShow = false;
417
 
446
 
447
  public function changePopupStatus()
448
  {
449
+ $popupId = (int)sanitize_text_field($_POST['popupId']);
450
  $obj = SGPopup::find($popupId);
451
  $isDraft = '';
452
  $postStatus = get_post_status($popupId);
469
  public function subscriptionSubmission()
470
  {
471
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
472
+ $postData = $_POST;
473
+ array_walk_recursive($postData, 'sanitize_text_field');
474
+ $this->setPostData($postData);
475
  $submissionData = $this->getValueFromPost('formData');
476
  $popupPostId = (int)$this->getValueFromPost('popupPostId');
477
 
522
  public function sgpbSubsciptionFormSubmittedAction()
523
  {
524
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
525
+ $postData = $_POST;
526
+ array_walk_recursive($postData, 'sanitize_text_field');
527
+ $this->setPostData($postData);
528
 
529
  $submissionData = $this->getValueFromPost('formData');
530
  $popupPostId = (int)$this->getValueFromPost('popupPostId');
629
  check_ajax_referer(SG_AJAX_NONCE, 'nonce_ajax');
630
  global $SGPB_DATA_CONFIG_ARRAY;
631
 
632
+ $groupId = (int)sanitize_text_field($_POST['groupId']);
633
  $targetType = sanitize_text_field($_POST['conditionName']);
634
  $addedObj = array();
635
 
654
  $targetType = sanitize_text_field($_POST['conditionName']);
655
  $builderObj = new ConditionBuilder();
656
 
657
+ $groupId = (int)sanitize_text_field($_POST['groupId']);
658
+ $ruleId = (int)sanitize_text_field($_POST['ruleId']);
659
 
660
  $builderObj->setGroupId($groupId);
661
  $builderObj->setRuleId($ruleId);
677
  $targetType = sanitize_text_field($_POST['conditionName']);
678
  $builderObj = new ConditionBuilder();
679
  $conditionConfig = $SGPB_DATA_CONFIG_ARRAY[$targetType];
680
+ $groupId = (int)sanitize_text_field($_POST['groupId']);
681
+ $ruleId = (int)sanitize_text_field($_POST['ruleId']);
682
+ $popupId = (int)sanitize_text_field($_POST['popupId']);
683
  $paramName = sanitize_text_field($_POST['paramName']);
684
 
685
  $savedData = array(
com/classes/ConditionCreator.php CHANGED
@@ -81,7 +81,7 @@ class ConditionCreator
81
  {
82
  ob_start();
83
  ?>
84
- <div class="events form sg-target-rule sgpb-margin-bottom-40 sg-target-rule-<?php echo $conditionDataObj->getRuleId(); ?> sgpb-event-row" data-rule-id="<?php echo $conditionDataObj->getRuleId(); ?>">
85
  <div class="formItem sgpb-align-item-start">
86
  <?php
87
  $savedData = $conditionDataObj->getSavedData();
@@ -105,7 +105,7 @@ class ConditionCreator
105
  $showRowStatusClass = ($hideStatus) ? 'sgpb-hide-condition-row' : $showRowStatusClass;
106
  ?>
107
  <?php if ($conditionName != 'hiddenOption'): ?>
108
- <div data-condition-name="<?php echo $conditionName;?>" class="<?php echo 'inputBlock sg-condition-'.$conditionName.'-wrapper'.' '.$showRowStatusClass; ?>">
109
  <?php
110
  if (!$hideStatus) {
111
  echo self::createConditionElement($conditionDataObj, $conditionName);
@@ -115,7 +115,7 @@ class ConditionCreator
115
  <?php endif; ?>
116
  <?php if (($conditionName == 'hiddenOption')): ?>
117
  <?php $hiddenContent = self::getHiddenDataContent($conditionDataObj); ?>
118
- <div class="sgpb-hide-condition-row"><div id="<?php echo $idHiddenDiv;?>"><?php echo $hiddenContent; ?></div></div>
119
  <?php endif; ?>
120
  <?php endforeach;?>
121
  <?php echo self::createConditionOperators($conditionDataObj, $idHiddenDiv); ?>
@@ -518,7 +518,7 @@ class ConditionCreator
518
  $activeClassName = 'sgpb-active';
519
  }
520
  ?>
521
- <button class="tablinks sgpb-tab-links <?php echo $activeClassName;?>" data-rule-id="<?php echo $ruleId; ?>" data-content-id="<?php echo $tab.'-'.$ruleId; ?>"><?php echo ucfirst($tab); ?></button>
522
  <?php endforeach;?>
523
  </div>
524
  <?php echo self::createHiddenFields($hiddenOptionsData, $conditionDataObj, $ruleId); ?>
@@ -539,8 +539,8 @@ class ConditionCreator
539
  ob_start();
540
  ?>
541
  <?php foreach ($hiddenOptionsData as $key => $hiddenData): ?>
542
- <div id="<?php echo $key.'-'.$ruleId; ?>" class="sgpb-tab-content-<?php echo $ruleId;?>">
543
- <div id="<?php echo $key; ?>" class="sgpb-tab-content-options">
544
  <?php foreach ($hiddenData as $name => $label): ?>
545
  <?php
546
  $hiddenOptionsView = self::optionLabelSupplement($conditionDataObj, $name);
@@ -553,12 +553,12 @@ class ConditionCreator
553
  <div class="col-md-6">
554
  <?php echo self::createConditionFieldHeader($conditionDataObj, $name); ?>
555
  </div>
556
- <div class="col-md-<?php echo $colMdValue; ?>">
557
  <?php echo self::createConditionField($conditionDataObj, $name); ?>
558
  </div>
559
  <?php if (!empty($hiddenOptionsView)): ?>
560
  <div class="col-md-4">
561
- <?php echo $hiddenOptionsView; ?>
562
  </div>
563
  <?php endif; ?>
564
  </div>
81
  {
82
  ob_start();
83
  ?>
84
+ <div class="events form sg-target-rule sgpb-margin-bottom-40 sg-target-rule-<?php echo esc_attr($conditionDataObj->getRuleId()); ?> sgpb-event-row" data-rule-id="<?php echo esc_attr($conditionDataObj->getRuleId()); ?>">
85
  <div class="formItem sgpb-align-item-start">
86
  <?php
87
  $savedData = $conditionDataObj->getSavedData();
105
  $showRowStatusClass = ($hideStatus) ? 'sgpb-hide-condition-row' : $showRowStatusClass;
106
  ?>
107
  <?php if ($conditionName != 'hiddenOption'): ?>
108
+ <div data-condition-name="<?php echo esc_attr($conditionName);?>" class="<?php echo 'inputBlock sg-condition-'.esc_attr($conditionName).'-wrapper'.' '.esc_attr($showRowStatusClass); ?>">
109
  <?php
110
  if (!$hideStatus) {
111
  echo self::createConditionElement($conditionDataObj, $conditionName);
115
  <?php endif; ?>
116
  <?php if (($conditionName == 'hiddenOption')): ?>
117
  <?php $hiddenContent = self::getHiddenDataContent($conditionDataObj); ?>
118
+ <div class="sgpb-hide-condition-row"><div id="<?php echo esc_attr($idHiddenDiv);?>"><?php echo $hiddenContent; ?></div></div>
119
  <?php endif; ?>
120
  <?php endforeach;?>
121
  <?php echo self::createConditionOperators($conditionDataObj, $idHiddenDiv); ?>
518
  $activeClassName = 'sgpb-active';
519
  }
520
  ?>
521
+ <button class="tablinks sgpb-tab-links <?php echo esc_attr($activeClassName);?>" data-rule-id="<?php echo esc_attr($ruleId); ?>" data-content-id="<?php echo esc_attr($tab.'-'.$ruleId); ?>"><?php echo ucfirst($tab); ?></button>
522
  <?php endforeach;?>
523
  </div>
524
  <?php echo self::createHiddenFields($hiddenOptionsData, $conditionDataObj, $ruleId); ?>
539
  ob_start();
540
  ?>
541
  <?php foreach ($hiddenOptionsData as $key => $hiddenData): ?>
542
+ <div id="<?php echo esc_attr($key.'-'.$ruleId); ?>" class="sgpb-tab-content-<?php echo esc_attr($ruleId);?>">
543
+ <div id="<?php echo esc_attr($key); ?>" class="sgpb-tab-content-options">
544
  <?php foreach ($hiddenData as $name => $label): ?>
545
  <?php
546
  $hiddenOptionsView = self::optionLabelSupplement($conditionDataObj, $name);
553
  <div class="col-md-6">
554
  <?php echo self::createConditionFieldHeader($conditionDataObj, $name); ?>
555
  </div>
556
+ <div class="col-md-<?php echo esc_attr($colMdValue); ?>">
557
  <?php echo self::createConditionField($conditionDataObj, $name); ?>
558
  </div>
559
  <?php if (!empty($hiddenOptionsView)): ?>
560
  <div class="col-md-4">
561
+ <?php echo wp_kses($hiddenOptionsView, 'post'); ?>
562
  </div>
563
  <?php endif; ?>
564
  </div>
com/classes/Feedback.php CHANGED
@@ -118,7 +118,7 @@ class SGPBFeedback
118
  <input class="sgpb-feedback-text sgpb-feedback-text-input" style="display: none;" type="text" name="reason_<?php echo esc_attr( $reasonKey ); ?>" placeholder="<?php echo esc_attr($reason['input_placeholder']); ?>" />
119
  <?php endif; ?>
120
  <?php if (!empty($reason['extra_help'])) : ?>
121
- <p class="sgpb-feedback-text-input" style="display: none;"><?php echo $reason['extra_help']; ?></p>
122
  <?php endif; ?>
123
  </div>
124
  </div>
118
  <input class="sgpb-feedback-text sgpb-feedback-text-input" style="display: none;" type="text" name="reason_<?php echo esc_attr( $reasonKey ); ?>" placeholder="<?php echo esc_attr($reason['input_placeholder']); ?>" />
119
  <?php endif; ?>
120
  <?php if (!empty($reason['extra_help'])) : ?>
121
+ <p class="sgpb-feedback-text-input" style="display: none;"><?php echo wp_kses($reason['extra_help'], 'post'); ?></p>
122
  <?php endif; ?>
123
  </div>
124
  </div>
com/classes/NotificationCenter.php CHANGED
@@ -33,7 +33,7 @@ class SGPBNotificationCenter
33
  echo "<script>
34
  jQuery(document).ready(function() {
35
  jQuery('.sgpb-menu-item-notification').remove();
36
- jQuery('.dashicons-menu-icon-sgpb').next().append('<span class=\"sgpb-menu-item-notification".$hidden."\">".$count."</span>');
37
  });
38
  </script>";
39
  }
33
  echo "<script>
34
  jQuery(document).ready(function() {
35
  jQuery('.sgpb-menu-item-notification').remove();
36
+ jQuery('.dashicons-menu-icon-sgpb').next().append('<span class=\"sgpb-menu-item-notification".esc_attr($hidden)."\">".esc_html($count)."</span>');
37
  });
38
  </script>";
39
  }
com/classes/PopupChecker.php CHANGED
@@ -333,7 +333,12 @@ class PopupChecker
333
  private function isSatisfyForParam($targetData)
334
  {
335
  $isSatisfy = false;
336
- $postId = get_queried_object_id();
 
 
 
 
 
337
 
338
  if (empty($targetData['param'])) {
339
  return $isSatisfy;
333
  private function isSatisfyForParam($targetData)
334
  {
335
  $isSatisfy = false;
336
+ if ($this->getIsAjaxCall()){
337
+ $popup = $this->getPopup();
338
+ $postId = $popup->getCurrentPageIdForAjax();
339
+ } else {
340
+ $postId = get_queried_object_id();
341
+ }
342
 
343
  if (empty($targetData['param'])) {
344
  return $isSatisfy;
com/classes/ScriptsLoader.php CHANGED
@@ -150,8 +150,8 @@ class ScriptsLoader
150
  $popupOptions = $this->getEncodedOptionsFromPopup($popup);
151
  $popupOptions = apply_filters('sgpbLoadToFooterOptions', $popupOptions);
152
  if ($isFromAjax) {
153
- $footerPopupContent = '<div class="sgpb-main-popup-data-container-'.$popupId.'" style="position:fixed;opacity: 0;filter: opacity(0%);transform: scale(0);">
154
- <div class="sg-popup-builder-content" id="sg-popup-content-wrapper-'.$popupId.'" data-id="'.esc_attr($popupId).'" data-events="'.esc_attr($events).'" data-options="'.esc_attr($popupOptions).'">
155
  <div class="sgpb-popup-builder-content-'.esc_attr($popupId).' sgpb-popup-builder-content-html">'.$popupContent.'</div>
156
  </div>
157
  </div>';
@@ -159,8 +159,8 @@ class ScriptsLoader
159
  $footerContentAjax .= $footerPopupContent;
160
  } else {
161
  add_action('wp_footer', function() use ($popupId, $events, $popupOptions, $popupContent, $extraContent) {
162
- $footerPopupContent = '<div class="sgpb-main-popup-data-container-'.$popupId.'" style="position:fixed;opacity: 0;filter: opacity(0%);transform: scale(0);">
163
- <div class="sg-popup-builder-content" id="sg-popup-content-wrapper-'.$popupId.'" data-id="'.esc_attr($popupId).'" data-events="'.esc_attr($events).'" data-options="'.esc_attr($popupOptions).'">
164
  <div class="sgpb-popup-builder-content-'.esc_attr($popupId).' sgpb-popup-builder-content-html">'.$popupContent.'</div>
165
  </div>
166
  </div>';
150
  $popupOptions = $this->getEncodedOptionsFromPopup($popup);
151
  $popupOptions = apply_filters('sgpbLoadToFooterOptions', $popupOptions);
152
  if ($isFromAjax) {
153
+ $footerPopupContent = '<div class="sgpb-main-popup-data-container-'.esc_attr($popupId).'" style="position:fixed;opacity: 0;filter: opacity(0%);transform: scale(0);">
154
+ <div class="sg-popup-builder-content" id="sg-popup-content-wrapper-'.esc_attr($popupId).'" data-id="'.esc_attr($popupId).'" data-events="'.esc_attr($events).'" data-options="'.esc_attr($popupOptions).'">
155
  <div class="sgpb-popup-builder-content-'.esc_attr($popupId).' sgpb-popup-builder-content-html">'.$popupContent.'</div>
156
  </div>
157
  </div>';
159
  $footerContentAjax .= $footerPopupContent;
160
  } else {
161
  add_action('wp_footer', function() use ($popupId, $events, $popupOptions, $popupContent, $extraContent) {
162
+ $footerPopupContent = '<div class="sgpb-main-popup-data-container-'.esc_attr($popupId).'" style="position:fixed;opacity: 0;filter: opacity(0%);transform: scale(0);">
163
+ <div class="sg-popup-builder-content" id="sg-popup-content-wrapper-'.esc_attr($popupId).'" data-id="'.esc_attr($popupId).'" data-events="'.esc_attr($events).'" data-options="'.esc_attr($popupOptions).'">
164
  <div class="sgpb-popup-builder-content-'.esc_attr($popupId).' sgpb-popup-builder-content-html">'.$popupContent.'</div>
165
  </div>
166
  </div>';
com/classes/components/Menu.php CHANGED
@@ -198,13 +198,13 @@ class SGPBMenu
198
  public function fields($itemId, $item, $depth, $args)
199
  { ?>
200
  <div class="description description-wide">
201
- <label for="edit-menu-item-pb-<?php echo $item->ID; ?>">
202
  <?php _e('Select a Popup', SG_POPUP_TEXT_DOMAIN); ?><br/>
203
- <select class="widefat" name="menu-item-pb[<?php echo $item->ID; ?>][popup]"
204
- id="edit-menu-item-pb-<?php echo $item->ID; ?>">
205
  <option value=""></option>
206
  <?php foreach (self::getPopups() as $popup) : ?>
207
- <option value="<?php echo $popup->getId(); ?>" <?php selected($popup->getId(), (int)get_post_meta($itemId, '_menu_sgpb_popup_id', true)); ?>>
208
  <?php echo esc_html($popup->getTitle()); ?>
209
  </option>
210
  <?php endforeach; ?>
198
  public function fields($itemId, $item, $depth, $args)
199
  { ?>
200
  <div class="description description-wide">
201
+ <label for="edit-menu-item-pb-<?php echo esc_attr($item->ID); ?>">
202
  <?php _e('Select a Popup', SG_POPUP_TEXT_DOMAIN); ?><br/>
203
+ <select class="widefat" name="menu-item-pb[<?php echo esc_attr($item->ID); ?>][popup]"
204
+ id="edit-menu-item-pb-<?php echo esc_attr($item->ID); ?>">
205
  <option value=""></option>
206
  <?php foreach (self::getPopups() as $popup) : ?>
207
+ <option value="<?php echo esc_attr($popup->getId()); ?>" <?php selected($popup->getId(), (int)get_post_meta($itemId, '_menu_sgpb_popup_id', true)); ?>>
208
  <?php echo esc_html($popup->getTitle()); ?>
209
  </option>
210
  <?php endforeach; ?>
com/classes/dataTable/Subscribers.php CHANGED
@@ -102,7 +102,7 @@ class Subscribers extends SGPBTable
102
 
103
  ob_start();
104
  ?>
105
- <input type="hidden" class="sgpb-subscription-popup-id" name="sgpb-subscription-popup-id" value="<?php echo $selectedPopup;?>">
106
  <input type="hidden" name="page" value="<?php echo SG_POPUP_SUBSCRIBERS_PAGE; ?>" >
107
 
108
  <select class="select__select sgpb-margin-right-10" name="sgpb-subscription-popup" id="sgpb-subscription-popup">
@@ -115,7 +115,7 @@ class Subscribers extends SGPBTable
115
  else {
116
  $selected = '';
117
  }
118
- $list .= '<option value="'.esc_attr($popupId).'"'.$selected.'>'.$popupTitle.'</option>';
119
  }
120
  echo $list;
121
  ?>
102
 
103
  ob_start();
104
  ?>
105
+ <input type="hidden" class="sgpb-subscription-popup-id" name="sgpb-subscription-popup-id" value="<?php echo esc_html($selectedPopup);?>">
106
  <input type="hidden" name="page" value="<?php echo SG_POPUP_SUBSCRIBERS_PAGE; ?>" >
107
 
108
  <select class="select__select sgpb-margin-right-10" name="sgpb-subscription-popup" id="sgpb-subscription-popup">
115
  else {
116
  $selected = '';
117
  }
118
+ $list .= '<option value="'.esc_attr($popupId).'"'.esc_attr($selected).'>'.esc_html($popupTitle).'</option>';
119
  }
120
  echo $list;
121
  ?>
com/classes/extension/SgpbPopupExtension.php CHANGED
@@ -97,8 +97,6 @@ class SgpbPopupExtension implements SgpbIPopupExtension
97
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'sgpbSelect2.js');
98
 
99
 
100
- $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'bootstrap.min.js');
101
- $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'sgPopupRangeSlider.js');
102
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Backend.js');
103
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'FloatingButton.js', 'dep' => array('Backend.js'),);
104
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'NotificationCenter.js');
97
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'sgpbSelect2.js');
98
 
99
 
 
 
100
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Backend.js');
101
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'FloatingButton.js', 'dep' => array('Backend.js'),);
102
  $jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'NotificationCenter.js');
com/classes/popups/FblikePopup.php CHANGED
@@ -55,14 +55,14 @@ class FblikePopup extends SGPopup
55
  {
56
  ob_start();
57
  ?>
58
- <div class='sg-fb-buttons-wrapper sgpb-fb-wrapper-<?php echo $layout;?>'>
59
  <div class="fb-like"
60
- data-href="<?php echo $shareUrl; ?>"
61
- data-layout="<?php echo $layout; ?>"
62
  data-action="like"
63
  data-size="small"
64
  data-show-faces="true"
65
- data-share="<?php echo $shareButtonStatus; ?>">
66
  </div>
67
  </div>
68
  <?php
55
  {
56
  ob_start();
57
  ?>
58
+ <div class='sg-fb-buttons-wrapper sgpb-fb-wrapper-<?php echo esc_attr($layout);?>'>
59
  <div class="fb-like"
60
+ data-href="<?php echo esc_attr($shareUrl); ?>"
61
+ data-layout="<?php echo esc_attr($layout); ?>"
62
  data-action="like"
63
  data-size="small"
64
  data-show-faces="true"
65
+ data-share="<?php echo esc_attr($shareButtonStatus); ?>">
66
  </div>
67
  </div>
68
  <?php
com/classes/popups/SGPopup.php CHANGED
@@ -14,6 +14,7 @@ abstract class SGPopup
14
  private $sanitizedData;
15
  private $postData = array();
16
  private $id;
 
17
  private $title;
18
  private $content;
19
  private $target;
@@ -34,6 +35,15 @@ abstract class SGPopup
34
  {
35
  return (int)$this->id;
36
  }
 
 
 
 
 
 
 
 
 
37
 
38
  public function setTitle($title)
39
  {
14
  private $sanitizedData;
15
  private $postData = array();
16
  private $id;
17
+ private $ajax_page_id;
18
  private $title;
19
  private $content;
20
  private $target;
35
  {
36
  return (int)$this->id;
37
  }
38
+ public function setCurrentPageIdForAjax($id)
39
+ {
40
+ $this->ajax_page_id = $id;
41
+ }
42
+
43
+ public function getCurrentPageIdForAjax()
44
+ {
45
+ return (int)$this->ajax_page_id;
46
+ }
47
 
48
  public function setTitle($title)
49
  {
com/classes/popups/SubscriptionPopup.php CHANGED
@@ -466,13 +466,13 @@ class SubscriptionPopup extends SGPopup
466
  ob_start();
467
  ?>
468
  <style type="text/css">
469
- .sgpb-subs-form-<?php echo $popupId; ?> {background-color: <?php echo $formBackgroundColor; ?>;padding: <?php echo $formPadding.'px'; ?>}
470
- .sgpb-subs-form-<?php echo $popupId; ?> .js-subs-text-inputs::-webkit-input-placeholder {color: <?php echo $placeholderColor; ?>;font-weight: lighter;}
471
- .sgpb-subs-form-<?php echo $popupId; ?> .js-subs-text-inputs::-moz-placeholder {color:<?php echo $placeholderColor; ?>;font-weight: lighter;}
472
- .sgpb-subs-form-<?php echo $popupId; ?> .js-subs-text-inputs:-ms-input-placeholder {color:<?php echo $placeholderColor; ?>;font-weight: lighter;} /* ie */
473
- .sgpb-subs-form-<?php echo $popupId; ?> .js-subs-text-inputs:-moz-placeholder {color:<?php echo $placeholderColor; ?>;font-weight: lighter;}
474
- .sgpb-subs-form-<?php echo $popupId; ?> input[type="checkbox"] {-webkit-appearance: checkbox;!important}
475
- .sgpb-subs-form-<?php echo $popupId; ?> input[type="checkbox"]:before {content: none!important; }
476
  </style>
477
  <?php
478
  $styles = ob_get_contents();
@@ -524,10 +524,10 @@ class SubscriptionPopup extends SGPopup
524
  ob_start();
525
  ?>
526
  <div class="subs-form-messages sgpb-alert sgpb-alert-success sg-hide-element">
527
- <p><?php echo $successMessage; ?></p>
528
  </div>
529
  <div class="subs-form-messages sgpb-alert sgpb-alert-danger sg-hide-element">
530
- <p><?php echo $errorMessage; ?></p>
531
  </div>
532
  <?php
533
  $messages = ob_get_contents();
466
  ob_start();
467
  ?>
468
  <style type="text/css">
469
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> {background-color: <?php echo esc_html($formBackgroundColor); ?>;padding: <?php echo esc_html($formPadding).'px'; ?>}
470
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> .js-subs-text-inputs::-webkit-input-placeholder {color: <?php echo esc_html($placeholderColor); ?>;font-weight: lighter;}
471
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> .js-subs-text-inputs::-moz-placeholder {color:<?php echo esc_html($placeholderColor); ?>;font-weight: lighter;}
472
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> .js-subs-text-inputs:-ms-input-placeholder {color:<?php echo esc_html($placeholderColor); ?>;font-weight: lighter;} /* ie */
473
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> .js-subs-text-inputs:-moz-placeholder {color:<?php echo esc_html($placeholderColor); ?>;font-weight: lighter;}
474
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> input[type="checkbox"] {-webkit-appearance: checkbox;!important}
475
+ .sgpb-subs-form-<?php echo esc_attr($popupId); ?> input[type="checkbox"]:before {content: none!important; }
476
  </style>
477
  <?php
478
  $styles = ob_get_contents();
524
  ob_start();
525
  ?>
526
  <div class="subs-form-messages sgpb-alert sgpb-alert-success sg-hide-element">
527
+ <p><?php echo esc_html($successMessage); ?></p>
528
  </div>
529
  <div class="subs-form-messages sgpb-alert sgpb-alert-danger sg-hide-element">
530
+ <p><?php echo esc_html($errorMessage); ?></p>
531
  </div>
532
  <?php
533
  $messages = ob_get_contents();
com/config/configPackage.php CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
3
  exit();
4
  }
5
 
6
- define('SG_POPUP_VERSION', '4.0.7');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
3
  exit();
4
  }
5
 
6
+ define('SG_POPUP_VERSION', '4.0.8');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
com/helpers/AdminHelper.php CHANGED
@@ -671,7 +671,7 @@ class AdminHelper
671
  </div>
672
  <ul class="sgpb-extensions-list">
673
  <?php foreach ($extensions as $extensionName): ?>
674
- <a target="_blank" href="https://popup-builder.com/forms/control-panel/"><li><?php echo $extensionName; ?></li></a>
675
  <?php endforeach; ?>
676
  </ul>
677
  </div>
@@ -1048,14 +1048,14 @@ class AdminHelper
1048
  </style>
1049
  <div class="sgpb-review-wrapper">
1050
  <div class="sgpb-review-description">
1051
- <?php echo $firstHeader; ?>
1052
  <h2 class="sgrb-review-h2"><?php _e('This is really great for your website score.', SG_POPUP_TEXT_DOMAIN); ?></h2>
1053
  <p class="sgrb-review-mt20"><?php _e('Have your input in the development of our plugin, and we’ll provide better conversions for your site!<br /> Leave your 5-star positive review and help us go further to the perfection!', SG_POPUP_TEXT_DOMAIN); ?></p>
1054
  </div>
1055
  <div class="sgpb-buttons-wrapper">
1056
  <button class="press press-grey sgpb-button-1 sgpb-close-promo-notification" data-action="sg-already-did-review"><?php _e('I already did', SG_POPUP_TEXT_DOMAIN); ?></button>
1057
  <button class="press press-lightblue sgpb-button-3 sgpb-close-promo-notification" data-action="sg-you-worth-it"><?php _e('You worth it!', SG_POPUP_TEXT_DOMAIN); ?></button>
1058
- <button class="press press-grey sgpb-button-2 sgpb-close-promo-notification" data-action="sg-show-popup-period" data-message-type="<?php echo $type; ?>"><?php _e('Maybe later', SG_POPUP_TEXT_DOMAIN); ?></button></div>
1059
  <div> </div>
1060
  </div>
1061
  <?php
671
  </div>
672
  <ul class="sgpb-extensions-list">
673
  <?php foreach ($extensions as $extensionName): ?>
674
+ <a target="_blank" href="https://popup-builder.com/forms/control-panel/"><li><?php echo esc_html($extensionName); ?></li></a>
675
  <?php endforeach; ?>
676
  </ul>
677
  </div>
1048
  </style>
1049
  <div class="sgpb-review-wrapper">
1050
  <div class="sgpb-review-description">
1051
+ <?php echo wp_kses($firstHeader, 'post'); ?>
1052
  <h2 class="sgrb-review-h2"><?php _e('This is really great for your website score.', SG_POPUP_TEXT_DOMAIN); ?></h2>
1053
  <p class="sgrb-review-mt20"><?php _e('Have your input in the development of our plugin, and we’ll provide better conversions for your site!<br /> Leave your 5-star positive review and help us go further to the perfection!', SG_POPUP_TEXT_DOMAIN); ?></p>
1054
  </div>
1055
  <div class="sgpb-buttons-wrapper">
1056
  <button class="press press-grey sgpb-button-1 sgpb-close-promo-notification" data-action="sg-already-did-review"><?php _e('I already did', SG_POPUP_TEXT_DOMAIN); ?></button>
1057
  <button class="press press-lightblue sgpb-button-3 sgpb-close-promo-notification" data-action="sg-you-worth-it"><?php _e('You worth it!', SG_POPUP_TEXT_DOMAIN); ?></button>
1058
+ <button class="press press-grey sgpb-button-2 sgpb-close-promo-notification" data-action="sg-show-popup-period" data-message-type="<?php echo esc_attr($type); ?>"><?php _e('Maybe later', SG_POPUP_TEXT_DOMAIN); ?></button></div>
1059
  <div> </div>
1060
  </div>
1061
  <?php
com/helpers/Functions.php CHANGED
@@ -114,7 +114,7 @@ class Functions
114
 
115
  ob_start();
116
  ?>
117
- <div class="sgpb-inputs-wrapper js-<?php echo $fieldKey; ?>-wrapper js-sgpb-form-field-<?php echo $fieldKey; ?>-wrapper <?php echo $hideClassName; ?>">
118
  <?php echo $htmlElement; ?>
119
  </div>
120
  <?php
114
 
115
  ob_start();
116
  ?>
117
+ <div class="sgpb-inputs-wrapper js-<?php echo esc_attr($fieldKey); ?>-wrapper js-sgpb-form-field-<?php echo esc_attr($fieldKey); ?>-wrapper <?php echo esc_attr($hideClassName); ?>">
118
  <?php echo $htmlElement; ?>
119
  </div>
120
  <?php
com/libs/Importer.php CHANGED
@@ -244,7 +244,7 @@ class WP_Import extends WP_Importer
244
  ?>
245
  <form action="<?php echo admin_url('admin.php?import='.SG_POPUP_POST_TYPE.'&amp;step=2'); ?>" method="post">
246
  <?php wp_nonce_field('import-wordpress'); ?>
247
- <input type="hidden" name="import_id" value="<?php echo $this->id; ?>" />
248
 
249
  <?php if (!empty($this->authors)) : ?>
250
  <h3><?php _e('Assign Authors', SG_POPUP_TEXT_DOMAIN); ?></h3>
@@ -291,7 +291,7 @@ class WP_Import extends WP_Importer
291
  $value = esc_attr(sanitize_user($author['author_login'], true));
292
  }
293
 
294
- echo ' <input type="text" name="user_new['.$n.']" value="'. $value .'" /><br />';
295
  }
296
 
297
  if (!$create_users && $this->version == '1.0')
@@ -299,7 +299,7 @@ class WP_Import extends WP_Importer
299
  else
300
  _e('or assign posts to an existing user:', SG_POPUP_TEXT_DOMAIN);
301
  wp_dropdown_users(array('name' => "user_map[$n]", 'multi' => true, 'show_option_all' => __('- Select -', SG_POPUP_TEXT_DOMAIN)));
302
- echo '<input type="hidden" name="imported_authors['.$n.']" value="' . esc_attr($author['author_login']) . '" />';
303
 
304
  if ($this->version != '1.0')
305
  echo '</div>';
244
  ?>
245
  <form action="<?php echo admin_url('admin.php?import='.SG_POPUP_POST_TYPE.'&amp;step=2'); ?>" method="post">
246
  <?php wp_nonce_field('import-wordpress'); ?>
247
+ <input type="hidden" name="import_id" value="<?php echo esc_html($this->id); ?>" />
248
 
249
  <?php if (!empty($this->authors)) : ?>
250
  <h3><?php _e('Assign Authors', SG_POPUP_TEXT_DOMAIN); ?></h3>
291
  $value = esc_attr(sanitize_user($author['author_login'], true));
292
  }
293
 
294
+ echo ' <input type="text" name="user_new['.esc_attr($n).']" value="'. $value .'" /><br />';
295
  }
296
 
297
  if (!$create_users && $this->version == '1.0')
299
  else
300
  _e('or assign posts to an existing user:', SG_POPUP_TEXT_DOMAIN);
301
  wp_dropdown_users(array('name' => "user_map[$n]", 'multi' => true, 'show_option_all' => __('- Select -', SG_POPUP_TEXT_DOMAIN)));
302
+ echo '<input type="hidden" name="imported_authors['.esc_attr($n).']" value="' . esc_attr($author['author_login']) . '" />';
303
 
304
  if ($this->version != '1.0')
305
  echo '</div>';
com/libs/ListTable.php CHANGED
@@ -338,8 +338,8 @@ class SGPBListTable {
338
  echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
339
  ?>
340
  <p class="search-box">
341
- <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
342
- <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
343
  <?php submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); ?>
344
  </p>
345
  <?php
@@ -437,13 +437,13 @@ class SGPBListTable {
437
  return;
438
 
439
  echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
440
- echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
441
  echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
442
 
443
  foreach ( $this->_actions as $name => $title ) {
444
  $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
445
 
446
- echo "\t<option value='$name'$class>$title</option>\n";
447
  }
448
 
449
  echo "</select>\n";
@@ -1041,7 +1041,7 @@ class SGPBListTable {
1041
  $class[] = $desc_first ? 'asc' : 'desc';
1042
  }
1043
 
1044
- $column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
1045
  }
1046
 
1047
  $tag = ( 'cb' === $column_key ) ? 'td' : 'th';
@@ -1234,12 +1234,12 @@ class SGPBListTable {
1234
  );
1235
  } elseif ( method_exists( $this, 'column_' . $column_name ) ) {
1236
  //<div class="table__data">01</div>
1237
- echo "<td $attributes>";
1238
  echo call_user_func( array( $this, 'column_' . $column_name ), $item );
1239
  echo $this->handle_row_actions( $item, $column_name, $primary );
1240
  echo '</td>';
1241
  } else {
1242
- echo "<td $attributes>";
1243
  echo $this->column_default( $item, $column_name );
1244
  echo $this->handle_row_actions( $item, $column_name, $primary );
1245
  echo '</td>';
338
  echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
339
  ?>
340
  <p class="search-box">
341
+ <label class="screen-reader-text" for="<?php echo esc_html($input_id) ?>"><?php echo esc_html($text); ?>:</label>
342
+ <input type="search" id="<?php echo esc_attr($input_id) ?>" name="s" value="<?php _admin_search_query(); ?>" />
343
  <?php submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); ?>
344
  </p>
345
  <?php
437
  return;
438
 
439
  echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
440
+ echo "<select name='action".esc_html($two)."' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
441
  echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
442
 
443
  foreach ( $this->_actions as $name => $title ) {
444
  $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
445
 
446
+ echo "\t<option value='$name'$class>".esc_html($title)."</option>\n";
447
  }
448
 
449
  echo "</select>\n";
1041
  $class[] = $desc_first ? 'asc' : 'desc';
1042
  }
1043
 
1044
+ $column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . esc_html($column_display_name) . '</span><span class="sorting-indicator"></span></a>';
1045
  }
1046
 
1047
  $tag = ( 'cb' === $column_key ) ? 'td' : 'th';
1234
  );
1235
  } elseif ( method_exists( $this, 'column_' . $column_name ) ) {
1236
  //<div class="table__data">01</div>
1237
+ echo "<td ".esc_attr($attributes).">";
1238
  echo call_user_func( array( $this, 'column_' . $column_name ), $item );
1239
  echo $this->handle_row_actions( $item, $column_name, $primary );
1240
  echo '</td>';
1241
  } else {
1242
+ echo "<td ".esc_attr($attributes).">";
1243
  echo $this->column_default( $item, $column_name );
1244
  echo $this->handle_row_actions( $item, $column_name, $primary );
1245
  echo '</td>';
com/libs/Table.php CHANGED
@@ -194,7 +194,7 @@ class SGPBTable extends SGPBListTable
194
  public function __toString()
195
  {
196
  $this->prepare_items(); ?>
197
- <form method="get" id="posts-filter-<?php echo $this->id?>">
198
  <p class="search-box">
199
  <input type="hidden" name="post_type" value="popupbuilder" />
200
  <?php $this->search_box('search', $this->id); ?>
@@ -241,7 +241,7 @@ class SGPBTable extends SGPBListTable
241
  echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
242
  ?>
243
  <div class="search search-box">
244
- <input type="search" class="search__input" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
245
  <div>
246
  <?php submit_button($text, 'search__button', '', false, array('id' => 'search-submit')); ?>
247
  </div>
194
  public function __toString()
195
  {
196
  $this->prepare_items(); ?>
197
+ <form method="get" id="posts-filter-<?php echo esc_attr($this->id)?>">
198
  <p class="search-box">
199
  <input type="hidden" name="post_type" value="popupbuilder" />
200
  <?php $this->search_box('search', $this->id); ?>
241
  echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
242
  ?>
243
  <div class="search search-box">
244
+ <input type="search" class="search__input" id="<?php echo esc_attr($input_id) ?>" name="s" value="<?php _admin_search_query(); ?>" />
245
  <div>
246
  <?php submit_button($text, 'search__button', '', false, array('id' => 'search-submit')); ?>
247
  </div>
com/libs/WOOSL_CodeAutoUpdate.php CHANGED
@@ -1,7 +1,11 @@
1
  <?php
2
 
3
  namespace sgpb;
4
-
 
 
 
 
5
  class WOOSL_CodeAutoUpdate
6
  {
7
 
1
  <?php
2
 
3
  namespace sgpb;
4
+ /**
5
+ * Allows plugins to use their own update API.
6
+ * Note: This updater is not used for Community/Hosted version of the plugin.
7
+ * This class is included in addons to have an update system in a single file rather than including it in each extension.
8
+ */
9
  class WOOSL_CodeAutoUpdate
10
  {
11
 
com/libs/parsers.php CHANGED
@@ -35,10 +35,10 @@ class WXR_Parser {
35
  echo '<pre>';
36
  if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
37
  foreach ( $result->get_error_data() as $error )
38
- echo $error->line . ':' . $error->column . ' ' . esc_html( $error->message ) . "\n";
39
  } else if ( 'XML_parse_error' == $result->get_error_code() ) {
40
  $error = $result->get_error_data();
41
- echo $error[0] . ':' . $error[1] . ' ' . esc_html( $error[2] );
42
  }
43
  echo '</pre>';
44
  echo '<p><strong>' . __( 'There was an error when reading this WXR file', 'wordpress-importer' ) . '</strong><br />';
35
  echo '<pre>';
36
  if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
37
  foreach ( $result->get_error_data() as $error )
38
+ echo esc_html($error->line) . ':' . esc_html($error->column) . ' ' . esc_html( $error->message ) . "\n";
39
  } else if ( 'XML_parse_error' == $result->get_error_code() ) {
40
  $error = $result->get_error_data();
41
+ echo esc_html($error[0]) . ':' . esc_html($error[1]) . ' ' . esc_html( $error[2] );
42
  }
43
  echo '</pre>';
44
  echo '<p><strong>' . __( 'There was an error when reading this WXR file', 'wordpress-importer' ) . '</strong><br />';
popup-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: https://popup-builder.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
- * Version: 4.0.7
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: https://popup-builder.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
+ * Version: 4.0.8
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
public/css/popupAdminStyles.css CHANGED
@@ -39,7 +39,7 @@ solid #ccc;position:absolute;min-width:20px;min-height:13px;display:none;margin-
39
  !important}}.sgpb-info-wrapper .sgpb-info-icon-align{vertical-align:text-top !important;margin-left:0 !important}.sgpb-col-no-padding{padding:0
40
  !important}.sgpb-info-icon-align-inputs{margin-top:15px !important}.sgpb-info-text-inputs{margin-left:41px !important;margin-top:-18px !important}.sgpb-event-row{min-height:50px}.sgpb-box-woocommerce-special-events .sgpb-event-row:not(:last-child) .sgpb-rules-add-button-wrapper.sgpb-static-padding-top{display:none}.sgpb-box-autoresponder-events .sgpb-event-row:not(:last-child) .sgpb-rules-add-button-wrapper.sgpb-static-padding-top{display:none}.col-md-2.sgpb-rules-edit-button-wrapper{max-width:144px}.sgpb-rules-add-button-wrapper.sgpb-static-padding-top,.sgpb-rules-edit-button-wrapper.sgpb-static-padding-top,.sgpb-rules-delete-button-wrapper.sgpb-static-padding-top{padding-top:23px}.sgpb-rules-add-button-wrapper.sgpb-static-padding-top{max-width:88px}.sgpb-rules-edit-button-wrapper.sgpb-static-padding-top{max-width:114px}.sgpb-events-spinner:before{content:""}.sgpb-event-row
41
  .btn{line-height:22px;border-radius:4px}.sgpb-hide-add-button{display:none !important}.sgpb-tab-content-options
42
- label{margin-bottom:0}.sgpb-label-align-with-select2{padding-top:8px}@media (max-width: 990px){.sgpb-rules-edit-button-wrapper.sgpb-static-padding-top{max-width:90px;width:30%}.sgpb-rules-add-button-wrapper.sgpb-static-padding-top{max-width:65px}}@media (max-width: 1240px){.sgpb-add-new-row{padding-right:15px}}@media (max-width: 768px){.col-sm-2.sgpb-rules-edit-button-wrapper .sgpb-rules-edit-rule{float:unset}.col-sm-2.sgpb-rules-edit-button-wrapper{width:12%;float:left;min-width:90px}.col-sm-1.sgpb-rules-delete-button-wrapper{width:12%;float:left}}.sgpb-preview-animation,.sgpb-preview-close-animation{background-image:url(../img/preview-eye.png);width:30px;height:30px;display:inline-block;cursor:pointer}.sgpb-js-open-animation-effect,.sgpb-js-close-animation-effect{display:none;width:100px;height:100px;margin-left:5px;background-image:url(../img/animationImage.png);background-size:100px 100px;position:absolute;right:-120px;z-index:9999}#sgpb-hidden-media-popup .sgpb-add-subscriber-popup-close-btn,
43
  #sgpb-js-variable-wrapper .sgpb-add-subscriber-popup-close-btn{margin-top:0}.sgpb-insert-popup-btns,
44
  .sgpb-insert-popup + span,
45
  .sgpb-insert-popup-event .select2-container{width:100%}.sgpb-insert-popup-btns{border:1px
39
  !important}}.sgpb-info-wrapper .sgpb-info-icon-align{vertical-align:text-top !important;margin-left:0 !important}.sgpb-col-no-padding{padding:0
40
  !important}.sgpb-info-icon-align-inputs{margin-top:15px !important}.sgpb-info-text-inputs{margin-left:41px !important;margin-top:-18px !important}.sgpb-event-row{min-height:50px}.sgpb-box-woocommerce-special-events .sgpb-event-row:not(:last-child) .sgpb-rules-add-button-wrapper.sgpb-static-padding-top{display:none}.sgpb-box-autoresponder-events .sgpb-event-row:not(:last-child) .sgpb-rules-add-button-wrapper.sgpb-static-padding-top{display:none}.col-md-2.sgpb-rules-edit-button-wrapper{max-width:144px}.sgpb-rules-add-button-wrapper.sgpb-static-padding-top,.sgpb-rules-edit-button-wrapper.sgpb-static-padding-top,.sgpb-rules-delete-button-wrapper.sgpb-static-padding-top{padding-top:23px}.sgpb-rules-add-button-wrapper.sgpb-static-padding-top{max-width:88px}.sgpb-rules-edit-button-wrapper.sgpb-static-padding-top{max-width:114px}.sgpb-events-spinner:before{content:""}.sgpb-event-row
41
  .btn{line-height:22px;border-radius:4px}.sgpb-hide-add-button{display:none !important}.sgpb-tab-content-options
42
+ label{margin-bottom:0}.sgpb-label-align-with-select2{padding-top:8px}@media (max-width: 990px){.sgpb-rules-edit-button-wrapper.sgpb-static-padding-top{max-width:90px;width:30%}.sgpb-rules-add-button-wrapper.sgpb-static-padding-top{max-width:65px}}@media (max-width: 1240px){.sgpb-add-new-row{padding-right:15px}}@media (max-width: 768px){.col-sm-2.sgpb-rules-edit-button-wrapper .sgpb-rules-edit-rule{float:unset}.col-sm-2.sgpb-rules-edit-button-wrapper{width:12%;float:left;min-width:90px}.col-sm-1.sgpb-rules-delete-button-wrapper{width:12%;float:left}}.sgpb-preview-animation,.sgpb-preview-close-animation{background-image:url(../img/preview-eye.png);width:30px;height:30px;display:inline-block;cursor:pointer}.sgpb-js-open-animation-effect,.sgpb-js-close-animation-effect{display:none;width:100px;height:100px;margin-left:5px;background-image:url(../img/animationImage.png);background-size:100px 100px;position:absolute;right:-120px;top:0;z-index:9999}#sgpb-hidden-media-popup .sgpb-add-subscriber-popup-close-btn,
43
  #sgpb-js-variable-wrapper .sgpb-add-subscriber-popup-close-btn{margin-top:0}.sgpb-insert-popup-btns,
44
  .sgpb-insert-popup + span,
45
  .sgpb-insert-popup-event .select2-container{width:100%}.sgpb-insert-popup-btns{border:1px
public/js/Backend.js CHANGED
@@ -48,10 +48,10 @@ uploader=wp.media.frames.file_frame=wp.media({titleFF:SGPB_JS_LOCALIZATION.chang
48
  jQuery('#js-sound-open-url').val(attachment.url).change();});uploader.open();});};SGPBBackend.prototype.openAnimationPreview=function()
49
  {var openAnimationPreview=jQuery('.sgpb-preview-animation');if(!openAnimationPreview.length){return false;}
50
  var openAnimation=jQuery('.sgpb-preview-open-animation');var openAnimationDiv=jQuery('#js-open-animation-effect');var speed=jQuery('#sgpb-open-animation-speed');var openAnimationAction=function(){var speedVal=parseInt(speed.val());if(!speedVal){speedVal=1;}
51
- var speedSeconds=speedVal*1000;setTimeout(function(){openAnimationDiv.hide();},speedSeconds);openAnimationDiv.removeClass();openAnimationDiv.show();openAnimationDiv.css({'animationDuration':speedSeconds+'ms'});openAnimationDiv.addClass('sg-animated '+jQuery('.sgpb-open-animation-effects option:selected').val());};jQuery('.sgpb-open-animation-effects').bind('change',openAnimationAction);openAnimationPreview.bind('click',openAnimationAction);};SGPBBackend.prototype.closeAnimationPreview=function()
52
  {var closeAnimationPreview=jQuery('.sgpb-preview-close-animation');if(!closeAnimationPreview.length){return false;}
53
  var closeAnimation=jQuery('.sgpb-preview-close-animation');var closeAnimationDiv=jQuery('#js-close-animation-effect');var speed=jQuery('#sgpb-close-animation-speed');var closeAnimationAction=function(){var speedVal=parseInt(speed.val());if(!speedVal){speedVal=1;}
54
- var speedSeconds=speedVal*1000;setTimeout(function(){closeAnimationDiv.hide();},speedSeconds);closeAnimationDiv.removeClass();closeAnimationDiv.show();closeAnimationDiv.css({'animationDuration':speedSeconds+'ms'});closeAnimationDiv.addClass('sg-animated '+jQuery('.sgpb-close-animation-effects option:selected').val());};jQuery('.sgpb-close-animation-effects').bind('change',closeAnimationAction);closeAnimationPreview.bind('click',closeAnimationAction);};SGPBBackend.prototype.multipleChoiceButton=function()
55
  {if(!jQuery('.sgpb-choice-wrapper input').length){return false;}
56
  var that=this;jQuery('.sgpb-choice-option-wrapper input').each(function(){if(jQuery(this).is(':checked')){that.buildChoiceShowOption(jQuery(this));}
57
  jQuery(this).on("click",function(){that.hideAllChoiceWrapper(jQuery('.sgpb-choice-option-wrapper'));that.buildChoiceShowOption(jQuery(this));jQuery(window).trigger('sgpbMultichoiceChanged');});});};SGPBBackend.prototype.hideAllChoiceWrapper=function(choiceOptionsWrapper)
48
  jQuery('#js-sound-open-url').val(attachment.url).change();});uploader.open();});};SGPBBackend.prototype.openAnimationPreview=function()
49
  {var openAnimationPreview=jQuery('.sgpb-preview-animation');if(!openAnimationPreview.length){return false;}
50
  var openAnimation=jQuery('.sgpb-preview-open-animation');var openAnimationDiv=jQuery('#js-open-animation-effect');var speed=jQuery('#sgpb-open-animation-speed');var openAnimationAction=function(){var speedVal=parseInt(speed.val());if(!speedVal){speedVal=1;}
51
+ var speedSeconds=speedVal*1000;setTimeout(function(){openAnimationDiv.hide();},speedSeconds);openAnimationDiv.removeClass();openAnimationDiv.css({'animationDuration':speedSeconds+'ms',display:'block'});openAnimationDiv.addClass('sgpb-js-open-animation-effect sg-animated '+jQuery('.sgpb-open-animation-effects option:selected').val());};jQuery('.sgpb-open-animation-effects').bind('change',openAnimationAction);openAnimationPreview.bind('click',openAnimationAction);};SGPBBackend.prototype.closeAnimationPreview=function()
52
  {var closeAnimationPreview=jQuery('.sgpb-preview-close-animation');if(!closeAnimationPreview.length){return false;}
53
  var closeAnimation=jQuery('.sgpb-preview-close-animation');var closeAnimationDiv=jQuery('#js-close-animation-effect');var speed=jQuery('#sgpb-close-animation-speed');var closeAnimationAction=function(){var speedVal=parseInt(speed.val());if(!speedVal){speedVal=1;}
54
+ var speedSeconds=speedVal*1000;setTimeout(function(){closeAnimationDiv.hide();},speedSeconds);closeAnimationDiv.removeClass();closeAnimationDiv.css({'animationDuration':speedSeconds+'ms',display:'block'});closeAnimationDiv.addClass('sgpb-js-close-animation-effect sg-animated '+jQuery('.sgpb-close-animation-effects option:selected').val());};jQuery('.sgpb-close-animation-effects').bind('change',closeAnimationAction);closeAnimationPreview.bind('click',closeAnimationAction);};SGPBBackend.prototype.multipleChoiceButton=function()
55
  {if(!jQuery('.sgpb-choice-wrapper input').length){return false;}
56
  var that=this;jQuery('.sgpb-choice-option-wrapper input').each(function(){if(jQuery(this).is(':checked')){that.buildChoiceShowOption(jQuery(this));}
57
  jQuery(this).on("click",function(){that.hideAllChoiceWrapper(jQuery('.sgpb-choice-option-wrapper'));that.buildChoiceShowOption(jQuery(this));jQuery(window).trigger('sgpbMultichoiceChanged');});});};SGPBBackend.prototype.hideAllChoiceWrapper=function(choiceOptionsWrapper)
public/js/bootstrap.min.js DELETED
@@ -1,6 +0,0 @@
1
- /*!
2
- * Bootstrap v3.4.1 (https://getbootstrap.com/)
3
- * Copyright 2011-2019 Twitter, Inc.
4
- * Licensed under the MIT license
5
- */
6
- if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);
 
 
 
 
 
 
public/js/sgPopupRangeSlider.js DELETED
@@ -1 +0,0 @@
1
- (function(){function e(t,s,n){var i=e.resolve(t);if(null==i){n=n||t,s=s||"root";var o=Error('Failed to require "'+n+'" from "'+s+'"');throw o.path=n,o.parent=s,o.require=!0,o}var r=e.modules[i];if(!r._resolving&&!r.exports){var a={};a.exports={},a.client=a.component=!0,r._resolving=!0,r.call(this,a.exports,e.relative(i),a),delete r._resolving,r.exports=a.exports}return r.exports}e.modules={},e.aliases={},e.resolve=function(t){"/"===t.charAt(0)&&(t=t.slice(1));for(var s=[t,t+".js",t+".json",t+"/index.js",t+"/index.json"],n=0;s.length>n;n++){var t=s[n];if(e.modules.hasOwnProperty(t))return t;if(e.aliases.hasOwnProperty(t))return e.aliases[t]}},e.normalize=function(e,t){var s=[];if("."!=t.charAt(0))return t;e=e.split("/"),t=t.split("/");for(var n=0;t.length>n;++n)".."==t[n]?e.pop():"."!=t[n]&&""!=t[n]&&s.push(t[n]);return e.concat(s).join("/")},e.register=function(t,s){e.modules[t]=s},e.alias=function(t,s){if(!e.modules.hasOwnProperty(t))throw Error('Failed to alias "'+t+'", it does not exist');e.aliases[s]=t},e.relative=function(t){function s(e,t){for(var s=e.length;s--;)if(e[s]===t)return s;return-1}function n(s){var i=n.resolve(s);return e(i,t,s)}var i=e.normalize(t,"..");return n.resolve=function(n){var o=n.charAt(0);if("/"==o)return n.slice(1);if("."==o)return e.normalize(i,n);var r=t.split("/"),a=s(r,"deps")+1;return a||(a=0),n=r.slice(0,a+1).join("/")+"/deps/"+n},n.exists=function(t){return e.modules.hasOwnProperty(n.resolve(t))},n},e.register("component-event/index.js",function(e){var t=window.addEventListener?"addEventListener":"attachEvent",s=window.removeEventListener?"removeEventListener":"detachEvent",n="addEventListener"!==t?"on":"";e.bind=function(e,s,i,o){return e[t](n+s,i,o||!1),i},e.unbind=function(e,t,i,o){return e[s](n+t,i,o||!1),i}}),e.register("component-query/index.js",function(e,t,s){function n(e,t){return t.querySelector(e)}e=s.exports=function(e,t){return t=t||document,n(e,t)},e.all=function(e,t){return t=t||document,t.querySelectorAll(e)},e.engine=function(t){if(!t.one)throw Error(".one callback required");if(!t.all)throw Error(".all callback required");return n=t.one,e.all=t.all,e}}),e.register("component-matches-selector/index.js",function(e,t,s){function n(e,t){if(r)return r.call(e,t);for(var s=i.all(t,e.parentNode),n=0;s.length>n;++n)if(s[n]==e)return!0;return!1}var i=t("query"),o=Element.prototype,r=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector;s.exports=n}),e.register("discore-closest/index.js",function(e,t,s){var n=t("matches-selector");s.exports=function(e,t,s,i){for(e=s?{parentNode:e}:e,i=i||document;(e=e.parentNode)&&e!==document;){if(n(e,t))return e;if(e===i)return}}}),e.register("component-delegate/index.js",function(e,t){var s=t("closest"),n=t("event");e.bind=function(e,t,i,o,r){return n.bind(e,i,function(n){var i=n.target||n.srcElement;n.delegateTarget=s(i,t,!0,e),n.delegateTarget&&o.call(e,n)},r)},e.unbind=function(e,t,s,i){n.unbind(e,t,s,i)}}),e.register("component-events/index.js",function(e,t,s){function n(e,t){if(!(this instanceof n))return new n(e,t);if(!e)throw Error("element required");if(!t)throw Error("object required");this.el=e,this.obj=t,this._events={}}function i(e){var t=e.split(/ +/);return{name:t.shift(),selector:t.join(" ")}}var o=t("event"),r=t("delegate");s.exports=n,n.prototype.sub=function(e,t,s){this._events[e]=this._events[e]||{},this._events[e][t]=s},n.prototype.bind=function(e,t){function s(){var e=[].slice.call(arguments).concat(h);l[t].apply(l,e)}var n=i(e),a=this.el,l=this.obj,c=n.name,t=t||"on"+c,h=[].slice.call(arguments,2);return n.selector?s=r.bind(a,n.selector,c,s):o.bind(a,c,s),this.sub(c,t,s),s},n.prototype.unbind=function(e,t){if(0==arguments.length)return this.unbindAll();if(1==arguments.length)return this.unbindAllOf(e);var s=this._events[e];if(s){var n=s[t];n&&o.unbind(this.el,e,n)}},n.prototype.unbindAll=function(){for(var e in this._events)this.unbindAllOf(e)},n.prototype.unbindAllOf=function(e){var t=this._events[e];if(t)for(var s in t)this.unbind(e,s)}}),e.register("component-indexof/index.js",function(e,t,s){s.exports=function(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0;e.length>s;++s)if(e[s]===t)return s;return-1}}),e.register("component-classes/index.js",function(e,t,s){function n(e){if(!e)throw Error("A DOM element reference is required");this.el=e,this.list=e.classList}var i=t("indexof"),o=/\s+/,r=Object.prototype.toString;s.exports=function(e){return new n(e)},n.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array(),s=i(t,e);return~s||t.push(e),this.el.className=t.join(" "),this},n.prototype.remove=function(e){if("[object RegExp]"==r.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),s=i(t,e);return~s&&t.splice(s,1),this.el.className=t.join(" "),this},n.prototype.removeMatching=function(e){for(var t=this.array(),s=0;t.length>s;s++)e.test(t[s])&&this.remove(t[s]);return this},n.prototype.toggle=function(e,t){return this.list?(t!==void 0?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(t!==void 0?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},n.prototype.array=function(){var e=this.el.className.replace(/^\s+|\s+$/g,""),t=e.split(o);return""===t[0]&&t.shift(),t},n.prototype.has=n.prototype.contains=function(e){return this.list?this.list.contains(e):!!~i(this.array(),e)}}),e.register("component-emitter/index.js",function(e,t,s){function n(e){return e?i(e):void 0}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}s.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function s(){n.off(e,s),t.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},s.fn=t,this.on(e,s),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s=this._callbacks[e];if(!s)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var n,i=0;s.length>i;i++)if(n=s[i],n===t||n.fn===t){s.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),s=this._callbacks[e];if(s){s=s.slice(0);for(var n=0,i=s.length;i>n;++n)s[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),e.register("ui-component-mouse/index.js",function(e,t,s){function n(e,t){this.obj=t||{},this.el=e}var i=t("emitter"),o=t("event");s.exports=function(e,t){return new n(e,t)},i(n.prototype),n.prototype.bind=function(){function e(i){s.onmouseup&&s.onmouseup(i),o.unbind(document,"mousemove",t),o.unbind(document,"mouseup",e),n.emit("up",i)}function t(e){s.onmousemove&&s.onmousemove(e),n.emit("move",e)}var s=this.obj,n=this;return n.down=function(i){s.onmousedown&&s.onmousedown(i),o.bind(document,"mouseup",e),o.bind(document,"mousemove",t),n.emit("down",i)},o.bind(this.el,"mousedown",n.down),this},n.prototype.unbind=function(){o.unbind(this.el,"mousedown",this.down),this.down=null}}),e.register("abpetkov-percentage-calc/percentage-calc.js",function(e){e.isNumber=function(e){return"number"==typeof e?!0:!1},e.of=function(t,s){return e.isNumber(t)&&e.isNumber(s)?t/100*s:void 0},e.from=function(t,s){return e.isNumber(t)&&e.isNumber(s)?100*(t/s):void 0}}),e.register("abpetkov-closest-num/closest-num.js",function(e){e.find=function(e,t){var s=null,n=null,o=t[0];for(i=0;t.length>i;i++)s=Math.abs(e-o),n=Math.abs(e-t[i]),s>n&&(o=t[i]);return o}}),e.register("vesln-super/lib/super.js",function(e,t,s){function n(){var t=i.call(arguments);if(t.length)return"function"!=typeof t[0]?e.merge(t):(e.inherits.apply(null,t),void 0)}var i=Array.prototype.slice,e=s.exports=n;e.extend=function(t,s){var n=this,i=function(){return n.apply(this,arguments)};return e.merge([i,this]),e.inherits(i,this),t&&e.merge([i.prototype,t]),s&&e.merge([i,s]),i.extend=this.extend,i},e.inherits=function(e,t){e.super_=t,Object.create?e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}):(e.prototype=new t,e.prototype.constructor=e)},e.merge=function(e){for(var t=2===e.length?e.shift():{},s=null,n=0,i=e.length;i>n;n++){s=e[n];for(var o in s)s.hasOwnProperty(o)&&(t[o]=s[o])}return t}}),e.register("powerange/lib/powerange.js",function(e,t,s){var n=(t("./main"),t("./horizontal")),i=t("./vertical"),o={callback:function(){},decimal:!1,disable:!1,disableOpacity:.5,hideRange:!1,klass:"",min:0,max:100,start:null,step:null,vertical:!1};s.exports=function(e,t){t=t||{};for(var s in o)null==t[s]&&(t[s]=o[s]);return t.vertical?new i(e,t):new n(e,t)}}),e.register("powerange/lib/main.js",function(e,t,s){function n(e,t){return this instanceof n?(this.element=e,this.options=t||{},this.slider=this.create("span","range-bar"),null!==this.element&&"text"===this.element.type&&this.init(),void 0):new n(e,t)}var o=t("mouse"),r=t("events"),a=t("classes"),l=t("percentage-calc");s.exports=n,n.prototype.bindEvents=function(){this.handle=this.slider.querySelector(".range-handle"),this.touch=r(this.handle,this),this.touch.bind("touchstart","onmousedown"),this.touch.bind("touchmove","onmousemove"),this.touch.bind("touchend","onmouseup"),this.mouse=o(this.handle,this),this.mouse.bind()},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.append=function(){var e=this.generate();this.insertAfter(this.element,e)},n.prototype.generate=function(){var e={handle:{type:"span",selector:"range-handle"},min:{type:"span",selector:"range-min"},max:{type:"span",selector:"range-max"},quantity:{type:"span",selector:"range-quantity"}};for(var t in e)if(e.hasOwnProperty(t)){var s=this.create(e[t].type,e[t].selector);this.slider.appendChild(s)}return this.slider},n.prototype.create=function(e,t){var s=document.createElement(e);return s.className=t,s},n.prototype.insertAfter=function(e,t){e.parentNode.insertBefore(t,e.nextSibling)},n.prototype.extraClass=function(e){this.options.klass&&a(this.slider).add(e)},n.prototype.setRange=function(e,t){"number"!=typeof e||"number"!=typeof t||this.options.hideRange||(this.slider.querySelector(".range-min").innerHTML=e,this.slider.querySelector(".range-max").innerHTML=t)},n.prototype.setValue=function(e,t){var s=l.from(parseFloat(e),t),n=l.of(s,this.options.max-this.options.min)+this.options.min,i=!1;n=this.options.decimal?Math.round(100*n)/100:Math.round(n),i=this.element.value!=n?!0:!1,this.element.value=n,this.options.callback(),i&&this.changeEvent()},n.prototype.step=function(e,t){var s=e-t,n=l.from(this.checkStep(this.options.step),this.options.max-this.options.min),o=l.of(n,s),r=[];for(i=0;s>=i;i+=o)r.push(i);return this.steps=r,this.steps},n.prototype.checkValues=function(e){this.options.min>e&&(this.options.start=this.options.min),e>this.options.max&&(this.options.start=this.options.max),this.options.min>=this.options.max&&(this.options.min=this.options.max)},n.prototype.checkStep=function(e){return 0>e&&(e=Math.abs(e)),this.options.step=e,this.options.step},n.prototype.disable=function(){(this.options.min==this.options.max||this.options.min>this.options.max||this.options.disable)&&(this.mouse.unbind(),this.touch.unbind(),this.slider.style.opacity=this.options.disableOpacity,a(this.handle).add("range-disabled"))},n.prototype.unselectable=function(e,t){a(this.slider).has("unselectable")||t!==!0?a(this.slider).remove("unselectable"):a(this.slider).add("unselectable")},n.prototype.changeEvent=function(){if("function"!=typeof Event&&document.fireEvent)this.element.fireEvent("onchange");else{var e=document.createEvent("HTMLEvents");e.initEvent("change",!1,!0),this.element.dispatchEvent(e)}},n.prototype.init=function(){this.hide(),this.append(),this.bindEvents(),this.extraClass(this.options.klass),this.checkValues(this.options.start),this.setRange(this.options.min,this.options.max),this.disable()}}),e.register("powerange/lib/horizontal.js",function(e,t,s){function n(){a.apply(this,arguments),this.options.step&&this.step(this.slider.offsetWidth,this.handle.offsetWidth),this.setStart(this.options.start)}var i=t("super"),o=t("closest-num"),r=t("percentage-calc"),a=t("./main");s.exports=n,i(n,a),n.prototype.setStart=function(e){var t=null===e?this.options.min:e,s=r.from(t-this.options.min,this.options.max-this.options.min)||0,n=r.of(s,this.slider.offsetWidth-this.handle.offsetWidth),i=this.options.step?o.find(n,this.steps):n;this.setPosition(i),this.setValue(this.handle.style.left,this.slider.offsetWidth-this.handle.offsetWidth)},n.prototype.setPosition=function(e){this.handle.style.left=e+"px",this.slider.querySelector(".range-quantity").style.width=e+"px"},n.prototype.onmousedown=function(e){e.touches&&(e=e.touches[0]),this.startX=e.clientX,this.handleOffsetX=this.handle.offsetLeft,this.restrictHandleX=this.slider.offsetWidth-this.handle.offsetWidth,this.unselectable(this.slider,!0)},n.prototype.onmousemove=function(e){e.preventDefault(),e.touches&&(e=e.touches[0]);var t=this.handleOffsetX+e.clientX-this.startX,s=this.steps?o.find(t,this.steps):t;0>=t?this.setPosition(0):t>=this.restrictHandleX?this.setPosition(this.restrictHandleX):this.setPosition(s),this.setValue(this.handle.style.left,this.slider.offsetWidth-this.handle.offsetWidth)},n.prototype.onmouseup=function(){this.unselectable(this.slider,!1)}}),e.register("powerange/lib/vertical.js",function(e,t,s){function n(){l.apply(this,arguments),o(this.slider).add("vertical"),this.options.step&&this.step(this.slider.offsetHeight,this.handle.offsetHeight),this.setStart(this.options.start)}var i=t("super"),o=t("classes"),r=t("closest-num"),a=t("percentage-calc"),l=t("./main");s.exports=n,i(n,l),n.prototype.setStart=function(e){var t=null===e?this.options.min:e,s=a.from(t-this.options.min,this.options.max-this.options.min)||0,n=a.of(s,this.slider.offsetHeight-this.handle.offsetHeight),i=this.options.step?r.find(n,this.steps):n;this.setPosition(i),this.setValue(this.handle.style.bottom,this.slider.offsetHeight-this.handle.offsetHeight)},n.prototype.setPosition=function(e){this.handle.style.bottom=e+"px",this.slider.querySelector(".range-quantity").style.height=e+"px"},n.prototype.onmousedown=function(e){e.touches&&(e=e.touches[0]),this.startY=e.clientY,this.handleOffsetY=this.slider.offsetHeight-this.handle.offsetHeight-this.handle.offsetTop,this.restrictHandleY=this.slider.offsetHeight-this.handle.offsetHeight,this.unselectable(this.slider,!0)},n.prototype.onmousemove=function(e){e.preventDefault(),e.touches&&(e=e.touches[0]);var t=this.handleOffsetY+this.startY-e.clientY,s=this.steps?r.find(t,this.steps):t;0>=t?this.setPosition(0):t>=this.restrictHandleY?this.setPosition(this.restrictHandleY):this.setPosition(s),this.setValue(this.handle.style.bottom,this.slider.offsetHeight-this.handle.offsetHeight)},n.prototype.onmouseup=function(){this.unselectable(this.slider,!1)}}),e.alias("component-events/index.js","powerange/deps/events/index.js"),e.alias("component-events/index.js","events/index.js"),e.alias("component-event/index.js","component-events/deps/event/index.js"),e.alias("component-delegate/index.js","component-events/deps/delegate/index.js"),e.alias("discore-closest/index.js","component-delegate/deps/closest/index.js"),e.alias("discore-closest/index.js","component-delegate/deps/closest/index.js"),e.alias("component-matches-selector/index.js","discore-closest/deps/matches-selector/index.js"),e.alias("component-query/index.js","component-matches-selector/deps/query/index.js"),e.alias("discore-closest/index.js","discore-closest/index.js"),e.alias("component-event/index.js","component-delegate/deps/event/index.js"),e.alias("component-classes/index.js","powerange/deps/classes/index.js"),e.alias("component-classes/index.js","classes/index.js"),e.alias("component-indexof/index.js","component-classes/deps/indexof/index.js"),e.alias("ui-component-mouse/index.js","powerange/deps/mouse/index.js"),e.alias("ui-component-mouse/index.js","mouse/index.js"),e.alias("component-emitter/index.js","ui-component-mouse/deps/emitter/index.js"),e.alias("component-event/index.js","ui-component-mouse/deps/event/index.js"),e.alias("abpetkov-percentage-calc/percentage-calc.js","powerange/deps/percentage-calc/percentage-calc.js"),e.alias("abpetkov-percentage-calc/percentage-calc.js","powerange/deps/percentage-calc/index.js"),e.alias("abpetkov-percentage-calc/percentage-calc.js","percentage-calc/index.js"),e.alias("abpetkov-percentage-calc/percentage-calc.js","abpetkov-percentage-calc/index.js"),e.alias("abpetkov-closest-num/closest-num.js","powerange/deps/closest-num/closest-num.js"),e.alias("abpetkov-closest-num/closest-num.js","powerange/deps/closest-num/index.js"),e.alias("abpetkov-closest-num/closest-num.js","closest-num/index.js"),e.alias("abpetkov-closest-num/closest-num.js","abpetkov-closest-num/index.js"),e.alias("vesln-super/lib/super.js","powerange/deps/super/lib/super.js"),e.alias("vesln-super/lib/super.js","powerange/deps/super/index.js"),e.alias("vesln-super/lib/super.js","super/index.js"),e.alias("vesln-super/lib/super.js","vesln-super/index.js"),e.alias("powerange/lib/powerange.js","powerange/index.js"),"object"==typeof exports?module.exports=e("powerange"):"function"==typeof define&&define.amd?define([],function(){return e("powerange")}):this.Powerange=e("powerange")})();
 
public/views/allMetaboxesView.php CHANGED
@@ -10,14 +10,14 @@ $metaboxes = apply_filters('sgpbAdditionalMetaboxes', array());
10
  }
11
  ?>
12
  <div class="sgpb-options-menu"
13
- id="<?php echo $key; ?>">
14
- <h3 class="sgpb-options-menu-header"><?php echo $metabox['displayName']; ?></h3>
15
- <span class="sgpb-options-menu-header__sub"><?php echo $metabox['short_description']; ?></span>
16
  </div>
17
 
18
  <div class="sgpb-options-content">
19
- <div id="options-<?php echo $key; ?>" class="sgpb-metabox sgpb-metabox-options ">
20
- <p class="sgpb-header-h1 sgpb-margin-top-20 sgpb-margin-bottom-50"><?php echo $metabox['displayName']; ?></p>
21
  <?php require_once( $metabox['filePath'] ); ?>
22
  </div>
23
  </div>
10
  }
11
  ?>
12
  <div class="sgpb-options-menu"
13
+ id="<?php echo esc_attr($key); ?>">
14
+ <h3 class="sgpb-options-menu-header"><?php echo wp_kses($metabox['displayName'], 'post'); ?></h3>
15
+ <span class="sgpb-options-menu-header__sub"><?php echo esc_html($metabox['short_description']); ?></span>
16
  </div>
17
 
18
  <div class="sgpb-options-content">
19
+ <div id="options-<?php echo esc_attr($key); ?>" class="sgpb-metabox sgpb-metabox-options ">
20
+ <p class="sgpb-header-h1 sgpb-margin-top-20 sgpb-margin-bottom-50"><?php echo wp_kses($metabox['displayName'], 'post'); ?></p>
21
  <?php require_once( $metabox['filePath'] ); ?>
22
  </div>
23
  </div>
public/views/closeSettingsView.php CHANGED
@@ -57,7 +57,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
57
  <span class="formItem__title"><?php _e('Dismiss on "esc" key', SG_POPUP_TEXT_DOMAIN) ?>:</span>
58
  <div class="sgpb-onOffSwitch">
59
  <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="esc-key"
60
- name="sgpb-esc-key" <?php echo $popupTypeObj->getOptionValue('sgpb-esc-key'); ?>>
61
  <label class="sgpb-onOffSwitch__label" for="esc-key">
62
  <span class="sgpb-onOffSwitch-inner"></span>
63
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -77,7 +77,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
77
  <span class="formItem__title"><?php _e('Show "close" button', SG_POPUP_TEXT_DOMAIN) ?>:</span>
78
  <div class="sgpb-onOffSwitch onOffswitch_smallMargin">
79
  <input class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" type="checkbox" id="close-button"
80
- name="sgpb-enable-close-button" <?php echo $popupTypeObj->getOptionValue('sgpb-enable-close-button'); ?>>
81
  <label class="sgpb-onOffSwitch__label" for="close-button">
82
  <span class="sgpb-onOffSwitch-inner"></span>
83
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -97,7 +97,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
97
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Button delay', SG_POPUP_TEXT_DOMAIN) ?>:</span>
98
  <input type="number" min="0" id="sgpb-close-button-delay" class="subFormItem__input"
99
  name="sgpb-close-button-delay"
100
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-close-button-delay'); ?>"
101
  placeholder="e.g.: 1">
102
  <div class="question-mark">B</div>
103
  <div class="sgpb-info-wrapper">
@@ -116,39 +116,39 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
116
  </div>
117
 
118
  <div class="formItem formItem">
119
- <div class="buttonPosition sgpb-button-position-top-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo $hideTopPosition; ?>">
120
  <span class="formItem__direction sgpb-margin-right-30"><?php _e('Top', SG_POPUP_TEXT_DOMAIN) ?></span>
121
  <div class="inputPxWrapper">
122
  <input id="sgpb-button-position-top" class="formItem__input" step="0.5"
123
  type="number" name="sgpb-button-position-top"
124
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-button-position-top'); ?>">
125
  <span class="formItem__inputValueType">px</span>
126
  </div>
127
  </div>
128
- <div class="buttonPosition sgpb-button-position-right-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo $hideRightPosition; ?>">
129
  <span class="formItem__direction sgpb-margin-right-20"><?php _e('Right', SG_POPUP_TEXT_DOMAIN) ?></span>
130
  <div class="inputPxWrapper ">
131
  <input id="sgpb-button-position-right" class="formItem__input" step="0.5"
132
  type="number" name="sgpb-button-position-right"
133
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-button-position-right'); ?>">
134
  <span class="formItem__inputValueType">px</span>
135
  </div>
136
  </div>
137
- <div class="buttonPosition sgpb-button-position-bottom-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo $hideBottomPosition; ?>">
138
  <span class="formItem__direction sgpb-margin-right-20"><?php _e('Bottom', SG_POPUP_TEXT_DOMAIN) ?></span>
139
  <div class="inputPxWrapper">
140
  <input id="sgpb-button-position-bottom" class="formItem__input" step="0.5"
141
  type="number" name="sgpb-button-position-bottom"
142
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-button-position-bottom'); ?>">
143
  <span class="formItem__inputValueType">px</span>
144
  </div>
145
  </div>
146
- <div class="buttonPosition sgpb-button-position-left-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo $hideLeftPosition; ?>">
147
  <span class="formItem__direction sgpb-margin-right-40"><?php _e('Left', SG_POPUP_TEXT_DOMAIN) ?></span>
148
  <div class="inputPxWrapper">
149
  <input id="sgpb-button-position-left" class="formItem__input" step="0.5"
150
  type="number" name="sgpb-button-position-left"
151
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-button-position-left'); ?>">
152
  <span class="formItem__inputValueType">px</span>
153
  </div>
154
  </div>
@@ -159,7 +159,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
159
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Button image', SG_POPUP_TEXT_DOMAIN) ?>:</span>
160
  <div type="text" class="subFormItem__x sgpb-margin-right-10">
161
  <div class="sgpb-show-button-image-container"
162
- style="background-image: url(<?php echo $buttonImage; ?>);">
163
  <span class="sgpb-no-image"></span>
164
  </div>
165
  </div>
@@ -188,7 +188,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
188
  <div class="inputPxWrapper">
189
  <input class="formItem__input" type="number" min="0"
190
  name="sgpb-button-image-width"
191
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-button-image-width'); ?>"
192
  required>
193
  <span class="formItem__inputValueType">px</span>
194
  </div>
@@ -198,7 +198,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
198
  <div class="inputPxWrapper ">
199
  <input class="formItem__input" type="number" min="0"
200
  name="sgpb-button-image-height"
201
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-button-image-height'); ?>"
202
  required>
203
  <span class="formItem__inputValueType">px</span>
204
  </div>
@@ -237,7 +237,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
237
  <span class="formItem__title"><?php _e('Dismiss on overlay click', SG_POPUP_TEXT_DOMAIN) ?>:</span>
238
  <div class="sgpb-onOffSwitch">
239
  <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="overlay-click"
240
- name="sgpb-overlay-click" <?php echo $popupTypeObj->getOptionValue('sgpb-overlay-click'); ?>>
241
  <label class="sgpb-onOffSwitch__label" for="overlay-click">
242
  <span class="sgpb-onOffSwitch-inner"></span>
243
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -257,7 +257,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
257
  <div class="formItem">
258
  <span class="formItem__title"><?php _e('Disable popup closing', SG_POPUP_TEXT_DOMAIN)?>:</span>
259
  <div class="sgpb-onOffSwitch">
260
- <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="popup-closing" name="sgpb-disable-popup-closing" <?php echo $popupTypeObj->getOptionValue('sgpb-disable-popup-closing'); ?>>
261
  <label class="sgpb-onOffSwitch__label" for="popup-closing">
262
  <span class="sgpb-onOffSwitch-inner"></span>
263
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -300,7 +300,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
300
  <div class="formItem">
301
  <span class="formItem__title"><?php _e('Auto close popup', SG_POPUP_TEXT_DOMAIN)?>:</span>
302
  <div class="sgpb-onOffSwitch">
303
- <input type="checkbox" id="auto-close" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-auto-close" <?php echo $popupTypeObj->getOptionValue('sgpb-auto-close'); ?>>
304
  <label class="sgpb-onOffSwitch__label" for="auto-close">
305
  <span class="sgpb-onOffSwitch-inner"></span>
306
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -335,7 +335,7 @@ $disablePopupClosing = PopupBuilderActivePackage::canUseOption('sgpb-disable-pop
335
  <div class="formItem">
336
  <span class="formItem__title"><?php _e('Close popup after the page scroll', SG_POPUP_TEXT_DOMAIN); ?>:</span>
337
  <div class="sgpb-onOffSwitch">
338
- <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-close-after-page-scroll" class="" name="sgpb-close-after-page-scroll" <?php echo $popupTypeObj->getOptionValue('sgpb-close-after-page-scroll'); ?>>
339
  <label class="sgpb-onOffSwitch__label" for="sgpb-close-after-page-scroll">
340
  <span class="sgpb-onOffSwitch-inner"></span>
341
  <span class="sgpb-onOffSwitch-switch"></span>
57
  <span class="formItem__title"><?php _e('Dismiss on "esc" key', SG_POPUP_TEXT_DOMAIN) ?>:</span>
58
  <div class="sgpb-onOffSwitch">
59
  <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="esc-key"
60
+ name="sgpb-esc-key" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-esc-key')); ?>>
61
  <label class="sgpb-onOffSwitch__label" for="esc-key">
62
  <span class="sgpb-onOffSwitch-inner"></span>
63
  <span class="sgpb-onOffSwitch-switch"></span>
77
  <span class="formItem__title"><?php _e('Show "close" button', SG_POPUP_TEXT_DOMAIN) ?>:</span>
78
  <div class="sgpb-onOffSwitch onOffswitch_smallMargin">
79
  <input class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" type="checkbox" id="close-button"
80
+ name="sgpb-enable-close-button" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-enable-close-button')); ?>>
81
  <label class="sgpb-onOffSwitch__label" for="close-button">
82
  <span class="sgpb-onOffSwitch-inner"></span>
83
  <span class="sgpb-onOffSwitch-switch"></span>
97
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Button delay', SG_POPUP_TEXT_DOMAIN) ?>:</span>
98
  <input type="number" min="0" id="sgpb-close-button-delay" class="subFormItem__input"
99
  name="sgpb-close-button-delay"
100
+ value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-close-button-delay')); ?>"
101
  placeholder="e.g.: 1">
102
  <div class="question-mark">B</div>
103
  <div class="sgpb-info-wrapper">
116
  </div>
117
 
118
  <div class="formItem formItem">
119
+ <div class="buttonPosition sgpb-button-position-top-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo esc_attr($hideTopPosition); ?>">
120
  <span class="formItem__direction sgpb-margin-right-30"><?php _e('Top', SG_POPUP_TEXT_DOMAIN) ?></span>
121
  <div class="inputPxWrapper">
122
  <input id="sgpb-button-position-top" class="formItem__input" step="0.5"
123
  type="number" name="sgpb-button-position-top"
124
+ value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-button-position-top')); ?>">
125
  <span class="formItem__inputValueType">px</span>
126
  </div>
127
  </div>
128
+ <div class="buttonPosition sgpb-button-position-right-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo esc_attr($hideRightPosition); ?>">
129
  <span class="formItem__direction sgpb-margin-right-20"><?php _e('Right', SG_POPUP_TEXT_DOMAIN) ?></span>
130
  <div class="inputPxWrapper ">
131
  <input id="sgpb-button-position-right" class="formItem__input" step="0.5"
132
  type="number" name="sgpb-button-position-right"
133
+ value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-button-position-right')); ?>">
134
  <span class="formItem__inputValueType">px</span>
135
  </div>
136
  </div>
137
+ <div class="buttonPosition sgpb-button-position-bottom-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo esc_attr($hideBottomPosition); ?>">
138
  <span class="formItem__direction sgpb-margin-right-20"><?php _e('Bottom', SG_POPUP_TEXT_DOMAIN) ?></span>
139
  <div class="inputPxWrapper">
140
  <input id="sgpb-button-position-bottom" class="formItem__input" step="0.5"
141
  type="number" name="sgpb-button-position-bottom"
142
+ value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-button-position-bottom')); ?>">
143
  <span class="formItem__inputValueType">px</span>
144
  </div>
145
  </div>
146
+ <div class="buttonPosition sgpb-button-position-left-js sgpb-display-flex sgpb-align-item-center sgpb-margin-right-20 <?php echo esc_attr($hideLeftPosition); ?>">
147
  <span class="formItem__direction sgpb-margin-right-40"><?php _e('Left', SG_POPUP_TEXT_DOMAIN) ?></span>
148
  <div class="inputPxWrapper">
149
  <input id="sgpb-button-position-left" class="formItem__input" step="0.5"
150
  type="number" name="sgpb-button-position-left"
151
+ value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-button-position-left')); ?>">
152
  <span class="formItem__inputValueType">px</span>
153
  </div>
154
  </div>
159
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Button image', SG_POPUP_TEXT_DOMAIN) ?>:</span>
160
  <div type="text" class="subFormItem__x sgpb-margin-right-10">
161
  <div class="sgpb-show-button-image-container"
162
+ style="background-image: url(<?php echo esc_url($buttonImage); ?>);">
163
  <span class="sgpb-no-image"></span>
164
  </div>
165
  </div>
188
  <div class="inputPxWrapper">
189
  <input class="formItem__input" type="number" min="0"
190
  name="sgpb-button-image-width"
191
+ value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-button-image-width')); ?>"
192
  required>
193
  <span class="formItem__inputValueType">px</span>
194
  </div>
198
  <div class="inputPxWrapper ">
199
  <input class="formItem__input" type="number" min="0"
200
  name="sgpb-button-image-height"
201
+ value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-button-image-height')); ?>"
202
  required>
203
  <span class="formItem__inputValueType">px</span>
204
  </div>
237
  <span class="formItem__title"><?php _e('Dismiss on overlay click', SG_POPUP_TEXT_DOMAIN) ?>:</span>
238
  <div class="sgpb-onOffSwitch">
239
  <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="overlay-click"
240
+ name="sgpb-overlay-click" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-overlay-click')); ?>>
241
  <label class="sgpb-onOffSwitch__label" for="overlay-click">
242
  <span class="sgpb-onOffSwitch-inner"></span>
243
  <span class="sgpb-onOffSwitch-switch"></span>
257
  <div class="formItem">
258
  <span class="formItem__title"><?php _e('Disable popup closing', SG_POPUP_TEXT_DOMAIN)?>:</span>
259
  <div class="sgpb-onOffSwitch">
260
+ <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="popup-closing" name="sgpb-disable-popup-closing" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-disable-popup-closing')); ?>>
261
  <label class="sgpb-onOffSwitch__label" for="popup-closing">
262
  <span class="sgpb-onOffSwitch-inner"></span>
263
  <span class="sgpb-onOffSwitch-switch"></span>
300
  <div class="formItem">
301
  <span class="formItem__title"><?php _e('Auto close popup', SG_POPUP_TEXT_DOMAIN)?>:</span>
302
  <div class="sgpb-onOffSwitch">
303
+ <input type="checkbox" id="auto-close" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-auto-close" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-auto-close')); ?>>
304
  <label class="sgpb-onOffSwitch__label" for="auto-close">
305
  <span class="sgpb-onOffSwitch-inner"></span>
306
  <span class="sgpb-onOffSwitch-switch"></span>
335
  <div class="formItem">
336
  <span class="formItem__title"><?php _e('Close popup after the page scroll', SG_POPUP_TEXT_DOMAIN); ?>:</span>
337
  <div class="sgpb-onOffSwitch">
338
+ <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-close-after-page-scroll" class="" name="sgpb-close-after-page-scroll" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-close-after-page-scroll')); ?>>
339
  <label class="sgpb-onOffSwitch__label" for="sgpb-close-after-page-scroll">
340
  <span class="sgpb-onOffSwitch-inner"></span>
341
  <span class="sgpb-onOffSwitch-switch"></span>
public/views/conditionsView.php CHANGED
@@ -25,7 +25,7 @@ $defaultConditionsGeoTargeting = $defaultData['freeConditionsGeoTargeting'];
25
  </a>
26
  <div class="sgpb-pro-conditions-list" style="display: none;">
27
  <?php foreach ($defaultConditionsGeoTargeting as $conditionIndex => $conditionName) : ?>
28
- <span class="formItem__direction sgpb-pro-conditions-list-item"><?php echo $conditionName; ?></span>
29
  <div class="sgpb-pro-conditions-inline-border sgpb-margin-y-10"></div>
30
  <?php endforeach; ?>
31
  </div>
@@ -52,7 +52,7 @@ $defaultConditionsGeoTargeting = $defaultData['freeConditionsGeoTargeting'];
52
  </a>
53
  <div class="sgpb-pro-conditions-list" style="display: none;">
54
  <?php foreach ($defaultConditionsAdvancedTargeting as $conditionIndex => $conditionName) : ?>
55
- <span class="formItem__direction sgpb-pro-conditions-list-item"><?php echo $conditionName; ?></span>
56
  <div class="sgpb-pro-conditions-inline-border sgpb-box-conditions-separator sgpb-margin-y-10"></div>
57
  <?php endforeach; ?>
58
  </div>
25
  </a>
26
  <div class="sgpb-pro-conditions-list" style="display: none;">
27
  <?php foreach ($defaultConditionsGeoTargeting as $conditionIndex => $conditionName) : ?>
28
+ <span class="formItem__direction sgpb-pro-conditions-list-item"><?php echo esc_html($conditionName); ?></span>
29
  <div class="sgpb-pro-conditions-inline-border sgpb-margin-y-10"></div>
30
  <?php endforeach; ?>
31
  </div>
52
  </a>
53
  <div class="sgpb-pro-conditions-list" style="display: none;">
54
  <?php foreach ($defaultConditionsAdvancedTargeting as $conditionIndex => $conditionName) : ?>
55
+ <span class="formItem__direction sgpb-pro-conditions-list-item"><?php echo esc_html($conditionName); ?></span>
56
  <div class="sgpb-pro-conditions-inline-border sgpb-box-conditions-separator sgpb-margin-y-10"></div>
57
  <?php endforeach; ?>
58
  </div>
public/views/customEditor.php CHANGED
@@ -24,19 +24,19 @@ $savedData = get_post_meta($popupId , 'sg_popup_scripts', true);
24
  <div id="sgpb-editor-options-tab-content-wrapper-1" class="sgpb-editor-options-tab-content-wrapper sgpb-padding-right-40 sgpb-margin-y-20" style="display: block;">
25
  <?php
26
  foreach ($jsDefaultData['description'] as $text) { ?>
27
- <p><?php echo $text; ?></p>
28
  <?php }
29
  ?>
30
 
31
  <?php foreach ($jsDefaultData['helperText'] as $key => $value) {?>
32
- <div class="formItem"><span class="formItem__title"><?php echo $value; ?></span>
33
  <textarea class="wp-editor-area formItem__textarea sgpb-margin-top-20"
34
- data-attr-event="<?php echo $key; ?>"
35
  placeholder=" #... type your code"
36
- mode="<?php echo $editorModeJs; ?>"
37
- name="sgpb-<?php echo $key; ?>"><?php
38
  if (!empty($savedData['js']['sgpb-'.$key])) {
39
- echo $savedData['js']['sgpb-'.$key];
40
  }
41
  ?></textarea>
42
  </div>
@@ -47,19 +47,19 @@ $savedData = get_post_meta($popupId , 'sg_popup_scripts', true);
47
  <div id="sgpb-editor-options-tab-content-wrapper-2" class="sgpb-editor-options-tab-content-wrapper sgpb-padding-right-40 sgpb-margin-y-20" style="display: none;">
48
  <?php
49
  foreach ($cssDefaultData['description'] as $text) { ?>
50
- <div><?php echo $text; ?></div>
51
  <?php } ?>
52
 
53
  <?php foreach ($cssDefaultData['helperText'] as $key => $value) {?>
54
- <div class="formItem"><span class="formItem__title"><?php echo $value; ?></span></div>
55
  <?php } ?>
56
 
57
  <textarea class="wp-editor-area editor-content sgpb-editor-content-css formItem__textarea sgpb-margin-top-20"
58
  placeholder=" #... type your code"
59
- mode="<?php echo $editorModeCss; ?>"
60
  name="sgpb-css-editor"><?php
61
  if (isset($savedData['css'])) {
62
- echo $savedData['css'];
63
  }?></textarea>
64
  </div>
65
  </div>
24
  <div id="sgpb-editor-options-tab-content-wrapper-1" class="sgpb-editor-options-tab-content-wrapper sgpb-padding-right-40 sgpb-margin-y-20" style="display: block;">
25
  <?php
26
  foreach ($jsDefaultData['description'] as $text) { ?>
27
+ <p><?php echo wp_kses($text, 'post'); ?></p>
28
  <?php }
29
  ?>
30
 
31
  <?php foreach ($jsDefaultData['helperText'] as $key => $value) {?>
32
+ <div class="formItem"><span class="formItem__title"><?php echo wp_kses($value, 'post'); ?></span>
33
  <textarea class="wp-editor-area formItem__textarea sgpb-margin-top-20"
34
+ data-attr-event="<?php echo esc_attr($key); ?>"
35
  placeholder=" #... type your code"
36
+ mode="<?php echo esc_attr($editorModeJs); ?>"
37
+ name="sgpb-<?php echo esc_attr($key); ?>"><?php
38
  if (!empty($savedData['js']['sgpb-'.$key])) {
39
+ echo esc_html($savedData['js']['sgpb-'.$key]);
40
  }
41
  ?></textarea>
42
  </div>
47
  <div id="sgpb-editor-options-tab-content-wrapper-2" class="sgpb-editor-options-tab-content-wrapper sgpb-padding-right-40 sgpb-margin-y-20" style="display: none;">
48
  <?php
49
  foreach ($cssDefaultData['description'] as $text) { ?>
50
+ <div><?php echo wp_kses($text, 'post'); ?></div>
51
  <?php } ?>
52
 
53
  <?php foreach ($cssDefaultData['helperText'] as $key => $value) {?>
54
+ <div class="formItem"><span class="formItem__title"><?php echo wp_kses($value, 'post'); ?></span></div>
55
  <?php } ?>
56
 
57
  <textarea class="wp-editor-area editor-content sgpb-editor-content-css formItem__textarea sgpb-margin-top-20"
58
  placeholder=" #... type your code"
59
+ mode="<?php echo esc_attr($editorModeCss); ?>"
60
  name="sgpb-css-editor"><?php
61
  if (isset($savedData['css'])) {
62
+ echo esc_html($savedData['css']);
63
  }?></textarea>
64
  </div>
65
  </div>
public/views/dimensionsView.php CHANGED
@@ -12,17 +12,17 @@
12
  <div class="sgpb sgpb-wrapper dimensions ">
13
  <?php echo (!empty($removedOptions['sgpb-popup-dimension-mode'])) ? '' : $multipleChoiceButton; ?>
14
  <div class="sg-hide sg-full-width" id="responsive-dimension-wrapper">
15
- <div class="subFormItem<?php echo $subOptionClass; ?>">
16
  <span class="subFormItem__title" for="max-height"><?php _e('Size', SG_POPUP_TEXT_DOMAIN) ?>:</span>
17
  <?php echo AdminHelper::createSelectBox($defaultData['responsiveDimensions'], esc_html($popupTypeObj->getOptionValue('sgpb-responsive-dimension-measure')), array('name' => 'sgpb-responsive-dimension-measure', 'class'=>'js-sg-select2 sgpb-responsive-mode-change-js')); ?>
18
  </div>
19
  </div>
20
  <div class="<?php echo (!empty($removedOptions['sgpb-popup-dimension-mode'])) ? '' : 'sg-hide '; ?>sg-full-width formItem" id="custom-dimension-wrapper">
21
- <div class="subFormItem<?php echo $subOptionClass; ?>">
22
  <span class="subFormItem__title"><?php _e('Width', SG_POPUP_TEXT_DOMAIN); ?>:</span>
23
  <input type="text" id="width" class="subFormItem__input" name="sgpb-width" placeholder="<?php _e('Ex: 100, 100px or 100%', SG_POPUP_TEXT_DOMAIN)?>" pattern = "\d+(([px]+|%)|)" title="<?php _e('It must be number + px or %', SG_POPUP_TEXT_DOMAIN) ?>" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-width')) ?>">
24
  </div>
25
- <div class="subFormItem<?php echo $subOptionClass; ?>">
26
  <span class="subFormItem__title"><?php _e('Height', SG_POPUP_TEXT_DOMAIN); ?>:</span>
27
  <input type="text" id="height" class="subFormItem__input" name="sgpb-height" placeholder="<?php _e('Ex: 100, 100px or 100%', SG_POPUP_TEXT_DOMAIN)?>" pattern = "\d+(([px]+|%)|)" title="<?php _e('It must be number + px or %', SG_POPUP_TEXT_DOMAIN) ?>" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-height')) ?>">
28
  </div>
12
  <div class="sgpb sgpb-wrapper dimensions ">
13
  <?php echo (!empty($removedOptions['sgpb-popup-dimension-mode'])) ? '' : $multipleChoiceButton; ?>
14
  <div class="sg-hide sg-full-width" id="responsive-dimension-wrapper">
15
+ <div class="subFormItem<?php echo esc_attr($subOptionClass); ?>">
16
  <span class="subFormItem__title" for="max-height"><?php _e('Size', SG_POPUP_TEXT_DOMAIN) ?>:</span>
17
  <?php echo AdminHelper::createSelectBox($defaultData['responsiveDimensions'], esc_html($popupTypeObj->getOptionValue('sgpb-responsive-dimension-measure')), array('name' => 'sgpb-responsive-dimension-measure', 'class'=>'js-sg-select2 sgpb-responsive-mode-change-js')); ?>
18
  </div>
19
  </div>
20
  <div class="<?php echo (!empty($removedOptions['sgpb-popup-dimension-mode'])) ? '' : 'sg-hide '; ?>sg-full-width formItem" id="custom-dimension-wrapper">
21
+ <div class="subFormItem<?php echo esc_attr($subOptionClass); ?>">
22
  <span class="subFormItem__title"><?php _e('Width', SG_POPUP_TEXT_DOMAIN); ?>:</span>
23
  <input type="text" id="width" class="subFormItem__input" name="sgpb-width" placeholder="<?php _e('Ex: 100, 100px or 100%', SG_POPUP_TEXT_DOMAIN)?>" pattern = "\d+(([px]+|%)|)" title="<?php _e('It must be number + px or %', SG_POPUP_TEXT_DOMAIN) ?>" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-width')) ?>">
24
  </div>
25
+ <div class="subFormItem<?php echo esc_attr($subOptionClass); ?>">
26
  <span class="subFormItem__title"><?php _e('Height', SG_POPUP_TEXT_DOMAIN); ?>:</span>
27
  <input type="text" id="height" class="subFormItem__input" name="sgpb-height" placeholder="<?php _e('Ex: 100, 100px or 100%', SG_POPUP_TEXT_DOMAIN)?>" pattern = "\d+(([px]+|%)|)" title="<?php _e('It must be number + px or %', SG_POPUP_TEXT_DOMAIN) ?>" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-height')) ?>">
28
  </div>
public/views/floatingButton.php CHANGED
@@ -10,7 +10,7 @@ if ($popupTypeObj->getOptionValue('sgpb-floating-button-style') == 'basic') {
10
  <div class="formItem">
11
  <p class="formItem__title"><?php _e('Enable', SG_POPUP_TEXT_DOMAIN)?>:</p>
12
  <div class="sgpb-onOffSwitch">
13
- <input id="sgpb-enable-floating-button" onchange="SGPBFloatingButton.prototype.adminInit()" type="checkbox" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" id="sgpb-enable-floating-button" name="sgpb-enable-floating-button" <?php echo $popupTypeObj->getOptionValue('sgpb-enable-floating-button'); ?>>
14
  <label class="sgpb-onOffSwitch__label" for="sgpb-enable-floating-button">
15
  <span class="sgpb-onOffSwitch-inner"></span>
16
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -48,28 +48,28 @@ if ($popupTypeObj->getOptionValue('sgpb-floating-button-style') == 'basic') {
48
  </div>
49
  <div class="formItem formItem_itemsCentered">
50
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Font size', SG_POPUP_TEXT_DOMAIN)?>:</span>
51
- <input type="number" min="0" name="sgpb-floating-button-font-size" id="sgpb-floating-button-font-size" class="formItem__input" value="<?php echo $popupTypeObj->getOptionValue('sgpb-floating-button-font-size'); ?>">
52
  <div class="formItem__inputValueType sgpb-margin-left-10">px</div>
53
  </div>
54
- <div class="sgpb-basic-button-style-options-wrapper-js<?php echo ($popupTypeObj->getOptionValue('sgpb-floating-button-position') == 'corner') ? ' sgpb-hide' : ''; ?>">
55
  <div class="formItem formItem_itemsCentered">
56
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Position top', SG_POPUP_TEXT_DOMAIN)?>:</span>
57
- <input type="number" min="0" name="sgpb-floating-button-position-top" id="sgpb-floating-button-position-top" class="formItem__input" value="<?php echo $popupTypeObj->getOptionValue('sgpb-floating-button-position-top'); ?>">
58
  <div class="formItem__inputValueType sgpb-margin-left-10">%</div>
59
  </div>
60
  <div class="formItem formItem_itemsCentered">
61
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Position right', SG_POPUP_TEXT_DOMAIN)?>:</span>
62
- <input type="number" min="0" name="sgpb-floating-button-position-right" id="sgpb-floating-button-position-right" class="formItem__input" value="<?php echo $popupTypeObj->getOptionValue('sgpb-floating-button-position-right'); ?>">
63
  <div class="formItem__inputValueType sgpb-margin-left-10">%</div>
64
  </div>
65
  <div class="formItem formItem_itemsCentered">
66
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Border size', SG_POPUP_TEXT_DOMAIN)?>:</span>
67
- <input type="number" min="0" name="sgpb-floating-button-border-size" id="sgpb-floating-button-border-size" class="formItem__input" value="<?php echo $popupTypeObj->getOptionValue('sgpb-floating-button-border-size'); ?>">
68
  <div class="formItem__inputValueType sgpb-margin-left-10">px</div>
69
  </div>
70
  <div class="formItem formItem_itemsCentered">
71
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Border radius', SG_POPUP_TEXT_DOMAIN)?>:</span>
72
- <input type="number" min="0" name="sgpb-floating-button-border-radius" id="sgpb-floating-button-border-radius" class="formItem__input" value="<?php echo $popupTypeObj->getOptionValue('sgpb-floating-button-border-radius'); ?>">
73
  <div class="formItem__inputValueType sgpb-margin-left-10">px</div>
74
  </div>
75
  <div class="formItem">
10
  <div class="formItem">
11
  <p class="formItem__title"><?php _e('Enable', SG_POPUP_TEXT_DOMAIN)?>:</p>
12
  <div class="sgpb-onOffSwitch">
13
+ <input id="sgpb-enable-floating-button" onchange="SGPBFloatingButton.prototype.adminInit()" type="checkbox" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" id="sgpb-enable-floating-button" name="sgpb-enable-floating-button" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-enable-floating-button')); ?>>
14
  <label class="sgpb-onOffSwitch__label" for="sgpb-enable-floating-button">
15
  <span class="sgpb-onOffSwitch-inner"></span>
16
  <span class="sgpb-onOffSwitch-switch"></span>
48
  </div>
49
  <div class="formItem formItem_itemsCentered">
50
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Font size', SG_POPUP_TEXT_DOMAIN)?>:</span>
51
+ <input type="number" min="0" name="sgpb-floating-button-font-size" id="sgpb-floating-button-font-size" class="formItem__input" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-floating-button-font-size')); ?>">
52
  <div class="formItem__inputValueType sgpb-margin-left-10">px</div>
53
  </div>
54
+ <div class="sgpb-basic-button-style-options-wrapper-js<?php echo esc_attr(($popupTypeObj->getOptionValue('sgpb-floating-button-position') == 'corner') ? ' sgpb-hide' : ''); ?>">
55
  <div class="formItem formItem_itemsCentered">
56
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Position top', SG_POPUP_TEXT_DOMAIN)?>:</span>
57
+ <input type="number" min="0" name="sgpb-floating-button-position-top" id="sgpb-floating-button-position-top" class="formItem__input" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-floating-button-position-top')); ?>">
58
  <div class="formItem__inputValueType sgpb-margin-left-10">%</div>
59
  </div>
60
  <div class="formItem formItem_itemsCentered">
61
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Position right', SG_POPUP_TEXT_DOMAIN)?>:</span>
62
+ <input type="number" min="0" name="sgpb-floating-button-position-right" id="sgpb-floating-button-position-right" class="formItem__input" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-floating-button-position-right')); ?>">
63
  <div class="formItem__inputValueType sgpb-margin-left-10">%</div>
64
  </div>
65
  <div class="formItem formItem_itemsCentered">
66
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Border size', SG_POPUP_TEXT_DOMAIN)?>:</span>
67
+ <input type="number" min="0" name="sgpb-floating-button-border-size" id="sgpb-floating-button-border-size" class="formItem__input" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-floating-button-border-size')); ?>">
68
  <div class="formItem__inputValueType sgpb-margin-left-10">px</div>
69
  </div>
70
  <div class="formItem formItem_itemsCentered">
71
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Border radius', SG_POPUP_TEXT_DOMAIN)?>:</span>
72
+ <input type="number" min="0" name="sgpb-floating-button-border-radius" id="sgpb-floating-button-border-radius" class="formItem__input" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-floating-button-border-radius')); ?>">
73
  <div class="formItem__inputValueType sgpb-margin-left-10">px</div>
74
  </div>
75
  <div class="formItem">
public/views/htmlCustomButtonElement.php CHANGED
@@ -28,7 +28,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
28
  <?php _e('Title', SG_POPUP_TEXT_DOMAIN); ?>:
29
  </label>
30
  <div class="col-md-6">
31
- <input class="form-control sgpb-full-width-events" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="title" type="text" name="sgpb-custom-btn-title" id="sgpb-custom-btn-title" value="<?php echo $buttonDefaultStyles['title']; ?>">
32
  </div>
33
  </div>
34
  <div class="row form-group">
@@ -43,7 +43,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
43
  <?php _e('Width', SG_POPUP_TEXT_DOMAIN); ?>:
44
  </label>
45
  <div class="col-md-6">
46
- <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="width" type="text" name="sgpb-custom-btn-width" id="sgpb-custom-btn-width" value="<?php echo $buttonDefaultStyles['width']; ?>">
47
  </div>
48
  </div>
49
  <div class="row form-group">
@@ -51,7 +51,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
51
  <?php _e('Height', SG_POPUP_TEXT_DOMAIN); ?>:
52
  </label>
53
  <div class="col-md-6">
54
- <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="height" type="text" name="sgpb-custom-btn-height" id="sgpb-custom-btn-height" value="<?php echo $buttonDefaultStyles['height']; ?>">
55
  </div>
56
  </div>
57
  <div class="row form-group">
@@ -59,7 +59,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
59
  <?php _e('Border width', SG_POPUP_TEXT_DOMAIN); ?>:
60
  </label>
61
  <div class="col-md-6">
62
- <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="border-width" type="text" name="sgpb-custom-btn-border-width" id="sgpb-custom-btn-border-width" value="<?php echo $buttonDefaultStyles['borderWidth']; ?>">
63
  </div>
64
  </div>
65
  <div class="row form-group">
@@ -67,7 +67,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
67
  <?php _e('Border radius', SG_POPUP_TEXT_DOMAIN); ?>:
68
  </label>
69
  <div class="col-md-6">
70
- <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="border-radius" type="text" name="sgpb-custom-btn-border-radius" id="sgpb-custom-btn-border-radius" value="<?php echo $buttonDefaultStyles['borderRadius']; ?>">
71
  </div>
72
  </div>
73
  <div class="row form-group">
@@ -76,7 +76,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
76
  </label>
77
  <div class="col-md-6">
78
  <div class="sgpb-color-picker-wrapper">
79
- <input id="sgpb-custom-btn-border-color" class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="border-color" type="text" name="sgpb-custom-btn-border-color" value="<?php echo $buttonDefaultStyles['borderColor']; ?>">
80
  </div>
81
  </div>
82
  </div>
@@ -86,7 +86,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
86
  </label>
87
  <div class="col-md-6">
88
  <div class="sgpb-color-picker-wrapper">
89
- <input class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="background-color" type="text" name="sgpb-custom-btn-bg-color" value="<?php echo $buttonDefaultStyles['backgroundColor']; ?>">
90
  </div>
91
  </div>
92
  </div>
@@ -96,7 +96,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
96
  </label>
97
  <div class="col-md-6">
98
  <div class="sgpb-color-picker-wrapper">
99
- <input class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="hover-color" type="text" name="sgpb-custom-btn-bg-color" value="<?php echo $buttonDefaultStyles['backgroundHoverColor']; ?>">
100
  </div>
101
  </div>
102
  </div>
@@ -106,7 +106,7 @@ $allPopups = AdminHelper::getPopupsIdAndTitle($excludedPopups);
106
  </label>
107
  <div class="col-md-6">
108
  <div class="sgpb-color-picker-wrapper">
109
- <input class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="color" type="text" name="sgpb-custom-btn-text-color" value="<?php echo $buttonDefaultStyles['textColor']; ?>">
110
  </div>
111
  </div>
112
  </div>
28
  <?php _e('Title', SG_POPUP_TEXT_DOMAIN); ?>:
29
  </label>
30
  <div class="col-md-6">
31
+ <input class="form-control sgpb-full-width-events" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="title" type="text" name="sgpb-custom-btn-title" id="sgpb-custom-btn-title" value="<?php echo esc_html($buttonDefaultStyles['title']); ?>">
32
  </div>
33
  </div>
34
  <div class="row form-group">
43
  <?php _e('Width', SG_POPUP_TEXT_DOMAIN); ?>:
44
  </label>
45
  <div class="col-md-6">
46
+ <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="width" type="text" name="sgpb-custom-btn-width" id="sgpb-custom-btn-width" value="<?php echo esc_html($buttonDefaultStyles['width']); ?>">
47
  </div>
48
  </div>
49
  <div class="row form-group">
51
  <?php _e('Height', SG_POPUP_TEXT_DOMAIN); ?>:
52
  </label>
53
  <div class="col-md-6">
54
+ <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="height" type="text" name="sgpb-custom-btn-height" id="sgpb-custom-btn-height" value="<?php echo esc_html($buttonDefaultStyles['height']); ?>">
55
  </div>
56
  </div>
57
  <div class="row form-group">
59
  <?php _e('Border width', SG_POPUP_TEXT_DOMAIN); ?>:
60
  </label>
61
  <div class="col-md-6">
62
+ <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="border-width" type="text" name="sgpb-custom-btn-border-width" id="sgpb-custom-btn-border-width" value="<?php echo esc_html($buttonDefaultStyles['borderWidth']); ?>">
63
  </div>
64
  </div>
65
  <div class="row form-group">
67
  <?php _e('Border radius', SG_POPUP_TEXT_DOMAIN); ?>:
68
  </label>
69
  <div class="col-md-6">
70
+ <input class="form-control js-contact-dimension sgpb-full-width-events sgpb-custom-button-settings" data-contact-rel="js-contact-submit-btn" data-field-type="button" data-style-type="border-radius" type="text" name="sgpb-custom-btn-border-radius" id="sgpb-custom-btn-border-radius" value="<?php echo esc_html($buttonDefaultStyles['borderRadius']); ?>">
71
  </div>
72
  </div>
73
  <div class="row form-group">
76
  </label>
77
  <div class="col-md-6">
78
  <div class="sgpb-color-picker-wrapper">
79
+ <input id="sgpb-custom-btn-border-color" class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="border-color" type="text" name="sgpb-custom-btn-border-color" value="<?php echo esc_html($buttonDefaultStyles['borderColor']); ?>">
80
  </div>
81
  </div>
82
  </div>
86
  </label>
87
  <div class="col-md-6">
88
  <div class="sgpb-color-picker-wrapper">
89
+ <input class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="background-color" type="text" name="sgpb-custom-btn-bg-color" value="<?php echo esc_html($buttonDefaultStyles['backgroundColor']); ?>">
90
  </div>
91
  </div>
92
  </div>
96
  </label>
97
  <div class="col-md-6">
98
  <div class="sgpb-color-picker-wrapper">
99
+ <input class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="hover-color" type="text" name="sgpb-custom-btn-bg-color" value="<?php echo esc_html($buttonDefaultStyles['backgroundHoverColor']); ?>">
100
  </div>
101
  </div>
102
  </div>
106
  </label>
107
  <div class="col-md-6">
108
  <div class="sgpb-color-picker-wrapper">
109
+ <input class="sgpb-custom-button-color-picker sgpb-custom-button-settings" data-field-type="button" data-contact-rel="js-contact-submit-btn" data-style-type="color" type="text" name="sgpb-custom-btn-text-color" value="<?php echo esc_html($buttonDefaultStyles['textColor']); ?>">
110
  </div>
111
  </div>
112
  </div>
public/views/importConfigView.php CHANGED
@@ -30,7 +30,7 @@ $formData = array('' => 'Select Field') + AdminHelper::getSubscriptionColumnsBy
30
  <?php endif; ?>
31
  <div class="formItem sgpb-justify-content-between">
32
  <div class="subFormItem__title">
33
- <?php echo $current; ?>
34
  </div>
35
  <div>
36
  <?php
30
  <?php endif; ?>
31
  <div class="formItem sgpb-justify-content-between">
32
  <div class="subFormItem__title">
33
+ <?php echo esc_html($current); ?>
34
  </div>
35
  <div>
36
  <?php
public/views/license.php CHANGED
@@ -12,7 +12,7 @@
12
  ?>
13
  <div class="sgpb-license sgpb-license-block sgpb-padding-20 sgpb-margin-bottom-30 sgpb-position-relative">
14
  <div class="sgpb-license-border <?= ( $status !== false && $status == 'valid' ) ? 'active' : 'inactive' ?>"></div>
15
- <h2 class="formItem__title sgpb-margin-top-10 sgpb-margin-bottom-30"><?php echo $currentLicense['boxLabel'] ?></h2>
16
  <div class="sgpb-license__status">
17
  <?php if ( $status !== false && $status == 'valid' ): ?>
18
  <div class="active"></div>
@@ -25,18 +25,18 @@
25
  <div class="licenseKey__form sgpb-margin-top-10 sgpb-margin-bottom-30 sgpb-align-item-center sgpb-display-flex">
26
  <span class="sgpb-width-20"><?php _e( 'License Key', SG_POPUP_TEXT_DOMAIN ); ?></span>
27
  <form method="post" action="options.php" class="sgpb-width-80 sgpb-display-inline-flex">
28
- <input id="<?php echo 'sgpb-license-key-' . $key ?>" type="text" class="sgpb-width-100"
29
  value="<?php esc_attr_e( $license ); ?>"
30
- name="<?php echo 'sgpb-license-key-' . $key ?>">
31
  <?php if ( $status !== false && $status == 'valid' ): ?>
32
  <?php wp_nonce_field( 'sgpb_nonce', 'sgpb_nonce' ); ?>
33
  <input type="submit" class="sgpb-btn sgpb-btn-blue"
34
- name="<?php echo 'sgpb-license-deactivate' . $key; ?>"
35
  value="<?php _e( 'Deactivate', SG_POPUP_TEXT_DOMAIN ); ?>">
36
  <?php else: ?>
37
  <?php wp_nonce_field( 'sgpb_nonce', 'sgpb_nonce' ); ?>
38
  <input type="submit" class="sgpb-btn sgpb-btn-blue"
39
- name="<?php echo 'sgpb-license-activate-' . $key; ?>"
40
  value="<?php _e( 'Activate', SG_POPUP_TEXT_DOMAIN ); ?>">
41
  <?php endif; ?>
42
  </form>
12
  ?>
13
  <div class="sgpb-license sgpb-license-block sgpb-padding-20 sgpb-margin-bottom-30 sgpb-position-relative">
14
  <div class="sgpb-license-border <?= ( $status !== false && $status == 'valid' ) ? 'active' : 'inactive' ?>"></div>
15
+ <h2 class="formItem__title sgpb-margin-top-10 sgpb-margin-bottom-30"><?php echo esc_html($currentLicense['boxLabel']) ?></h2>
16
  <div class="sgpb-license__status">
17
  <?php if ( $status !== false && $status == 'valid' ): ?>
18
  <div class="active"></div>
25
  <div class="licenseKey__form sgpb-margin-top-10 sgpb-margin-bottom-30 sgpb-align-item-center sgpb-display-flex">
26
  <span class="sgpb-width-20"><?php _e( 'License Key', SG_POPUP_TEXT_DOMAIN ); ?></span>
27
  <form method="post" action="options.php" class="sgpb-width-80 sgpb-display-inline-flex">
28
+ <input id="<?php echo 'sgpb-license-key-' . esc_attr($key) ?>" type="text" class="sgpb-width-100"
29
  value="<?php esc_attr_e( $license ); ?>"
30
+ name="<?php echo 'sgpb-license-key-' . esc_attr( $key ) ?>">
31
  <?php if ( $status !== false && $status == 'valid' ): ?>
32
  <?php wp_nonce_field( 'sgpb_nonce', 'sgpb_nonce' ); ?>
33
  <input type="submit" class="sgpb-btn sgpb-btn-blue"
34
+ name="<?php echo 'sgpb-license-deactivate' . esc_attr( $key ); ?>"
35
  value="<?php _e( 'Deactivate', SG_POPUP_TEXT_DOMAIN ); ?>">
36
  <?php else: ?>
37
  <?php wp_nonce_field( 'sgpb_nonce', 'sgpb_nonce' ); ?>
38
  <input type="submit" class="sgpb-btn sgpb-btn-blue"
39
+ name="<?php echo 'sgpb-license-activate-' . esc_attr( $key ); ?>"
40
  value="<?php _e( 'Activate', SG_POPUP_TEXT_DOMAIN ); ?>">
41
  <?php endif; ?>
42
  </form>
public/views/newsletter.php CHANGED
@@ -45,11 +45,11 @@
45
  </div>
46
  <div class="formItem">
47
  <div class="subFormItem__title sgpb-margin-right-10"><?php _e('From email', SG_POPUP_TEXT_DOMAIN); ?></div>
48
- <input type="email" id="sgpb-newsletter-from-email" class="sgpb-newsletter-from-email formItem__input formItem__input_sgpb-popup-overlay" value="<?php echo $adminEmail; ?>">
49
  </div>
50
  <div class="formItem">
51
  <div class="subFormItem__title sgpb-margin-right-10"><?php _e('Email\'s subject', SG_POPUP_TEXT_DOMAIN); ?></div>
52
- <input type="email" id="sgpb-newsletter-subject" class="sgpb-newsletter-subject formItem__input formItem__input_sgpb-popup-overlay" value="<?php echo (empty($newsletterSavedOptions['newsletterSubject'])) ? _e('Your subject here', SG_POPUP_TEXT_DOMAIN) : $newsletterSavedOptions['newsletterSubject']; ?>">
53
  </div>
54
  </div>
55
 
@@ -115,7 +115,7 @@
115
  continue;
116
  }
117
  ?>
118
- <input type="button" id="sgpb-newsletter-shortcode-<?php echo $index; ?>" class="sgpb-btn sgpb-btn-blue-light sgpb-margin-5 buttonGroup__button_shortcodes" value="<?php echo @$field['fieldName']; ?>" data-value="[<?php echo @$field['fieldName'];?>]">
119
  <?php
120
  }
121
  ?>
45
  </div>
46
  <div class="formItem">
47
  <div class="subFormItem__title sgpb-margin-right-10"><?php _e('From email', SG_POPUP_TEXT_DOMAIN); ?></div>
48
+ <input type="email" id="sgpb-newsletter-from-email" class="sgpb-newsletter-from-email formItem__input formItem__input_sgpb-popup-overlay" value="<?php echo esc_html($adminEmail); ?>">
49
  </div>
50
  <div class="formItem">
51
  <div class="subFormItem__title sgpb-margin-right-10"><?php _e('Email\'s subject', SG_POPUP_TEXT_DOMAIN); ?></div>
52
+ <input type="email" id="sgpb-newsletter-subject" class="sgpb-newsletter-subject formItem__input formItem__input_sgpb-popup-overlay" value="<?php echo esc_html((empty($newsletterSavedOptions['newsletterSubject'])) ? _e('Your subject here', SG_POPUP_TEXT_DOMAIN) : $newsletterSavedOptions['newsletterSubject']); ?>">
53
  </div>
54
  </div>
55
 
115
  continue;
116
  }
117
  ?>
118
+ <input type="button" id="sgpb-newsletter-shortcode-<?php echo esc_attr($index); ?>" class="sgpb-btn sgpb-btn-blue-light sgpb-margin-5 buttonGroup__button_shortcodes" value="<?php echo @$field['fieldName']; ?>" data-value="[<?php echo @$field['fieldName'];?>]">
119
  <?php
120
  }
121
  ?>
public/views/options/facebook.php CHANGED
@@ -14,7 +14,7 @@
14
  <div class="formItem">
15
  <span class="formItem__title"><?php _e('Don\'t show share button', SG_POPUP_TEXT_DOMAIN);?>:</span>
16
  <div class="sgpb-onOffSwitch">
17
- <input class="sgpb-onOffSwitch-checkbox" name="sgpb-fblike-dont-show-share-button" id="fblike-dont-show-share-button" type="checkbox" <?php echo $popupTypeObj->getOptionValue('sgpb-fblike-dont-show-share-button');?>>
18
  <label class="sgpb-onOffSwitch__label" for="fblike-dont-show-share-button">
19
  <span class="sgpb-onOffSwitch-inner"></span>
20
  <span class="sgpb-onOffSwitch-switch"></span>
14
  <div class="formItem">
15
  <span class="formItem__title"><?php _e('Don\'t show share button', SG_POPUP_TEXT_DOMAIN);?>:</span>
16
  <div class="sgpb-onOffSwitch">
17
+ <input class="sgpb-onOffSwitch-checkbox" name="sgpb-fblike-dont-show-share-button" id="fblike-dont-show-share-button" type="checkbox" <?php echo esc_html($popupTypeObj->getOptionValue('sgpb-fblike-dont-show-share-button'));?>>
18
  <label class="sgpb-onOffSwitch__label" for="fblike-dont-show-share-button">
19
  <span class="sgpb-onOffSwitch-inner"></span>
20
  <span class="sgpb-onOffSwitch-switch"></span>
public/views/options/subscription.php CHANGED
@@ -48,9 +48,9 @@
48
  <div class="sgpb-slider-wrapper sgpb-range-wrap sgpb-display-inline-flex">
49
  <?php $overlayOpacity = $popupTypeObj->getOptionValue('sgpb-overlay-opacity'); ?>
50
  <input type="range" name="sgpb-subs-form-bg-opacity" class="sgpb-range-input js-subs-bg-opacity sgpb-cursor-pointer"
51
- value="<?php echo $popupTypeObj->getOptionValue('sgpb-subs-form-bg-opacity'); ?>"
52
  min="0.0" step="0.1" max="1">
53
- <span class="js-subs-bg-opacity-value sgpb-margin-left-10"><?php echo $overlayOpacity?></span>
54
  </div>
55
  </div>
56
  </div>
@@ -68,7 +68,7 @@
68
  <div class="formItem">
69
  <span class="formItem__title"><?php _e('Enable GDPR', SG_POPUP_TEXT_DOMAIN)?>:</span>
70
  <div class="sgpb-onOffSwitch">
71
- <input type="checkbox" class="js-checkbox-accordion js-checkbox-field-status sgpb-onOffSwitch-checkbox" id="subs-gdpr-status" data-subs-field-wrapper="js-gdpr-wrapper" name="sgpb-subs-gdpr-status" <?php echo $popupTypeObj->getOptionValue('sgpb-subs-gdpr-status'); ?>>
72
  <label class="sgpb-onOffSwitch__label" for="subs-gdpr-status">
73
  <span class="sgpb-onOffSwitch-inner"></span>
74
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -88,7 +88,7 @@
88
  <div class="formItem">
89
  <span class="formItem__title"><?php _e('First name', SG_POPUP_TEXT_DOMAIN)?>:</span>
90
  <div class="sgpb-onOffSwitch">
91
- <input type="checkbox" class="js-checkbox-accordion js-checkbox-field-status sgpb-onOffSwitch-checkbox" id="subs-first-name-status" data-subs-field-wrapper="js-first-name-wrapper" name="sgpb-subs-first-name-status" <?php echo $popupTypeObj->getOptionValue('sgpb-subs-first-name-status'); ?>>
92
  <label class="sgpb-onOffSwitch__label" for="subs-first-name-status">
93
  <span class="sgpb-onOffSwitch-inner"></span>
94
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -114,7 +114,7 @@
114
  <div class="formItem">
115
  <span class="formItem__title"><?php _e('Last name', SG_POPUP_TEXT_DOMAIN)?>:</span>
116
  <div class="sgpb-onOffSwitch">
117
- <input type="checkbox" class="js-checkbox-accordion js-checkbox-field-status sgpb-onOffSwitch-checkbox" id="subs-last-name-status" data-subs-field-wrapper="js-last-name-wrapper" name="sgpb-subs-last-name-status" <?php echo $popupTypeObj->getOptionValue('sgpb-subs-last-name-status'); ?>>
118
  <label class="sgpb-onOffSwitch__label" for="subs-last-name-status">
119
  <span class="sgpb-onOffSwitch-inner"></span>
120
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -285,12 +285,12 @@
285
  <div class="sg-hide sgpb-bg-black__opacity-02 sgpb-width-100 sgpb-padding-20 sgpb-margin-bottom-20" id="subs-redirect-to-URL">
286
  <div class="subFormItem">
287
  <span class="subFormItem__title sgpb-margin-right-10"><?php _e('Redirect URL', SG_POPUP_TEXT_DOMAIN)?>:</span>
288
- <input type="url" name="sgpb-subs-success-redirect-URL" id="sgpb-subs-success-redirect-URL" placeholder="https://www.example.com" class="grayFormItem__input" value="<?php echo $popupTypeObj->getOptionValue('sgpb-subs-success-redirect-URL'); ?>">
289
  </div>
290
  <div class="subFormItem sgpb-display-flex sgpb-align-item-center">
291
  <span class="subFormItem__title sgpb-margin-right-10"><?php _e('Redirect to new tab', SG_POPUP_TEXT_DOMAIN)?>:</span>
292
  <div class="sgpb-onOffSwitch">
293
- <input type="checkbox" name="sgpb-subs-success-redirect-new-tab" id="subs-success-redirect-new-tab" class="sgpb-onOffSwitch-checkbox" placeholder="https://www.example.com" <?php echo $popupTypeObj->getOptionValue('sgpb-subs-success-redirect-new-tab'); ?>>
294
  <label class="sgpb-onOffSwitch__label" for="subs-success-redirect-new-tab">
295
  <span class="sgpb-onOffSwitch-inner"></span>
296
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -311,7 +311,7 @@
311
  <img class="sgpb-margin-right-10" src="<?php echo SG_POPUP_PUBLIC_URL.'icons/Black/eye.svg'; ?>" alt="Eye icon">
312
  <span class="livePreview__text"><?php _e('Live Preview', SG_POPUP_TEXT_DOMAIN)?></span>
313
  </div>
314
- <div class="sgpb-margin-top-10 sgpb-subs-form-<?php echo $popupId; ?> sgpb-subscription-admin-wrapper<?php echo $forceRtlClass; ?>">
315
  <?php echo Functions::renderForm($formData); ?>
316
  </div>
317
  <?php
48
  <div class="sgpb-slider-wrapper sgpb-range-wrap sgpb-display-inline-flex">
49
  <?php $overlayOpacity = $popupTypeObj->getOptionValue('sgpb-overlay-opacity'); ?>
50
  <input type="range" name="sgpb-subs-form-bg-opacity" class="sgpb-range-input js-subs-bg-opacity sgpb-cursor-pointer"
51
+ value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-subs-form-bg-opacity')); ?>"
52
  min="0.0" step="0.1" max="1">
53
+ <span class="js-subs-bg-opacity-value sgpb-margin-left-10"><?php echo esc_html($overlayOpacity)?></span>
54
  </div>
55
  </div>
56
  </div>
68
  <div class="formItem">
69
  <span class="formItem__title"><?php _e('Enable GDPR', SG_POPUP_TEXT_DOMAIN)?>:</span>
70
  <div class="sgpb-onOffSwitch">
71
+ <input type="checkbox" class="js-checkbox-accordion js-checkbox-field-status sgpb-onOffSwitch-checkbox" id="subs-gdpr-status" data-subs-field-wrapper="js-gdpr-wrapper" name="sgpb-subs-gdpr-status" <?php echo esc_html($popupTypeObj->getOptionValue('sgpb-subs-gdpr-status')); ?>>
72
  <label class="sgpb-onOffSwitch__label" for="subs-gdpr-status">
73
  <span class="sgpb-onOffSwitch-inner"></span>
74
  <span class="sgpb-onOffSwitch-switch"></span>
88
  <div class="formItem">
89
  <span class="formItem__title"><?php _e('First name', SG_POPUP_TEXT_DOMAIN)?>:</span>
90
  <div class="sgpb-onOffSwitch">
91
+ <input type="checkbox" class="js-checkbox-accordion js-checkbox-field-status sgpb-onOffSwitch-checkbox" id="subs-first-name-status" data-subs-field-wrapper="js-first-name-wrapper" name="sgpb-subs-first-name-status" <?php echo esc_html($popupTypeObj->getOptionValue('sgpb-subs-first-name-status')); ?>>
92
  <label class="sgpb-onOffSwitch__label" for="subs-first-name-status">
93
  <span class="sgpb-onOffSwitch-inner"></span>
94
  <span class="sgpb-onOffSwitch-switch"></span>
114
  <div class="formItem">
115
  <span class="formItem__title"><?php _e('Last name', SG_POPUP_TEXT_DOMAIN)?>:</span>
116
  <div class="sgpb-onOffSwitch">
117
+ <input type="checkbox" class="js-checkbox-accordion js-checkbox-field-status sgpb-onOffSwitch-checkbox" id="subs-last-name-status" data-subs-field-wrapper="js-last-name-wrapper" name="sgpb-subs-last-name-status" <?php echo esc_html($popupTypeObj->getOptionValue('sgpb-subs-last-name-status')); ?>>
118
  <label class="sgpb-onOffSwitch__label" for="subs-last-name-status">
119
  <span class="sgpb-onOffSwitch-inner"></span>
120
  <span class="sgpb-onOffSwitch-switch"></span>
285
  <div class="sg-hide sgpb-bg-black__opacity-02 sgpb-width-100 sgpb-padding-20 sgpb-margin-bottom-20" id="subs-redirect-to-URL">
286
  <div class="subFormItem">
287
  <span class="subFormItem__title sgpb-margin-right-10"><?php _e('Redirect URL', SG_POPUP_TEXT_DOMAIN)?>:</span>
288
+ <input type="url" name="sgpb-subs-success-redirect-URL" id="sgpb-subs-success-redirect-URL" placeholder="https://www.example.com" class="grayFormItem__input" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-subs-success-redirect-URL')); ?>">
289
  </div>
290
  <div class="subFormItem sgpb-display-flex sgpb-align-item-center">
291
  <span class="subFormItem__title sgpb-margin-right-10"><?php _e('Redirect to new tab', SG_POPUP_TEXT_DOMAIN)?>:</span>
292
  <div class="sgpb-onOffSwitch">
293
+ <input type="checkbox" name="sgpb-subs-success-redirect-new-tab" id="subs-success-redirect-new-tab" class="sgpb-onOffSwitch-checkbox" placeholder="https://www.example.com" <?php echo esc_html($popupTypeObj->getOptionValue('sgpb-subs-success-redirect-new-tab')); ?>>
294
  <label class="sgpb-onOffSwitch__label" for="subs-success-redirect-new-tab">
295
  <span class="sgpb-onOffSwitch-inner"></span>
296
  <span class="sgpb-onOffSwitch-switch"></span>
311
  <img class="sgpb-margin-right-10" src="<?php echo SG_POPUP_PUBLIC_URL.'icons/Black/eye.svg'; ?>" alt="Eye icon">
312
  <span class="livePreview__text"><?php _e('Live Preview', SG_POPUP_TEXT_DOMAIN)?></span>
313
  </div>
314
+ <div class="sgpb-margin-top-10 sgpb-subs-form-<?php echo esc_attr($popupId); ?> sgpb-subscription-admin-wrapper<?php echo esc_attr($forceRtlClass); ?>">
315
  <?php echo Functions::renderForm($formData); ?>
316
  </div>
317
  <?php
public/views/optionsView.php CHANGED
@@ -26,7 +26,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
26
  <div class="formItem">
27
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Action on popup content click', SG_POPUP_TEXT_DOMAIN)?>:</span>
28
  <div class="sgpb-onOffSwitch">
29
- <input type="checkbox" id="sgpb-content-click" name="sgpb-content-click" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" <?php echo $popupTypeObj->getOptionValue('sgpb-content-click'); ?>>
30
  <label class="sgpb-onOffSwitch__label" for="sgpb-content-click">
31
  <span class="sgpb-onOffSwitch-inner"></span>
32
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -41,12 +41,12 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
41
  <div class="sgpb-bg-black__opacity-02 sg-hide sg-full-width sgpb-padding-20" id="content-click-redirect">
42
  <div class="subFormItem">
43
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('URL', SG_POPUP_TEXT_DOMAIN)?>:</span>
44
- <input type="url" name="sgpb-click-redirect-to-url" id="redirect-to-url" class="grayFormItem__input" placeholder="http://" value="<?php echo $popupTypeObj->getOptionValue('sgpb-click-redirect-to-url'); ?>">
45
  </div>
46
  <div class="formItem">
47
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Redirect to new tab', SG_POPUP_TEXT_DOMAIN)?>:</span>
48
  <div class="sgpb-onOffSwitch">
49
- <input id="redirect" class="sgpb-onOffSwitch-checkbox" type="checkbox" name="sgpb-redirect-to-new-tab" <?php echo $popupTypeObj->getOptionValue('sgpb-redirect-to-new-tab');?>>
50
  <label class="sgpb-onOffSwitch__label" for="redirect">
51
  <span class="sgpb-onOffSwitch-inner"></span>
52
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -63,7 +63,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
63
  <div class="subFormItem formItem">
64
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Close popup', SG_POPUP_TEXT_DOMAIN)?>:</span>
65
  <div class="sgpb-onOffSwitch">
66
- <input class="sgpb-onOffSwitch-checkbox" type="checkbox" name="sgpb-copy-to-clipboard-close-popup" id="sgpb-copy-to-clipboard-close-popup" <?php echo $popupTypeObj->getOptionValue('sgpb-copy-to-clipboard-close-popup'); ?>>
67
  <label class="sgpb-onOffSwitch__label" for="sgpb-copy-to-clipboard-close-popup">
68
  <span class="sgpb-onOffSwitch-inner"></span>
69
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -73,7 +73,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
73
  <div class="subFormItem formItem">
74
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Show alert', SG_POPUP_TEXT_DOMAIN)?>:</span>
75
  <div class="sgpb-onOffSwitch">
76
- <input type="checkbox" id="sgpb-copy-to-clipboard-alert" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-copy-to-clipboard-alert" <?php echo $popupTypeObj->getOptionValue('sgpb-copy-to-clipboard-alert'); ?>>
77
  <label class="sgpb-onOffSwitch__label" for="sgpb-copy-to-clipboard-alert">
78
  <span class="sgpb-onOffSwitch-inner"></span>
79
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -83,7 +83,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
83
  <div class="sg-full-width">
84
  <div class="subFormItem formItem">
85
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Message', SG_POPUP_TEXT_DOMAIN)?>:</span>
86
- <input type="text" id="sgpb-copy-to-clipboard-message" class="subFormItem__input" name="sgpb-copy-to-clipboard-message" value="<?php echo $popupTypeObj->getOptionValue('sgpb-copy-to-clipboard-message'); ?>">
87
  </div>
88
  </div>
89
  </div>
@@ -93,7 +93,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
93
  <div class="formItem">
94
  <span class="formItem__title"><?php _e('Popup showing limitation', SG_POPUP_TEXT_DOMAIN)?>:</span>
95
  <div class="sgpb-onOffSwitch">
96
- <input type="checkbox" id="sgpb-show-popup-same-user" name="sgpb-show-popup-same-user" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" <?php echo $popupTypeObj->getOptionValue('sgpb-show-popup-same-user'); ?>>
97
  <label class="sgpb-onOffSwitch__label" for="sgpb-show-popup-same-user">
98
  <span class="sgpb-onOffSwitch-inner"></span>
99
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -110,7 +110,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
110
  <div class="subForm noPadding">
111
  <div class="subFormItem formItem">
112
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Popup showing count', SG_POPUP_TEXT_DOMAIN)?>:</span>
113
- <input type="number" min="1" disabled required id="sgpb-show-popup-same-user-count" class="subFormItem__input" name="sgpb-show-popup-same-user-count" value="<?php echo $popupTypeObj->getOptionValue('sgpb-show-popup-same-user-count'); ?>" placeholder="e.g.: 1">
114
  <div class="question-mark">B</div>
115
  <div class="sgpb-info-wrapper">
116
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
@@ -120,7 +120,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
120
  </div>
121
  <div class="subFormItem formItem">
122
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Popup showing expiry', SG_POPUP_TEXT_DOMAIN)?>:</span>
123
- <input type="number" min="0" disabled required id="sgpb-show-popup-same-user-expiry" class="subFormItem__input" name="sgpb-show-popup-same-user-expiry" value="<?php echo $popupTypeObj->getOptionValue('sgpb-show-popup-same-user-expiry'); ?>" placeholder="e.g.: 1">
124
  <div class="question-mark">B</div>
125
  <div class="sgpb-info-wrapper">
126
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
@@ -131,7 +131,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
131
  <div class="subFormItem formItem">
132
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Apply option on each page', SG_POPUP_TEXT_DOMAIN)?>:</span>
133
  <div class="checkbox-wrapper">
134
- <input type="checkbox" disabled id="sgpb-show-popup-same-user-page-level" name="sgpb-show-popup-same-user-page-level" <?php echo $popupTypeObj->getOptionValue('sgpb-show-popup-same-user-page-level'); ?>>
135
  <label class="checkboxLabel" for="sgpb-show-popup-same-user-page-level"></label>
136
  </div>
137
  <div class="question-mark">B</div>
@@ -149,7 +149,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
149
  <?php _e('Popup opening sound', SG_POPUP_TEXT_DOMAIN); ?>:
150
  </span>
151
  <div class="sgpb-onOffSwitch">
152
- <input type="checkbox" id="open-sound" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-open-sound" <?php echo $popupTypeObj->getOptionValue('sgpb-open-sound'); ?>>
153
  <label class="sgpb-onOffSwitch__label" for="open-sound">
154
  <span class="sgpb-onOffSwitch-inner"></span>
155
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -165,7 +165,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
165
  <div class="subForm formItem sgpb-padding-x-20 sgpb-width-100">
166
  <div class="musicForm">
167
  <div class="musicFormItem sgpb-display-flex">
168
- <input type="text" id="js-sound-open-url" readonly class="musicFormItem__input sgpb-margin-right-20 sgpb-width-50" name="sgpb-sound-url" value="<?php echo $popupTypeObj->getOptionValue('sgpb-sound-url'); ?>">
169
  <div class="sgpb-icons icons_blue sgpb-js-preview-sound">J</div>
170
  </div>
171
  <div class="musicFormItem sgpb-width-50 sgpb-margin-top-10 sgpb-display-flex sgpb-justify-content-center musicFormItem_last">
@@ -177,7 +177,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
177
  <div class="formItem">
178
  <span class="formItem__title"><?php _e('Popup opening animation', SG_POPUP_TEXT_DOMAIN); ?>:</span>
179
  <div class="sgpb-onOffSwitch">
180
- <input type="checkbox" id="open-animation" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-open-animation" <?php echo $popupTypeObj->getOptionValue('sgpb-open-animation'); ?>>
181
  <label class="sgpb-onOffSwitch__label" for="open-animation">
182
  <span class="sgpb-onOffSwitch-inner"></span>
183
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -208,7 +208,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
208
  <div class="formItem">
209
  <span class="formItem__title"><?php _e('Popup closing animation', SG_POPUP_TEXT_DOMAIN); ?>:</span>
210
  <div class="sgpb-onOffSwitch">
211
- <input type="checkbox" id="close-animation" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-close-animation" <?php echo $popupTypeObj->getOptionValue('sgpb-close-animation'); ?>>
212
  <label class="sgpb-onOffSwitch__label" for="close-animation">
213
  <span class="sgpb-onOffSwitch-inner"></span>
214
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -238,7 +238,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
238
  <div class="formItem">
239
  <span class="formItem__title"><?php _e('Popup location', SG_POPUP_TEXT_DOMAIN); ?>:</span>
240
  <div class="sgpb-onOffSwitch">
241
- <input type="checkbox" id="popup-fixed" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-popup-fixed" <?php echo $popupTypeObj->getOptionValue('sgpb-popup-fixed'); ?>>
242
  <label class="sgpb-onOffSwitch__label" for="popup-fixed">
243
  <span class="sgpb-onOffSwitch-inner"></span>
244
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -265,7 +265,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
265
  <div class="formItem">
266
  <span class="formItem__title"><?php _e('Disable page scrolling', SG_POPUP_TEXT_DOMAIN); ?>:</span>
267
  <div class="sgpb-onOffSwitch">
268
- <input type="checkbox" id="disable-page-scrolling" class="sgpb-onOffSwitch-checkbox" name="sgpb-disable-page-scrolling" <?php echo $popupTypeObj->getOptionValue('sgpb-disable-page-scrolling'); ?>>
269
  <label class="sgpb-onOffSwitch__label" for="disable-page-scrolling">
270
  <span class="sgpb-onOffSwitch-inner"></span>
271
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -283,7 +283,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
283
  <div class="formItem">
284
  <span class="formItem__title"><?php _e('Enable content scrolling', SG_POPUP_TEXT_DOMAIN)?>:</span>
285
  <div class="sgpb-onOffSwitch">
286
- <input type="checkbox" id="content-scrolling" class="sgpb-onOffSwitch-checkbox" name="sgpb-enable-content-scrolling" <?php echo $popupTypeObj->getOptionValue('sgpb-enable-content-scrolling'); ?>>
287
  <label class="sgpb-onOffSwitch__label" for="content-scrolling">
288
  <span class="sgpb-onOffSwitch-inner"></span>
289
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -302,7 +302,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
302
  <div class="formItem">
303
  <span class="formItem__title"><?php _e('Reopen after form submission', SG_POPUP_TEXT_DOMAIN); ?>:</span>
304
  <div class="sgpb-onOffSwitch">
305
- <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="reopen-after-form-submission" name="sgpb-reopen-after-form-submission" <?php echo $popupTypeObj->getOptionValue('sgpb-reopen-after-form-submission'); ?>>
306
  <label class="sgpb-onOffSwitch__label" for="reopen-after-form-submission">
307
  <span class="sgpb-onOffSwitch-inner"></span>
308
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -319,7 +319,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
319
  <?php if (empty($removedOptions['sgpb-popup-order'])): ?>
320
  <div class="formItem formItem_itemsCentered">
321
  <span class="formItem__title"><?php _e('Popup order', SG_POPUP_TEXT_DOMAIN)?>:</span>
322
- <input type="number" min="0" name="sgpb-popup-order" id="sgpb-popup-order" class="formItem__input" value="<?php echo (int)$popupTypeObj->getOptionValue('sgpb-popup-order'); ?>">
323
  <div class="question-mark">B</div>
324
  <div class="sgpb-info-wrapper">
325
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
26
  <div class="formItem">
27
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Action on popup content click', SG_POPUP_TEXT_DOMAIN)?>:</span>
28
  <div class="sgpb-onOffSwitch">
29
+ <input type="checkbox" id="sgpb-content-click" name="sgpb-content-click" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-content-click')); ?>>
30
  <label class="sgpb-onOffSwitch__label" for="sgpb-content-click">
31
  <span class="sgpb-onOffSwitch-inner"></span>
32
  <span class="sgpb-onOffSwitch-switch"></span>
41
  <div class="sgpb-bg-black__opacity-02 sg-hide sg-full-width sgpb-padding-20" id="content-click-redirect">
42
  <div class="subFormItem">
43
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('URL', SG_POPUP_TEXT_DOMAIN)?>:</span>
44
+ <input type="url" name="sgpb-click-redirect-to-url" id="redirect-to-url" class="grayFormItem__input" placeholder="http://" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-click-redirect-to-url')); ?>">
45
  </div>
46
  <div class="formItem">
47
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Redirect to new tab', SG_POPUP_TEXT_DOMAIN)?>:</span>
48
  <div class="sgpb-onOffSwitch">
49
+ <input id="redirect" class="sgpb-onOffSwitch-checkbox" type="checkbox" name="sgpb-redirect-to-new-tab" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-redirect-to-new-tab'));?>>
50
  <label class="sgpb-onOffSwitch__label" for="redirect">
51
  <span class="sgpb-onOffSwitch-inner"></span>
52
  <span class="sgpb-onOffSwitch-switch"></span>
63
  <div class="subFormItem formItem">
64
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Close popup', SG_POPUP_TEXT_DOMAIN)?>:</span>
65
  <div class="sgpb-onOffSwitch">
66
+ <input class="sgpb-onOffSwitch-checkbox" type="checkbox" name="sgpb-copy-to-clipboard-close-popup" id="sgpb-copy-to-clipboard-close-popup" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-copy-to-clipboard-close-popup')); ?>>
67
  <label class="sgpb-onOffSwitch__label" for="sgpb-copy-to-clipboard-close-popup">
68
  <span class="sgpb-onOffSwitch-inner"></span>
69
  <span class="sgpb-onOffSwitch-switch"></span>
73
  <div class="subFormItem formItem">
74
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Show alert', SG_POPUP_TEXT_DOMAIN)?>:</span>
75
  <div class="sgpb-onOffSwitch">
76
+ <input type="checkbox" id="sgpb-copy-to-clipboard-alert" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-copy-to-clipboard-alert" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-copy-to-clipboard-alert')); ?>>
77
  <label class="sgpb-onOffSwitch__label" for="sgpb-copy-to-clipboard-alert">
78
  <span class="sgpb-onOffSwitch-inner"></span>
79
  <span class="sgpb-onOffSwitch-switch"></span>
83
  <div class="sg-full-width">
84
  <div class="subFormItem formItem">
85
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Message', SG_POPUP_TEXT_DOMAIN)?>:</span>
86
+ <input type="text" id="sgpb-copy-to-clipboard-message" class="subFormItem__input" name="sgpb-copy-to-clipboard-message" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-copy-to-clipboard-message')); ?>">
87
  </div>
88
  </div>
89
  </div>
93
  <div class="formItem">
94
  <span class="formItem__title"><?php _e('Popup showing limitation', SG_POPUP_TEXT_DOMAIN)?>:</span>
95
  <div class="sgpb-onOffSwitch">
96
+ <input type="checkbox" id="sgpb-show-popup-same-user" name="sgpb-show-popup-same-user" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-show-popup-same-user')); ?>>
97
  <label class="sgpb-onOffSwitch__label" for="sgpb-show-popup-same-user">
98
  <span class="sgpb-onOffSwitch-inner"></span>
99
  <span class="sgpb-onOffSwitch-switch"></span>
110
  <div class="subForm noPadding">
111
  <div class="subFormItem formItem">
112
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Popup showing count', SG_POPUP_TEXT_DOMAIN)?>:</span>
113
+ <input type="number" min="1" disabled required id="sgpb-show-popup-same-user-count" class="subFormItem__input" name="sgpb-show-popup-same-user-count" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-show-popup-same-user-count')); ?>" placeholder="e.g.: 1">
114
  <div class="question-mark">B</div>
115
  <div class="sgpb-info-wrapper">
116
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
120
  </div>
121
  <div class="subFormItem formItem">
122
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Popup showing expiry', SG_POPUP_TEXT_DOMAIN)?>:</span>
123
+ <input type="number" min="0" disabled required id="sgpb-show-popup-same-user-expiry" class="subFormItem__input" name="sgpb-show-popup-same-user-expiry" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-show-popup-same-user-expiry')); ?>" placeholder="e.g.: 1">
124
  <div class="question-mark">B</div>
125
  <div class="sgpb-info-wrapper">
126
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
131
  <div class="subFormItem formItem">
132
  <span class="subFormItem__title sgpb-margin-right-20"><?php _e('Apply option on each page', SG_POPUP_TEXT_DOMAIN)?>:</span>
133
  <div class="checkbox-wrapper">
134
+ <input type="checkbox" disabled id="sgpb-show-popup-same-user-page-level" name="sgpb-show-popup-same-user-page-level" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-show-popup-same-user-page-level')); ?>>
135
  <label class="checkboxLabel" for="sgpb-show-popup-same-user-page-level"></label>
136
  </div>
137
  <div class="question-mark">B</div>
149
  <?php _e('Popup opening sound', SG_POPUP_TEXT_DOMAIN); ?>:
150
  </span>
151
  <div class="sgpb-onOffSwitch">
152
+ <input type="checkbox" id="open-sound" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-open-sound" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-open-sound')); ?>>
153
  <label class="sgpb-onOffSwitch__label" for="open-sound">
154
  <span class="sgpb-onOffSwitch-inner"></span>
155
  <span class="sgpb-onOffSwitch-switch"></span>
165
  <div class="subForm formItem sgpb-padding-x-20 sgpb-width-100">
166
  <div class="musicForm">
167
  <div class="musicFormItem sgpb-display-flex">
168
+ <input type="text" id="js-sound-open-url" readonly class="musicFormItem__input sgpb-margin-right-20 sgpb-width-50" name="sgpb-sound-url" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-sound-url')); ?>">
169
  <div class="sgpb-icons icons_blue sgpb-js-preview-sound">J</div>
170
  </div>
171
  <div class="musicFormItem sgpb-width-50 sgpb-margin-top-10 sgpb-display-flex sgpb-justify-content-center musicFormItem_last">
177
  <div class="formItem">
178
  <span class="formItem__title"><?php _e('Popup opening animation', SG_POPUP_TEXT_DOMAIN); ?>:</span>
179
  <div class="sgpb-onOffSwitch">
180
+ <input type="checkbox" id="open-animation" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-open-animation" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-open-animation')); ?>>
181
  <label class="sgpb-onOffSwitch__label" for="open-animation">
182
  <span class="sgpb-onOffSwitch-inner"></span>
183
  <span class="sgpb-onOffSwitch-switch"></span>
208
  <div class="formItem">
209
  <span class="formItem__title"><?php _e('Popup closing animation', SG_POPUP_TEXT_DOMAIN); ?>:</span>
210
  <div class="sgpb-onOffSwitch">
211
+ <input type="checkbox" id="close-animation" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-close-animation" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-close-animation')); ?>>
212
  <label class="sgpb-onOffSwitch__label" for="close-animation">
213
  <span class="sgpb-onOffSwitch-inner"></span>
214
  <span class="sgpb-onOffSwitch-switch"></span>
238
  <div class="formItem">
239
  <span class="formItem__title"><?php _e('Popup location', SG_POPUP_TEXT_DOMAIN); ?>:</span>
240
  <div class="sgpb-onOffSwitch">
241
+ <input type="checkbox" id="popup-fixed" class="js-checkbox-accordion sgpb-onOffSwitch-checkbox" name="sgpb-popup-fixed" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-popup-fixed')); ?>>
242
  <label class="sgpb-onOffSwitch__label" for="popup-fixed">
243
  <span class="sgpb-onOffSwitch-inner"></span>
244
  <span class="sgpb-onOffSwitch-switch"></span>
265
  <div class="formItem">
266
  <span class="formItem__title"><?php _e('Disable page scrolling', SG_POPUP_TEXT_DOMAIN); ?>:</span>
267
  <div class="sgpb-onOffSwitch">
268
+ <input type="checkbox" id="disable-page-scrolling" class="sgpb-onOffSwitch-checkbox" name="sgpb-disable-page-scrolling" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-disable-page-scrolling')); ?>>
269
  <label class="sgpb-onOffSwitch__label" for="disable-page-scrolling">
270
  <span class="sgpb-onOffSwitch-inner"></span>
271
  <span class="sgpb-onOffSwitch-switch"></span>
283
  <div class="formItem">
284
  <span class="formItem__title"><?php _e('Enable content scrolling', SG_POPUP_TEXT_DOMAIN)?>:</span>
285
  <div class="sgpb-onOffSwitch">
286
+ <input type="checkbox" id="content-scrolling" class="sgpb-onOffSwitch-checkbox" name="sgpb-enable-content-scrolling" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-enable-content-scrolling')); ?>>
287
  <label class="sgpb-onOffSwitch__label" for="content-scrolling">
288
  <span class="sgpb-onOffSwitch-inner"></span>
289
  <span class="sgpb-onOffSwitch-switch"></span>
302
  <div class="formItem">
303
  <span class="formItem__title"><?php _e('Reopen after form submission', SG_POPUP_TEXT_DOMAIN); ?>:</span>
304
  <div class="sgpb-onOffSwitch">
305
+ <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="reopen-after-form-submission" name="sgpb-reopen-after-form-submission" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-reopen-after-form-submission')); ?>>
306
  <label class="sgpb-onOffSwitch__label" for="reopen-after-form-submission">
307
  <span class="sgpb-onOffSwitch-inner"></span>
308
  <span class="sgpb-onOffSwitch-switch"></span>
319
  <?php if (empty($removedOptions['sgpb-popup-order'])): ?>
320
  <div class="formItem formItem_itemsCentered">
321
  <span class="formItem__title"><?php _e('Popup order', SG_POPUP_TEXT_DOMAIN)?>:</span>
322
+ <input type="number" min="0" name="sgpb-popup-order" id="sgpb-popup-order" class="formItem__input" value="<?php echo esc_html((int)$popupTypeObj->getOptionValue('sgpb-popup-order')); ?>">
323
  <div class="question-mark">B</div>
324
  <div class="sgpb-info-wrapper">
325
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
public/views/otherConditionsView.php CHANGED
@@ -15,7 +15,7 @@ $conditionsCanBeUsed = PopupBuilderActivePackage::canUseSection('popupOtherCondi
15
  <div class="formItem">
16
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Schedule', SG_POPUP_TEXT_DOMAIN); ?>:</span>
17
  <div class="sgpb-onOffSwitch">
18
- <input type="checkbox" id="schedule-status" class="sgpb-onOffSwitch-checkbox" disabled name="sgpb-schedule-status" <?php echo $popupTypeObj->getOptionValue('sgpb-schedule-status'); ?>>
19
  <label class="sgpb-onOffSwitch__label" for="schedule-status">
20
  <span class="sgpb-onOffSwitch-inner"></span>
21
  <span class="sgpb-onOffSwitch-switch"></span>
15
  <div class="formItem">
16
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Schedule', SG_POPUP_TEXT_DOMAIN); ?>:</span>
17
  <div class="sgpb-onOffSwitch">
18
+ <input type="checkbox" id="schedule-status" class="sgpb-onOffSwitch-checkbox" disabled name="sgpb-schedule-status" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-schedule-status')); ?>>
19
  <label class="sgpb-onOffSwitch__label" for="schedule-status">
20
  <span class="sgpb-onOffSwitch-inner"></span>
21
  <span class="sgpb-onOffSwitch-switch"></span>
public/views/popupDesignView.php CHANGED
@@ -19,7 +19,7 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
19
  <?php _e('Force RTL', SG_POPUP_TEXT_DOMAIN)?>:
20
  </label>
21
  <div class="sgpb-onOffSwitch">
22
- <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-force-rtl" name="sgpb-force-rtl" <?php echo $popupTypeObj->getOptionValue('sgpb-force-rtl'); ?>>
23
  <label class="sgpb-onOffSwitch__label" for="sgpb-force-rtl">
24
  <span class="sgpb-onOffSwitch-inner"></span>
25
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -43,7 +43,7 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
43
  <?php if (empty($removedOptions['sgpb-popup-z-index'])) : ?>
44
  <div class="formItem formItem_itemsCentered">
45
  <span class="formItem__title"><?php _e('Popup z-index', SG_POPUP_TEXT_DOMAIN); ?>:</span>
46
- <input type="number" min="1" name="sgpb-popup-z-index" id="sgpb-popup-z-index" class="formItem__input formItem__input_sgpb-pixels" value="<?php echo $popupTypeObj->getOptionValue('sgpb-popup-z-index'); ?>">
47
  <div class="question-mark sgpb-info-icon">B</div>
48
  <div class="sgpb-info-wrapper">
49
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
@@ -57,10 +57,10 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
57
  <span class="formItem__title"><?php _e('Themes', SG_POPUP_TEXT_DOMAIN)?>:</span>
58
  <?php AdminHelper::createRadioButtons($defaultData['theme'], "sgpb-popup-themes", esc_html($popupTheme), true, 'bg_img'); ?>
59
  </div>
60
- <div class="formItem sgpb-disable-border-wrapper<?php echo $hidePopupBorderOption ;?>">
61
  <span class="formItem__title"><?php _e('Disable popup border', SG_POPUP_TEXT_DOMAIN)?>:</span>
62
  <div class="sgpb-onOffSwitch">
63
- <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-disable-border" name="sgpb-disable-border" <?php echo $popupTypeObj->getOptionValue('sgpb-disable-border', true); ?>>
64
  <label class="sgpb-onOffSwitch__label" for="sgpb-disable-border">
65
  <span class="sgpb-onOffSwitch-inner"></span>
66
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -96,7 +96,7 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
96
  <div class="formItem formItem_lessMargin">
97
  <span class="formItem__title "><?php _e('Enable popup overlay', SG_POPUP_TEXT_DOMAIN)?>:</span>
98
  <div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
99
- <input type="checkbox" id="sgpb-enable-popup-overlay" name="sgpb-enable-popup-overlay" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" <?php echo $popupTypeObj->getOptionValue('sgpb-enable-popup-overlay'); ?> <?php echo (!empty($removedOptions['sgpb-enable-popup-overlay'])) ? ' disabled' : '' ?>>
100
  <label class="sgpb-onOffSwitch__label" for="sgpb-enable-popup-overlay">
101
  <span class="sgpb-onOffSwitch-inner"></span>
102
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -137,8 +137,8 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
137
  <?php $overlayOpacity = $popupTypeObj->getOptionValue('sgpb-overlay-opacity'); ?>
138
  <input type="range" class="sgpb-range-input js-popup-overlay-opacity sgpb-margin-right-10"
139
  name="sgpb-overlay-opacity"
140
- id="js-popup-overlay-opacity" min="0.0" step="0.1" max="1" value="<?php echo $overlayOpacity?>">
141
- <span class="js-popup-overlay-opacity-value"><?php echo $overlayOpacity?></span>
142
  </div>
143
  </div>
144
  </div>
@@ -162,7 +162,7 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
162
  <div class="formItem formItem_lessMargin">
163
  <span class="formItem__title"><?php _e('Show background', SG_POPUP_TEXT_DOMAIN)?>:</span>
164
  <div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
165
- <input type="checkbox" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" id="sgpb-show-background" name="sgpb-show-background" <?php echo $popupTypeObj->getOptionValue('sgpb-show-background'); ?>>
166
  <label class="sgpb-onOffSwitch__label" for="sgpb-show-background">
167
  <span class="sgpb-onOffSwitch-inner"></span>
168
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -184,8 +184,8 @@ if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
184
  <div class="slider-wrapper sgpb-display-inline-flex">
185
  <?php $contentOpacity = $popupTypeObj->getOptionValue('sgpb-content-opacity'); ?>
186
  <input type="range" name="sgpb-content-opacity" class="sgpb-range-input js-popup-content-opacity sgpb-margin-right-10"
187
- id="js-popup-content-opacity" min="0.0" step="0.1" max="1" value="<?php echo $contentOpacity?>">
188
- <span class="js-popup-content-opacity-value"><?php echo $contentOpacity?></span>
189
  </div>
190
  </div>
191
  </div>
19
  <?php _e('Force RTL', SG_POPUP_TEXT_DOMAIN)?>:
20
  </label>
21
  <div class="sgpb-onOffSwitch">
22
+ <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-force-rtl" name="sgpb-force-rtl" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-force-rtl')); ?>>
23
  <label class="sgpb-onOffSwitch__label" for="sgpb-force-rtl">
24
  <span class="sgpb-onOffSwitch-inner"></span>
25
  <span class="sgpb-onOffSwitch-switch"></span>
43
  <?php if (empty($removedOptions['sgpb-popup-z-index'])) : ?>
44
  <div class="formItem formItem_itemsCentered">
45
  <span class="formItem__title"><?php _e('Popup z-index', SG_POPUP_TEXT_DOMAIN); ?>:</span>
46
+ <input type="number" min="1" name="sgpb-popup-z-index" id="sgpb-popup-z-index" class="formItem__input formItem__input_sgpb-pixels" value="<?php echo esc_html($popupTypeObj->getOptionValue('sgpb-popup-z-index')); ?>">
47
  <div class="question-mark sgpb-info-icon">B</div>
48
  <div class="sgpb-info-wrapper">
49
  <span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
57
  <span class="formItem__title"><?php _e('Themes', SG_POPUP_TEXT_DOMAIN)?>:</span>
58
  <?php AdminHelper::createRadioButtons($defaultData['theme'], "sgpb-popup-themes", esc_html($popupTheme), true, 'bg_img'); ?>
59
  </div>
60
+ <div class="formItem sgpb-disable-border-wrapper<?php echo esc_attr($hidePopupBorderOption) ;?>">
61
  <span class="formItem__title"><?php _e('Disable popup border', SG_POPUP_TEXT_DOMAIN)?>:</span>
62
  <div class="sgpb-onOffSwitch">
63
+ <input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-disable-border" name="sgpb-disable-border" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-disable-border', true)); ?>>
64
  <label class="sgpb-onOffSwitch__label" for="sgpb-disable-border">
65
  <span class="sgpb-onOffSwitch-inner"></span>
66
  <span class="sgpb-onOffSwitch-switch"></span>
96
  <div class="formItem formItem_lessMargin">
97
  <span class="formItem__title "><?php _e('Enable popup overlay', SG_POPUP_TEXT_DOMAIN)?>:</span>
98
  <div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
99
+ <input type="checkbox" id="sgpb-enable-popup-overlay" name="sgpb-enable-popup-overlay" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-enable-popup-overlay')); ?> <?php echo (!empty($removedOptions['sgpb-enable-popup-overlay'])) ? ' disabled' : '' ?>>
100
  <label class="sgpb-onOffSwitch__label" for="sgpb-enable-popup-overlay">
101
  <span class="sgpb-onOffSwitch-inner"></span>
102
  <span class="sgpb-onOffSwitch-switch"></span>
137
  <?php $overlayOpacity = $popupTypeObj->getOptionValue('sgpb-overlay-opacity'); ?>
138
  <input type="range" class="sgpb-range-input js-popup-overlay-opacity sgpb-margin-right-10"
139
  name="sgpb-overlay-opacity"
140
+ id="js-popup-overlay-opacity" min="0.0" step="0.1" max="1" value="<?php echo esc_html($overlayOpacity)?>">
141
+ <span class="js-popup-overlay-opacity-value"><?php echo esc_html($overlayOpacity)?></span>
142
  </div>
143
  </div>
144
  </div>
162
  <div class="formItem formItem_lessMargin">
163
  <span class="formItem__title"><?php _e('Show background', SG_POPUP_TEXT_DOMAIN)?>:</span>
164
  <div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
165
+ <input type="checkbox" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" id="sgpb-show-background" name="sgpb-show-background" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-show-background')); ?>>
166
  <label class="sgpb-onOffSwitch__label" for="sgpb-show-background">
167
  <span class="sgpb-onOffSwitch-inner"></span>
168
  <span class="sgpb-onOffSwitch-switch"></span>
184
  <div class="slider-wrapper sgpb-display-inline-flex">
185
  <?php $contentOpacity = $popupTypeObj->getOptionValue('sgpb-content-opacity'); ?>
186
  <input type="range" name="sgpb-content-opacity" class="sgpb-range-input js-popup-content-opacity sgpb-margin-right-10"
187
+ id="js-popup-content-opacity" min="0.0" step="0.1" max="1" value="<?php echo esc_html($contentOpacity)?>">
188
+ <span class="js-popup-content-opacity-value"><?php echo esc_html($contentOpacity)?></span>
189
  </div>
190
  </div>
191
  </div>
public/views/popupOpeningCounter.php CHANGED
@@ -8,7 +8,7 @@
8
  <div class="formItem">
9
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Disable popup counting', SG_POPUP_TEXT_DOMAIN)?>:</span>
10
  <div class="sgpb-onOffSwitch">
11
- <input id="sgpb-popup-counting-disabled" class="sgpb-onOffSwitch-checkbox" name="sgpb-popup-counting-disabled" type="checkbox" <?php echo $popupTypeObj->getOptionValue('sgpb-popup-counting-disabled');?>>
12
  <label class="sgpb-onOffSwitch__label" for="sgpb-popup-counting-disabled">
13
  <span class="sgpb-onOffSwitch-inner"></span>
14
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -17,10 +17,10 @@
17
  </div>
18
  <div class="formItem">
19
  <span class="subFormItem__title"><?php _e('Views', SG_POPUP_TEXT_DOMAIN); ?>: </span>
20
- <span class="subFormItem__title sgpb-popup-opening-analytics-option-value-span"> <?php echo $count; ?></span>
21
  </div>
22
  <div class="formItem">
23
- <input onclick="SGPBBackend.resetCount(<?php echo $popupId; ?>, false)" type="button" class="button sgpb-reset-count-btn" value="<?php _e('Reset', SG_POPUP_TEXT_DOMAIN); ?>" <?php echo ($popupId && $count != 0) ? '' : ' disabled' ; ?>>
24
  </div>
25
  </div>
26
  </div>
8
  <div class="formItem">
9
  <span class="formItem__title sgpb-margin-right-20"><?php _e('Disable popup counting', SG_POPUP_TEXT_DOMAIN)?>:</span>
10
  <div class="sgpb-onOffSwitch">
11
+ <input id="sgpb-popup-counting-disabled" class="sgpb-onOffSwitch-checkbox" name="sgpb-popup-counting-disabled" type="checkbox" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-popup-counting-disabled'));?>>
12
  <label class="sgpb-onOffSwitch__label" for="sgpb-popup-counting-disabled">
13
  <span class="sgpb-onOffSwitch-inner"></span>
14
  <span class="sgpb-onOffSwitch-switch"></span>
17
  </div>
18
  <div class="formItem">
19
  <span class="subFormItem__title"><?php _e('Views', SG_POPUP_TEXT_DOMAIN); ?>: </span>
20
+ <span class="subFormItem__title sgpb-popup-opening-analytics-option-value-span"> <?php echo esc_html($count); ?></span>
21
  </div>
22
  <div class="formItem">
23
+ <input onclick="SGPBBackend.resetCount(<?php echo esc_html($popupId); ?>, false)" type="button" class="button sgpb-reset-count-btn" value="<?php _e('Reset', SG_POPUP_TEXT_DOMAIN); ?>" <?php echo ($popupId && $count != 0) ? '' : ' disabled' ; ?>>
24
  </div>
25
  </div>
26
  </div>
public/views/popupTypes.php CHANGED
@@ -31,9 +31,9 @@ $labels = $SGPB_POPUP_TYPES['typeLabels'];
31
  <?php if (defined('SGPB_SUBSCRIPTION_PLUS_CLASSES_PATH') && $type == 'subscription'): ?>
32
  <img src="<?php echo SG_POPUP_PUBLIC_URL.'icons/white/subscriptionPlus.svg' ;?>" class="sgpb-box-img">
33
  <?php else: ?>
34
- <img src="<?php echo SG_POPUP_PUBLIC_URL.'icons/white/'.$type.'.svg' ;?>" class="sgpb-box-img">
35
  <?php endif; ?>
36
- <p class="sgpb-box-text"><?php echo $labels[$type]; ?></p>
37
  <span class="sgpb-box-plus" >L</span>
38
  </div>
39
  <?php endforeach; ?>
31
  <?php if (defined('SGPB_SUBSCRIPTION_PLUS_CLASSES_PATH') && $type == 'subscription'): ?>
32
  <img src="<?php echo SG_POPUP_PUBLIC_URL.'icons/white/subscriptionPlus.svg' ;?>" class="sgpb-box-img">
33
  <?php else: ?>
34
+ <img src="<?php echo SG_POPUP_PUBLIC_URL.'icons/white/'.esc_html($type).'.svg' ;?>" class="sgpb-box-img">
35
  <?php endif; ?>
36
+ <p class="sgpb-box-text"><?php echo esc_html($labels[$type]); ?></p>
37
  <span class="sgpb-box-plus" >L</span>
38
  </div>
39
  <?php endforeach; ?>
public/views/settings.php CHANGED
@@ -24,7 +24,7 @@ $userSavedRoles = get_option('sgpb-user-roles');
24
  <div class="formItem">
25
  <p class="subFormItem__title sgpb-flex-220"><?php _e('Enable DEBUG MODE', SG_POPUP_TEXT_DOMAIN)?>:</p>
26
  <div class="sgpb-onOffSwitch">
27
- <input type="checkbox" name="sgpb-enable-debug-mode" class="sgpb-onOffSwitch-checkbox" id="sgpb-enable-debug-mode" <?php echo $enableDebugMode; ?>>
28
  <label class="sgpb-onOffSwitch__label" for="sgpb-enable-debug-mode">
29
  <span class="sgpb-onOffSwitch-inner"></span>
30
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -34,7 +34,7 @@ $userSavedRoles = get_option('sgpb-user-roles');
34
  <div class="formItem">
35
  <span class="subFormItem__title sgpb-flex-220"><?php _e('Delete popup data', SG_POPUP_TEXT_DOMAIN)?>:</span>
36
  <div class="sgpb-onOffSwitch">
37
- <input type="checkbox" name="sgpb-dont-delete-data" class="sgpb-onOffSwitch-checkbox" id="sgpb-dont-delete-data" <?php echo $deleteData; ?>>
38
  <label class="sgpb-onOffSwitch__label" for="sgpb-dont-delete-data">
39
  <span class="sgpb-onOffSwitch-inner"></span>
40
  <span class="sgpb-onOffSwitch-switch"></span>
@@ -77,7 +77,7 @@ $userSavedRoles = get_option('sgpb-user-roles');
77
  <span class="formItem__title"><?php _e('System information', SG_POPUP_TEXT_DOMAIN)?>:</span>
78
  </div>
79
  <div class="formItem">
80
- <textarea onclick="this.select();" rows="20" class="formItem__textarea" readonly><?php echo $systemInfo ;?></textarea>
81
  </div>
82
  <input type="button" class="sgpb-download-system-info saveCHangeButton sgpb-btn sgpb-btn-blue" value="<?php _e('Download', SG_POPUP_TEXT_DOMAIN)?>">
83
  </div>
24
  <div class="formItem">
25
  <p class="subFormItem__title sgpb-flex-220"><?php _e('Enable DEBUG MODE', SG_POPUP_TEXT_DOMAIN)?>:</p>
26
  <div class="sgpb-onOffSwitch">
27
+ <input type="checkbox" name="sgpb-enable-debug-mode" class="sgpb-onOffSwitch-checkbox" id="sgpb-enable-debug-mode" <?php echo esc_attr($enableDebugMode); ?>>
28
  <label class="sgpb-onOffSwitch__label" for="sgpb-enable-debug-mode">
29
  <span class="sgpb-onOffSwitch-inner"></span>
30
  <span class="sgpb-onOffSwitch-switch"></span>
34
  <div class="formItem">
35
  <span class="subFormItem__title sgpb-flex-220"><?php _e('Delete popup data', SG_POPUP_TEXT_DOMAIN)?>:</span>
36
  <div class="sgpb-onOffSwitch">
37
+ <input type="checkbox" name="sgpb-dont-delete-data" class="sgpb-onOffSwitch-checkbox" id="sgpb-dont-delete-data" <?php echo esc_attr($deleteData); ?>>
38
  <label class="sgpb-onOffSwitch__label" for="sgpb-dont-delete-data">
39
  <span class="sgpb-onOffSwitch-inner"></span>
40
  <span class="sgpb-onOffSwitch-switch"></span>
77
  <span class="formItem__title"><?php _e('System information', SG_POPUP_TEXT_DOMAIN)?>:</span>
78
  </div>
79
  <div class="formItem">
80
+ <textarea onclick="this.select();" rows="20" class="formItem__textarea" readonly><?php echo esc_textarea($systemInfo) ;?></textarea>
81
  </div>
82
  <input type="button" class="sgpb-download-system-info saveCHangeButton sgpb-btn sgpb-btn-blue" value="<?php _e('Download', SG_POPUP_TEXT_DOMAIN)?>">
83
  </div>
public/views/subscribers.php CHANGED
@@ -133,7 +133,7 @@ if ($isEmpty) {
133
  </div>
134
  <div id="importSubscriberFooter">
135
  <input type="button" value="<?php _e('Import', SG_POPUP_TEXT_DOMAIN); ?>"
136
- class="sgpb-btn sgpb-btn-blue sgpb-import-subscriber-to-list" data-ajaxnonce="popupBuilderAjaxNonce" <?php echo $disable; ?>>
137
  </div>
138
  </div>
139
 
133
  </div>
134
  <div id="importSubscriberFooter">
135
  <input type="button" value="<?php _e('Import', SG_POPUP_TEXT_DOMAIN); ?>"
136
+ class="sgpb-btn sgpb-btn-blue sgpb-import-subscriber-to-list" data-ajaxnonce="popupBuilderAjaxNonce" <?php echo esc_attr($disable); ?>>
137
  </div>
138
  </div>
139
 
public/views/targetView.php CHANGED
@@ -15,4 +15,4 @@ $type = (!empty($_GET['sgpb_type'])) ? sanitize_text_field($_GET['sgpb_type']) :
15
 
16
  <input type="hidden" name="sgpb-type" value="<?php echo esc_html($type); ?>">
17
  <input id="sgpb-is-preview" type="hidden" name="sgpb-is-preview" value="0" autocomplete="off">
18
- <input id="sgpb-is-active" type="hidden" name="sgpb-is-active" value="<?php echo $popupTypeObj->getOptionValue('sgpb-is-active'); ?>" autocomplete="off">
15
 
16
  <input type="hidden" name="sgpb-type" value="<?php echo esc_html($type); ?>">
17
  <input id="sgpb-is-preview" type="hidden" name="sgpb-is-preview" value="0" autocomplete="off">
18
+ <input id="sgpb-is-active" type="hidden" name="sgpb-is-active" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-is-active')); ?>" autocomplete="off">
readme.txt CHANGED
@@ -8,7 +8,7 @@ Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wo
8
  Requires at least: 4.2
9
  Tested up to: 5.8
10
  Requires PHP: 5.3.3
11
- Stable tag: 4.0.7
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
@@ -145,6 +145,9 @@ Go to the Popup Builder settings and set your desired options.
145
 
146
  == Changelog ==
147
 
 
 
 
148
  = Version 4.0.7 =
149
  * Bug fixed related to export of subscribers
150
  * Bug fixed related to sgpb_type parameter
@@ -488,4 +491,4 @@ Leave us a good review :)
488
 
489
  == Upgrade Notice ==
490
 
491
- Current Version of Popup Builder is 4.0.7
8
  Requires at least: 4.2
9
  Tested up to: 5.8
10
  Requires PHP: 5.3.3
11
+ Stable tag: 4.0.8
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
145
 
146
  == Changelog ==
147
 
148
+ = Version 4.0.8 =
149
+ * Security improvements and fixes.
150
+
151
  = Version 4.0.7 =
152
  * Bug fixed related to export of subscribers
153
  * Bug fixed related to sgpb_type parameter
491
 
492
  == Upgrade Notice ==
493
 
494
+ Current Version of Popup Builder is 4.0.8