mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +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(),
|
||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||
$v_projects = array_reverse($v_projects);
|
||||
$is_new = false;
|
||||
} else {
|
||||
$is_new = true;
|
||||
$question = PonderQuestion::initializeNewQuestion($viewer);
|
||||
$v_projects = array();
|
||||
}
|
||||
|
@ -124,13 +126,17 @@ final class PonderQuestionEditController extends PonderController {
|
|||
->setSpacePHID($v_space)
|
||||
->setPolicies($policies)
|
||||
->setValue($v_view)
|
||||
->setCapability(PhabricatorPolicyCapability::CAN_VIEW))
|
||||
->appendChild(
|
||||
id(new AphrontFormSelectControl())
|
||||
->setLabel(pht('Status'))
|
||||
->setName('status')
|
||||
->setValue($v_status)
|
||||
->setOptions(PonderQuestionStatus::getQuestionStatusMap()));
|
||||
->setCapability(PhabricatorPolicyCapability::CAN_VIEW));
|
||||
|
||||
|
||||
if (!$is_new) {
|
||||
$form->appendChild(
|
||||
id(new AphrontFormSelectControl())
|
||||
->setLabel(pht('Status'))
|
||||
->setName('status')
|
||||
->setValue($v_status)
|
||||
->setOptions(PonderQuestionStatus::getQuestionStatusMap()));
|
||||
}
|
||||
|
||||
$form->appendControl(
|
||||
id(new AphrontFormTokenizerControl())
|
||||
|
@ -142,7 +148,7 @@ final class PonderQuestionEditController extends PonderController {
|
|||
$form->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->addCancelButton($this->getApplicationURI())
|
||||
->setValue(pht('Ask Away!')));
|
||||
->setValue(pht('Submit')));
|
||||
|
||||
$preview = id(new PHUIRemarkupPreviewPanel())
|
||||
->setHeader(pht('Question Preview'))
|
||||
|
|
|
@ -171,7 +171,10 @@ final class PonderQuestionViewController extends PonderController {
|
|||
|
||||
$view->invokeWillRenderEvent();
|
||||
|
||||
$view->addSectionHeader(pht('Question'));
|
||||
$view->addSectionHeader(
|
||||
pht('Details'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
|
||||
$view->addTextContent(
|
||||
array(
|
||||
phutil_tag(
|
||||
|
|
Loading…
Reference in a new issue