-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemSettings.php
More file actions
70 lines (63 loc) · 1.9 KB
/
SystemSettings.php
File metadata and controls
70 lines (63 loc) · 1.9 KB
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
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
* @source https://github.com/jbrule/matomoplugin-HidePasswordReset/blob/5.x-dev/SystemSettings.php
* @source https://github.com/openmost/CodeInjector/blob/5.x-dev/SystemSettings.php
*/
namespace Piwik\Plugins\Enhancements;
use Piwik\Piwik;
use Piwik\Settings\Setting;
use Piwik\Settings\FieldConfig;
class SystemSettings extends \Piwik\Settings\Plugin\SystemSettings
{
/** @var Setting */
public $bodyTop;
/** @var Setting */
public $bodyBottom;
/** @var Setting */
public $message;
/**
*/
protected function init()
{
$attributes = [
'rows' => 10,
'style' => 'min-height: 250px !important; font-family: monospace;'
];
$this->bodyTop = $this->makeSetting(
'bodyTop',
'',
FieldConfig::TYPE_STRING,
function (FieldConfig $field) use ($attributes) {
$field->title = Piwik::translate('CodeInjector_BodyTopTitle');
$field->uiControl = FieldConfig::UI_CONTROL_TEXTAREA;
$field->uiControlAttributes = $attributes;
$field->description = Piwik::translate('CodeInjector_BodyTopDescription');
}
);
$this->bodyBottom = $this->makeSetting(
'bodyBottom',
'',
FieldConfig::TYPE_STRING,
function (FieldConfig $field) use ($attributes) {
$field->title = Piwik::translate('CodeInjector_BodyBottomTitle');
$field->uiControl = FieldConfig::UI_CONTROL_TEXTAREA;
$field->uiControlAttributes = $attributes;
$field->description = Piwik::translate('CodeInjector_BodyBottomDescription');
}
);
$this->message = $this->makeSetting(
'message',
'',
FieldConfig::TYPE_STRING,
function (FieldConfig $field) {
$field->title = 'Login Message';
$field->uiControl = FieldConfig::UI_CONTROL_TEXTAREA;
$field->description = 'Message to display in lieu of "Lost your password?"';
}
);
}
}