diff options
-rw-r--r-- | actions/emailsettings.php | 59 | ||||
-rw-r--r-- | actions/openidsettings.php | 26 | ||||
-rw-r--r-- | js/util.js | 6 | ||||
-rw-r--r-- | lib/action.php | 3 | ||||
-rw-r--r-- | lib/htmloutputter.php | 23 | ||||
-rw-r--r-- | lib/settingsgroupnav.php | 4 | ||||
-rw-r--r-- | theme/base/css/display.css | 28 | ||||
-rw-r--r-- | theme/identica/css/display.css | 10 |
8 files changed, 96 insertions, 63 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/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/js/util.js b/js/util.js index c43af2333..35d69310b 100644 --- a/js/util.js +++ b/js/util.js @@ -22,13 +22,13 @@ $(document).ready(function(){ var maxLength = 140; var currentLength = $("#notice_data-text").val().length; var remaining = maxLength - currentLength; - var counter = $("#counter"); + var counter = $("#notice_text-count"); counter.text(remaining); if (remaining <= 0) { - $("#form_notice").addClass("response_error"); + $("#form_notice").addClass("warning"); } else { - $("#form_notice").removeClass("response_error"); + $("#form_notice").removeClass("warning"); } } diff --git a/lib/action.php b/lib/action.php index 5ff536dab..35f6f2e3e 100644 --- a/lib/action.php +++ b/lib/action.php @@ -565,8 +565,7 @@ class Action extends HTMLOutputter // lawsuit if ($is_selected) { $lattrs['class'] = 'current'; } - - $this->elementStart('li', (is_null($id)) ? null : array('id' => $id), $lattrs); + $this->elementStart('li', (is_null($id)) ? $lattrs : $lattr['id'] = $id); $attrs['href'] = $url; if ($title) { $attrs['title'] = $title; diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index eb8a612e4..71f17604b 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -155,20 +155,17 @@ class HTMLOutputter extends XMLOutputter function input($id, $label, $value=null, $instructions=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $attrs = array('name' => $id, 'type' => 'text', - 'class' => 'input_text', 'id' => $id); if ($value) { $attrs['value'] = htmlspecialchars($value); } $this->element('input', $attrs); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -192,7 +189,6 @@ class HTMLOutputter extends XMLOutputter function checkbox($id, $label, $checked=false, $instructions=null, $value='true', $disabled=false) { - $this->elementStart('p'); $attrs = array('name' => $id, 'type' => 'checkbox', 'class' => 'checkbox', @@ -208,14 +204,13 @@ class HTMLOutputter extends XMLOutputter } $this->element('input', $attrs); $this->text(' '); - $this->element('label', array('class' => 'checkbox_label', + $this->element('label', array('class' => 'checkbox', 'for' => $id), $label); $this->text(' '); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -240,7 +235,6 @@ class HTMLOutputter extends XMLOutputter function dropdown($id, $label, $content, $instructions=null, $blank_select=false, $selected=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $this->elementStart('select', array('id' => $id, 'name' => $id)); if ($blank_select) { @@ -257,9 +251,8 @@ class HTMLOutputter extends XMLOutputter } $this->elementEnd('select'); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -296,7 +289,6 @@ class HTMLOutputter extends XMLOutputter function password($id, $label, $instructions=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $attrs = array('name' => $id, 'type' => 'password', @@ -304,9 +296,8 @@ class HTMLOutputter extends XMLOutputter 'id' => $id); $this->element('input', $attrs); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -348,7 +339,6 @@ class HTMLOutputter extends XMLOutputter function textarea($id, $label, $content=null, $instructions=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $this->element('textarea', array('rows' => 3, 'cols' => 40, @@ -356,8 +346,7 @@ class HTMLOutputter extends XMLOutputter 'id' => $id), ($content) ? $content : ''); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } } diff --git a/lib/settingsgroupnav.php b/lib/settingsgroupnav.php index 044c74552..bd66c65a6 100644 --- a/lib/settingsgroupnav.php +++ b/lib/settingsgroupnav.php @@ -94,7 +94,7 @@ class SettingsGroupNav extends Widget _('Other options'))); $action_name = $this->action->trimmed('action'); - $this->action->elementStart('ul', array('id' => 'nav_views')); + $this->action->elementStart('ul', array('class' => 'nav')); foreach ($menu as $menuaction => $menudesc) { if ($menuaction == 'imsettings' && @@ -104,7 +104,7 @@ class SettingsGroupNav extends Widget $this->action->menuItem(common_local_url($menuaction), $menudesc[0], $menudesc[1], - $action_name == $menuaction); + $action_name === $menuaction); } $this->action->elementEnd('ul'); diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 2892ca4f1..3aee52088 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -64,6 +64,13 @@ font-weight:bold; } form ul li input { } + +form input.checkbox { +position:relative; +top:2px; +left:0; +} + form .error { margin-right:11px; } @@ -92,15 +99,20 @@ form input.submit { /* FORM SETTINGS */ +.form_settings { +margin-bottom:29px; +} + .form_settings fieldset { padding:0; border:0; } .form_settings legend { -display:none; +font-size:1.6em; +text-transform:uppercase; } .form_settings .form_datas label { -display:block; + } .form_guide { @@ -116,7 +128,17 @@ display:inline; font-weight:bold; } +.form_settings p { +margin-bottom:18px; +} +#settings_email_address { +margin-bottom:29px; +} + +#settings_email_preferences label { +font-weight:normal; +} /* FORM SETTINGS */ @@ -638,7 +660,7 @@ margin-right:11px; .notice .author a { } .notice .author:after { -content:":"; +/*content:":";*/ } .vcard .photo { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 1eba97a45..c2eb4ef65 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -41,12 +41,12 @@ color:#88171A; #notice_text-count { color:#333; } -#notice_text-count.warning { -color:#FDFF00; -background-color:#000; +#form_notice.warning #notice_text-count { +color:#000; +background-color:#A9BF4F; } -#notice_data-text.warning { -border-color:#FDFF00; +#form_notice.warning #notice_data-text { +border-color:#A9BF4F; } #form_notice #notice_data-attach_view { |