Skip to main content

max / makenotwork

2.4 KB · 48 lines History Blame Raw
1 <div id="report-modal" class="modal-overlay hidden">
2 <div class="report-modal-content">
3 <div class="modal-header">
4 <h2 class="report-modal-title">Report this {{ report_target_type }}</h2>
5 <button type="button" class="modal-close" onclick="document.getElementById('report-modal').classList.add('hidden')">&times;</button>
6 </div>
7 <form hx-post="/api/reports"
8 hx-target="#report-modal"
9 hx-swap="outerHTML">
10 <input type="hidden" name="target_type" value="{{ report_target_type }}">
11 <input type="hidden" name="target_id" value="{{ report_target_id }}">
12
13 <fieldset class="report-modal-fieldset">
14 <legend class="report-modal-legend">What is the issue?</legend>
15 {% if report_has_labels %}
16 <label class="report-modal-option">
17 <input type="radio" name="report_type" value="mislabeled" required> Mislabeled (wrong AI tier or category)
18 </label>
19 {% endif %}
20 <label class="report-modal-option">
21 <input type="radio" name="report_type" value="spam" {% if !report_has_labels %}required{% endif %}> Spam
22 </label>
23 <label class="report-modal-option">
24 <input type="radio" name="report_type" value="abuse"> Abuse
25 </label>
26 <label class="report-modal-option">
27 <input type="radio" name="report_type" value="infringement"> Infringement
28 </label>
29 <label class="report-modal-option">
30 <input type="radio" name="report_type" value="other"> Other
31 </label>
32 </fieldset>
33
34 <div class="report-modal-details">
35 <label for="report-reason" class="report-modal-details-label">Details (optional)</label>
36 <textarea id="report-reason" name="reason" rows="3"
37 class="report-modal-textarea"
38 placeholder="Provide additional context..."></textarea>
39 </div>
40
41 <div class="report-modal-actions">
42 <button type="button" class="btn-secondary" onclick="document.getElementById('report-modal').classList.add('hidden')">Cancel</button>
43 <button type="submit" class="btn-primary">Submit Report</button>
44 </div>
45 </form>
46 </div>
47 </div>
48