forked from Techno11/os-ticket-snipe-it
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
62 lines (59 loc) · 2.19 KB
/
config.php
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
<?php
require_once INCLUDE_DIR . 'class.plugin.php';
class SnipeITPluginConfig 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('mentioner');
}
/**
* Build an Admin settings page.
* TODO: Update for my app
* {@inheritdoc}
*
* @see PluginConfig::getOptions()
*/
function getOptions()
{
list ($__, $_N) = self::translate();
return array(
'asl' => new BooleanField([ //Auto Snipe-IT Link
'label' => $__('Enable Auto Snipe-IT Link'),
'hint' => $__('By default, enable all [square-brackets] to link to Asset IDs'),
'default' => true
]),
'apikey' => new TextareaField([ //API Key
'label' => $__('Snipe-IT Api Key'),
'hint' => $__('Your Secret API Key for Snipe-IT'),
'default' => ''
]),
'url' => new TextareaField([ //Snipe-IT Url
'label' => $__('Snipe-IT URL'),
'hint' => $__('The URL Of you Snipe-IT Server (http://url.com/). Please make sure to UNLINK the URL before saving.'),
'default' => 'http://url.com/'
])/*,
'aiec' => new BooleanField([ //Asset ID Encasement Character
'label' => $__("Encasement Character(s) for Asset ID"),
'hint' => $__('Character the software looks for to link an asset ID to Snipe-IT'),
'default' => true
]),
'snec' => new BooleanField([ //Serial Number Encasement Character
'label' => $__("Encasement Character(s) for Asset ID"),
'hint' => $__('Character the software looks for to link an asset ID to Snipe-IT'),
'default' => true
]),*/
);
}
}