From 8fdf888edbd74e707d2698c7625dc90b22f0aeef Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 18 Jan 2009 06:12:47 +0000 Subject: trac750 Javascript file for Facebook app --- actions/facebooksettings.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'actions/facebooksettings.php') diff --git a/actions/facebooksettings.php b/actions/facebooksettings.php index eafd91123..372c40c28 100644 --- a/actions/facebooksettings.php +++ b/actions/facebooksettings.php @@ -68,19 +68,18 @@ class FacebooksettingsAction extends FacebookAction $this->showHeader('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('form', array('id' => 'redirect_form', + 'style' => 'display: none;')); + 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_start('fb:prompt-permission', array('perms' => 'status_update', + 'next_fbjs' => 'redirectSettings()')); common_element('h2', null, _('Allow Identi.ca to update my Facebook status')); common_element_end('fb:prompt-permission'); common_element_end('p'); + + if ($facebook->api_client->users_hasAppPermission('status_update')) { common_element_start('form', array('method' => 'post', @@ -94,8 +93,6 @@ class FacebooksettingsAction extends FacebookAction common_checkbox('replysync', _('Send local "@" replies to Facebook.'), ($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) : true); - // function common_input($id, $label, $value=null,$instructions=null) - $prefix = $facebook->api_client->data_getUserPreference(1); -- cgit v1.2.3-54-g00ecf