backupaccountform.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. /**
  15. * Class of the form.
  16. *
  17. * @return string the form's class
  18. */
  19. function formClass()
  20. {
  21. return 'form_profile_backup';
  22. }
  23. /**
  24. * URL the form posts to
  25. *
  26. * @return string the form's action URL
  27. */
  28. function action()
  29. {
  30. return common_local_url('backupaccount');
  31. }
  32. /**
  33. * Output form data
  34. *
  35. * Really, just instructions for doing a backup.
  36. *
  37. * @return void
  38. */
  39. function formData()
  40. {
  41. $msg =
  42. // TRANS: Information displayed on the backup account page.
  43. _('You can backup your account data in '.
  44. '<a href="http://activitystrea.ms/">Activity Streams</a> '.
  45. 'format. This is an experimental feature and provides an '.
  46. 'incomplete backup; private account '.
  47. 'information like email and IM addresses is not backed up. '.
  48. 'Additionally, uploaded files and direct messages are not '.
  49. 'backed up.');
  50. $this->out->elementStart('p');
  51. $this->out->raw($msg);
  52. $this->out->elementEnd('p');
  53. }
  54. /**
  55. * Buttons for the form
  56. *
  57. * In this case, a single submit button
  58. *
  59. * @return void
  60. */
  61. function formActions()
  62. {
  63. $this->out->submit('submit',
  64. // TRANS: Submit button to backup an account on the backup account page.
  65. _m('BUTTON', 'Backup'),
  66. 'submit',
  67. null,
  68. // TRANS: Title for submit button to backup an account on the backup account page.
  69. _('Backup your account.'));
  70. }
  71. }