PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / trunk
Search Atlas SEO – OTTO AI SEO Automation for WordPress vtrunk
2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 2.6.4 2.6.3 2.5.23 All 138 releases
metasync / views / metasync-report-issue.php

metasync-report-issue.php in Search Atlas SEO – OTTO AI SEO Automation for WordPress trunk, at views/metasync-report-issue.php

535 lines 17.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Report Issue admin page view
4 *
5 * @link https://searchatlas.com
6 * @since 1.0.0
7 *
8 * @package Metasync
9 * @subpackage Metasync/views
10 */
11
12 if (!defined('ABSPATH')) {
13 exit; // Exit if accessed directly
14 }
15
16 $plugin_name = Metasync::get_effective_plugin_name();
17
18 # Get general options (same way as used throughout the plugin)
19 $general_options = Metasync::get_option('general');
20 if (!is_array($general_options)) {
21 $general_options = array();
22 }
23 $project_uuid = isset($general_options['otto_pixel_uuid']) ? sanitize_text_field($general_options['otto_pixel_uuid']) : '';
24
25 # Get WordPress and plugin information with error handling
26 global $wp_version;
27 $active_theme = wp_get_theme();
28 $theme_name = is_object($active_theme) ? $active_theme->get('Name') : get_template();
29
30 # Collect system information
31 $system_info = array(
32 'website_url' => esc_url(home_url()),
33 'site_title' => esc_html(get_bloginfo('name')),
34 'admin_email' => sanitize_email(get_bloginfo('admin_email')),
35 'plugin_version' => defined('METASYNC_VERSION') ? esc_html(METASYNC_VERSION) : '1.0.0',
36 'wordpress_version' => esc_html($wp_version),
37 'php_version' => esc_html(PHP_VERSION),
38 'active_theme' => esc_html($theme_name),
39 'memory_limit' => esc_html(ini_get('memory_limit')),
40 'multisite' => is_multisite() ? 'Yes' : 'No'
41 );
42 ?>
43
44 <?php $this->render_layout_open('Report Issue', 'report_issue', 'Submit a support ticket or report a bug to our team.'); ?>
45
46 <div class="metasync-report-issue-container">
47
48 <!-- System Information Card -->
49 <div class="dashboard-card metasync-system-info-card">
50 <h2>System Information</h2>
51 <p>This information will be automatically included with your report.</p>
52
53 <div class="metasync-system-info-grid">
54 <div class="metasync-info-item">
55 <span class="metasync-info-label">Website URL:</span>
56 <span class="metasync-info-value"><?php echo esc_html($system_info['website_url']); ?></span>
57 </div>
58 <div class="metasync-info-item">
59 <span class="metasync-info-label">Plugin Version:</span>
60 <span class="metasync-info-value"><?php echo esc_html($system_info['plugin_version']); ?></span>
61 </div>
62 <div class="metasync-info-item">
63 <span class="metasync-info-label">WordPress Version:</span>
64 <span class="metasync-info-value"><?php echo esc_html($system_info['wordpress_version']); ?></span>
65 </div>
66 <div class="metasync-info-item">
67 <span class="metasync-info-label">PHP Version:</span>
68 <span class="metasync-info-value"><?php echo esc_html($system_info['php_version']); ?></span>
69 </div>
70 <div class="metasync-info-item">
71 <span class="metasync-info-label">Active Theme:</span>
72 <span class="metasync-info-value"><?php echo esc_html($system_info['active_theme']); ?></span>
73 </div>
74 <div class="metasync-info-item">
75 <span class="metasync-info-label">Project UUID:</span>
76 <span class="metasync-info-value metasync-uuid-value">
77 <?php if (!empty($project_uuid)): ?>
78 <?php echo esc_html($project_uuid); ?>
79 <?php else: ?>
80 <em style="opacity: 0.6;">Not configured yet</em>
81 <?php endif; ?>
82 </span>
83 </div>
84 </div>
85 </div>
86
87 <!-- Report Form Card -->
88 <div class="dashboard-card metasync-report-form-card">
89 <h2>Report an Issue</h2>
90 <p>Describe the issue you're experiencing and we'll receive it in our monitoring system.</p>
91
92 <?php if (!empty($project_uuid)): ?>
93 <div class="metasync-report-title-info">
94 <p><strong>Report Title:</strong> <code>Client Report <?php echo esc_html($project_uuid); ?></code></p>
95 <p class="metasync-form-help-text" style="margin-top: 5px;">This standardized title helps us prioritize your issue in our monitoring system.</p>
96 </div>
97 <?php endif; ?>
98
99 <form id="metasync-report-issue-form" method="post">
100 <?php wp_nonce_field('metasync_report_issue', 'metasync_report_issue_nonce'); ?>
101
102 <div class="metasync-form-group">
103 <label for="metasync_issue_message" class="metasync-form-label">
104 <strong>Issue Description</strong>
105 <span class="metasync-required-badge">Required</span>
106 </label>
107 <textarea
108 id="metasync_issue_message"
109 name="issue_message"
110 class="metasync-form-textarea"
111 placeholder="Please describe the issue in detail. Include any error messages, steps to reproduce, or relevant information..."
112 rows="8"
113 maxlength="1000"
114 required
115 ></textarea>
116 <span id="metasync_char_counter" class="metasync-char-counter">0/1000</span>
117 <div class="metasync-char-counter-wrapper">
118 <p class="metasync-form-help-text">Minimum 10 characters, maximum 1000 characters</p>
119 </div>
120 </div>
121
122 <div class="metasync-form-group">
123 <label for="metasync_issue_severity" class="metasync-form-label">
124 <strong>Severity Level</strong>
125 </label>
126 <select id="metasync_issue_severity" name="issue_severity" class="metasync-form-select">
127 <option value="info">Info - General question or feedback</option>
128 <option value="warning" selected>Warning - Non-critical issue</option>
129 <option value="error">Error - Affecting functionality</option>
130 <option value="fatal">Critical - Site breaking issue</option>
131 </select>
132 </div>
133
134 <div class="metasync-form-group">
135 <label for="metasync_issue_attachment" class="metasync-form-label">
136 <strong>Attachment</strong>
137 <span class="metasync-optional-badge">Optional</span>
138 </label>
139 <input
140 type="file"
141 id="metasync_issue_attachment"
142 name="issue_attachment"
143 class="metasync-form-file-input"
144 accept="image/jpeg,image/jpg,image/png,image/gif,image/webp"
145 />
146 <p class="metasync-form-help-text">Upload a screenshot or image (JPEG, PNG, GIF, WebP). Max 5MB.</p>
147 </div>
148
149 <div class="metasync-form-group">
150 <label class="metasync-checkbox-label">
151 <input type="checkbox" id="metasync_include_user_info" name="include_user_info" checked />
152 <span>Include current user information (username, email)</span>
153 </label>
154 </div>
155
156 <div class="metasync-form-actions">
157 <button type="submit" class="button button-primary button-large" id="metasync-submit-report-btn">
158 <span class="metasync-btn-text"><span class="dashicons dashicons-upload" style="margin-top:9px;font-size:15px;width:15px;height:15px;"></span> Submit Report</span>
159 <span class="metasync-btn-loading">
160 <span class="spinner is-active metasync-spinner"></span>
161 Sending...
162 </span>
163 </button>
164 </div>
165
166 <div id="metasync-report-response-message" class="metasync-report-response"></div>
167 </form>
168 </div>
169
170 <!-- Help Card -->
171 <div class="dashboard-card metasync-help-card">
172 <h3>Tips for Reporting Issues</h3>
173 <ul class="metasync-help-list">
174 <li>�
175 Be as specific as possible about the issue</li>
176 <li>�
177 Include steps to reproduce the problem</li>
178 <li>�
179 Mention any error messages you see</li>
180 <li>�
181 Include screen recording video link if possible (e.g., Loom, Jam.dev, or similar)</li>
182 <li>�
183 Note when the issue started occurring</li>
184 </ul>
185 </div>
186
187 </div>
188
189 <?php $this->render_layout_close(); ?>
190
191 <style>
192 /* MetaSync Report Issue Styles - Matches plugin theme */
193 .metasync-report-issue-container {
194 max-width: 1200px;
195 margin: 20px 0;
196 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
197 }
198
199 /* Card styling matching plugin dashboard cards */
200 .metasync-report-issue-container .dashboard-card {
201 background: var(--dashboard-card-bg, #1a1f26);
202 border: 1px solid var(--dashboard-border, #374151);
203 border-radius: 12px;
204 padding: 28px;
205 margin-bottom: 24px;
206 box-shadow: var(--dashboard-shadow, 0 10px 15px -3px rgba(0, 0, 0, 0.3));
207 transition: none; /* No hover effect */
208 }
209
210 .metasync-report-issue-container .dashboard-card h2 {
211 margin-top: 0;
212 margin-bottom: 12px;
213 font-size: 22px;
214 font-weight: 600;
215 color: var(--dashboard-text-primary, #ffffff);
216 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
217 }
218
219 .metasync-report-issue-container .dashboard-card h3 {
220 margin-top: 0;
221 margin-bottom: 12px;
222 font-size: 18px;
223 font-weight: 600;
224 color: var(--dashboard-text-primary, #ffffff);
225 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
226 }
227
228 .metasync-report-issue-container .dashboard-card p {
229 color: var(--dashboard-text-secondary, #9ca3af);
230 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
231 }
232
233 .metasync-system-info-grid {
234 display: grid;
235 grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
236 gap: 16px;
237 }
238
239 .metasync-info-item {
240 display: flex;
241 flex-direction: column;
242 padding: 16px;
243 background: rgba(59, 130, 246, 0.1);
244 border-radius: 8px;
245 border-left: 3px solid var(--dashboard-accent, #3b82f6);
246 transition: none; /* No hover effect */
247 }
248
249 .metasync-info-label {
250 font-weight: 600;
251 color: var(--dashboard-text-primary, #ffffff);
252 font-size: 13px;
253 margin-bottom: 6px;
254 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
255 }
256
257 .metasync-info-value {
258 color: var(--dashboard-text-secondary, #9ca3af);
259 font-size: 14px;
260 word-break: break-all;
261 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
262 }
263
264 .metasync-report-title-info {
265 padding: 16px;
266 background: rgba(59, 130, 246, 0.08);
267 border-radius: 8px;
268 border: 1px solid rgba(59, 130, 246, 0.2);
269 margin-bottom: 24px;
270 }
271
272 .metasync-report-title-info p {
273 margin: 0;
274 color: var(--dashboard-text-primary, #ffffff);
275 font-size: 14px;
276 }
277
278 .metasync-report-title-info code {
279 background: rgba(0, 0, 0, 0.3);
280 padding: 4px 10px;
281 border-radius: 4px;
282 font-family: 'Courier New', monospace;
283 color: var(--dashboard-accent, #3b82f6);
284 font-size: 13px;
285 }
286
287 .metasync-form-group {
288 margin-bottom: 24px;
289 }
290
291 .metasync-form-label {
292 display: block;
293 margin-bottom: 8px;
294 font-size: 14px;
295 font-weight: 500;
296 color: var(--dashboard-text-primary, #ffffff);
297 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
298 }
299
300 .metasync-required-badge {
301 color: var(--dashboard-error, #ef4444);
302 font-size: 12px;
303 font-weight: normal;
304 margin-left: 6px;
305 }
306
307 .metasync-optional-badge {
308 color: var(--dashboard-text-secondary, #9ca3af);
309 font-size: 12px;
310 font-weight: normal;
311 margin-left: 6px;
312 }
313
314 .metasync-form-input,
315 .metasync-form-textarea,
316 .metasync-form-select {
317 width: 100%;
318 padding: 12px 16px;
319 font-size: 14px;
320 border: 1px solid var(--dashboard-border, #374151);
321 border-radius: 8px;
322 box-sizing: border-box;
323 background: rgba(15, 20, 25, 0.5);
324 color: var(--dashboard-text-primary, #ffffff);
325 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
326 transition: border-color 0.2s ease;
327 }
328
329 .metasync-form-input:focus,
330 .metasync-form-textarea:focus,
331 .metasync-form-select:focus {
332 border-color: var(--dashboard-accent, #3b82f6);
333 outline: none;
334 box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
335 }
336
337 .metasync-form-input::placeholder,
338 .metasync-form-textarea::placeholder {
339 color: var(--dashboard-text-secondary, #9ca3af);
340 opacity: 0.6;
341 }
342
343 .metasync-form-textarea {
344 resize: vertical;
345 min-height: 150px;
346 line-height: 1.6;
347 }
348
349 .metasync-form-select {
350 cursor: pointer;
351 color: #ffffff !important;
352 }
353
354 .metasync-form-select option {
355 color: #ffffff;
356 background: var(--dashboard-card-bg, #1a1f26);
357 }
358
359 .metasync-form-file-input {
360 display: block;
361 padding: 12px 16px;
362 font-size: 14px;
363 border: 1px solid var(--dashboard-border, #374151);
364 border-radius: 8px;
365 box-sizing: border-box;
366 background: rgba(15, 20, 25, 0.5);
367 color: var(--dashboard-text-primary, #ffffff);
368 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
369 cursor: pointer;
370 }
371
372 .metasync-form-file-input::-webkit-file-upload-button {
373 background: var(--dashboard-accent, #3b82f6);
374 color: #ffffff;
375 border: none;
376 padding: 8px 16px;
377 border-radius: 6px;
378 cursor: pointer;
379 font-size: 13px;
380 font-weight: 500;
381 margin-right: 12px;
382 }
383
384 .metasync-form-file-input::-webkit-file-upload-button:hover {
385 background: var(--dashboard-accent-hover, #2563eb);
386 }
387
388 .metasync-form-file-input::file-selector-button {
389 background: var(--dashboard-accent, #3b82f6);
390 color: #ffffff;
391 border: none;
392 padding: 8px 16px;
393 border-radius: 6px;
394 cursor: pointer;
395 font-size: 13px;
396 font-weight: 500;
397 margin-right: 12px;
398 }
399
400 .metasync-form-file-input::file-selector-button:hover {
401 background: var(--dashboard-accent-hover, #2563eb);
402 }
403
404 .metasync-form-help-text {
405 margin: 8px 0 0 0;
406 font-size: 13px;
407 color: var(--dashboard-text-secondary, #9ca3af);
408 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
409 }
410
411 .metasync-char-counter-wrapper {
412 margin-top: 8px;
413 }
414
415 .metasync-char-counter {
416 display: block;
417 font-size: 13px;
418 color: var(--dashboard-text-secondary, #9ca3af);
419 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
420 margin-top: 4px;
421 }
422
423 .metasync-char-counter-warning {
424 color: #f59e0b;
425 }
426
427 .metasync-char-counter-limit {
428 color: var(--dashboard-error, #ef4444);
429 font-weight: 600;
430 }
431
432 .metasync-checkbox-label {
433 display: flex;
434 align-items: center;
435 cursor: pointer;
436 font-size: 14px;
437 color: var(--dashboard-text-primary, #ffffff);
438 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
439 }
440
441 .metasync-checkbox-label input[type="checkbox"] {
442 margin-right: 10px;
443 width: 18px;
444 height: 18px;
445 cursor: pointer;
446 }
447
448 .metasync-report-issue-container .button-large {
449 padding: 12px 28px;
450 height: auto;
451 font-size: 15px;
452 font-weight: 600;
453 border-radius: 8px;
454 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
455 transition: opacity 0.2s ease;
456 }
457
458 .metasync-report-issue-container .button-large:disabled {
459 opacity: 0.6;
460 cursor: not-allowed;
461 }
462
463 .metasync-btn-loading {
464 display: flex;
465 align-items: center;
466 }
467
468 .metasync-report-response {
469 margin-top: 24px;
470 padding: 16px 20px;
471 border-radius: 8px;
472 font-size: 14px;
473 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
474 font-weight: 500;
475 }
476
477 .metasync-report-response.success {
478 background: rgba(16, 185, 129, 0.15);
479 border: 1px solid var(--dashboard-success, #10b981);
480 color: var(--dashboard-success, #10b981);
481 }
482
483 .metasync-report-response.error {
484 background: rgba(239, 68, 68, 0.15);
485 border: 1px solid var(--dashboard-error, #ef4444);
486 color: var(--dashboard-error, #ef4444);
487 }
488
489 .metasync-help-list {
490 margin: 16px 0;
491 padding-left: 24px;
492 }
493
494 .metasync-help-list li {
495 margin-bottom: 10px;
496 color: var(--dashboard-text-secondary, #9ca3af);
497 line-height: 1.7;
498 font-size: 14px;
499 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
500 }
501
502 /* UUID value styling */
503 .metasync-uuid-value {
504 font-family: 'Courier New', monospace;
505 font-size: 12px;
506 }
507
508 /* Button loading state */
509 .metasync-btn-loading {
510 display: none;
511 }
512
513 .metasync-btn-loading .metasync-spinner {
514 float: none;
515 margin: 0 5px 0 0;
516 }
517
518 /* Response message hidden by default */
519 .metasync-report-response {
520 display: none;
521 }
522
523 @media (max-width: 768px) {
524 .metasync-system-info-grid {
525 grid-template-columns: 1fr;
526 }
527
528 .metasync-report-issue-container .dashboard-card {
529 padding: 20px;
530 }
531 }
532 </style>
533
534
535