mirror of https://gitlab.com/tildes/tildes.git
committed by
Bauke
8 changed files with 132 additions and 11 deletions
-
1tildes/tildes/models/user/user.py
-
20tildes/tildes/routes.py
-
6tildes/tildes/schemas/message.py
-
5tildes/tildes/templates/macros/user_menu.jinja2
-
41tildes/tildes/templates/new_message_from_inbox.jinja2
-
2tildes/tildes/views/api/web/exceptions.py
-
54tildes/tildes/views/api/web/user.py
-
14tildes/tildes/views/exceptions.py
@ -0,0 +1,41 @@ |
|||||
|
{# Copyright (c) 2018 Tildes contributors <code@tildes.net> #} |
||||
|
{# SPDX-License-Identifier: AGPL-3.0-or-later #} |
||||
|
|
||||
|
{% extends 'base_no_sidebar.jinja2' %} |
||||
|
|
||||
|
{% from 'macros/forms.jinja2' import markdown_textarea %} |
||||
|
|
||||
|
{% block title %}New private message conversation{% endblock %} |
||||
|
|
||||
|
{% block main_heading %} |
||||
|
Send a new private message |
||||
|
{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<form |
||||
|
method="post" |
||||
|
autocomplete="off" |
||||
|
action="/messages/new" |
||||
|
data-ic-post-to="/messages/new" |
||||
|
data-js-prevent-double-submit |
||||
|
data-js-confirm-leave-page-unsaved |
||||
|
> |
||||
|
<input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}"> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="form-label" for="recipient">Recipient</label> |
||||
|
<input class="form-input" id="recipient" name="recipient" type="text" placeholder="Recipient's username" required> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="form-label" for="subject">Subject</label> |
||||
|
<input class="form-input" id="subject" name="subject" type="text" placeholder="Subject" value="{{ subject }}" required> |
||||
|
</div> |
||||
|
|
||||
|
{{ markdown_textarea(text=message) }} |
||||
|
|
||||
|
<div class="form-buttons"> |
||||
|
<button type="submit" class="btn btn-primary">Send message</button> |
||||
|
</div> |
||||
|
</form> |
||||
|
{% endblock %} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue