| @@ -233,17 +233,9 @@ | ||
| 233 | 233 | $this->dashboard_js(); |
| 234 | 234 | break; |
| 235 | 235 | case WP_Data_Access_Admin::PAGE_MAIN: |
| 236 | 236 | if ( !isset( $_REQUEST['page_action'] ) ) { |
| 237 | - if ( !isset( $_REQUEST['table_name'] ) ) { | |
| 238 | - $this->toolbar_wpda(); | |
| 239 | - } else { | |
| 240 | - if ( !isset( $_REQUEST['action'] ) || 'new' !== $_REQUEST['action'] && 'edit' !== $_REQUEST['action'] ) { | |
| 241 | - $this->toolbar_wpda_table(); | |
| 242 | - } else { | |
| 243 | - $this->toolbar_wpda_row(); | |
| 244 | - } | |
| 245 | - } | |
| 237 | + $this->toolbar_wpda(); | |
| 246 | 238 | } elseif ( 'wpda_backup' === $_REQUEST['page_action'] && (!isset( $_REQUEST['action'] ) || 'remove' === $_REQUEST['action'] || 'update' === $_REQUEST['action'] || 'add' === $_REQUEST['action']) ) { |
| 247 | 239 | $this->toolbar_backup(); |
| 248 | 240 | } elseif ( 'wpda_import_csv' === $_REQUEST['page_action'] ) { |
| 249 | 241 | $this->toolbar_import_csv(); |
| @@ -1006,109 +998,8 @@ | ||
| 1006 | 998 | <?php |
| 1007 | 999 | } |
| 1008 | 1000 | |
| 1009 | 1001 | /** |
| 1010 | - * Data Explorer table page toolbar | |
| 1011 | - * | |
| 1012 | - * @return void | |
| 1013 | - */ | |
| 1014 | - protected function toolbar_wpda_table() { | |
| 1015 | - ?> | |
| 1016 | - <form id="wpda_new_row" style="display: none" method="post" action="?page=<?php | |
| 1017 | - echo esc_attr( WP_Data_Access_Admin::PAGE_MAIN ); | |
| 1018 | - ?>"> | |
| 1019 | - <?php | |
| 1020 | - if ( isset( $_REQUEST['wpdaschema_name'] ) ) { | |
| 1021 | - $schema_name = esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['wpdaschema_name'] ) ) ); | |
| 1022 | - // phpcs:disable WordPress.Security.EscapeOutput | |
| 1023 | - echo "<input type='hidden' name='wpdaschema_name' value='{$schema_name}'>"; | |
| 1024 | - // phpcs:enable WordPress.Security.EscapeOutput | |
| 1025 | - } | |
| 1026 | - ?> | |
| 1027 | - <input type="hidden" id="wpda_new_row_table_name" name="table_name" value=""> | |
| 1028 | - <input type="hidden" name="action" value="new"> | |
| 1029 | - </form> | |
| 1030 | - <div id="wpda-dashboard-toolbar" class="wpda-dashboard-toolbar" style="display:none"> | |
| 1031 | - <div class="wpda-nowrap"> | |
| 1032 | - <div> | |
| 1033 | - <div> | |
| 1034 | - <a href="javascript:void(0)" | |
| 1035 | - id="wpda_toolbar_icon_add_row" | |
| 1036 | - class="wpda-dashboard-item wpda_tooltip" | |
| 1037 | - title="Add new row to table" | |
| 1038 | - > | |
| 1039 | - <i class="fas fa-plus-circle"></i> | |
| 1040 | - <div> | |
| 1041 | - Add row | |
| 1042 | - </div> | |
| 1043 | - </a> | |
| 1044 | - </div><div> | |
| 1045 | - <a onclick="jQuery('#upload_file_container').show()" | |
| 1046 | - href="javascript:void(0)" | |
| 1047 | - class="wpda-dashboard-item wpda_tooltip" | |
| 1048 | - title="Allows only imports into table authors" | |
| 1049 | - > | |
| 1050 | - <i class="fas fa-code"></i> | |
| 1051 | - <div> | |
| 1052 | - Import rows | |
| 1053 | - </div> | |
| 1054 | - </a> | |
| 1055 | - </div> | |
| 1056 | - </div> | |
| 1057 | - </div> | |
| 1058 | - <?php | |
| 1059 | - $this->get_promotions( 'table' ); | |
| 1060 | - ?> | |
| 1061 | - </div> | |
| 1062 | - <?php | |
| 1063 | - } | |
| 1064 | - | |
| 1065 | - /** | |
| 1066 | - * Data Explorer data entry form toolbar | |
| 1067 | - * | |
| 1068 | - * @return void | |
| 1069 | - */ | |
| 1070 | - protected function toolbar_wpda_row() { | |
| 1071 | - ?> | |
| 1072 | - <form id="wpda_new_row" style="display: none" method="post" action="?page=<?php | |
| 1073 | - echo esc_attr( WP_Data_Access_Admin::PAGE_MAIN ); | |
| 1074 | - ?>"> | |
| 1075 | - <?php | |
| 1076 | - if ( isset( $_REQUEST['wpdaschema_name'] ) ) { | |
| 1077 | - $schema_name = esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['wpdaschema_name'] ) ) ); | |
| 1078 | - // phpcs:disable WordPress.Security.EscapeOutput | |
| 1079 | - echo "<input type='hidden' name='wpdaschema_name' value='{$schema_name}'>"; | |
| 1080 | - // phpcs:enable WordPress.Security.EscapeOutput | |
| 1081 | - } | |
| 1082 | - ?> | |
| 1083 | - <input type="hidden" id="wpda_new_row_table_name" name="table_name" value=""> | |
| 1084 | - <input type="hidden" name="action" value="new"> | |
| 1085 | - </form> | |
| 1086 | - <div id="wpda-dashboard-toolbar" class="wpda-dashboard-toolbar" style="display:none"> | |
| 1087 | - <div class="wpda-nowrap"> | |
| 1088 | - <div> | |
| 1089 | - <div> | |
| 1090 | - <a href="javascript:void(0)" | |
| 1091 | - id="wpda_toolbar_icon_add_row" | |
| 1092 | - class="wpda-dashboard-item wpda_tooltip" | |
| 1093 | - title="Add new row to table" | |
| 1094 | - > | |
| 1095 | - <i class="fas fa-plus-circle"></i> | |
| 1096 | - <div> | |
| 1097 | - Add row | |
| 1098 | - </div> | |
| 1099 | - </a> | |
| 1100 | - </div> | |
| 1101 | - </div> | |
| 1102 | - </div> | |
| 1103 | - <?php | |
| 1104 | - $this->get_promotions( 'row' ); | |
| 1105 | - ?> | |
| 1106 | - </div> | |
| 1107 | - <?php | |
| 1108 | - } | |
| 1109 | - | |
| 1110 | - /** | |
| 1111 | 1002 | * Data Backup toolbar |
| 1112 | 1003 | * |
| 1113 | 1004 | * @return void |
| 1114 | 1005 | */ |
| @@ -1290,9 +1181,9 @@ | ||
| 1290 | 1181 | Create table design |
| 1291 | 1182 | </div> |
| 1292 | 1183 | </a> |
| 1293 | 1184 | </div><div> |
| 1294 | - <a onclick="jQuery('#upload_file_container').show()" | |
| 1185 | + <a onclick="alert('This feature has been removed. Please use the Data Explorer import feature.')" | |
| 1295 | 1186 | href="javascript:void(0)" |
| 1296 | 1187 | class="wpda-dashboard-item wpda_tooltip" |
| 1297 | 1188 | title="Import table designs" |
| 1298 | 1189 | > |
| @@ -1338,9 +1229,9 @@ | ||
| 1338 | 1229 | Create data table |
| 1339 | 1230 | </div> |
| 1340 | 1231 | </a> |
| 1341 | 1232 | </div><div> |
| 1342 | - <a onclick="jQuery('#upload_file_container').show()" | |
| 1233 | + <a onclick="alert('This feature has been removed. Please use the Data Explorer import feature.')" | |
| 1343 | 1234 | href="javascript:void(0)" |
| 1344 | 1235 | class="wpda-dashboard-item wpda_tooltip" |
| 1345 | 1236 | title="Import data tables" |
| 1346 | 1237 | > |
| @@ -1397,9 +1288,9 @@ | ||
| 1397 | 1288 | Create project |
| 1398 | 1289 | </div> |
| 1399 | 1290 | </a> |
| 1400 | 1291 | </div><div> |
| 1401 | - <a onclick="jQuery('#upload_file_container_multi').show()" | |
| 1292 | + <a onclick="jQuery(alert('This feature has been removed. Please use the Data Explorer import feature.')).show()" | |
| 1402 | 1293 | href="javascript:void(0)" |
| 1403 | 1294 | class="wpda-dashboard-item wpda_tooltip" |
| 1404 | 1295 | title="Import projects" |
| 1405 | 1296 | > |