-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathapp_settings.html
119 lines (100 loc) · 5.06 KB
/
app_settings.html
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{%- block page_header -%}
{%- set title='Application settings' -%}
{% include "header.html" %}
{%- endblock page_header -%}
<h1>Manage Users</h1>
<p><a class="navigation-link" href="/admin/manage_users">Delete or
hide users</a></p>
<form action="/admin/update_settings" method="get" class="user-settings">
<h1>Application settings</h1>
<div class="user-settings-block">
<label class="user-settings-label" for="domains">
Domains to restrict new users to:
</label>
<textarea id="domains" class="user-settings-textarea" name="domains" rows="4" cols="60">{{settings.domains|join("\n")}}</textarea>
<div>
Only users with email addresses <code><b>@<domain></b></code> can
register on this site.
(One per line.)
</div>
</div>
<div class="user-settings-block">
<label class="user-settings-label" for="hostname">Hostname users should use to access this server:</label>
<input id="hostname" type="text" name="hostname" value="{{settings.hostname}}" class="user-settings-input">
<div>This is used for reminder emails and chat messages.</div>
</div>
<fieldset class="user-settings-block">
<legend class="user-settings-label">
Should new users default to interpreting snippets as <a href="http://daringfireball.net/projects/markdown/syntax">markdown</a>?
</legend>
<input id="markdown-yes" type="radio" name="markdown" value="yes"
{% if settings.default_markdown %}checked{% endif %}>
<label for="markdown-yes">yes</label>
<input id="markdown-no" type="radio" name="markdown" value="no"
{% if not settings.default_markdown %}checked{% endif %}>
<label for="markdown-no">no</label>
</fieldset>
<fieldset class="user-settings-block">
<legend class="user-settings-label">Should new users default to
having snippets be private (only visible by people in their domain)?:</legend>
<input id="private-yes" type="radio" name="private" value="yes"
{% if settings.default_private %}checked{% endif %}>
<label for="private-yes">yes</label>
<input id="private-no" type="radio" name="private" value="no"
{% if not settings.default_private %}checked{% endif %}>
<label for="private-no">no</label>
</fieldset>
<fieldset class="user-settings-block">
<legend class="user-settings-label">Should new users default to
getting reminder emails by default?:</legend>
<input id="reminder-email-yes" type="radio" name="reminder_email" value="yes"
{% if settings.default_email %}checked{% endif %}>
<label for="reminder-email-yes">yes</label>
<input id="reminder-email-no" type="radio" name="reminder_email" value="no"
{% if not settings.default_email %}checked{% endif %}>
<label for="reminder-email-no">no</label>
</fieldset>
<h1>Chat and email settings</h1>
<div class="user-settings-block">
<label class="user-settings-label" for="email_from">Email 'from' address:</label>
<input id="email_from" type="text" name="email_from" value="{{settings.email_from}}" class="user-settings-full-width-input">
<p>If set, will send a weekly reminder email and "snippets ready!"
email to all users. The mail will appear to come from this email
address.</p>
</div>
<div class="user-settings-block">
<label class="user-settings-label" for="slack_channel">Slack channel:</label>
<input id="slack_channel" type="text" name="slack_channel" value="{{settings.slack_channel}}" class="user-settings-full-width-input">
<p>If set, will send a weekly reminder message and "snippets ready!"
message to the specified channel in Slack. If not set, will not send
to Slack. Include the leading <code>#</code>.</p>
</div>
<div class="user-settings-block">
<label class="user-settings-label" for="slack_token">Slack bot token:</label>
<input id="slack_token" type="text" name="slack_token" value="{{settings.slack_token}}" class="user-settings-full-width-input">
<p>Needed to send messages via
Slack. <a href="https://api.slack.com/bot-users">instructions for
getting a Slack bot token</a>.</p>
</div>
<div class="user-settings-block">
<label class="user-settings-label" for="slack_slash_token">Slack verification token:</label>
<input id="slack_slash_token" type="text" name="slack_slash_token" value="{{settings.slack_slash_token}}" class="user-settings-full-width-input">
<p>If non-empty, enable slash-commands to work in Slack, to interact
with snippets from within Slack. Slack slash-commands can be
enabled/disabled independently from Slack messaging. See the bottom
of <a href="https://api.slack.com/slash-commands">this page</a> for
instructions (you only need to do the first step). The command
should be called <code>/snippets</code>. The following
slash-commands are supported:</p>
<blockquote><pre>
{{slack_slash_commands}}
</pre></blockquote>
<p>
You will need to give the app "commands" permission scope and specify
https://mycomany-snippets.appspot.com/slack as the endpoint for /snippets
</p>
</div>
<input type="hidden" name="redirect_to" value="{{redirect_to}}">
<input class="button save-button" type="submit" value="Save">
</form>
{% include "footer.html" %}