mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 15:21:03 +01:00
Clean up misc Ponder details
Summary: Ref T3578, Changes "Ask Away" to just "Submit", Changes Description to Details, check for is_new when offering closed state on question edit. Test Plan: New Question, Edit Question Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T3578 Differential Revision: https://secure.phabricator.com/D13891
This commit is contained in:
parent
489c7ce048
commit
9e306710b3
2 changed files with 18 additions and 9 deletions
|
@ -23,7 +23,9 @@ final class PonderQuestionEditController extends PonderController {
|
||||||
$question->getPHID(),
|
$question->getPHID(),
|
||||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||||
$v_projects = array_reverse($v_projects);
|
$v_projects = array_reverse($v_projects);
|
||||||
|
$is_new = false;
|
||||||
} else {
|
} else {
|
||||||
|
$is_new = true;
|
||||||
$question = PonderQuestion::initializeNewQuestion($viewer);
|
$question = PonderQuestion::initializeNewQuestion($viewer);
|
||||||
$v_projects = array();
|
$v_projects = array();
|
||||||
}
|
}
|
||||||
|
@ -124,13 +126,17 @@ final class PonderQuestionEditController extends PonderController {
|
||||||
->setSpacePHID($v_space)
|
->setSpacePHID($v_space)
|
||||||
->setPolicies($policies)
|
->setPolicies($policies)
|
||||||
->setValue($v_view)
|
->setValue($v_view)
|
||||||
->setCapability(PhabricatorPolicyCapability::CAN_VIEW))
|
->setCapability(PhabricatorPolicyCapability::CAN_VIEW));
|
||||||
->appendChild(
|
|
||||||
id(new AphrontFormSelectControl())
|
|
||||||
->setLabel(pht('Status'))
|
if (!$is_new) {
|
||||||
->setName('status')
|
$form->appendChild(
|
||||||
->setValue($v_status)
|
id(new AphrontFormSelectControl())
|
||||||
->setOptions(PonderQuestionStatus::getQuestionStatusMap()));
|
->setLabel(pht('Status'))
|
||||||
|
->setName('status')
|
||||||
|
->setValue($v_status)
|
||||||
|
->setOptions(PonderQuestionStatus::getQuestionStatusMap()));
|
||||||
|
}
|
||||||
|
|
||||||
$form->appendControl(
|
$form->appendControl(
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
|
@ -142,7 +148,7 @@ final class PonderQuestionEditController extends PonderController {
|
||||||
$form->appendChild(
|
$form->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->addCancelButton($this->getApplicationURI())
|
->addCancelButton($this->getApplicationURI())
|
||||||
->setValue(pht('Ask Away!')));
|
->setValue(pht('Submit')));
|
||||||
|
|
||||||
$preview = id(new PHUIRemarkupPreviewPanel())
|
$preview = id(new PHUIRemarkupPreviewPanel())
|
||||||
->setHeader(pht('Question Preview'))
|
->setHeader(pht('Question Preview'))
|
||||||
|
|
|
@ -171,7 +171,10 @@ final class PonderQuestionViewController extends PonderController {
|
||||||
|
|
||||||
$view->invokeWillRenderEvent();
|
$view->invokeWillRenderEvent();
|
||||||
|
|
||||||
$view->addSectionHeader(pht('Question'));
|
$view->addSectionHeader(
|
||||||
|
pht('Details'),
|
||||||
|
PHUIPropertyListView::ICON_SUMMARY);
|
||||||
|
|
||||||
$view->addTextContent(
|
$view->addTextContent(
|
||||||
array(
|
array(
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
|
|
Loading…
Reference in a new issue