diff --git a/src/applications/flag/view/PhabricatorFlagSelectControl.php b/src/applications/flag/view/PhabricatorFlagSelectControl.php index f3a9c20aa2..0cc01fb123 100644 --- a/src/applications/flag/view/PhabricatorFlagSelectControl.php +++ b/src/applications/flag/view/PhabricatorFlagSelectControl.php @@ -1,65 +1,65 @@ getValue()); $file_map = array( PhabricatorFlagColor::COLOR_RED => 'red', PhabricatorFlagColor::COLOR_ORANGE => 'orange', PhabricatorFlagColor::COLOR_YELLOW => 'yellow', PhabricatorFlagColor::COLOR_GREEN => 'green', PhabricatorFlagColor::COLOR_BLUE => 'blue', PhabricatorFlagColor::COLOR_PINK => 'pink', PhabricatorFlagColor::COLOR_PURPLE => 'purple', PhabricatorFlagColor::COLOR_CHECKERED => 'finish', ); $out = array(); foreach ($colors as $const => $name) { // TODO: This should probably be a sprite sheet. $partial = $file_map[$const]; $uri = '/rsrc/image/icon/fatcow/flag_'.$partial.'.png'; $uri = celerity_get_resource_uri($uri); $icon = id(new PHUIIconView()) ->setImage($uri); $input = phutil_tag( 'input', array( 'type' => 'checkbox', 'name' => $this->getName().'[]', 'value' => $const, 'checked' => isset($value_map[$const]) ? 'checked' : null, 'class' => 'phabricator-flag-select-checkbox', )); $label = phutil_tag( 'label', array( 'class' => 'phabricator-flag-select-label', ), array( $icon, $input, )); $out[] = $label; } return $out; } } diff --git a/src/applications/releeph/view/branch/ReleephBranchPreviewView.php b/src/applications/releeph/view/branch/ReleephBranchPreviewView.php index e90861ae4c..d81f1f5d01 100644 --- a/src/applications/releeph/view/branch/ReleephBranchPreviewView.php +++ b/src/applications/releeph/view/branch/ReleephBranchPreviewView.php @@ -1,60 +1,60 @@ setID($celerity_id); $this->dynamics[$param_name] = $celerity_id; return $this; } public function addStatic($param_name, $value) { $this->statics[$param_name] = $value; return $this; } - public function getCustomControlClass() { + protected function getCustomControlClass() { require_celerity_resource('releeph-preview-branch'); return 'releeph-preview-branch'; } - public function renderInput() { + protected function renderInput() { static $required_params = array( 'arcProjectID', 'projectName', 'isSymbolic', 'template', ); $all_params = array_merge($this->statics, $this->dynamics); foreach ($required_params as $param_name) { if (idx($all_params, $param_name) === null) { throw new Exception( "'{$param_name}' is not set as either a static or dynamic!"); } } $output_id = celerity_generate_unique_node_id(); Javelin::initBehavior('releeph-preview-branch', array( 'uri' => '/releeph/branch/preview/', 'outputID' => $output_id, 'params' => array( 'static' => $this->statics, 'dynamic' => $this->dynamics, ), )); return phutil_tag( 'div', array( 'id' => $output_id, ), ''); } } diff --git a/src/applications/releeph/view/request/ReleephRequestTypeaheadControl.php b/src/applications/releeph/view/request/ReleephRequestTypeaheadControl.php index 0cb9a7ed6d..e8ed53f946 100644 --- a/src/applications/releeph/view/request/ReleephRequestTypeaheadControl.php +++ b/src/applications/releeph/view/request/ReleephRequestTypeaheadControl.php @@ -1,60 +1,60 @@ repo = $repo; return $this; } public function setStartTime($epoch) { $this->startTime = $epoch; return $this; } - public function getCustomControlClass() { + protected function getCustomControlClass() { return 'releeph-request-typeahead'; } - public function renderInput() { + protected function renderInput() { $id = celerity_generate_unique_node_id(); $div = phutil_tag( 'div', array( 'style' => 'position: relative;', 'id' => $id, ), phutil_tag( 'input', array( 'autocomplete' => 'off', 'type' => 'text', 'name' => $this->getName(), ), '')); require_celerity_resource('releeph-request-typeahead-css'); Javelin::initBehavior('releeph-request-typeahead', array( 'id' => $id, 'src' => '/releeph/request/typeahead/', 'placeholder' => self::PLACEHOLDER, 'value' => $this->getValue(), 'aux' => array( 'repo' => $this->repo->getID(), 'callsign' => $this->repo->getCallsign(), 'since' => $this->startTime, 'limit' => 16, ), )); return $div; } }