Welcome to mirror list, hosted at ThFree Co, Russian Federation.

generalSettings.twig « templates « CoreAdminHome « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbc8d1743a683ef5fb7bd93bc9816eaace8517f5 (plain)
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
{% extends 'admin.twig' %}

{% block content %}
{{ loadJavascriptTranslations(['UsersManager']) }}
{# load macros #}
{% import 'macros.twig' as piwik %}
{% import 'ajaxMacros.twig' as ajax %}

{% if isSuperUser %}
    <h2>{{ 'General_GeneralSettings'|translate }}</h2>
    {{ ajax.errorDiv('ajaxError') }}
    {{ ajax.loadingDiv('ajaxLoading') }}
    <table class="adminTable" style='width:900px;'>
        <tr>
            <td style='width:400px'>{{ 'General_AllowPiwikArchivingToTriggerBrowser'|translate }}</td>
            <td style='width:220px'>
                <fieldset>
                    <label>
                        <input type="radio" value="1" name="enableBrowserTriggerArchiving"{% if enableBrowserTriggerArchiving==1 %} checked="checked"{% endif %} />
                        {{ 'General_Yes'|translate }} <br/>
                        <span class="form-description">{{ 'General_Default'|translate }}</span>
                    </label><br/><br/>

                    <label>
                        <input type="radio" value="0" name="enableBrowserTriggerArchiving"{% if enableBrowserTriggerArchiving==0 %} checked="checked"{% endif %} />
                        {{ 'General_No'|translate }} <br/>
                        <span class="form-description">{{ 'General_ArchivingTriggerDescription'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/setup-auto-archiving/' target='_blank'>","</a>")|raw }}</span>
                    </label>
                </fieldset>
            <td>
                {% set browserArchivingHelp %}
                    {{ 'General_ArchivingInlineHelp'|translate }}
                    <br/>
                    {{ 'General_SeeTheOfficialDocumentationForMoreInformation'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/setup-auto-archiving/' target='_blank'>","</a>")|raw }}
                {% endset %}
                {{ piwik.inlineHelp(browserArchivingHelp) }}
            </td>
        </tr>
        <tr>
            <td>
                <label for="todayArchiveTimeToLive">
                    {{ 'General_ReportsContainingTodayWillBeProcessedAtMostEvery'|translate }}
                </label>
            </td>
            <td>
                {{ 'General_NSeconds'|translate("<input size='3' value='" ~ todayArchiveTimeToLive ~ "' id='todayArchiveTimeToLive' />")|raw }}
            </td>
            <td width='450px'>
                {% set archiveTodayTTLHelp %}
                    {% if showWarningCron %}
                        <strong>
                            {{ 'General_NewReportsWillBeProcessedByCron'|translate }}<br/>
                            {{ 'General_ReportsWillBeProcessedAtMostEveryHour'|translate }}
                            {{ 'General_IfArchivingIsFastYouCanSetupCronRunMoreOften'|translate }}<br/>
                        </strong>
                    {% endif %}
                    {{ 'General_SmallTrafficYouCanLeaveDefault'|translate(10) }}
                    <br/>
                    {{ 'General_MediumToHighTrafficItIsRecommendedTo'|translate(1800,3600) }}
                {% endset %}
                {{ piwik.inlineHelp(archiveTodayTTLHelp) }}
            </td>
        </tr>
        <tr>
            <td style='width:400px'>{{ 'CoreAdminHome_CheckReleaseGetVersion'|translate }}</td>
            <td style='width:220px'>
                <fieldset>
                    <label><input type="radio" value="0" name="enableBetaReleaseCheck"{% if enableBetaReleaseCheck==0 %} checked="checked"{% endif %} />
                        {{ 'CoreAdminHome_LatestStableRelease'|translate }} <br/>
                        <span class="form-description">{{ 'General_Recommended'|translate }}</span>
                    </label><br/><br/>

                    <label><input type="radio" value="1" name="enableBetaReleaseCheck"{% if enableBetaReleaseCheck==1 %} checked="checked"{% endif %} />
                        {{ 'CoreAdminHome_LatestBetaRelease'|translate }} <br/>
                        <span class="form-description">{{ 'CoreAdminHome_ForBetaTestersOnly'|translate }}</span>
                    </label>
                </fieldset>
            <td>
                {% set checkReleaseHelp %}
                    {{ 'CoreAdminHome_DevelopmentProcess'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/participate/development-process/' target='_blank'>","</a>")|raw }}
                    <br/>
                    {{ 'CoreAdminHome_StableReleases'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/participate/user-feedback/' target='_blank'>","</a>")|raw }}
                {% endset %}
                {{ piwik.inlineHelp(checkReleaseHelp) }}
            </td>
        </tr>
    </table>
    <h2>{{ 'CoreAdminHome_EmailServerSettings'|translate }}</h2>
    <div id='emailSettings'>
        <table class="adminTable" style='width:600px;'>
            <tr>
                <td>{{ 'General_UseSMTPServerForEmail'|translate }}<br/>
                    <span class="form-description">{{ 'General_SelectYesIfYouWantToSendEmailsViaServer'|translate }}</span>
                </td>
                <td style='width:200px'>
                    <label><input type="radio" name="mailUseSmtp" value="1" {% if mail.transport == 'smtp' %} checked {% endif %}/> {{ 'General_Yes'|translate }}</label>
                    <label><input type="radio" name="mailUseSmtp" value="0"
                                  style="margin-left:20px;" {% if mail.transport == '' %} checked {% endif %}/>  {{ 'General_No'|translate }}</label>
                </td>
            </tr>
        </table>
    </div>
    <div id='smtpSettings'>
        <table class="adminTable" style='width:550px;'>
            <tr>
                <td><label for="mailHost">{{ 'General_SmtpServerAddress'|translate }}</label></td>
                <td style='width:200px'><input type="text" id="mailHost" value="{{ mail.host }}"></td>
            </tr>
            <tr>
                <td><label for="mailPort">{{ 'General_SmtpPort'|translate }}</label><br/>
                    <span class="form-description">{{ 'General_OptionalSmtpPort'|translate }}</span></td>
                <td><input type="text" id="mailPort" value="{{ mail.port }}"></td>
            </tr>
            <tr>
                <td><label for="mailType">{{ 'General_AuthenticationMethodSmtp'|translate }}</label><br/>
                    <span class="form-description">{{ 'General_OnlyUsedIfUserPwdIsSet'|translate }}</span>
                </td>
                <td>
                    <select id="mailType">
                        <option value="" {% if mail.type == '' %} selected="selected" {% endif %}></option>
                        <option id="plain" {% if mail.type == 'Plain' %} selected="selected" {% endif %} value="Plain">Plain</option>
                        <option id="login" {% if mail.type == 'Login' %} selected="selected" {% endif %} value="Login"> Login</option>
                        <option id="cram-md5" {% if mail.type == 'Crammd5' %} selected="selected" {% endif %} value="Crammd5"> Crammd5</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><label for="mailUsername">{{ 'General_SmtpUsername'|translate }}</label><br/>
                    <span class="form-description">{{ 'General_OnlyEnterIfRequired'|translate }}</span></td>
                <td>
                    <input type="text" id="mailUsername" value="{{ mail.username }}"/>
                </td>
            </tr>
            <tr>
                <td><label for="mailPassword">{{ 'General_SmtpPassword'|translate }}</label><br/>
				<span class="form-description">{{ 'General_OnlyEnterIfRequiredPassword'|translate }}<br/>
                    {{ 'General_WarningPasswordStored'|translate("<strong>","</strong>") }}</span>
                </td>
                <td>
                    <input type="password" id="mailPassword" value="{{ mail.password }}"/>
                </td>
            </tr>
            <tr>
                <td><label for="mailEncryption">{{ 'General_SmtpEncryption'|translate }}</label><br/>
                    <span class="form-description">{{ 'General_EncryptedSmtpTransport'|translate }}</span></td>
                <td>
                    <select id="mailEncryption">
                        <option value="" {% if mail.encryption == '' %} selected="selected" {% endif %}></option>
                        <option id="ssl" {% if mail.encryption == 'ssl' %} selected="selected" {% endif %} value="ssl">SSL</option>
                        <option id="tls" {% if mail.encryption == 'tls' %} selected="selected" {% endif %} value="tls">TLS</option>
                    </select>
                </td>
            </tr>
        </table>
    </div>
    <div class="ui-confirm" id="confirmTrustedHostChange">
        <h2>{{ 'CoreAdminHome_TrustedHostConfirm'|translate }}</h2>
        <input role="yes" type="button" value="{{ 'General_Yes'|translate }}"/>
        <input role="no" type="button" value="{{ 'General_No'|translate }}"/>
    </div>
    <h2 id="trustedHostsSection">{{ 'CoreAdminHome_TrustedHostSettings'|translate }}</h2>
    <div id='trustedHostSettings'>
        {# untrusted host warning (display again) #}
        {% if isValidHost is defined and invalidHostMessage is defined and not isValidHost %}
            <div class="ajaxSuccess">
                <a style="float:right" href="http://piwik.org/faq/troubleshooting/#faq_171" target="_blank">
                    <img src="plugins/Zeitgeist/images/help_grey.png"/>
                </a>
                <strong>{{ 'General_Warning'|translate }}:&nbsp;</strong>{{ invalidHostMessage }}
            </div>
        {% endif %}
        {% if trustedHosts|length == 1 and (isValidHost is not defined or isValidHost) %}
            {{ 'CoreAdminHome_PiwikIsInstalledAt'|translate }}:&nbsp;&nbsp;
            <input name="trusted_host" type="text" value="{{ trustedHosts[0] }}"/>
        {% else %}
            <p>{{ 'CoreAdminHome_PiwikIsInstalledAt'|translate }}:</p>
            <table class="adminTable">
                <tr>
                    <th style="width:250px">{{ 'CoreAdminHome_ValidPiwikHostname'|translate }}</th>
                    <th style="width:10px">&nbsp;</th>
                </tr>
                {% for hostIdx, host in trustedHosts %}
                    <tr>
                        <td><input name="trusted_host" type="text" value="{{ host }}"/></td>
                        <td>
                            <a href="#" class="remove-trusted-host">x</a>
                        </td>
                    </tr>
                {% endfor %}
            </table>
            <div class="adminTable add-trusted-host-container">
                <a href="#" class="add-trusted-host"><em>{{ 'General_Add'|translate }}</em></a>
            </div>
        {% endif %}
    </div>
    <h2>{{ 'CoreAdminHome_BrandingSettings'|translate }}</h2>
    <div id='brandSettings'>
        {{ 'CoreAdminHome_CustomLogoHelpText'|translate }}
        <table class="adminTable" style='width:600px;'>
            <tr>
                <td>{{ 'CoreAdminHome_UseCustomLogo'|translate }}</td>
                <td style='width:200px'>
                    <label>
                        <input type="radio" name="useCustomLogo" value="1" {% if branding.use_custom_logo == 1 %} checked {% endif %}/>
                        {{ 'General_Yes'|translate }}
                    </label>
                    <label>
                        <input type="radio" name="useCustomLogo" value="0" style="margin-left:20px;" {% if branding.use_custom_logo == 0 %} checked {% endif %} />
                        {{ 'General_No'|translate }}
                    </label>
                </td>
            </tr>
        </table>
    </div>
    <div id='logoSettings'>
        {% set giveUsFeedbackText %}"{{ 'General_GiveUsYourFeedback'|translate }}"{% endset %}
        {% set customLogoHelp %}
            {{ 'CoreAdminHome_CustomLogoFeedbackInfo'|translate(giveUsFeedbackText,"<a href='?module=CorePluginsAdmin&action=index' target='_blank'>","</a>")|raw }}
        {% endset %}
        {{ piwik.inlineHelp(customLogoHelp) }}
        <form id="logoUploadForm" method="post" enctype="multipart/form-data" action="index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo">
            <table class="adminTable" style='width:550px;'>
                <tr>
                    {% if logosWriteable %}
                        <td>
                            <label for="customLogo">{{ 'CoreAdminHome_LogoUpload'|translate }}:<br/>
                                <span class="form-description">{{ 'CoreAdminHome_LogoUploadDescription'|translate("JPG / PNG / GIF",110) }}</span>
                            </label>
                        </td>
                        <td style='width:200px'>
                            <input name="customLogo" type="file" id="customLogo"/>
                            <img src="misc/user/logo.png?r={math equation='rand(10,1000)'}" id="currentLogo" height="150"/>
                        </td>
                    {% else %}
                        <td>
                            <span class="ajaxSuccess">{{ 'CoreAdminHome_LogoNotWriteable'|translate("<ul style='list-style: disc inside;'><li>/misc/user/</li><li>/misc/user/logo.png</li><li>/misc/user/logo-header.png</li></ul>")|raw }}</span>
                        </td>
                    {% endif %}
                </tr>
            </table>
        </form>
    </div>
    <input type="submit" value="{{ 'General_Save'|translate }}" id="generalSettingsSubmit" class="submit"/>
    <br/>
    <br/>
    {% set clickDeleteLogSettings %}{{ 'PrivacyManager_DeleteDataSettings'|translate }}{% endset %}
    <h2>{{ 'PrivacyManager_DeleteDataSettings'|translate }}</h2>
    <p>
        {{ 'PrivacyManager_DeleteDataDescription'|translate }} {{ 'PrivacyManager_DeleteDataDescription2'|translate }}
        <br/>
        <a href='{{ linkTo({'module':"PrivacyManager", 'action':"privacySettings"}) }}#deleteLogsAnchor'>
            {{ 'PrivacyManager_ClickHereSettings'|translate("'" ~ clickDeleteLogSettings ~ "'") }}
        </a>
    </p>
{% endif %}
<h2>{{ 'CoreAdminHome_OptOutForYourVisitors'|translate }}</h2>

<p>{{ 'CoreAdminHome_OptOutExplanation'|translate }}
    {% set optOutUrl %}{{ piwikUrl }}index.php?module=CoreAdminHome&action=optOut&language={{ language }}{% endset %}
    {% set iframeOptOut %}
        <iframe frameborder="no" width="600px" height="200px" src="{{ optOutUrl }}"></iframe>
    {% endset %}
    <code>{{ iframeOptOut }}</code>
    <br/>
    {{ 'CoreAdminHome_OptOutExplanationBis'|translate("<a href='" ~ optOutUrl ~ "' target='_blank'>","</a>")|raw }}
</p>

{% endblock %}