chg: [chat request] add other chat type + placeholders

otp
terrtia 2024-09-17 10:21:16 +02:00
parent f4da8c55f4
commit 4ee6b4d06d
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 5 additions and 4 deletions

View File

@ -231,7 +231,7 @@ def chat_monitoring_request():
username = request.form.get('username')
invite = request.form.get('invite')
description = request.form.get('description')
if chat_type not in ['discord', 'telegram']:
if chat_type not in ['discord', 'telegram', 'other']:
return create_json_response({"status": "error", "reason": "Invalid Chat Type"}, 400)
if not username and not invite and not description:
return create_json_response({"status": "error", "reason": "Please provide a username/username/invite/comment"}, 400)

View File

@ -46,21 +46,22 @@
<select class="custom-select" id="level_selector" name="type">
<option value="telegram" selected>Telegram</option>
<option value="discord">Discord</option>
<option value="other">Other</option>
</select>
<div class="form-group">
<label for="username"><b>Chat Username</b></label>
<input type="text" class="form-control" id="username" name="username">
<input type="text" class="form-control" id="username" name="username" placeholder="Chat Username (Optional)">
</div>
<div class="form-group">
<label for="invite"><b>Chat Invite</b></label>
<input type="text" class="form-control" id="invite" name="invite">
<input type="text" class="form-control" id="invite" name="invite" placeholder="Chat Invite (Optional)">
</div>
<div class="form-group">
<label for="description"><b>Comments</b></label>
<textarea class="form-control" id="paste_content" name="description" rows="5"></textarea>
<textarea class="form-control" id="description" name="description" rows="5" placeholder="Additional Comments (Optional)"></textarea>
</div>