summaryrefslogtreecommitdiff
path: root/views/message_send.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'views/message_send.ejs')
-rw-r--r--views/message_send.ejs30
1 files changed, 30 insertions, 0 deletions
diff --git a/views/message_send.ejs b/views/message_send.ejs
new file mode 100644
index 0000000..6f72d74
--- /dev/null
+++ b/views/message_send.ejs
@@ -0,0 +1,30 @@
+<%- include('header', { title: "Send Message" }) %>
+<style>
+input, textarea { width: 100%; max-width: 45em; }
+</style>
+<form action="/message/send" method="post">
+<p>
+To:<br>
+<input id="to" type="text" name="to" size="80" maxlength="80"
+ onkeypress="if(event.keyCode===13){document.querySelector('#subject').focus();return false;}"
+ value="<%= to_name %>"
+ <%= to_id === 0 ? "autofocus" : "" %>
+ required>
+
+<p>
+Subject:
+<br>
+<input id="subject" type="text" name="subject" size="80" maxlength="80"
+ onkeypress="if(event.keyCode===13){document.querySelector('#body').focus();return false;}"
+ value="<%= subject %>"
+ <%= to_id > 0 ? "autofocus" : "" %>
+ pattern=".*\S+.*"
+ required>
+
+<p>
+Body:
+<br>
+<textarea id="body" name="body" rows="20" cols="80" maxlength="32000" required><%= body %></textarea>
+<p>
+<button type="submit">Send</button>
+</form>