1<?php
2/**
3 * Options for the evesso plugin
4 *
5 * @author Andreas Gohr <andi@splitbrain.org>
6 */
7
8class setting_plugin_evesso extends setting {
9
10    function update($input) {
11        return true;
12    }
13
14    public function html(\admin_plugin_config $plugin, $echo = false) {
15        /** @var helper_plugin_evesso $hlp */
16        $hlp = plugin_load('helper', 'evesso');
17
18        $key   = htmlspecialchars($this->_key);
19        $value = '<code>'.$hlp->getRedirectURI().'</code>';
20
21        $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
22        $input = '<div>'.$value.'</div>';
23        return array($label, $input);
24    }
25
26}
27
28class plugin_evesso extends setting {
29
30    function update($input) {
31        return true;
32    }
33
34    public function html(\admin_plugin_config $plugin, $echo = false) {
35        /** @var helper_plugin_evesso $hlp */
36        $hlp = plugin_load('helper', 'evesso');
37
38        $key   = htmlspecialchars($this->_key);
39        $value = '<code>'.$hlp->getRedirectURI().'</code>';
40
41        $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
42        $input = '<div>'.$value.'</div>';
43        return array($label, $input);
44    }
45
46}
47
48$meta['info']                = array('plugin_evesso');
49$meta['custom-redirectURI']  = array('string','_caution' => 'danger');
50$meta['eveonline-key']       = array('string');
51$meta['eveonline-secret']    = array('string');
52$meta['singleService']       = array('multichoice',
53                                    '_caution' => 'danger',
54                                    '_other' => 'never',
55                                    '_choices' => array(
56                                        '',
57                                        'EveOnlinePage',
58                                        'EveOnline',
59                                        )
60                                    );
61$meta['register-on-auth']    = array('onoff','_caution' => 'security');
62$meta['require-corporation']   = array('string', '_caution' => 'security');
63$meta['require-alliance']      = array('string', '_caution' => 'security');
64$meta['require-faction']       = array('string', '_caution' => 'security');
65$meta['login-button']        = array('multichoice',
66                                    '_choices' => array(
67                                        'Text',
68                                        'LargeLight',
69                                        'LargeDark',
70                                        'SmallLight',
71                                        'SmallDark'
72                                        ));
73