summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/emailsettings.php59
-rw-r--r--actions/login.php14
-rw-r--r--actions/openidsettings.php26
-rw-r--r--actions/smssettings.php30
-rw-r--r--actions/twittersettings.php39
5 files changed, 113 insertions, 55 deletions
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 4cd63a9d3..355470815 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -85,45 +85,46 @@ class EmailsettingsAction extends SettingsAction
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
- 'id' => 'emailsettings',
+ 'id' => 'form_settings_email',
+ 'class' => 'form_settings',
'action' =>
common_local_url('emailsettings')));
+ $this->elementStart('fieldset', array('id' => 'settings_email_address'));
+ $this->element('legend', null, _('Address'));
$this->hidden('token', common_session_token());
- $this->element('h2', null, _('Address'));
-
if ($user->email) {
- $this->elementStart('p');
- $this->element('span', 'address confirmed', $user->email);
- $this->element('span', 'input_instructions',
- _('Current confirmed email address.'));
+ $this->element('p', array('id' => 'email_confirmed', $user->email));
+ $this->element('p', array('class' => 'form_note'), _('Current confirmed email address.'));
$this->hidden('email', $user->email);
- $this->elementEnd('p');
$this->submit('remove', _('Remove'));
} else {
$confirm = $this->getConfirmation();
if ($confirm) {
- $this->elementStart('p');
- $this->element('span', 'address unconfirmed', $confirm->address);
- $this->element('span', 'input_instructions',
- _('Awaiting confirmation on this address. '.
- 'Check your inbox (and spam box!) for a message '.
- 'with further instructions.'));
+ $this->element('p', array('id' => 'email_unconfirmed'), $confirm->address);
+ $this->element('p', array('class' => 'form_note'),
+ _('Awaiting confirmation on this address. '.
+ 'Check your inbox (and spam box!) for a message '.
+ 'with further instructions.'));
$this->hidden('email', $confirm->address);
- $this->elementEnd('p');
$this->submit('cancel', _('Cancel'));
} else {
+ $this->elementStart('ul', 'form_datas');
+ $this->elementStart('li');
$this->input('email', _('Email Address'),
($this->arg('email')) ? $this->arg('email') : null,
_('Email address, like "UserName@example.org"'));
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
$this->submit('add', _('Add'));
}
}
+ $this->elementEnd('fieldset');
- if ($user->email) {
- $this->element('h2', null, _('Incoming email'));
-
+ if ($user->email) {
+ $this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
+ $this->element('legend',_('Incoming email'));
if ($user->incomingemail) {
$this->elementStart('p');
$this->element('span', 'address', $user->incomingemail);
@@ -139,32 +140,48 @@ class EmailsettingsAction extends SettingsAction
'cancels the old one.'));
$this->elementEnd('p');
$this->submit('newincoming', _('New'));
+ $this->elementEnd('fieldset');
}
- $this->element('h2', null, _('Preferences'));
+ $this->elementStart('fieldset', array('id' => 'settings_email_preferences'));
+ $this->element('legend', null, _('Preferences'));
+
+ $this->elementStart('ul', 'form_datas');
+ $this->elementStart('li');
$this->checkbox('emailnotifysub',
_('Send me notices of new subscriptions through email.'),
$user->emailnotifysub);
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('emailnotifyfav',
_('Send me email when someone '.
'adds my notice as a favorite.'),
$user->emailnotifyfav);
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('emailnotifymsg',
_('Send me email when someone sends me a private message.'),
$user->emailnotifymsg);
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('emailnotifynudge',
_('Allow friends to nudge me and send me an email.'),
$user->emailnotifynudge);
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('emailpost',
_('I want to post notices by email.'),
$user->emailpost);
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('emailmicroid',
_('Publish a MicroID for my email address.'),
$user->emailmicroid);
-
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
$this->submit('save', _('Save'));
-
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/login.php b/actions/login.php
index 23ab16676..224b30f6f 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -130,15 +130,27 @@ class LoginAction extends Action
function showContent()
{
$this->elementStart('form', array('method' => 'post',
- 'id' => 'login',
+ 'id' => 'form_login',
+ 'class' => 'form_login',
'action' => common_local_url('login')));
+ $this->elementStart('fieldset');
+ $this->element('legend', null, _('Login to site'));
+ $this->elementStart('ul', 'form_datas');
+ $this->elementStart('li');
$this->input('nickname', _('Nickname'));
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->password('password', _('Password'));
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('rememberme', _('Remember me'), false,
_('Automatically login in the future; ' .
'not for shared computers!'));
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
$this->submit('submit', _('Login'));
$this->hidden('token', common_session_token());
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
$this->elementStart('p');
$this->element('a', array('href' => common_local_url('recoverpassword')),
diff --git a/actions/openidsettings.php b/actions/openidsettings.php
index a21a9869e..6f17f154c 100644
--- a/actions/openidsettings.php
+++ b/actions/openidsettings.php
@@ -85,26 +85,31 @@ class OpenidsettingsAction extends SettingsAction
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
- 'id' => 'openidadd',
+ 'id' => 'form_settings_openid_add',
+ 'class' => 'form_settings',
'action' =>
common_local_url('openidsettings')));
+ $this->elementStart('fieldset', array('id' => 'settings_openid_add'));
+ $this->element('legend', null, _('Add OpenID'));
$this->hidden('token', common_session_token());
- $this->element('h2', null, _('Add OpenID'));
- $this->element('p', null,
+ $this->element('p', 'form_guide',
_('If you want to add an OpenID to your account, ' .
'enter it in the box below and click "Add".'));
- $this->elementStart('p');
+ $this->elementStart('ul', 'form_datas');
+ $this->elementStart('li');
$this->element('label', array('for' => 'openid_url'),
_('OpenID URL'));
$this->element('input', array('name' => 'openid_url',
'type' => 'text',
'id' => 'openid_url'));
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
$this->element('input', array('type' => 'submit',
- 'id' => 'add',
+ 'id' => 'settings_openid_add_action-submit',
'name' => 'add',
'class' => 'submit',
'value' => _('Add')));
- $this->elementEnd('p');
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
$oid = new User_openid();
@@ -134,7 +139,7 @@ class OpenidsettingsAction extends SettingsAction
} else {
- $this->element('p', null,
+ $this->element('p', 'form_guide',
_('You can remove an OpenID from your account '.
'by clicking the button marked "Remove".'));
$idx = 0;
@@ -142,10 +147,11 @@ class OpenidsettingsAction extends SettingsAction
while ($oid->fetch()) {
$this->elementStart('form',
array('method' => 'POST',
- 'id' => 'openiddelete' . $idx,
+ 'id' => 'form_settings_openid_delete' . $idx,
+ 'class' => 'form_settings',
'action' =>
common_local_url('openidsettings')));
- $this->elementStart('p');
+ $this->elementStart('fieldset');
$this->hidden('token', common_session_token());
$this->element('a', array('href' => $oid->canonical),
$oid->display);
@@ -158,7 +164,7 @@ class OpenidsettingsAction extends SettingsAction
'name' => 'remove',
'class' => 'submit',
'value' => _('Remove')));
- $this->elementEnd('p');
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
$idx++;
}
diff --git a/actions/smssettings.php b/actions/smssettings.php
index f214997ec..6d3c54942 100644
--- a/actions/smssettings.php
+++ b/actions/smssettings.php
@@ -83,12 +83,14 @@ class SmssettingsAction extends SettingsAction
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
- 'id' => 'smssettings',
+ 'id' => 'form_settings_sms',
+ 'class' => 'form_settings',
'action' =>
common_local_url('smssettings')));
+ $this->elementStart('fieldset', array('id' => 'settings_sms_address'));
+ $this->element('legend', null, _('Address'));
$this->hidden('token', common_session_token());
- $this->element('h2', null, _('Address'));
if ($user->sms) {
$this->elementStart('p');
@@ -126,6 +128,7 @@ class SmssettingsAction extends SettingsAction
$this->submit('add', _('Add'));
}
}
+ $this->elementEnd('fieldset');
if ($user->sms) {
$this->element('h2', null, _('Incoming email'));
@@ -139,24 +142,29 @@ class SmssettingsAction extends SettingsAction
$this->submit('removeincoming', _('Remove'));
}
- $this->elementStart('p');
- $this->element('span', 'input_instructions',
+ $this->element('p', 'form_guide',
_('Make a new email address for posting to; '.
'cancels the old one.'));
- $this->elementEnd('p');
$this->submit('newincoming', _('New'));
}
- $this->element('h2', null, _('Preferences'));
+ $this->elementStart('fieldset', array('id' => 'settings_sms_preferences'));
+ $this->element('legend', null, _('Preferences'));
+
+ $this->elementStart('ul', 'form_datas');
+ $this->elementStart('li');
$this->checkbox('smsnotify',
_('Send me notices through SMS; '.
'I understand I may incur '.
'exorbitant charges from my carrier.'),
$user->smsnotify);
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
$this->submit('save', _('Save'));
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
}
@@ -436,8 +444,9 @@ class SmssettingsAction extends SettingsAction
$cnt = $carrier->find();
- $this->elementStart('p');
- $this->element('label', array('for' => 'carrier'));
+ $this->elementStart('ul');
+ $this->elementStart('li');
+ $this->element('label', array('for' => 'carrier'), _('Mobile carrier'));
$this->elementStart('select', array('name' => 'carrier',
'id' => 'carrier'));
$this->element('option', array('value' => 0),
@@ -447,13 +456,14 @@ class SmssettingsAction extends SettingsAction
$carrier->name);
}
$this->elementEnd('select');
- $this->elementEnd('p');
- $this->element('span', 'input_instructions',
+ $this->element('p', 'form_guide',
sprintf(_('Mobile carrier for your phone. '.
'If you know a carrier that accepts ' .
'SMS over email but isn\'t listed here, ' .
'send email to let us know at %s.'),
common_config('site', 'email')));
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
}
/**
diff --git a/actions/twittersettings.php b/actions/twittersettings.php
index 5492dd995..cd070cb45 100644
--- a/actions/twittersettings.php
+++ b/actions/twittersettings.php
@@ -97,58 +97,71 @@ class TwittersettingsAction extends SettingsAction
}
$this->elementStart('form', array('method' => 'post',
- 'id' => 'twittersettings',
+ 'id' => 'form_settings_twitter',
+ 'class' => 'form_settings',
'action' =>
common_local_url('twittersettings')));
+ $this->elementStart('fieldset', array('id' => 'settings_twitter_account'));
+ $this->element('legend', null, _('Twitter Account'));
$this->hidden('token', common_session_token());
-
- $this->element('h2', null, _('Twitter Account'));
-
+ $this->elementStart('ul', 'form_datas');
if ($fuser) {
- $this->elementStart('p');
-
+ $this->elementStart('li');
$this->element('span', 'twitter_user', $fuser->nickname);
$this->element('a', array('href' => $fuser->uri), $fuser->uri);
- $this->element('span', 'input_instructions',
+ $this->element('p', 'form_guide',
_('Current verified Twitter account.'));
$this->hidden('flink_foreign_id', $flink->foreign_id);
- $this->elementEnd('p');
$this->submit('remove', _('Remove'));
+ $this->elementEnd('li');
} else {
+ $this->elementStart('li');
$this->input('twitter_username', _('Twitter user name'),
($this->arg('twitter_username')) ?
$this->arg('twitter_username') :
$profile->nickname,
_('No spaces, please.')); // hey, it's what Twitter says
-
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->password('twitter_password', _('Twitter password'));
+ $this->elementend('li');
}
+ $this->elementEnd('ul');
+ $this->elementEnd('fieldset');
- $this->element('h2', null, _('Preferences'));
+ $this->elementStart('fieldset', array('id' => 'settings_twitter_preferences'));
+ $this->element('legend', null, _('Preferences'));
+ $this->elementStart('ul');
+ $this->elementStart('li');
$this->checkbox('noticesync',
_('Automatically send my notices to Twitter.'),
($flink) ?
($flink->noticesync & FOREIGN_NOTICE_SEND) :
true);
-
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('replysync',
_('Send local "@" replies to Twitter.'),
($flink) ?
($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) :
true);
-
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->checkbox('friendsync',
_('Subscribe to my Twitter friends here.'),
($flink) ?
($flink->friendsync & FOREIGN_FRIEND_RECV) :
false);
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
if ($flink) {
$this->submit('save', _('Save'));
} else {
$this->submit('add', _('Add'));
}
+ $this->elementEnd('fieldset');
$this->showTwitterSubscriptions();
@@ -481,4 +494,4 @@ class TwittersettingsAction extends SettingsAction
return false;
}
-} \ No newline at end of file
+}