diff --git a/web/app.py b/web/app.py index 64fb4bb..f8138a9 100644 --- a/web/app.py +++ b/web/app.py @@ -2489,7 +2489,7 @@ TG #: ''' + str(tg_d.tg) + ''' all_post = '' return render_template('ss.html', markup_content = Markup(content), all_post = Markup(post_content), user_id = dmr_id) - @app.route('/mail/', methods=['GET']) + @app.route('/mail/', methods=['GET', 'POST']) @login_required def get_mail(user): if current_user.username == user: @@ -2498,6 +2498,12 @@ TG #: ''' + str(tg_d.tg) + ''' content = '''

Deleted message.

Redirecting in 3 seconds.

''' + elif request.args.get('send_mail'): + mailbox_del(int(request.args.get('delete_mail'))) + content = '''

Message sent.

+

Redirecting in 3 seconds.

+ ''' + else: mail_all = MailBox.query.filter_by(rcv_callsign=user.upper()).order_by(MailBox.time.desc()).all() content = '' diff --git a/web/templates/mail.html b/web/templates/mail.html index 6803097..72ccdd9 100644 --- a/web/templates/mail.html +++ b/web/templates/mail.html @@ -4,6 +4,34 @@

Mail

+ + +
+ +
+
Send Message
+
+
+ +
+ Username + +
+ +
+ Message + +
+ + +

+ +
+
+ +
+ +
@@ -26,5 +54,7 @@
+ +

 

{% endblock %}