1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- if (!defined('GNUSOCIAL')) {
- exit(1);
- }
- class PollPrefsForm extends Form
- {
- public function __construct(Action $out, User_poll_prefs $prefs = null)
- {
- parent::__construct($out);
- $this->prefs = $prefs;
- }
-
- public function formData()
- {
- $this->elementStart('fieldset');
- $this->elementStart('ul', 'form_data');
- $this->elementStart('li');
- $this->checkbox(
- 'hide_responses',
- _('Do not deliver poll responses to my home timeline'),
- ($this->prefs instanceof User_poll_prefs && $this->prefs->hide_responses)
- );
- $this->elementEnd('li');
- $this->elementEnd('ul');
- $this->elementEnd('fieldset');
- }
-
- public function formActions()
- {
- $this->submit('submit', _('Save'));
- }
-
- public function id()
- {
- return 'form_poll_prefs';
- }
-
- public function action()
- {
- return common_local_url('pollsettings');
- }
-
- public function formClass()
- {
- return 'form_settings';
- }
- }
|