From 250fe7fb7724e7892b3e404c02ad45617c3922b8 Mon Sep 17 00:00:00 2001 From: Mailson Menezes Date: Sat, 29 Dec 2012 17:57:51 -0300 Subject: [PATCH] Fix tokenizer placeholder issue Summary: The placeholder property remains null despite it is set to a custom value. Test Plan: Use a custom placeholder in `AphrontFormTokenizerControl` ``` id(new AphrontFormTokenizerControl()) ->setPlaceholder('My custom placeholder...') ->setDatasource('/typeahead/common/projects/'); ``` The placeholder should be set to "My custom placeholder..." Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4297 --- src/view/form/control/AphrontFormTokenizerControl.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/view/form/control/AphrontFormTokenizerControl.php b/src/view/form/control/AphrontFormTokenizerControl.php index 89d4465224..3d82c2881b 100644 --- a/src/view/form/control/AphrontFormTokenizerControl.php +++ b/src/view/form/control/AphrontFormTokenizerControl.php @@ -41,9 +41,8 @@ final class AphrontFormTokenizerControl extends AphrontFormControl { $id = celerity_generate_unique_node_id(); } - $placeholder = null; if (!$this->placeholder) { - $placeholder = $this->getDefaultPlaceholder(); + $this->placeholder = $this->getDefaultPlaceholder(); } $template = new AphrontTokenizerTemplateView(); @@ -64,7 +63,7 @@ final class AphrontFormTokenizerControl extends AphrontFormControl { 'limit' => $this->limit, 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 'username' => $username, - 'placeholder' => $placeholder, + 'placeholder' => $this->placeholder, )); }