backupaccountform.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /**
  3. * A form for backing up the account.
  4. *
  5. * @category Account
  6. * @package StatusNet
  7. * @author Evan Prodromou <evan@status.net>
  8. * @copyright 2010 StatusNet, Inc.
  9. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  10. * @link http://status.net/
  11. */
  12. class BackupAccountForm extends Form
  13. {
  14. public $widgetOpts;
  15. public $scoped;
  16. /**
  17. * Class of the form.
  18. *
  19. * @return string the form's class
  20. */
  21. function formClass()
  22. {
  23. return 'form_profile_backup';
  24. }
  25. /**
  26. * URL the form posts to
  27. *
  28. * @return string the form's action URL
  29. */
  30. function action()
  31. {
  32. return common_local_url('backupaccount');
  33. }
  34. /**
  35. * Output form data
  36. *
  37. * Really, just instructions for doing a backup.
  38. *
  39. * @return void
  40. */
  41. function formData()
  42. {
  43. $msg =
  44. // TRANS: Information displayed on the backup account page.
  45. _('You can backup your account data in '.
  46. '<a href="http://activitystrea.ms/">Activity Streams</a> '.
  47. 'format. This is an experimental feature and provides an '.
  48. 'incomplete backup; private account '.
  49. 'information like email and IM addresses is not backed up. '.
  50. 'Additionally, uploaded files and direct messages are not '.
  51. 'backed up.');
  52. $this->out->elementStart('p');
  53. $this->out->raw($msg);
  54. $this->out->elementEnd('p');
  55. }
  56. /**
  57. * Buttons for the form
  58. *
  59. * In this case, a single submit button
  60. *
  61. * @return void
  62. */
  63. function formActions()
  64. {
  65. $this->out->submit('submit',
  66. // TRANS: Submit button to backup an account on the backup account page.
  67. _m('BUTTON', 'Backup'),
  68. 'submit',
  69. null,
  70. // TRANS: Title for submit button to backup an account on the backup account page.
  71. _('Backup your account.'));
  72. }
  73. }