3 class YammerAuthVerifyForm extends Form
7 function __construct($out, YammerRunner $runner)
9 parent::__construct($out);
10 $this->runner = $runner;
16 * @return int ID of the form
21 return 'yammer-auth-verify-form';
28 * @return string of the form class
33 return 'form_yammer_auth_verify';
40 * @return string URL of the action
45 return common_local_url('yammeradminpanel');
56 $this->out->element('legend', null, _m('Connect to Yammer'));
60 * Data elements of the form
67 $this->out->elementStart('p');
68 $this->out->text(_m('Follow this link to confirm authorization at Yammer; you will be prompted to log in if necessary:'));
69 $this->out->elementEnd('p');
71 $this->out->elementStart('blockquote');
72 $this->out->element('a',
73 array('href' => $this->runner->getAuthUrl(),
74 'target' => '_blank'),
75 _m('Open Yammer authentication window'));
76 $this->out->elementEnd('blockquote');
78 $this->out->element('p', array(), _m('Copy the verification code you are given into the form below:'));
80 $this->out->input('verify_token', _m('Verification code:'));
82 // iframe would be nice to avoid leaving -- since they don't seem to have callback url O_O
84 $this->out->element('iframe', array('id' => 'yammer-oauth',
85 'src' => $this->runner->getAuthUrl()));
87 // yeah, it ignores the callback_url
96 function formActions()
98 $this->out->submit('submit', _m('Verify code'), 'submit', null, _m('Verification code'));