// 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) {
$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');
}
/**
*/
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);
}
/**