diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-01-19 12:28:45 +0000 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-01-19 12:28:45 +0000 |
commit | 264ab53953d529680cea4df31ed125710bb26988 (patch) | |
tree | f31c6addf124ff4b1fdfab587d9ddc05b5f19477 /actions | |
parent | f2b06b8bbd56ce94d7b46ffcec36e2be3f260fe9 (diff) | |
parent | 838502dfd9894e409714c512f83179bab68446d7 (diff) |
Merge branch 'uiredesign' of /var/www/trunk into uiredesign
Diffstat (limited to 'actions')
-rw-r--r-- | actions/emailsettings.php | 8 | ||||
-rw-r--r-- | actions/imsettings.php | 42 | ||||
-rw-r--r-- | actions/login.php | 2 | ||||
-rw-r--r-- | actions/openidsettings.php | 6 | ||||
-rw-r--r-- | actions/othersettings.php | 2 | ||||
-rw-r--r-- | actions/profilesettings.php | 2 | ||||
-rw-r--r-- | actions/register.php | 32 | ||||
-rw-r--r-- | actions/smssettings.php | 35 | ||||
-rw-r--r-- | actions/twittersettings.php | 4 |
9 files changed, 87 insertions, 46 deletions
diff --git a/actions/emailsettings.php b/actions/emailsettings.php index 8b8a5351e..b84acb214 100644 --- a/actions/emailsettings.php +++ b/actions/emailsettings.php @@ -95,14 +95,14 @@ class EmailsettingsAction extends AccountSettingsAction $this->hidden('token', common_session_token()); if ($user->email) { - $this->element('p', array('id' => 'email_confirmed'), $user->email); + $this->element('p', array('id' => 'form_confirmed'), $user->email); $this->element('p', array('class' => 'form_note'), _('Current confirmed email address.')); $this->hidden('email', $user->email); $this->submit('remove', _('Remove')); } else { $confirm = $this->getConfirmation(); if ($confirm) { - $this->element('p', array('id' => 'email_unconfirmed'), $confirm->address); + $this->element('p', array('id' => 'form_unconfirmed'), $confirm->address); $this->element('p', array('class' => 'form_note'), _('Awaiting confirmation on this address. '. 'Check your inbox (and spam box!) for a message '. @@ -110,7 +110,7 @@ class EmailsettingsAction extends AccountSettingsAction $this->hidden('email', $confirm->address); $this->submit('cancel', _('Cancel')); } else { - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->input('email', _('Email Address'), ($this->arg('email')) ? $this->arg('email') : null, @@ -146,7 +146,7 @@ class EmailsettingsAction extends AccountSettingsAction $this->elementStart('fieldset', array('id' => 'settings_email_preferences')); $this->element('legend', null, _('Preferences')); - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->checkbox('emailnotifysub', _('Send me notices of new subscriptions through email.'), diff --git a/actions/imsettings.php b/actions/imsettings.php index 98951ac30..e0f5ede3a 100644 --- a/actions/imsettings.php +++ b/actions/imsettings.php @@ -86,36 +86,35 @@ class ImsettingsAction extends ConnectSettingsAction { $user = common_current_user(); $this->elementStart('form', array('method' => 'post', - 'id' => 'imsettings', + 'id' => 'form_settings_im', + 'class' => 'form_settings', 'action' => common_local_url('imsettings'))); + $this->elementStart('fieldset', array('id' => 'settings_im_address')); + $this->element('legend', null, _('Address')); $this->hidden('token', common_session_token()); - $this->element('h2', null, _('Address')); - if ($user->jabber) { - $this->elementStart('p'); - $this->element('span', 'address confirmed', $user->jabber); - $this->element('span', 'input_instructions', + $this->element('p', 'form_confirmed', $user->jabber); + $this->element('p', 'form_note', _('Current confirmed Jabber/GTalk address.')); $this->hidden('jabber', $user->jabber); - $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', + $this->element('p', 'form_unconfirmed', $confirm->address); + $this->element('p', 'form_note', sprintf(_('Awaiting confirmation on this address. '. 'Check your Jabber/GTalk account for a '. 'message with further instructions. '. '(Did you add %s to your buddy list?)'), jabber_daemon_address())); $this->hidden('jabber', $confirm->address); - $this->elementEnd('p'); $this->submit('cancel', _('Cancel')); } else { + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('jabber', _('IM Address'), ($this->arg('jabber')) ? $this->arg('jabber') : null, sprintf(_('Jabber or GTalk address, '. @@ -123,27 +122,40 @@ class ImsettingsAction extends ConnectSettingsAction 'First, make sure to add %s to your '. 'buddy list in your IM client or on GTalk.'), jabber_daemon_address())); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('add', _('Add')); } } - - $this->element('h2', null, _('Preferences')); - + $this->elementEnd('fieldset'); + + $this->elementStart('fieldset', array('id' => 'settings_im_preferences')); + $this->element('legend', null, _('Preferences')); + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->checkbox('jabbernotify', _('Send me notices through Jabber/GTalk.'), $user->jabbernotify); + $this->elementEnd('li'); + $this->elementStart('li'); $this->checkbox('updatefrompresence', _('Post a notice when my Jabber/GTalk status changes.'), $user->updatefrompresence); + $this->elementEnd('li'); + $this->elementStart('li'); $this->checkbox('jabberreplies', _('Send me replies through Jabber/GTalk '. 'from people I\'m not subscribed to.'), $user->jabberreplies); + $this->elementEnd('li'); + $this->elementStart('li'); $this->checkbox('jabbermicroid', _('Publish a MicroID for my Jabber/GTalk address.'), $user->jabbermicroid); + $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 9fa501a5d..11cf1f02a 100644 --- a/actions/login.php +++ b/actions/login.php @@ -223,7 +223,7 @@ class LoginAction extends Action 'action' => common_local_url('login'))); $this->elementStart('fieldset'); $this->element('legend', null, _('Login to site')); - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->input('nickname', _('Nickname')); $this->elementEnd('li'); diff --git a/actions/openidsettings.php b/actions/openidsettings.php index 257aac8d0..92469d20f 100644 --- a/actions/openidsettings.php +++ b/actions/openidsettings.php @@ -95,7 +95,7 @@ class OpenidsettingsAction extends AccountSettingsAction $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('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->element('label', array('for' => 'openid_url'), _('OpenID URL')); @@ -124,7 +124,7 @@ class OpenidsettingsAction extends AccountSettingsAction if ($cnt == 1 && !$user->password) { - $this->element('p', null, + $this->element('p', 'form_guide', _('Removing your only OpenID '. 'would make it impossible to log in! ' . 'If you need to remove it, '. @@ -162,7 +162,7 @@ class OpenidsettingsAction extends AccountSettingsAction $this->element('input', array('type' => 'submit', 'id' => 'remove'.$idx, 'name' => 'remove', - 'class' => 'submit', + 'class' => 'submit remove', 'value' => _('Remove'))); $this->elementEnd('fieldset'); $this->elementEnd('form'); diff --git a/actions/othersettings.php b/actions/othersettings.php index cbb2c0cb9..b542233ca 100644 --- a/actions/othersettings.php +++ b/actions/othersettings.php @@ -107,7 +107,7 @@ class OthersettingsAction extends AccountSettingsAction 'metamark.net' => 'metamark.net' ); - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->dropdown('urlshorteningservice', _('Service'), $services, _('Automatic shortening service to use.'), diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 12251b83b..6dd4775e5 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -93,7 +93,7 @@ class ProfilesettingsAction extends AccountSettingsAction # too much common patterns here... abstractable? - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->input('nickname', _('Nickname'), ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, diff --git a/actions/register.php b/actions/register.php index b15aea08e..159daaa73 100644 --- a/actions/register.php +++ b/actions/register.php @@ -332,22 +332,32 @@ class RegisterAction extends Action } $this->elementStart('form', array('method' => 'post', - 'id' => 'login', + 'id' => 'form_register', + 'class' => 'form_settings', 'action' => common_local_url('register'))); - + $this->elementStart('fieldset'); + $this->element('legend', null, 'Account settings'); $this->hidden('token', common_session_token()); if ($code) { $this->hidden('code', $code); } + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('nickname', _('Nickname'), $this->trimmed('nickname'), _('1-64 lowercase letters or numbers, '. 'no punctuation or spaces. Required.')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->password('password', _('Password'), _('6 or more characters. Required.')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->password('confirm', _('Confirm'), _('Same as password above. Required.')); + $this->elementEnd('li'); + $this->elementStart('li'); if ($invite && $invite->address_type == 'email') { $this->input('email', _('Email'), $invite->address, _('Used only for updates, announcements, '. @@ -357,41 +367,55 @@ class RegisterAction extends Action _('Used only for updates, announcements, '. 'and password recovery')); } + $this->elementEnd('li'); + $this->elementStart('li'); $this->input('fullname', _('Full name'), $this->trimmed('fullname'), _('Longer name, preferably your "real" name')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->input('homepage', _('Homepage'), $this->trimmed('homepage'), _('URL of your homepage, blog, '. 'or profile on another site')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->textarea('bio', _('Bio'), $this->trimmed('bio'), _('Describe yourself and your '. 'interests in 140 chars')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->input('location', _('Location'), $this->trimmed('location'), _('Where you are, like "City, '. 'State (or Region), Country"')); + $this->elementEnd('li'); + $this->elementStart('li', array('id' => 'settings_rememberme')); $this->checkbox('rememberme', _('Remember me'), $this->boolean('rememberme'), _('Automatically login in the future; '. 'not for shared computers!')); - $this->elementStart('p'); + $this->elementEnd('li'); $attrs = array('type' => 'checkbox', 'id' => 'license', + 'class' => 'checkbox', 'name' => 'license', 'value' => 'true'); if ($this->boolean('license')) { $attrs['checked'] = 'checked'; } + $this->elementStart('li'); $this->element('input', $attrs); $this->text(_('My text and files are available under ')); $this->element('a', array('href' => common_config('license', 'url')), $config['license']['title']); $this->text(_(' except this private data: password, '. 'email address, IM address, phone number.')); - $this->elementEnd('p'); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('submit', _('Register')); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } diff --git a/actions/smssettings.php b/actions/smssettings.php index 845266d18..f89cbe1ab 100644 --- a/actions/smssettings.php +++ b/actions/smssettings.php @@ -93,37 +93,42 @@ class SmssettingsAction extends ConnectSettingsAction $this->hidden('token', common_session_token()); if ($user->sms) { - $this->elementStart('p'); $carrier = $user->getCarrier(); - $this->element('span', 'address confirmed', + $this->element('p', 'form_confirmed', $user->sms . ' (' . $carrier->name . ')'); - $this->element('span', 'input_instructions', + $this->element('p', 'form_guide', _('Current confirmed SMS-enabled phone number.')); $this->hidden('sms', $user->sms); $this->hidden('carrier', $user->carrier); - $this->elementEnd('p'); $this->submit('remove', _('Remove')); } else { $confirm = $this->getConfirmation(); if ($confirm) { $carrier = Sms_carrier::staticGet($confirm->address_extra); - $this->elementStart('p'); - $this->element('span', 'address unconfirmed', + $this->element('p', 'form_unconfirmed', $confirm->address . ' (' . $carrier->name . ')'); - $this->element('span', 'input_instructions', + $this->element('p', 'form_guide', _('Awaiting confirmation on this phone number.')); $this->hidden('sms', $confirm->address); $this->hidden('carrier', $confirm->address_extra); - $this->elementEnd('p'); $this->submit('cancel', _('Cancel')); + + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('code', _('Confirmation code'), null, _('Enter the code you received on your phone.')); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('confirm', _('Confirm')); } else { + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('sms', _('SMS Phone number'), ($this->arg('sms')) ? $this->arg('sms') : null, _('Phone number, no punctuation or spaces, '. 'with area code')); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->carrierSelect(); $this->submit('add', _('Add')); } @@ -131,14 +136,13 @@ class SmssettingsAction extends ConnectSettingsAction $this->elementEnd('fieldset'); if ($user->sms) { - $this->element('h2', null, _('Incoming email')); + $this->elementStart('fieldset', array('id' => 'settings_sms_incoming_email')); + $this->element('legend', null, _('Incoming email')); if ($user->incomingemail) { - $this->elementStart('p'); - $this->element('span', 'address', $user->incomingemail); - $this->element('span', 'input_instructions', + $this->element('p', 'form_unconfirmed', $user->incomingemail); + $this->element('p', 'form_note', _('Send email to this address to post new notices.')); - $this->elementEnd('p'); $this->submit('removeincoming', _('Remove')); } @@ -146,12 +150,13 @@ class SmssettingsAction extends ConnectSettingsAction _('Make a new email address for posting to; '. 'cancels the old one.')); $this->submit('newincoming', _('New')); + $this->elementEnd('fieldset'); } $this->elementStart('fieldset', array('id' => 'settings_sms_preferences')); $this->element('legend', null, _('Preferences')); - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->checkbox('smsnotify', _('Send me notices through SMS; '. @@ -443,7 +448,7 @@ class SmssettingsAction extends ConnectSettingsAction $cnt = $carrier->find(); - $this->elementStart('ul'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->element('label', array('for' => 'carrier'), _('Mobile carrier')); $this->elementStart('select', array('name' => 'carrier', diff --git a/actions/twittersettings.php b/actions/twittersettings.php index 597623c80..efc8215cd 100644 --- a/actions/twittersettings.php +++ b/actions/twittersettings.php @@ -104,7 +104,7 @@ class TwittersettingsAction extends ConnectSettingsAction $this->elementStart('fieldset', array('id' => 'settings_twitter_account')); $this->element('legend', null, _('Twitter Account')); $this->hidden('token', common_session_token()); - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); if ($fuser) { $this->elementStart('li'); $this->element('span', 'twitter_user', $fuser->nickname); @@ -133,7 +133,7 @@ class TwittersettingsAction extends ConnectSettingsAction array('id' => 'settings_twitter_preferences')); $this->element('legend', null, _('Preferences')); - $this->elementStart('ul'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->checkbox('noticesync', _('Automatically send my notices to Twitter.'), |