]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/YammerImport/lib/yammerauthinitform.php
Yammer import API keys can now be overridden by the admin.
[quix0rs-gnu-social.git] / plugins / YammerImport / lib / yammerauthinitform.php
1 <?php
2
3 class YammerAuthInitForm extends Form
4 {
5     /**
6      * ID of the form
7      *
8      * @return int ID of the form
9      */
10
11     function id()
12     {
13         return 'yammer-auth-init-form';
14     }
15
16
17     /**
18      * class of the form
19      *
20      * @return string of the form class
21      */
22
23     function formClass()
24     {
25         return 'form_yammer_auth_init form_settings';
26     }
27
28
29     /**
30      * Action of the form
31      *
32      * @return string URL of the action
33      */
34
35     function action()
36     {
37         return common_local_url('yammeradminpanel');
38     }
39
40
41     /**
42      * Legend of the Form
43      *
44      * @return void
45      */
46     function formLegend()
47     {
48         $this->out->element('legend', null, _m('Connect to Yammer'));
49     }
50
51     /**
52      * Data elements of the form
53      *
54      * @return void
55      */
56
57     function formData()
58     {
59         $this->out->hidden('subaction', 'authinit');
60
61         $this->out->elementStart('fieldset');
62         $this->out->submit('submit', _m('Start authentication'), 'submit', null, _m('Request authorization to connect to Yammer account'));
63         $this->out->submit('change-apikey', _m('Change API key'));
64         $this->out->elementEnd('fieldset');
65     }
66
67     /**
68      * Action elements
69      *
70      * @return void
71      */
72
73     function formActions()
74     {
75     }
76 }