Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialAddCommentView.php
| <?php | <?php | ||||
| final class DifferentialAddCommentView extends AphrontView { | final class DifferentialAddCommentView extends AphrontView { | ||||
| private $revision; | private $revision; | ||||
| private $actions; | private $actions; | ||||
| private $actionURI; | private $actionURI; | ||||
| private $draft; | private $draft; | ||||
| private $auxFields; | |||||
| private $reviewers = array(); | private $reviewers = array(); | ||||
| private $ccs = array(); | private $ccs = array(); | ||||
| public function setRevision($revision) { | public function setRevision($revision) { | ||||
| $this->revision = $revision; | $this->revision = $revision; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setAuxFields(array $aux_fields) { | |||||
| assert_instances_of($aux_fields, 'DifferentialFieldSpecification'); | |||||
| $this->auxFields = $aux_fields; | |||||
| return $this; | |||||
| } | |||||
| public function setActions(array $actions) { | public function setActions(array $actions) { | ||||
| $this->actions = $actions; | $this->actions = $actions; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setActionURI($uri) { | public function setActionURI($uri) { | ||||
| $this->actionURI = $uri; | $this->actionURI = $uri; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | Javelin::initBehavior( | ||||
| 'row' => 'add-ccs', | 'row' => 'add-ccs', | ||||
| 'placeholder' => pht('Type a user or mailing list...'), | 'placeholder' => pht('Type a user or mailing list...'), | ||||
| ), | ), | ||||
| ), | ), | ||||
| 'select' => 'comment-action', | 'select' => 'comment-action', | ||||
| )); | )); | ||||
| $diff = $revision->loadActiveDiff(); | $diff = $revision->loadActiveDiff(); | ||||
| $warnings = mpull($this->auxFields, 'renderWarningBoxForRevisionAccept'); | $warnings = array(); | ||||
| Javelin::initBehavior( | Javelin::initBehavior( | ||||
| 'differential-accept-with-errors', | 'differential-accept-with-errors', | ||||
| array( | array( | ||||
| 'select' => 'comment-action', | 'select' => 'comment-action', | ||||
| 'warnings' => 'warnings', | 'warnings' => 'warnings', | ||||
| )); | )); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||