yammerauthinit.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. class YammerAuthInitForm extends Form
  3. {
  4. /**
  5. * ID of the form
  6. *
  7. * @return int ID of the form
  8. */
  9. function id()
  10. {
  11. return 'yammer-auth-init-form';
  12. }
  13. /**
  14. * class of the form
  15. *
  16. * @return string of the form class
  17. */
  18. function formClass()
  19. {
  20. return 'form_yammer_auth_init form_settings';
  21. }
  22. /**
  23. * Action of the form
  24. *
  25. * @return string URL of the action
  26. */
  27. function action()
  28. {
  29. return common_local_url('yammeradminpanel');
  30. }
  31. /**
  32. * Legend of the Form
  33. *
  34. * @return void
  35. */
  36. function formLegend()
  37. {
  38. // TRANS: Form legend.
  39. $this->out->element('legend', null, _m('Connect to Yammer'));
  40. }
  41. /**
  42. * Data elements of the form
  43. *
  44. * @return void
  45. */
  46. function formData()
  47. {
  48. $this->out->hidden('subaction', 'authinit');
  49. $this->out->elementStart('fieldset');
  50. // TRANS: Button text for starting Yammer authentication.
  51. $this->out->submit('submit', _m('BUTTON','Start authentication'),
  52. // TRANS: Button title for starting Yammer authentication.
  53. 'submit', null, _m('Request authorization to connect to a Yammer account.'));
  54. // TRANS: Button text for starting changing a Yammer API key.
  55. $this->out->submit('change-apikey', _m('BUTTON','Change API key'));
  56. $this->out->elementEnd('fieldset');
  57. }
  58. /**
  59. * Action elements
  60. *
  61. * @return void
  62. */
  63. function formActions()
  64. {
  65. }
  66. }