2010-09-25 09:22:44 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class YammerAuthInitForm extends Form
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* ID of the form
|
|
|
|
*
|
|
|
|
* @return int ID of the form
|
|
|
|
*/
|
|
|
|
|
|
|
|
function id()
|
|
|
|
{
|
|
|
|
return 'yammer-auth-init-form';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* class of the form
|
|
|
|
*
|
|
|
|
* @return string of the form class
|
|
|
|
*/
|
|
|
|
|
|
|
|
function formClass()
|
|
|
|
{
|
2010-09-28 08:56:48 +09:00
|
|
|
return 'form_yammer_auth_init form_settings';
|
2010-09-25 09:22:44 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Action of the form
|
|
|
|
*
|
|
|
|
* @return string URL of the action
|
|
|
|
*/
|
|
|
|
|
|
|
|
function action()
|
|
|
|
{
|
|
|
|
return common_local_url('yammeradminpanel');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Legend of the Form
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function formLegend()
|
|
|
|
{
|
|
|
|
$this->out->element('legend', null, _m('Connect to Yammer'));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Data elements of the form
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
|
|
|
|
function formData()
|
|
|
|
{
|
2010-09-28 08:56:48 +09:00
|
|
|
$this->out->hidden('subaction', 'authinit');
|
|
|
|
|
|
|
|
$this->out->elementStart('fieldset');
|
|
|
|
$this->out->submit('submit', _m('Start authentication'), 'submit', null, _m('Request authorization to connect to Yammer account'));
|
|
|
|
$this->out->submit('change-apikey', _m('Change API key'));
|
|
|
|
$this->out->elementEnd('fieldset');
|
2010-09-25 09:22:44 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Action elements
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
|
|
|
|
function formActions()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|