-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.html
301 lines (294 loc) · 8.53 KB
/
configure.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<!DOCTYPE html>
<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
<head>
{include="includes"}
</head>
<body class="text-light bg-dark">
{include="page.header"}
<form method="POST" name="configform" id="configform">
<input type="hidden" name="token" value="{$token}" />
<h2>{'Configure'|t}</h2>
<p class="form-group">
<label for="title">
{'Shaarli title'|t}
</label>
<input type="text"
name="title"
id="title"
size="50"
value="{$title}"
class="form-control"
/>
</p>
<p class="form-group">
<label for="titleLink">
{'Home link'|t}
</label>
<input type="text"
name="titleLink"
id="titleLink"
size="50"
value="{$titleLink}"
class="form-control text-monospace"
/>
<small class="form-text text-muted">
{'Default value'|t}: ?
</small>
</p>
<p class="form-group">
<label for="theme">
{'Theme'|t}
</label>
<select name="theme"
id="theme"
class="custom-select"
>
{loop="$theme_available"}
<option value="{$value}"
{if="$value===$theme"} selected {/if}
>
{$value}
</option>
{/loop}
</select>
</p>
<p class="form-group">
<label for="language">
{'Language'|t}
</label>
<select name="language"
id="language"
class="custom-select"
>
{loop="$languages"}
<option value="{$key}"
{if="$key===$language"} selected {/if}
>
{$value}
</option>
{/loop}
</select>
</p>
<p class="mb-1">
<label for="continent">
{'Timezone'|t}
</label>
</p>
<fieldset class="form-group form-inline">
<span class="mb-1 mb-sm-0 mr-1">
<label for="continent" class="justify-content-start">
{'Continent'|t}
</label>
<select name="continent"
id="continent"
class="custom-select"
>
{loop="$continents"}
{if="$key !== 'selected'"}
<option value="{$value}"
{if="$continents.selected === $value"} selected {/if}
>
{$value}
</option>
{/if}
{/loop}
</select>
</span>
<span class="mb-1 mb-sm-0 ">
<label for="city" class="justify-content-start">
{'City'|t}
</label>
<select id="city"
name="city"
class="custom-select"
>
{loop="$cities"}
{if="$key !== 'selected'"}
<option value="{$value.city}"
{if="$cities.selected === $value.city"} selected {/if}
>
{function="str_replace('_', ' ', $value.city)"}
</option>
{/if}
{/loop}
</select>
</span>
</fieldset>
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="disablesessionprotection"
id="disablesessionprotection"
{if="$session_protection_disabled"} checked {/if}
class="custom-control-input"
/>
<label for="disablesessionprotection" class="custom-control-label">
{'Disable session cookie hijacking protection'|t}
</label>
<small class="form-text text-muted">
{'Check this if you get disconnected or if your IP address changes often'|t}
</small>
</p>
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="privateLinkByDefault"
id="privateLinkByDefault"
{if="$private_links_default"} checked {/if}
class="custom-control-input"
/>
<label for="privateLinkByDefault" class="custom-control-label">
{'Private links by default'|t}
</label>
<small class="form-text text-muted">
{'All new links are private by default'|t}
</small>
</p>
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="hidePublicLinks"
id="hidePublicLinks"
{if="$hide_public_links"} checked {/if}
class="custom-control-input"
/>
<label for="hidePublicLinks" class="custom-control-label">
{'Hide public links'|t}
</label>
<small class="form-text text-muted">
{'Do not show any links if the user is not logged in'|t}
</small>
</p>
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="retrieveDescription"
id="retrieveDescription"
{if="$retrieve_description"} checked {/if}
class="custom-control-input"
/>
<label for="retrieveDescription" class="custom-control-label">
{'Automatically retrieve description for new bookmarks'|t}
</label>
<small class="form-text text-muted">
{'Shaarli will try to retrieve the description from meta HTML headers'|t}
</small>
</p>
<p class="form-group">
<label for="enableThumbnails_none">
{'Enable thumbnails'|t}
</label>
<span class="custom-control custom-radio">
<input type="radio"
name="enableThumbnails"
id="enableThumbnails_none"
value="none"
{if="$thumbnails_mode=='none' || !$gd_enabled"} checked {/if}
class="custom-control-input"
/>
<label for="enableThumbnails_none" class="custom-control-label">
{'None'|t}
</label>
</span>
<span class="custom-control custom-radio">
<input type="radio"
name="enableThumbnails"
id="enableThumbnails_common"
value="common"
{if="$thumbnails_mode=='common'"} checked {/if}
{if="!$gd_enabled"} disabled {/if}
class="custom-control-input"
/>
<label for="enableThumbnails_common" class="custom-control-label">
{'Only common media hosts'|t}
</label>
</span>
<span class="custom-control custom-radio">
<input type="radio"
name="enableThumbnails"
id="enableThumbnails_all"
value="all"
{if="$thumbnails_mode=='all'"} checked {/if}
{if="!$gd_enabled"} disabled {/if}
class="custom-control-input"
/>
<label for="enableThumbnails_all" class="custom-control-label">
{'All'|t}
</label>
</span>
{if="!$gd_enabled"}
<small class="form-text text-muted">
{'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
</small>
{/if}
</p>
{if="$gd_enabled && $thumbnails_enabled"}
<p class="form-group">
<label>{'Synchronize thumbnails'|t}</label><br>
<a href="?do=thumbs_update" class="btn btn-outline-info">
{'Synchronize thumbnails'|t}
</a>
</p>
{/if}
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="enableRssPermalinks"
id="enableRssPermalinks"
{if="$enable_rss_permalinks"} checked {/if}
class="custom-control-input"
/>
<label for="enableRssPermalinks" class="custom-control-label">
{'RSS direct links'|t}
</label>
<small class="form-text text-muted">
{'Check this to use direct URL instead of permalink in feeds'|t}
</small>
</p>
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="enableApi"
id="enableApi"
{if="$api_enabled"} checked {/if}
class="custom-control-input"
/>
<label for="enableApi" class="custom-control-label">
{'Enable REST API'|t}
</label>
<small class="form-text text-muted">
{'Allow third party software to use Shaarli such as mobile applications'|t}
</small>
</p>
<p class="form-group">
<label for="apiSecret">
{'API secret'|t}
</label>
<input type="text"
name="apiSecret"
id="apiSecret"
size="50"
value="{$api_secret}"
autocorrect="off"
autocapitalize="none"
class="form-control text-monospace"
/>
</p>
<p class="custom-control custom-checkbox">
<input type="checkbox"
name="updateCheck"
id="updateCheck"
{if="$enable_update_check"} checked {/if}
class="custom-control-input"
/>
<label for="updateCheck" class="custom-control-label">
{'Check updates'|t}
</label>
<small class="form-text text-muted">
{'Notify me when a new release is ready'|t}
</small>
</p>
<p>
<button type="submit"
name="save"
class="btn btn-primary"
>{'Save'|t}</button>
</p>
</form>
{include="page.footer"}
</body>
</html>