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 form_settings';
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->hidden('subaction', 'authverify');
69 $this->out->elementStart('fieldset');
71 $this->out->elementStart('p');
72 $this->out->text(_m('Follow this link to confirm authorization at Yammer; you will be prompted to log in if necessary:'));
73 $this->out->elementEnd('p');
75 // iframe would be nice to avoid leaving -- since they don't seem to have callback url O_O
77 $this->out->element('iframe', array('id' => 'yammer-oauth',
78 'src' => $this->runner->getAuthUrl()));
80 // yeah, it ignores the callback_url
81 // soo... crappy link. :(
83 $this->out->elementStart('p', array('class' => 'magiclink'));
84 $this->out->element('a',
85 array('href' => $this->runner->getAuthUrl(),
86 'target' => '_blank'),
87 _m('Open Yammer authentication window'));
88 $this->out->elementEnd('p');
90 $this->out->element('p', array(), _m('Copy the verification code you are given below:'));
92 $this->out->elementStart('ul', array('class' => 'form_data'));
93 $this->out->elementStart('li');
94 $this->out->input('verify_token', _m('Verification code:'));
95 $this->out->elementEnd('li');
96 $this->out->elementEnd('ul');
98 $this->out->submit('submit', _m('Continue'), 'submit', null, _m('Save code and begin import'));
99 $this->out->elementEnd('fieldset');
108 function formActions()