From 24394269fa7d89c556835ebb55afd5b4c8400059 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 13 Feb 2010 18:44:41 +0100 Subject: Updated OStatus form markup --- plugins/OStatus/actions/ostatusinit.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/OStatus/actions/ostatusinit.php') diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index bac2c4d43..11f81ecb9 100644 --- a/plugins/OStatus/actions/ostatusinit.php +++ b/plugins/OStatus/actions/ostatusinit.php @@ -79,15 +79,15 @@ class OStatusInitAction extends Action 'class' => 'form_settings', 'action' => common_local_url('ostatusinit'))); $this->elementStart('fieldset'); - $this->element('legend', _('Subscribe to a remote user')); + $this->element('legend', null, sprintf(_('Subscribe to %s'), $this->nickname)); $this->hidden('token', common_session_token()); $this->elementStart('ul', 'form_data'); - $this->elementStart('li'); + $this->elementStart('li', array('id' => 'ostatus_nickname')); $this->input('nickname', _('User nickname'), $this->nickname, _('Nickname of the user you want to follow')); $this->elementEnd('li'); - $this->elementStart('li'); + $this->elementStart('li', array('id' => 'ostatus_profile')); $this->input('acct', _('Profile Account'), $this->acct, _('Your account id (i.e. user@identi.ca)')); $this->elementEnd('li'); @@ -95,7 +95,7 @@ class OStatusInitAction extends Action $this->submit('submit', _('Subscribe')); $this->elementEnd('fieldset'); $this->elementEnd('form'); - } + } function ostatusConnect() { @@ -125,4 +125,4 @@ class OStatusInitAction extends Action return _('OStatus Connect'); } -} \ No newline at end of file +} -- cgit v1.2.3-54-g00ecf From 4d050f96f3b6c43ed74521d7a7215676cda6835e Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 13 Feb 2010 18:49:14 +0100 Subject: Added XHR channel for OStatus Subscribe button --- plugins/OStatus/actions/ostatusinit.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'plugins/OStatus/actions/ostatusinit.php') diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index 11f81ecb9..d21774420 100644 --- a/plugins/OStatus/actions/ostatusinit.php +++ b/plugins/OStatus/actions/ostatusinit.php @@ -67,9 +67,21 @@ class OStatusInitAction extends Action function showForm($err = null) { - $this->err = $err; - $this->showPage(); - + $this->err = $err; + if ($this->boolean('ajax')) { + header('Content-Type: text/xml;charset=utf-8'); + $this->xw->startDocument('1.0', 'UTF-8'); + $this->elementStart('html'); + $this->elementStart('head'); + $this->element('title', null, _('Subscribe to user')); + $this->elementEnd('head'); + $this->elementStart('body'); + $this->showContent(); + $this->elementEnd('body'); + $this->elementEnd('html'); + } else { + $this->showPage(); + } } function showContent() -- cgit v1.2.3-54-g00ecf