-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.html
More file actions
785 lines (740 loc) · 28.4 KB
/
contact.html
File metadata and controls
785 lines (740 loc) · 28.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AgentBox - Contact & Support</title>
<meta name="description" content="Get help with AgentBox. Submit a support ticket, browse common solutions, or connect with the community.">
<style>
:root {
--bg: #0a0a0a;
--surface: #141414;
--surface-2: #1e1e1e;
--surface-3: #252525;
--border: #2a2a2a;
--text: #e8e8e8;
--text-muted: #888;
--accent: #00d4ff;
--accent-light: #66e5ff;
--accent-bg: #00d4ff15;
--green: #00b894;
--green-bg: #00b89422;
--yellow: #fdcb6e;
--orange: #e17055;
--purple: #6c5ce7;
--purple-bg: #6c5ce722;
--red: #d63031;
--radius: 12px;
--radius-sm: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
min-height: 100vh;
}
/* Header */
.header {
text-align: center;
padding: 60px 20px 40px;
border-bottom: 1px solid var(--border);
}
.header a.back {
display: inline-block;
color: var(--accent);
text-decoration: none;
font-size: 0.9rem;
margin-bottom: 16px;
}
.header a.back:hover { text-decoration: underline; }
.header h1 {
font-size: 2.2rem;
font-weight: 700;
margin-bottom: 8px;
}
.header p {
color: var(--text-muted);
font-size: 1.1rem;
max-width: 550px;
margin: 0 auto;
}
/* Container */
.container {
max-width: 900px;
margin: 0 auto;
padding: 40px 20px 80px;
}
/* Quick Help Cards */
.quick-help {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
margin-bottom: 48px;
}
.quick-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 24px 20px;
text-align: center;
text-decoration: none;
color: var(--text);
transition: all 0.2s;
cursor: pointer;
}
.quick-card:hover {
border-color: var(--accent);
background: var(--surface-2);
transform: translateY(-2px);
}
.quick-card .icon {
font-size: 2rem;
margin-bottom: 10px;
}
.quick-card h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 4px;
}
.quick-card p {
color: var(--text-muted);
font-size: 0.85rem;
}
/* Section Titles */
.section-title {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 8px;
}
.section-desc {
color: var(--text-muted);
margin-bottom: 24px;
}
/* Ticket Form */
.ticket-form {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 32px;
margin-bottom: 48px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
font-weight: 600;
font-size: 0.9rem;
margin-bottom: 6px;
}
.form-group label .required {
color: var(--red);
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
padding: 12px 14px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text);
font-size: 0.95rem;
font-family: inherit;
outline: none;
transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
border-color: var(--accent);
}
.form-group textarea {
min-height: 120px;
resize: vertical;
}
.form-group select {
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 14px center;
padding-right: 36px;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
@media (max-width: 600px) {
.form-row { grid-template-columns: 1fr; }
}
.form-group .hint {
color: var(--text-muted);
font-size: 0.8rem;
margin-top: 4px;
}
.form-group .char-count {
color: var(--text-muted);
font-size: 0.8rem;
text-align: right;
margin-top: 4px;
}
/* Attachment area */
.attachment-area {
border: 2px dashed var(--border);
border-radius: var(--radius-sm);
padding: 24px;
text-align: center;
color: var(--text-muted);
cursor: pointer;
transition: all 0.2s;
position: relative;
}
.attachment-area:hover {
border-color: var(--accent);
color: var(--accent-light);
}
.attachment-area input[type="file"] {
position: absolute;
inset: 0;
opacity: 0;
cursor: pointer;
}
.attachment-area .icon { font-size: 1.5rem; margin-bottom: 6px; }
.attachment-list {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.attachment-chip {
background: var(--surface-3);
border: 1px solid var(--border);
border-radius: 20px;
padding: 4px 12px;
font-size: 0.8rem;
display: flex;
align-items: center;
gap: 6px;
}
.attachment-chip .remove {
cursor: pointer;
color: var(--text-muted);
font-weight: bold;
}
.attachment-chip .remove:hover { color: var(--red); }
/* Submit Button */
.submit-btn {
background: linear-gradient(135deg, var(--accent), var(--purple));
color: #fff;
border: none;
border-radius: var(--radius-sm);
padding: 14px 32px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
width: 100%;
transition: all 0.2s;
}
.submit-btn:hover {
opacity: 0.9;
transform: translateY(-1px);
}
.submit-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
/* Success message */
.success-msg {
display: none;
text-align: center;
padding: 40px 20px;
}
.success-msg.show { display: block; }
.success-msg .checkmark {
font-size: 3rem;
margin-bottom: 12px;
}
.success-msg h3 {
font-size: 1.3rem;
margin-bottom: 8px;
}
.success-msg p { color: var(--text-muted); }
.success-msg .ticket-id {
display: inline-block;
background: var(--accent-bg);
color: var(--accent);
font-weight: 600;
padding: 6px 16px;
border-radius: 20px;
margin-top: 12px;
font-family: monospace;
font-size: 0.95rem;
}
/* Common Solutions */
.solutions-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 16px;
margin-bottom: 48px;
}
.solution-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
cursor: pointer;
transition: all 0.2s;
}
.solution-card:hover {
border-color: var(--accent);
}
.solution-card h4 {
font-size: 0.95rem;
margin-bottom: 6px;
display: flex;
align-items: center;
gap: 8px;
}
.solution-card p {
color: var(--text-muted);
font-size: 0.85rem;
}
.solution-card .steps {
display: none;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border);
font-size: 0.85rem;
color: var(--text-muted);
}
.solution-card .steps ol {
padding-left: 18px;
}
.solution-card .steps li {
margin-bottom: 6px;
}
.solution-card.expanded .steps { display: block; }
/* Community Links */
.community-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
margin-bottom: 48px;
}
.community-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
text-align: center;
text-decoration: none;
color: var(--text);
transition: all 0.2s;
}
.community-card:hover {
border-color: var(--accent);
transform: translateY(-2px);
}
.community-card .icon { font-size: 1.8rem; margin-bottom: 8px; }
.community-card h4 { font-size: 0.95rem; margin-bottom: 4px; }
.community-card p { color: var(--text-muted); font-size: 0.8rem; }
/* Response Time Badges */
.response-times {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 48px;
justify-content: center;
}
.rt-badge {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px 24px;
text-align: center;
min-width: 140px;
}
.rt-badge .time {
font-size: 1.4rem;
font-weight: 700;
color: var(--accent);
}
.rt-badge .label {
font-size: 0.8rem;
color: var(--text-muted);
margin-top: 2px;
}
/* Footer */
.footer {
text-align: center;
padding: 30px 20px;
border-top: 1px solid var(--border);
color: var(--text-muted);
font-size: 0.85rem;
}
.footer a {
color: var(--accent);
text-decoration: none;
}
.footer a:hover { text-decoration: underline; }
</style>
</head>
<body>
<div class="header">
<a href="index.html" class="back">← Back to AgentBox</a>
<h1>📬 Contact & Support</h1>
<p>Need help? Submit a ticket, browse common solutions, or connect with our community.</p>
</div>
<div class="container">
<!-- Response Times -->
<div class="response-times">
<div class="rt-badge">
<div class="time">< 4h</div>
<div class="label">Critical Issues</div>
</div>
<div class="rt-badge">
<div class="time">< 24h</div>
<div class="label">General Support</div>
</div>
<div class="rt-badge">
<div class="time">< 48h</div>
<div class="label">Feature Requests</div>
</div>
<div class="rt-badge">
<div class="time">99.9%</div>
<div class="label">Satisfaction Rate</div>
</div>
</div>
<!-- Quick Help -->
<div class="quick-help">
<a href="faq.html" class="quick-card">
<div class="icon">❓</div>
<h3>FAQ</h3>
<p>Browse common questions</p>
</a>
<a href="https://t.me/AgentBox11Bot" class="quick-card" target="_blank" rel="noopener noreferrer">
<div class="icon">💬</div>
<h3>Telegram Bot</h3>
<p>Chat directly with AgentBox</p>
</a>
<a href="uptime-history.html" class="quick-card">
<div class="icon">📊</div>
<h3>System Status</h3>
<p>Check service uptime</p>
</a>
<a href="docs/index.html" class="quick-card">
<div class="icon">📖</div>
<h3>Documentation</h3>
<p>API reference & guides</p>
</a>
</div>
<!-- Common Solutions -->
<h2 class="section-title">🔧 Common Solutions</h2>
<p class="section-desc">Click a topic to expand step-by-step instructions.</p>
<div class="solutions-grid">
<div class="solution-card" onclick="this.classList.toggle('expanded')">
<h4>🤖 Bot Not Responding</h4>
<p>AgentBox isn't replying to your messages</p>
<div class="steps">
<ol>
<li>Check <a href="uptime-history.html">system status</a> for outages</li>
<li>Send <code>/start</code> to reinitialize the bot</li>
<li>Clear your Telegram cache (Settings → Data & Storage)</li>
<li>Try sending a simple message like "Hello"</li>
<li>If still not working, submit a ticket below</li>
</ol>
</div>
</div>
<div class="solution-card" onclick="this.classList.toggle('expanded')">
<h4>🧠 Memory Issues</h4>
<p>Bot forgot something or remembers wrong info</p>
<div class="steps">
<ol>
<li>Send <code>/memory</code> to view what AgentBox remembers</li>
<li>Use <code>/forget [topic]</code> to remove specific memories</li>
<li>Use <code>/reset</code> to clear all conversation history</li>
<li>Note: memory improves with more conversations</li>
</ol>
</div>
</div>
<div class="solution-card" onclick="this.classList.toggle('expanded')">
<h4>⏰ Reminder Not Firing</h4>
<p>Scheduled reminder didn't arrive</p>
<div class="steps">
<ol>
<li>Check your timezone setting with <code>/settings</code></li>
<li>Ensure Telegram notifications are enabled for the bot</li>
<li>Try setting a test reminder: "Remind me in 1 minute to test"</li>
<li>Use <code>/reminders</code> to list all pending reminders</li>
</ol>
</div>
</div>
<div class="solution-card" onclick="this.classList.toggle('expanded')">
<h4>📷 Image Analysis Failed</h4>
<p>Bot can't analyze your image or photo</p>
<div class="steps">
<ol>
<li>Ensure the image is under 20MB</li>
<li>Send as a photo, not a file/document</li>
<li>Try re-sending with a clear question about the image</li>
<li>Supported formats: JPG, PNG, GIF, WEBP</li>
</ol>
</div>
</div>
<div class="solution-card" onclick="this.classList.toggle('expanded')">
<h4>💳 Billing Questions</h4>
<p>Free tier limits, upgrades, or payment issues</p>
<div class="steps">
<ol>
<li>Free tier: 20 messages/day, resets at midnight UTC</li>
<li>Check usage with <code>/usage</code></li>
<li>Upgrade anytime with <code>/upgrade</code></li>
<li>For payment issues, submit a ticket with your Telegram username</li>
</ol>
</div>
</div>
<div class="solution-card" onclick="this.classList.toggle('expanded')">
<h4>🔒 Privacy & Data</h4>
<p>Questions about your data and privacy</p>
<div class="steps">
<ol>
<li>Your data is isolated — no one else can access it</li>
<li>Use <code>/export</code> to download all your data</li>
<li>Use <code>/delete-account</code> to permanently delete everything</li>
<li>See our <a href="privacy.html">Privacy Center</a> for full details</li>
</ol>
</div>
</div>
</div>
<!-- Support Ticket Form -->
<h2 class="section-title">📝 Submit a Support Ticket</h2>
<p class="section-desc">Can't find what you need? Send us a message and we'll get back to you.</p>
<div class="ticket-form" id="ticketForm">
<div class="form-content">
<div class="form-row">
<div class="form-group">
<label>Name <span class="required">*</span></label>
<input type="text" id="name" placeholder="Your name" required>
</div>
<div class="form-group">
<label>Email <span class="required">*</span></label>
<input type="email" id="email" placeholder="you@example.com" required>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label>Category <span class="required">*</span></label>
<select id="category">
<option value="">Select a category...</option>
<option value="bug">🐛 Bug Report</option>
<option value="billing">💳 Billing & Payments</option>
<option value="feature">💡 Feature Request</option>
<option value="account">👤 Account Issue</option>
<option value="api">🔌 API & Integration</option>
<option value="other">📋 Other</option>
</select>
</div>
<div class="form-group">
<label>Priority</label>
<select id="priority">
<option value="low">🟢 Low — Not urgent</option>
<option value="medium" selected>🟡 Medium — Normal</option>
<option value="high">🟠 High — Blocking me</option>
<option value="critical">🔴 Critical — Service down</option>
</select>
</div>
</div>
<div class="form-group">
<label>Subject <span class="required">*</span></label>
<input type="text" id="subject" placeholder="Brief description of your issue" maxlength="120">
<div class="char-count"><span id="subjectCount">0</span>/120</div>
</div>
<div class="form-group">
<label>Description <span class="required">*</span></label>
<textarea id="description" placeholder="Please describe your issue in detail. Include steps to reproduce, expected vs actual behavior, and your Telegram username if relevant." maxlength="2000"></textarea>
<div class="char-count"><span id="descCount">0</span>/2000</div>
</div>
<div class="form-group">
<label>Attachments</label>
<div class="attachment-area" id="attachmentArea">
<input type="file" id="fileInput" multiple accept="image/*,.pdf,.txt,.log">
<div class="icon">📎</div>
<div>Drop files here or click to upload</div>
<div style="font-size: 0.8rem; margin-top: 4px;">Images, PDFs, logs — up to 5MB each</div>
</div>
<div class="attachment-list" id="attachmentList"></div>
</div>
<div class="form-group">
<label>Telegram Username</label>
<input type="text" id="telegram" placeholder="@yourusername (optional, helps us find your account)">
<div class="hint">Include this if your issue is related to your bot conversations</div>
</div>
<button class="submit-btn" id="submitBtn" onclick="submitTicket()">Submit Ticket</button>
</div>
<div class="success-msg" id="successMsg">
<div class="checkmark">✅</div>
<h3>Ticket Submitted!</h3>
<p>We've received your request and will respond within the estimated timeframe.</p>
<div class="ticket-id" id="ticketId">AG-000000</div>
<p style="margin-top: 16px; font-size: 0.85rem;">A confirmation has been noted. You can reference this ticket ID in follow-up messages.</p>
<button class="submit-btn" style="margin-top: 20px; max-width: 200px; margin-left: auto; margin-right: auto; display: block;" onclick="resetForm()">Submit Another</button>
</div>
</div>
<!-- Community -->
<h2 class="section-title">🌐 Community & Resources</h2>
<p class="section-desc">Connect with other AgentBox users and stay updated.</p>
<div class="community-grid">
<a href="https://github.com/sauravbhattacharya001/getagentbox/issues" class="community-card" target="_blank" rel="noopener noreferrer">
<div class="icon">🐙</div>
<h4>GitHub Issues</h4>
<p>Report bugs & track features</p>
</a>
<a href="https://github.com/sauravbhattacharya001/getagentbox/discussions" class="community-card" target="_blank" rel="noopener noreferrer">
<div class="icon">💬</div>
<h4>Discussions</h4>
<p>Ask questions & share tips</p>
</a>
<a href="updates.html" class="community-card">
<div class="icon">📰</div>
<h4>Product Updates</h4>
<p>Latest features & changes</p>
</a>
<a href="https://github.com/sauravbhattacharya001/getagentbox" class="community-card" target="_blank" rel="noopener noreferrer">
<div class="icon">⭐</div>
<h4>Star on GitHub</h4>
<p>Support the project</p>
</a>
</div>
</div>
<div class="footer">
<a href="index.html">AgentBox</a> · <a href="faq.html">FAQ</a> · <a href="privacy.html">Privacy</a> · <a href="uptime-history.html">Status</a>
<br><br>
© AgentBox. Built by <a href="https://github.com/sauravbhattacharya001" target="_blank" rel="noopener noreferrer">Saurav Bhattacharya</a>
</div>
<script>
// Character counters
document.getElementById('subject').addEventListener('input', function() {
document.getElementById('subjectCount').textContent = this.value.length;
});
document.getElementById('description').addEventListener('input', function() {
document.getElementById('descCount').textContent = this.value.length;
});
// File attachments
const files = [];
document.getElementById('fileInput').addEventListener('change', function(e) {
for (const file of e.target.files) {
if (file.size > 5 * 1024 * 1024) {
alert(`${file.name} is too large (max 5MB)`);
continue;
}
if (files.length >= 5) {
alert('Maximum 5 attachments');
break;
}
files.push(file);
}
renderAttachments();
this.value = '';
});
function escapeHtml(s) {
const d = document.createElement('div');
d.textContent = s;
return d.innerHTML;
}
function renderAttachments() {
const list = document.getElementById('attachmentList');
list.innerHTML = files.map((f, i) =>
`<div class="attachment-chip">
📄 ${escapeHtml(f.name)} (${(f.size / 1024).toFixed(0)}KB)
<span class="remove" onclick="removeFile(${i})">×</span>
</div>`
).join('');
}
function removeFile(index) {
files.splice(index, 1);
renderAttachments();
}
// Form validation
function validateForm() {
const name = document.getElementById('name').value.trim();
const email = document.getElementById('email').value.trim();
const category = document.getElementById('category').value;
const subject = document.getElementById('subject').value.trim();
const description = document.getElementById('description').value.trim();
if (!name) return 'Please enter your name';
if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) return 'Please enter a valid email';
if (!category) return 'Please select a category';
if (!subject) return 'Please enter a subject';
if (subject.length < 5) return 'Subject must be at least 5 characters';
if (!description) return 'Please describe your issue';
if (description.length < 20) return 'Description must be at least 20 characters';
return null;
}
// Generate ticket ID
function generateTicketId() {
const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
let id = 'AG-';
for (let i = 0; i < 6; i++) id += chars[Math.floor(Math.random() * chars.length)];
return id;
}
// Submit
function submitTicket() {
const error = validateForm();
if (error) {
alert(error);
return;
}
const btn = document.getElementById('submitBtn');
btn.disabled = true;
btn.textContent = 'Submitting...';
// Simulate submission (this is a static site — in production, would POST to API)
setTimeout(() => {
const ticketId = generateTicketId();
document.getElementById('ticketId').textContent = ticketId;
// Save to localStorage for reference
const tickets = JSON.parse(localStorage.getItem('agentbox-tickets') || '[]');
tickets.push({
id: ticketId,
name: document.getElementById('name').value.trim(),
email: document.getElementById('email').value.trim(),
category: document.getElementById('category').value,
priority: document.getElementById('priority').value,
subject: document.getElementById('subject').value.trim(),
description: document.getElementById('description').value.trim(),
telegram: document.getElementById('telegram').value.trim(),
attachments: files.map(f => f.name),
timestamp: new Date().toISOString()
});
localStorage.setItem('agentbox-tickets', JSON.stringify(tickets));
// Show success
document.querySelector('.form-content').style.display = 'none';
document.getElementById('successMsg').classList.add('show');
}, 1200);
}
function resetForm() {
document.querySelector('.form-content').style.display = 'block';
document.getElementById('successMsg').classList.remove('show');
document.getElementById('name').value = '';
document.getElementById('email').value = '';
document.getElementById('category').value = '';
document.getElementById('priority').value = 'medium';
document.getElementById('subject').value = '';
document.getElementById('description').value = '';
document.getElementById('telegram').value = '';
document.getElementById('subjectCount').textContent = '0';
document.getElementById('descCount').textContent = '0';
document.getElementById('submitBtn').disabled = false;
document.getElementById('submitBtn').textContent = 'Submit Ticket';
files.length = 0;
renderAttachments();
}
</script>
</body>
</html>