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
|
{% extends 'admin.twig' %}
{% set title %}{{ 'CoreAdminHome_MenuGeneralSettings'|translate }}{% endset %}
{% block content %}
{% import 'macros.twig' as piwik %}
{% import 'ajaxMacros.twig' as ajax %}
{{ ajax.errorDiv() }}
{{ ajax.loadingDiv() }}
{% if isGeneralSettingsAdminEnabled %}
<div piwik-content-block content-title="{{ 'CoreAdminHome_ArchivingSettings'|translate|e('html_attr') }}">
<div ng-controller="ArchivingController as archivingSettings">
<div class="form-group row">
<h3 class="col s12">{{ 'General_AllowPiwikArchivingToTriggerBrowser'|translate }}</h3>
<div class="col s12 m6">
<p>
<input type="radio" value="1" id="enableBrowserTriggerArchiving1"
name="enableBrowserTriggerArchiving" {% if enableBrowserTriggerArchiving==1 %} checked="checked"{% endif %}
/>
<label for="enableBrowserTriggerArchiving1">
{{ 'General_Yes'|translate }}
<span class="form-description">{{ 'General_Default'|translate }}</span>
</label>
</p>
<p>
<input type="radio" value="0"
id="enableBrowserTriggerArchiving2"
name="enableBrowserTriggerArchiving"
{% if enableBrowserTriggerArchiving==0 %} checked="checked"{% endif %} />
<label for="enableBrowserTriggerArchiving2">
{{ 'General_No'|translate }}
<span class="form-description">{{ 'General_ArchivingTriggerDescription'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/setup-auto-archiving/'>","</a>")|raw }}</span>
</label>
</p>
</div><div class="col s12 m6">
<div class="form-help">
{{ 'General_ArchivingInlineHelp'|translate }}
<br/>
{{ 'General_SeeTheOfficialDocumentationForMoreInformation'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/setup-auto-archiving/'>","</a>")|raw }}
</div>
</div>
</div>
<div class="form-group row">
<h3 class="col s12">
{{ 'General_ReportsContainingTodayWillBeProcessedAtMostEvery'|translate }}
</h3>
<div class="input-field col s12 m6">
<input type="text" value='{{ todayArchiveTimeToLive }}' id='todayArchiveTimeToLive' {% if not isGeneralSettingsAdminEnabled %}disabled="disabled"{% endif %} />
<span class="form-description">
{{ 'General_RearchiveTimeIntervalOnlyForTodayReports'|translate }}
</span>
</div>
<div class="col s12 m6">
{% if isGeneralSettingsAdminEnabled %}
<div class="form-help">
{% if showWarningCron %}
<strong>
{{ 'General_NewReportsWillBeProcessedByCron'|translate }}<br/>
{{ 'General_ReportsWillBeProcessedAtMostEveryHour'|translate }}
{{ 'General_IfArchivingIsFastYouCanSetupCronRunMoreOften'|translate }}<br/>
</strong>
{% endif %}
{{ 'General_SmallTrafficYouCanLeaveDefault'|translate( todayArchiveTimeToLiveDefault ) }}
<br/>
{{ 'General_MediumToHighTrafficItIsRecommendedTo'|translate(1800,3600) }}
</div>
{% endif %}
</div>
</div>
<div onconfirm="archivingSettings.save()" saving="archivingSettings.isLoading" piwik-save-button></div>
</div>
</div>
<div piwik-content-block content-title="{{ 'CoreAdminHome_EmailServerSettings'|translate|e('html_attr') }}">
<div piwik-form ng-controller="MailSmtpController as mailSettings">
<div piwik-field uicontrol="checkbox" name="mailUseSmtp"
ng-model="mailSettings.enabled"
data-title="{{ 'General_UseSMTPServerForEmail'|translate|e('html_attr') }}"
value="{% if mail.transport == 'smtp' %}1{% endif %}"
inline-help="{{ 'General_SelectYesIfYouWantToSendEmailsViaServer'|translate|e('html_attr') }}">
</div>
<div id="smtpSettings"
ng-show="mailSettings.enabled">
<div piwik-field uicontrol="text" name="mailHost"
ng-model="mailSettings.mailHost"
data-title="{{ 'General_SmtpServerAddress'|translate|e('html_attr') }}"
value="{{ mail.host }}">
</div>
<div piwik-field uicontrol="text" name="mailPort"
ng-model="mailSettings.mailPort"
data-title="{{ 'General_SmtpPort'|translate|e('html_attr') }}"
value="{{ mail.port }}" inline-help="{{ 'General_OptionalSmtpPort'|translate|e('html_attr') }}">
</div>
<div piwik-field uicontrol="select" name="mailType"
ng-model="mailSettings.mailType"
data-title="{{ 'General_AuthenticationMethodSmtp'|translate|e('html_attr') }}"
options="{{ mailTypes|json_encode }}"
value="{{ mail.type }}" inline-help="{{ 'General_OnlyUsedIfUserPwdIsSet'|translate|e('html_attr') }}">
</div>
<div piwik-field uicontrol="text" name="mailUsername"
ng-model="mailSettings.mailUsername"
data-title="{{ 'General_SmtpUsername'|translate|e('html_attr') }}"
value="{{ mail.username }}" inline-help="{{ 'General_OnlyEnterIfRequired'|translate|e('html_attr') }}"
autocomplete="off">
</div>
{% set help -%}
{{ 'General_OnlyEnterIfRequiredPassword'|translate }}<br/>
{{ 'General_WarningPasswordStored'|translate("<strong>","</strong>")|raw }}
{%- endset %}
<div piwik-field uicontrol="password" name="mailPassword"
ng-model="mailSettings.mailPassword"
ng-change="mailSettings.passwordChanged = true"
data-title="{{ 'General_SmtpPassword'|translate|e('html_attr') }}"
value="{{ mail.password ? '******' }}" inline-help="{{ help|e('html_attr') }}"
autocomplete="off">
</div>
<div piwik-field uicontrol="select" name="mailEncryption"
ng-model="mailSettings.mailEncryption"
data-title="{{ 'General_SmtpEncryption'|translate|e('html_attr') }}"
options="{{ mailEncryptions|json_encode }}"
value="{{ mail.encryption }}" inline-help="{{ 'General_EncryptedSmtpTransport'|translate|e('html_attr') }}">
</div>
</div>
<div onconfirm="mailSettings.save()" saving="mailSettings.isLoading" piwik-save-button></div>
</div>
</div>
{% endif %}
<div piwik-content-block content-title="{{ 'CoreAdminHome_BrandingSettings'|translate|e('html_attr') }}">
<div piwik-form ng-controller="BrandingController as brandingSettings">
<p>{{ 'CoreAdminHome_CustomLogoHelpText'|translate }}</p>
{% set help -%}
{% set giveUsFeedbackText %}"{{ 'General_GiveUsYourFeedback'|translate }}"{% endset %}
{{ 'CoreAdminHome_CustomLogoFeedbackInfo'|translate(giveUsFeedbackText,"<a href='?module=CorePluginsAdmin&action=plugins' rel='noreferrer noopener' target='_blank'>","</a>")|raw }}
{%- endset %}
<div piwik-field uicontrol="checkbox" name="useCustomLogo"
ng-model="brandingSettings.enabled"
ng-change="brandingSettings.toggleCustomLogo()"
data-title="{{ 'CoreAdminHome_UseCustomLogo'|translate|e('html_attr') }}"
value="{% if branding.use_custom_logo == 1 %}1{% endif %}"
{% if isPluginsAdminEnabled %}inline-help="{{ help|e('html_attr') }}"{% endif %}>
</div>
<div id="logoSettings" ng-show="brandingSettings.enabled">
<form id="logoUploadForm" method="post" enctype="multipart/form-data" action="index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo">
{% if fileUploadEnabled %}
<input type="hidden" name="token_auth" value="{{ token_auth }}"/>
{% if logosWriteable %}
<div class="alert alert-warning uploaderror" style="display:none;">
{{ 'CoreAdminHome_LogoUploadFailed'|translate }}
</div>
<div piwik-field uicontrol="file" name="customLogo"
ng-change="brandingSettings.updateLogo()"
ng-model="brandingSettings.customLogo"
data-title="{{ 'CoreAdminHome_LogoUpload'|translate|e('html_attr') }}"
inline-help="{{ 'CoreAdminHome_LogoUploadHelp'|translate("JPG / PNG / GIF", 110)|e('html_attr') }}">
</div>
<div class="row">
<div class="col s12">
<img data-src="{{ pathUserLogo }}" data-src-exists="{{ hasUserLogo ? '1':'0' }}"
id="currentLogo" style="max-height: 150px"/>
</div>
</div>
<div piwik-field uicontrol="file" name="customFavicon"
ng-change="brandingSettings.updateLogo()"
ng-model="brandingSettings.customFavicon"
data-title="{{ 'CoreAdminHome_FaviconUpload'|translate|e('html_attr') }}"
inline-help="{{ 'CoreAdminHome_LogoUploadHelp'|translate("JPG / PNG / GIF", 16)|e('html_attr') }}">
</div>
<div class="row">
<div class="col s12">
<img data-src="{{ pathUserFavicon }}" data-src-exists="{{ hasUserFavicon ? '1':'0' }}"
id="currentFavicon" width="16" height="16"/>
</div>
</div>
{% else %}
<div class="alert alert-warning">
{{ 'CoreAdminHome_LogoNotWriteableInstruction'
|translate("<code>"~pathUserLogoDirectory~"</code><br/>", pathUserLogo ~", "~ pathUserLogoSmall ~", "~ pathUserLogoSVG ~"")|raw }}
</div>
{% endif %}
{% else %}
<div class="alert alert-warning">
{{ 'CoreAdminHome_FileUploadDisabled'|translate("file_uploads=1") }}
</div>
{% endif %}
</form>
</div>
<div onconfirm="brandingSettings.save()" saving="brandingSettings.isLoading" piwik-save-button></div>
</div>
</div>
{% if isDataPurgeSettingsEnabled %}
<div piwik-content-block content-title="{{ 'PrivacyManager_DeleteDataSettings'|translate|e('html_attr') }}">
<p>{{ 'PrivacyManager_DeleteDataDescription'|translate }}</p>
<p>
<a href='{{ linkTo({'module':"PrivacyManager", 'action':"privacySettings"}) }}#deleteLogsAnchor'>
{{ 'PrivacyManager_ClickHereSettings'|translate("'" ~ 'PrivacyManager_DeleteDataSettings'|translate ~ "'") }}
</a>
</p>
</div>
{% endif %}
<div piwik-plugin-settings mode="admin"></div>
{% endblock %}
|