]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - lib/backupaccountform.php
Use ToSelector choice again.
[quix0rs-gnu-social.git] / lib / backupaccountform.php
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     /**
25      * URL the form posts to
26      *
27      * @return string the form's action URL
28      */
29     function action()
30     {
31         return common_local_url('backupaccount');
32     }
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     /**
58      * Buttons for the form
59      *
60      * In this case, a single submit button
61      *
62      * @return void
63      */
64     function formActions()
65     {
66         $this->out->submit('submit',
67                            // TRANS: Submit button to backup an account on the backup account page.
68                            _m('BUTTON', 'Backup'),
69                            'submit',
70                            null,
71                            // TRANS: Title for submit button to backup an account on the backup account page.
72                            _('Backup your account.'));
73     }
74 }