Make a PhabricatorRemarkupControl to de-duplicate code usage around adding a Remarkup reference to a TextAreaControl.

Summary: ...also makes Maniphest Task Edit Controller use this when its not appropriate to upsell email.

Test Plan: played around with each tool and verified the Remarkup reference was present

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1756

Differential Revision: https://secure.phabricator.com/D3468
This commit is contained in:
Bob Trahan
2012-09-19 12:27:28 -07:00
parent 670ddf2178
commit 557cc5b29c
12 changed files with 74 additions and 103 deletions

View File

@@ -100,20 +100,11 @@ final class PonderQuestionAskController extends PonderController {
->setName('title')
->setValue($title))
->appendChild(
id(new AphrontFormTextAreaControl())
id(new PhabricatorRemarkupControl())
->setName('content')
->setID('content')
->setValue($content)
->setLabel("Question")
->setCaption(phutil_render_tag(
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'article/Remarkup_Reference.html'),
'tabindex' => '-1',
'target' => '_blank',
),
"Formatting Reference")))
->setLabel("Question"))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue('Ask Away!'));