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->input('verify_token', _m('Verification code:'), '', _m("Click through and paste the code it gives you below..."));
69 // iframe would be nice to avoid leaving -- since they don't seem to have callback url O_O
71 $this->out->element('iframe', array('id' => 'yammer-oauth',
72 'src' => $this->runner->getAuthUrl()));
74 // yeah, it ignores the callback_url
75 $this->out->element('a',
76 array('href' => $this->runner->getAuthUrl(),
77 'target' => '_blank'),
87 function formActions()
89 $this->out->submit('submit', _m('Verify code'), 'submit', null, _m('Verification code'));