123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class QnanewquestionForm extends Form
- {
- protected $title;
- protected $description;
-
- function __construct($out = null, $title = null, $description = null, $options = null)
- {
- parent::__construct($out);
- $this->title = $title;
- $this->description = $description;
- }
-
- function id()
- {
- return 'newquestion-form';
- }
-
- function formClass()
- {
- return 'form_settings ajax-notice';
- }
-
- function action()
- {
- return common_local_url('qnanewquestion');
- }
-
- function formData()
- {
- $this->out->elementStart('fieldset', array('id' => 'newquestion-data'));
- $this->out->elementStart('ul', 'form_data');
- $this->li();
- $this->out->input(
- 'qna-question-title',
-
- _m('LABEL','Title'),
- $this->title,
-
- _m('The title of your question.'),
- 'title',
- true
- );
- $this->unli();
- $this->li();
- $this->out->textarea(
- 'qna-question-description',
-
- _m('LABEL','Description'),
- $this->description,
-
- _m('Your question in detail.'),
- 'description',
- true
- );
- $this->unli();
- $this->out->elementEnd('ul');
- $toWidget = new ToSelector(
- $this->out,
- common_current_user(),
- null
- );
- $toWidget->show();
- $this->out->elementEnd('fieldset');
- }
-
- function formActions()
- {
-
- $this->out->submit('qna-question-submit', _m('BUTTON', 'Save'), 'submit', 'submit');
- }
- }
|