Differential D12224 Diff 29377 src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | $instructions = | ||||
phutil_tag( | phutil_tag( | ||||
'p', | 'p', | ||||
array( | array( | ||||
'class' => 'aphront-form-instructions', | 'class' => 'aphront-form-instructions', | ||||
), | ), | ||||
pht('Resolve issues and build consensus through '. | pht('Resolve issues and build consensus through '. | ||||
'protracted deliberation.')); | 'protracted deliberation.')); | ||||
if ($v_projects) { | |||||
$project_handles = $this->loadViewerHandles($v_projects); | |||||
} else { | |||||
$project_handles = array(); | |||||
} | |||||
$form = id(new AphrontFormView()) | $form = id(new AphrontFormView()) | ||||
->setUser($user) | ->setUser($user) | ||||
->appendChild($instructions) | ->appendChild($instructions) | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormTextAreaControl()) | id(new AphrontFormTextAreaControl()) | ||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT) | ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT) | ||||
->setLabel(pht('Question')) | ->setLabel(pht('Question')) | ||||
->setName('question') | ->setName('question') | ||||
->setValue($v_question) | ->setValue($v_question) | ||||
->setError($e_question)) | ->setError($e_question)) | ||||
->appendChild( | ->appendChild( | ||||
id(new PhabricatorRemarkupControl()) | id(new PhabricatorRemarkupControl()) | ||||
->setUser($user) | ->setUser($user) | ||||
->setLabel(pht('Description')) | ->setLabel(pht('Description')) | ||||
->setName('description') | ->setName('description') | ||||
->setValue($v_description)) | ->setValue($v_description)) | ||||
->appendChild( | ->appendControl( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setLabel(pht('Projects')) | ->setLabel(pht('Projects')) | ||||
->setName('projects') | ->setName('projects') | ||||
->setValue($project_handles) | ->setValue($v_projects) | ||||
->setDatasource(new PhabricatorProjectDatasource())); | ->setDatasource(new PhabricatorProjectDatasource())); | ||||
if ($is_new) { | if ($is_new) { | ||||
for ($ii = 0; $ii < 10; $ii++) { | for ($ii = 0; $ii < 10; $ii++) { | ||||
$n = ($ii + 1); | $n = ($ii + 1); | ||||
$response = id(new AphrontFormTextControl()) | $response = id(new AphrontFormTextControl()) | ||||
->setLabel(pht('Response %d', $n)) | ->setLabel(pht('Response %d', $n)) | ||||
->setName('response[]') | ->setName('response[]') | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |