1<?php
2
3class setting_plugin_sfauth extends setting {
4    public $_instance = 1;
5
6    function update($input) {
7        return true;
8    }
9
10    public function html(&$plugin, $echo = false) {
11        $key   = htmlspecialchars($this->_key);
12        $value = helper_plugin_sfauth::getLoginURL($this->_instance);
13
14        $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
15        $input = '<div><code>'.$value.'</code></div>';
16        return array($label, $input);
17    }
18}
19
20
21$meta['auth url']          = array('multichoice', '_choices' => array('https://test.salesfoce.com', 'https://login.salesforce.com'));
22$meta['owner domain']      = array('string');
23
24$meta['callback url']      = array('plugin_sfauth', '_instance' => 1);
25$meta['consumer key']      = array('string');
26$meta['consumer secret']   = array('password');
27
28$meta['callback url 2']    = array('plugin_sfauth', '_instance' => 2);
29$meta['consumer key 2']    = array('string');
30$meta['consumer secret 2'] = array('password');
31
32$meta['callback url 3']    = array('plugin_sfauth', '_instance' => 3);
33$meta['consumer key 3']    = array('string');
34$meta['consumer secret 3'] = array('password');
35