From 41e0f97c197a51db427b1cd77208f4700ab902a8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 2 Feb 2013 06:04:54 -0800 Subject: [PATCH] render_tag -> tag: forms / remarkup Summary: See inlines. Test Plan: See inlines. Reviewers: vrana Reviewed By: vrana CC: aran Maniphest Tasks: T2432 Differential Revision: https://secure.phabricator.com/D4767 --- .../form/control/AphrontFormDateControl.php | 17 ++++++++--------- .../form/control/AphrontFormSelectControl.php | 4 ++-- .../form/control/PhabricatorRemarkupControl.php | 9 ++++++--- src/view/layout/PhabricatorPropertyListView.php | 4 ++-- .../AphrontKeyboardShortcutsAvailableView.php | 12 ++++++++---- 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/view/form/control/AphrontFormDateControl.php b/src/view/form/control/AphrontFormDateControl.php index 27166c8440..61c470bccf 100644 --- a/src/view/form/control/AphrontFormDateControl.php +++ b/src/view/form/control/AphrontFormDateControl.php @@ -247,20 +247,19 @@ final class AphrontFormDateControl extends AphrontFormControl { Javelin::initBehavior('fancy-datepicker', array()); - return javelin_render_tag( + return javelin_tag( 'div', array( 'class' => 'aphront-form-date-container', 'sigil' => 'phabricator-date-control', ), - self::renderSingleView( - array( - $days_sel, - $months_sel, - $years_sel, - $cal_icon, - $time_sel, - ))); + array( + $days_sel, + $months_sel, + $years_sel, + $cal_icon, + $time_sel, + )); } } diff --git a/src/view/form/control/AphrontFormSelectControl.php b/src/view/form/control/AphrontFormSelectControl.php index 9896eedef5..06c0c43e02 100644 --- a/src/view/form/control/AphrontFormSelectControl.php +++ b/src/view/form/control/AphrontFormSelectControl.php @@ -35,10 +35,10 @@ final class AphrontFormSelectControl extends AphrontFormControl { $option_tags = self::renderOptions($selected, $options); - return javelin_render_tag( + return javelin_tag( 'select', $attrs, - implode("\n", $option_tags)); + $option_tags); } private static function renderOptions($selected, array $options) { diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index be41fdf655..e1faf1dfb3 100644 --- a/src/view/form/control/PhabricatorRemarkupControl.php +++ b/src/view/form/control/PhabricatorRemarkupControl.php @@ -142,13 +142,16 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { $this->setCustomClass( 'remarkup-assist-textarea '.$monospaced_textareas_class); - return javelin_render_tag( + return javelin_tag( 'div', array( 'sigil' => 'remarkup-assist-control', ), - $buttons. - parent::renderInput()); + $this->renderHTMLView( + array( + $buttons, + parent::renderInput(), + ))); } } diff --git a/src/view/layout/PhabricatorPropertyListView.php b/src/view/layout/PhabricatorPropertyListView.php index 85c1c2774b..3cedcdbbf9 100644 --- a/src/view/layout/PhabricatorPropertyListView.php +++ b/src/view/layout/PhabricatorPropertyListView.php @@ -73,12 +73,12 @@ final class PhabricatorPropertyListView extends AphrontView { } } - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phabricator-property-list-view', ), - $this->renderSingleView($items)); + $this->renderHTMLView($items)); } private function renderPropertyPart(array $part) { diff --git a/src/view/widget/AphrontKeyboardShortcutsAvailableView.php b/src/view/widget/AphrontKeyboardShortcutsAvailableView.php index bfb8850605..a371445664 100644 --- a/src/view/widget/AphrontKeyboardShortcutsAvailableView.php +++ b/src/view/widget/AphrontKeyboardShortcutsAvailableView.php @@ -3,10 +3,14 @@ final class AphrontKeyboardShortcutsAvailableView extends AphrontView { public function render() { - return - '
'. - 'Press ? to show keyboard shortcuts.'. - '
'; + return phutil_tag( + 'div', + array( + 'class' => 'keyboard-shortcuts-available', + ), + pht( + 'Press %s to show keyboard shortcuts.', + phutil_tag('strong', array(), '?'))); } }