aboutsummaryrefslogtreecommitdiffstats
path: root/themes/sourcehut/settings.html
blob: 43228af9e2cf2a96710b70689c42a98955e12632 (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
96
97
98
99
100
101
102
103
104
{{template "head.html" .Global}}
{{template "nav.html" .Global}}

<div class="container-fluid">
  <div class="row">
    <div class="col-md-12 header-tabbed">
      <h2>Settings</h2>
    </div>
  </div>
</div>

<div class="container">
  <form method="post" class="col-md-12">
    <div class="form-group">
      <label for="from">Full name:</label>
      <input
        type="text"
        name="from"
        id="from"
        class="form-control"
        value="{{.Settings.From}}"
        placeholder="Your display name for outgoing emails"
      />
    </div>

    <div class="form-group">
      <label for="signature">Message signature:</label>
      <textarea
        name="signature"
        id="signature"
        class="form-control"
        rows="5"
        placeholder="Optional signature to append to your emails"
      >{{.Settings.Signature}}</textarea>
    </div>

    <div class="form-group">
      <label for="smtp_username">Custom SMTP Username (optional):</label>
      <input
        type="text"
        name="smtp_username"
        id="smtp_username"
        class="form-control"
        value="{{.Settings.SMTPUsername}}"
        placeholder="Leave empty to use login username"
      />
      <small class="form-text text-muted">Use this if your SMTP server requires different credentials than your email login</small>
    </div>

    <div class="form-group">
      <label for="smtp_password">Custom SMTP Password (optional):</label>
      <input
        type="password"
        name="smtp_password"
        id="smtp_password"
        class="form-control"
        value="{{.Settings.SMTPPassword}}"
        placeholder="Leave empty to use login password"
      />
      <small class="form-text text-muted">Use this if your SMTP server requires different credentials than your email login</small>
    </div>

    <div class="form-group">
      <label for="subscriptions">Subscribed folders:</label>
      <select name="subscriptions" id="subscriptions" class="form-control" multiple>
        {{ $subs := .Subscriptions }}
        {{ range .Mailboxes }}
        {{ if and (ne .Name "INBOX") (not (.HasAttr "\\Noselect")) }}
        <option
          value="{{.Name}}"
          {{ if $subs.Has .Name }}
          selected
          {{ end }}
        >{{.Name}}</option>
        {{ end }}
        {{ end }}
      </select>
    </div>

    <div class="form-group">
      <label for="messages_per_page">Messages per page:</label>
      <input
        type="number"
        name="messages_per_page"
        id="messages_per_page"
        required
        class="form-control"
        value="{{.Settings.MessagesPerPage}}" />
    </div>

    <div class="pull-right">
      <a
        href="/"
        class="btn btn-default"
      >Cancel</a>
      <button
        type="submit"
        class="btn btn-primary"
      >Save</button>
    </div>
  </form>
</div>

{{template "foot.html"}}