-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.php
More file actions
54 lines (51 loc) · 1.53 KB
/
config.php
File metadata and controls
54 lines (51 loc) · 1.53 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
<?php
require_once INCLUDE_DIR . 'class.plugin.php';
class MergingPluginConfig extends PluginConfig
{
// Provide compatibility function for versions of osTicket prior to
// translation support (v1.9.4)
function translate()
{
if (! method_exists('Plugin', 'translate')) {
return array(
function ($x) {
return $x;
},
function ($x, $y, $n) {
return $n != 1 ? $y : $x;
}
);
}
return Plugin::translate('merging');
}
/**
* Build an Admin settings page.
*
* {@inheritdoc}
*
* @see PluginConfig::getOptions()
*/
function getOptions()
{
list ($__, $_N) = self::translate();
$statuses = array();
foreach(TicketStatusList::getStatuses() as $status){
$statuses[$status->getId()] = $status->getName();
}
return array(
'childstatus' => new ChoiceField([
'label' => $__('Child status'),
'required' => true,
'hint' => $__('What status do you want child tickets to get.'),
'default' => '',
'choices' => $statuses
]),
'copyrecipients' => new BooleanField([
'label' => $__('Copy recipients'),
'required' => false,
'hint' => $__('When merging tickets bring the owner of the child ticket and collaborators.'),
'default' => true
]),
);
}
}