From 3892dca12adb7fad54251f1bde6a3c318e070280 Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Thu, 7 Oct 2021 20:59:21 -0700 Subject: [PATCH] sending portal mail, WIP --- web/app.py | 8 +++++++- web/templates/mail.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) 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 %}