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 // TRANS: Form legend.
57 $this->out->element('legend', null, _m('Connect to Yammer'));
61 * Data elements of the form
68 $this->out->hidden('subaction', 'authverify');
70 $this->out->elementStart('fieldset');
72 $this->out->elementStart('p');
73 // TRANS: Form instructions.
74 $this->out->text(_m('Follow this link to confirm authorization at Yammer; you will be prompted to log in if necessary:'));
75 $this->out->elementEnd('p');
77 // iframe would be nice to avoid leaving -- since they don't seem to have callback url O_O
79 $this->out->element('iframe', array('id' => 'yammer-oauth',
80 'src' => $this->runner->getAuthUrl()));
82 // yeah, it ignores the callback_url
83 // soo... crappy link. :(
85 $this->out->elementStart('p', array('class' => 'magiclink'));
86 $this->out->element('a',
87 array('href' => $this->runner->getAuthUrl(),
88 'target' => '_blank'),
89 // TRANS: Link description for a link in an external Yammer system.
90 _m('Open Yammer authentication window'));
91 $this->out->elementEnd('p');
93 // TRANS: Form instructions.
94 $this->out->element('p', array(), _m('Copy the verification code you are given below:'));
96 $this->out->elementStart('ul', array('class' => 'form_data'));
97 $this->out->elementStart('li');
98 // TRANS: Field label.
99 $this->out->input('verify_token', _m('Verification code:'));
100 $this->out->elementEnd('li');
101 $this->out->elementEnd('ul');
103 // TRANS: Button text for saving Yammer authorisation data and starting Yammer import.
104 $this->out->submit('submit', _m('BUTTON','Continue'),
105 // TRANS: Button title for saving Yammer authorisation data and starting Yammer import.
106 'submit', null, _m('Save the verification code and begin import.'));
107 $this->out->elementEnd('fieldset');
116 function formActions()