From eaa81d25fa7bd954132ce7f901fae69b0d46ec1a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 15 Jan 2009 22:57:15 +0000 Subject: Convert all actions to use new UI functions I did a massive search-and-replace to get all the action subclasses to use the new output function (common_element() -> $this->element(), etc.) There's still a lot to do, but it's a first step --- actions/facebooksettings.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'actions/facebooksettings.php') diff --git a/actions/facebooksettings.php b/actions/facebooksettings.php index ab04ad82b..8b071353a 100644 --- a/actions/facebooksettings.php +++ b/actions/facebooksettings.php @@ -68,43 +68,43 @@ class FacebooksettingsAction extends FacebookAction $this->show_header('Settings', $msg, $success); - common_element_start('fb:if-section-not-added', array('section' => 'profile')); - common_element('h2', null, _('Add an Identi.ca box to my profile')); - common_element_start('p'); - common_element('fb:add-section-button', array('section' => 'profile')); - common_element_end('p'); - - common_element_end('fb:if-section-not-added'); - common_element_start('p'); - common_element_start('fb:prompt-permission', array('perms' => 'status_update')); - common_element('h2', null, _('Allow Identi.ca to update my Facebook status')); - common_element_end('fb:prompt-permission'); - common_element_end('p'); + $this->elementStart('fb:if-section-not-added', array('section' => 'profile')); + $this->element('h2', null, _('Add an Identi.ca box to my profile')); + $this->elementStart('p'); + $this->element('fb:add-section-button', array('section' => 'profile')); + $this->elementEnd('p'); + + $this->elementEnd('fb:if-section-not-added'); + $this->elementStart('p'); + $this->elementStart('fb:prompt-permission', array('perms' => 'status_update')); + $this->element('h2', null, _('Allow Identi.ca to update my Facebook status')); + $this->elementEnd('fb:prompt-permission'); + $this->elementEnd('p'); if ($facebook->api_client->users_hasAppPermission('status_update')) { - common_element_start('form', array('method' => 'post', + $this->elementStart('form', array('method' => 'post', 'id' => 'facebook_settings')); - common_element('h2', null, _('Sync preferences')); + $this->element('h2', null, _('Sync preferences')); - common_checkbox('noticesync', _('Automatically update my Facebook status with my notices.'), + $this->checkbox('noticesync', _('Automatically update my Facebook status with my notices.'), ($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND) : true); - common_checkbox('replysync', _('Send local "@" replies to Facebook.'), + $this->checkbox('replysync', _('Send local "@" replies to Facebook.'), ($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) : true); - // function common_input($id, $label, $value=null,$instructions=null) + // function $this->input($id, $label, $value=null,$instructions=null) $prefix = $facebook->api_client->data_getUserPreference(1); - common_input('prefix', _('Prefix'), + $this->input('prefix', _('Prefix'), ($prefix) ? $prefix : null, _('A string to prefix notices with.')); - common_submit('save', _('Save')); + $this->submit('save', _('Save')); - common_element_end('form'); + $this->elementEnd('form'); } -- cgit v1.2.3-54-g00ecf