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 // TRANS: Form legend for adding details to connect to a remote Yammer API.
57 $this->out->element('legend', null, _m('Yammer API registration'));
61 * Data elements of the form
68 $this->out->hidden('subaction', 'apikey');
70 $this->out->elementStart('fieldset');
72 $this->out->elementStart('p');
73 // TRANS: Explanation of what needs to be done to connect to a Yammer network.
74 $this->out->text(_m('Before we can connect to your Yammer network, ' .
75 'you will need to register the importer as an ' .
76 'application authorized to pull data on your behalf. ' .
77 'This registration will work only for your own network. ' .
78 'Follow this link to register the app at Yammer; ' .
79 'you will be prompted to log in if necessary:'));
80 $this->out->elementEnd('p');
82 $this->out->elementStart('p', array('class' => 'magiclink'));
83 $this->out->element('a',
84 array('href' => 'https://www.yammer.com/client_applications/new',
85 'target' => '_blank'),
86 // TRANS: Link description to a Yammer application registration form.
87 _m('Open Yammer application registration form'));
88 $this->out->elementEnd('p');
90 // TRANS: Instructions.
91 $this->out->element('p', array(), _m('Copy the consumer key and secret you are given into the form below:'));
93 $this->out->elementStart('ul', array('class' => 'form_data'));
94 $this->out->elementStart('li');
95 // TRANS: Field label for a Yammer consumer key.
96 $this->out->input('consumer_key', _m('Consumer key:'), common_config('yammer', 'consumer_key'));
97 $this->out->elementEnd('li');
98 $this->out->elementStart('li');
99 // TRANS: Field label for a Yammer consumer secret.
100 $this->out->input('consumer_secret', _m('Consumer secret:'), common_config('yammer', 'consumer_secret'));
101 $this->out->elementEnd('li');
102 $this->out->elementEnd('ul');
104 // TRANS: Button text for saving a Yammer API registration.
105 $this->out->submit('submit', _m('BUTTON','Save'),
106 // TRANS: Button title for saving a Yammer API registration.
107 'submit', null, _m('Save the entered consumer key and consumer secret.'));
109 $this->out->elementEnd('fieldset');
118 function formActions()