From: Zach Copley Date: Mon, 4 Apr 2011 19:02:33 +0000 (-0700) Subject: QnA: Unify answer forms X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6fd3fa0383dfaa914d2e55965cd4676f56206c4;p=quix0rs-gnu-social.git QnA: Unify answer forms --- diff --git a/plugins/QnA/QnAPlugin.php b/plugins/QnA/QnAPlugin.php index 08a73031a5..a586d89b40 100644 --- a/plugins/QnA/QnAPlugin.php +++ b/plugins/QnA/QnAPlugin.php @@ -391,7 +391,7 @@ class QnAPlugin extends MicroAppPlugin // Don't prompt user for an answer if the question is closed or // the current user posed the question in the first place if (empty($question->closed)) { - if (!empty($user) && ($user->id != $question->profile_id)) { + if (!empty($user)) { $profile = $user->getProfile(); $answer = $question->getAnswer($profile); if (!$answer) { diff --git a/plugins/QnA/lib/qnanewanswerform.php b/plugins/QnA/lib/qnanewanswerform.php index 967b27e70c..34e73def0a 100644 --- a/plugins/QnA/lib/qnanewanswerform.php +++ b/plugins/QnA/lib/qnanewanswerform.php @@ -103,9 +103,9 @@ class QnanewanswerForm extends Form $out = $this->out; $id = "question-" . $question->id; - $out->element('p', 'answer', $question->title); + $out->element('p', 'answer', 'Your answer'); $out->hidden('id', $id); - $out->element('input', array('type' => 'text', 'name' => 'answer')); + $out->textarea('answer', 'answer'); } /** diff --git a/plugins/QnA/lib/qnareviseanswerform.php b/plugins/QnA/lib/qnareviseanswerform.php index f9ebae132c..280dd74cd9 100644 --- a/plugins/QnA/lib/qnareviseanswerform.php +++ b/plugins/QnA/lib/qnareviseanswerform.php @@ -101,13 +101,11 @@ class QnareviseanswerForm extends Form */ function formData() { - $out = $this->out; - - $out->element('p', 'Your answer to:', $this->question->title); - + $out = $this->out; + $out->element('p', 'revise-answer', 'Your answer'); $id = "answer-" . $this->answer->id; $out->hidden('id', $id); - $out->textarea('answer', 'You said:', $this->answer->content); + $out->textarea('answer', 'answer', $this->answer->content); } /**