-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskerAdminConfig.php
More file actions
60 lines (48 loc) · 1.9 KB
/
TaskerAdminConfig.php
File metadata and controls
60 lines (48 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
<?php namespace ProcessWire;
// DEBUG disable file compiler for this file
// FileCompiler=0
/*
* TaskerAdmin module - configuration
*
* Provides management interfaces (HTML and REST API) for Tasker.
*
* Copyright 2018 Tamas Meszaros <mt+github@webit.hu>
* This file licensed under Mozilla Public License v2.0 http://mozilla.org/MPL/2.0/
*/
class TaskerAdminConfig extends ModuleConfig {
public function getDefaults() {
return array(
'enableWebRun' => 1,
);
}
public function getInputfields() {
$inputfields = parent::getInputfields();
/******************** Module info *********************************/
$fieldset = $this->wire('modules')->get('InputfieldFieldset');
$fieldset->label = __('About the module and usage tips');
$fieldset->collapsed = InputfieldFieldset::collapsedYes;
$f = $this->modules->get('InputfieldMarkup');
$f->label = __('About the module');
$f->columnWidth = 50;
$f->value = __('This module provides an admin interface and a backend API for Tasker.
For more information check the module\'s home');
$fieldset->add($f);
$f = $this->modules->get('InputfieldMarkup');
$f->label = __('Usage tips');
$f->columnWidth = 50;
$f->value = __('See the Wiki on the GitHub!');
$fieldset->add($f);
$inputfields->add($fieldset);
/******************** Scheduler settings ******************************/
$fieldset = $this->wire('modules')->get('InputfieldFieldset');
$fieldset->label = __('Module settings');
$f = $this->modules->get('InputfieldCheckbox');
$f->attr('name', 'enableWebRun');
$f->label = __('Allow executing tasks using TaskerAdmin\'s Web interface');
$f->description = __('A Javascript frontend utility will periodically call the Tasker backend to execute the selected task.');
$f->columnWidth = 50;
$fieldset->add($f);
$inputfields->add($fieldset);
return $inputfields;
}
}