aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/compose.html
blob: 82ee28352bab932349a10d42c472e6a593d1cf79 (plain) (blame)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{{template "head.html" .}}
{{template "nav.html" .}}
{{template "util.html" .}}

<div class="page-wrap">
  {{ template "aside" . }}

  <div class="container">
    <main class="create-update">

      <form method="post" enctype="multipart/form-data" id="compose-form">
        <input type="hidden" name="message_id" value="{{.Message.MessageID}}">
        <input type="hidden" name="in_reply_to" value="{{.Message.InReplyTo}}">

        <div class="headers no-js">
          <label>From</label>
          <input type="email" name="from" id="from" value="{{.Message.From}}" />

          <label>To</label>
          <input
            type="email"
            name="to"
            id="to"
            value="{{.Message.ToString}}"
            multiple
            list="emails"
            {{ if not .Message.To }} autofocus{{ end }}
          />

          <label>Subject</label>
          <input type="text" name="subject" id="subject" value="{{.Message.Subject}}" {{ if .Message.To }} autofocus{{ end }}/>

          <label>Attachments</label>
          <input type="file" name="attachments" id="attachments" multiple>

          <div
            id="attachment-list"
            {{ if .Message.Attachments }}
            style="display: none;"
            {{ end }}
          >
            <div class="help">Drag and drop attachments here</div>
            {{range .Message.Attachments}}
            <div class="upload">
              <label class="filename">
                <input type="checkbox" name="prev_attachments" value="{{.Node.PathString}}" checked>
                {{.Filename}}
              </label>
            </div>
            {{end}}
            <!--
            <div class="upload">
              <span class="progress"></span>
              <span class="filename">foobar.pdf</span>
              <span class="error"></span>
              <span class="size">1234 KiB</span>
              <button>&times;</button>
            </div>
            -->
          </div>

          <input type="hidden" id="attachment-uuids" name="attachment-uuids" value="" />
        </div>

        <div class="text">
          <textarea name="text" class="body">{{.Message.Text}}</textarea>
          <div id="send-progress" style="display: none">
            <!--
              Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com
              License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
            -->
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"/></svg>
            <span class="info">Sending message...</span>
          </div>
        </div>

        <datalist id="emails">
          {{range .Extra.EmailSuggestions}}
            <option value="{{.}}">
          {{end}}
        </datalist>

        <div class="actions">
          <button id="send-button" type="submit">Send Message</button>
          <button id="save-button" type="submit" name="save_as_draft">Save as draft</button>
          <a class="button-link" href="/mailbox/INBOX">Cancel</a>
        </div>
      </form>

    </main>
  </div>
</div>
<script src="/themes/alps/assets/compose.js"></script>

{{template "foot.html"}}