forked from GNUsocial/gnu-social
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
This commit is contained in:
commit
51dc0e1c9b
@ -391,7 +391,7 @@ class QnAPlugin extends MicroAppPlugin
|
|||||||
// Don't prompt user for an answer if the question is closed or
|
// Don't prompt user for an answer if the question is closed or
|
||||||
// the current user posed the question in the first place
|
// the current user posed the question in the first place
|
||||||
if (empty($question->closed)) {
|
if (empty($question->closed)) {
|
||||||
if (!empty($user) && ($user->id != $question->profile_id)) {
|
if (!empty($user)) {
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
$answer = $question->getAnswer($profile);
|
$answer = $question->getAnswer($profile);
|
||||||
if (!$answer) {
|
if (!$answer) {
|
||||||
|
@ -103,9 +103,9 @@ class QnanewanswerForm extends Form
|
|||||||
$out = $this->out;
|
$out = $this->out;
|
||||||
$id = "question-" . $question->id;
|
$id = "question-" . $question->id;
|
||||||
|
|
||||||
$out->element('p', 'answer', $question->title);
|
$out->element('p', 'answer', 'Your answer');
|
||||||
$out->hidden('id', $id);
|
$out->hidden('id', $id);
|
||||||
$out->element('input', array('type' => 'text', 'name' => 'answer'));
|
$out->textarea('answer', 'answer');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -102,12 +102,10 @@ class QnareviseanswerForm extends Form
|
|||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$out = $this->out;
|
$out = $this->out;
|
||||||
|
$out->element('p', 'revise-answer', 'Your answer');
|
||||||
$out->element('p', 'Your answer to:', $this->question->title);
|
|
||||||
|
|
||||||
$id = "answer-" . $this->answer->id;
|
$id = "answer-" . $this->answer->id;
|
||||||
$out->hidden('id', $id);
|
$out->hidden('id', $id);
|
||||||
$out->textarea('answer', 'You said:', $this->answer->content);
|
$out->textarea('answer', 'answer', $this->answer->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user