Repository navigation
Expand file tree
/
Copy pathconfig.php
More file actions
43 lines (37 loc) · 1.5 KB
/
Copy pathconfig.php
File metadata and controls
43 lines (37 loc) · 1.5 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
<?php
require_once INCLUDE_DIR . 'class.plugin.php';
class WebhookPluginConfig 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('webhook');
}
function getOptions() {
list ($__, $_N) = self::translate();
return array(
'webhook' => new SectionBreakField(array(
'hint' => $__('<br>For mobile app osTicket Admin, use this Webhook URL: https://api.osticket.com.br/push_notification<br><br>Readme first: https://github.com/luispimenta/osticket-webhook')
)),
'webhook-webhook-url' => new TextboxField(array(
'label' => $__('Webhook URL'),
'required'=>true,
'default' => 'https://api.osticket.com.br/push_notification',
'placeholder' => "For mobile app osTicket Admin, use this Webhook URL: https://api.osticket.com.br/push_notification",
'configuration' => array(
'size' => 130,
'length' => 300
)
))
);
}
}