3 class YammerApikeyForm extends Form
7 function __construct($out)
9 parent::__construct($out);
10 $this->runner = $runner;
16 * @return int ID of the form
21 return 'yammer-apikey-form';
28 * @return string of the form class
33 return 'form_yammer_apikey form_settings';
40 * @return string URL of the action
45 return common_local_url('yammeradminpanel');
56 $this->out->element('legend', null, _m('Yammer API registration'));
60 * Data elements of the form
67 $this->out->hidden('subaction', 'apikey');
69 $this->out->elementStart('fieldset');
71 $this->out->elementStart('p');
72 $this->out->text(_m('Before we can connect to your Yammer network, ' .
73 'you will need to register the importer as an ' .
74 'application authorized to pull data on your behalf. ' .
75 'This registration will work only for your own network. ' .
76 'Follow this link to register the app at Yammer; ' .
77 'you will be prompted to log in if necessary:'));
78 $this->out->elementEnd('p');
80 $this->out->elementStart('p', array('class' => 'magiclink'));
81 $this->out->element('a',
82 array('href' => 'https://www.yammer.com/client_applications/new',
83 'target' => '_blank'),
84 _m('Open Yammer application registration form'));
85 $this->out->elementEnd('p');
87 $this->out->element('p', array(), _m('Copy the consumer key and secret you are given into the form below:'));
89 $this->out->elementStart('ul', array('class' => 'form_data'));
90 $this->out->elementStart('li');
91 $this->out->input('consumer_key', _m('Consumer key:'), common_config('yammer', 'consumer_key'));
92 $this->out->elementEnd('li');
93 $this->out->elementStart('li');
94 $this->out->input('consumer_secret', _m('Consumer secret:'), common_config('yammer', 'consumer_secret'));
95 $this->out->elementEnd('li');
96 $this->out->elementEnd('ul');
98 $this->out->submit('submit', _m('Save'), 'submit', null, _m('Save these consumer keys'));
100 $this->out->elementEnd('fieldset');
109 function formActions()