-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.html
More file actions
75 lines (74 loc) · 3.92 KB
/
Copy pathcompose.html
File metadata and controls
75 lines (74 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{{define "content"}}
<div class="compose-container">
<div class="compose-card">
<div class="compose-header">
<h2>New Message</h2>
</div>
{{if .Error}}
<div class="error-notification">
<strong>Error:</strong> {{.Error}}
</div>
{{end}}
<form method="POST" action="/send" enctype="multipart/form-data" id="compose-form">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div class="compose-body">
<div class="compose-field">
<label for="from">From</label>
<input type="text" id="from" value="{{.From}}" disabled>
</div>
<div class="compose-field">
<label for="to">To</label>
<input type="text" id="to" name="to" required
placeholder="Recipients"
value="{{if .Prefill}}{{index .Prefill "to"}}{{end}}">
</div>
<div class="compose-field">
<label for="cc">Cc</label>
<input type="text" id="cc" name="cc" placeholder="Cc (optional)"
value="{{if .Prefill}}{{index .Prefill "cc"}}{{end}}">
</div>
<div class="compose-field">
<label for="subject">Subject</label>
<input type="text" id="subject" name="subject" required
placeholder="Subject"
value="{{if .Prefill}}{{index .Prefill "subject"}}{{end}}">
</div>
<div class="compose-field-extra">
<label>
Priority:
<select id="priority" name="priority">
<option value="1" {{if and .Prefill (eq (index .Prefill "priority") "1")}}selected{{end}}>Highest</option>
<option value="2" {{if and .Prefill (eq (index .Prefill "priority") "2")}}selected{{end}}>High</option>
<option value="3" {{if or (not .Prefill) (eq (index .Prefill "priority") "3")}}selected{{end}}>Normal</option>
<option value="4" {{if and .Prefill (eq (index .Prefill "priority") "4")}}selected{{end}}>Low</option>
<option value="5" {{if and .Prefill (eq (index .Prefill "priority") "5")}}selected{{end}}>Lowest</option>
</select>
</label>
<label>
<input type="checkbox" id="read_receipt" name="read_receipt" value="1">
Request read receipt
</label>
</div>
<textarea id="body" name="body" class="compose-textarea" required
placeholder="Write your message...">{{if .Prefill}}{{index .Prefill "body"}}{{end}}</textarea>
<div class="compose-attachments">
<label for="attachments">Attachments (max 25MB total)</label>
<div class="attachments-input-wrapper">
<button type="button" class="btn btn-secondary" id="attachments-btn">
+ Add Files
</button>
<input type="file" id="attachments" name="attachments" multiple style="display: none;">
<span class="attachments-help">Hold Ctrl+Click (or Cmd+Click on Mac) to select multiple files</span>
</div>
<div id="attachments-list" class="attachments-list"></div>
</div>
</div>
<div class="compose-actions">
<button type="submit" class="btn btn-primary">Send</button>
<a href="/inbox" class="btn btn-ghost">Discard</a>
</div>
</form>
</div>
</div>
<script src="/static/attachments.js"></script>
{{end}}