IM settings markup and style.

Added confirmed/unconfirmed styles
This commit is contained in:
sarven 2009-01-18 20:36:50 +00:00
parent 5426c4ec6a
commit d46c2cc8a7
4 changed files with 43 additions and 23 deletions

View File

@ -95,14 +95,14 @@ class EmailsettingsAction extends AccountSettingsAction
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
if ($user->email) { 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->element('p', array('class' => 'form_note'), _('Current confirmed email address.'));
$this->hidden('email', $user->email); $this->hidden('email', $user->email);
$this->submit('remove', _('Remove')); $this->submit('remove', _('Remove'));
} else { } else {
$confirm = $this->getConfirmation(); $confirm = $this->getConfirmation();
if ($confirm) { 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'), $this->element('p', array('class' => 'form_note'),
_('Awaiting confirmation on this address. '. _('Awaiting confirmation on this address. '.
'Check your inbox (and spam box!) for a message '. 'Check your inbox (and spam box!) for a message '.

View File

@ -86,36 +86,35 @@ class ImsettingsAction extends ConnectSettingsAction
{ {
$user = common_current_user(); $user = common_current_user();
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'imsettings', 'id' => 'form_settings_im',
'class' => 'form_settings',
'action' => 'action' =>
common_local_url('imsettings'))); common_local_url('imsettings')));
$this->elementStart('fieldset', array('id' => 'settings_im_address'));
$this->element('legend', null, _('Address'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->element('h2', null, _('Address'));
if ($user->jabber) { if ($user->jabber) {
$this->elementStart('p'); $this->element('p', 'form_confirmed', $user->jabber);
$this->element('span', 'address confirmed', $user->jabber); $this->element('p', 'form_note',
$this->element('span', 'input_instructions',
_('Current confirmed Jabber/GTalk address.')); _('Current confirmed Jabber/GTalk address.'));
$this->hidden('jabber', $user->jabber); $this->hidden('jabber', $user->jabber);
$this->elementEnd('p');
$this->submit('remove', _('Remove')); $this->submit('remove', _('Remove'));
} else { } else {
$confirm = $this->getConfirmation(); $confirm = $this->getConfirmation();
if ($confirm) { if ($confirm) {
$this->elementStart('p'); $this->element('p', 'form_unconfirmed', $confirm->address);
$this->element('span', 'address unconfirmed', $confirm->address); $this->element('p', 'form_note',
$this->element('span', 'input_instructions',
sprintf(_('Awaiting confirmation on this address. '. sprintf(_('Awaiting confirmation on this address. '.
'Check your Jabber/GTalk account for a '. 'Check your Jabber/GTalk account for a '.
'message with further instructions. '. 'message with further instructions. '.
'(Did you add %s to your buddy list?)'), '(Did you add %s to your buddy list?)'),
jabber_daemon_address())); jabber_daemon_address()));
$this->hidden('jabber', $confirm->address); $this->hidden('jabber', $confirm->address);
$this->elementEnd('p');
$this->submit('cancel', _('Cancel')); $this->submit('cancel', _('Cancel'));
} else { } else {
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('jabber', _('IM Address'), $this->input('jabber', _('IM Address'),
($this->arg('jabber')) ? $this->arg('jabber') : null, ($this->arg('jabber')) ? $this->arg('jabber') : null,
sprintf(_('Jabber or GTalk address, '. sprintf(_('Jabber or GTalk address, '.
@ -123,27 +122,40 @@ class ImsettingsAction extends ConnectSettingsAction
'First, make sure to add %s to your '. 'First, make sure to add %s to your '.
'buddy list in your IM client or on GTalk.'), 'buddy list in your IM client or on GTalk.'),
jabber_daemon_address())); jabber_daemon_address()));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('add', _('Add')); $this->submit('add', _('Add'));
} }
} }
$this->elementEnd('fieldset');
$this->element('h2', null, _('Preferences')); $this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
$this->element('legend', null, _('Preferences'));
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->checkbox('jabbernotify', $this->checkbox('jabbernotify',
_('Send me notices through Jabber/GTalk.'), _('Send me notices through Jabber/GTalk.'),
$user->jabbernotify); $user->jabbernotify);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('updatefrompresence', $this->checkbox('updatefrompresence',
_('Post a notice when my Jabber/GTalk status changes.'), _('Post a notice when my Jabber/GTalk status changes.'),
$user->updatefrompresence); $user->updatefrompresence);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('jabberreplies', $this->checkbox('jabberreplies',
_('Send me replies through Jabber/GTalk '. _('Send me replies through Jabber/GTalk '.
'from people I\'m not subscribed to.'), 'from people I\'m not subscribed to.'),
$user->jabberreplies); $user->jabberreplies);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('jabbermicroid', $this->checkbox('jabbermicroid',
_('Publish a MicroID for my Jabber/GTalk address.'), _('Publish a MicroID for my Jabber/GTalk address.'),
$user->jabbermicroid); $user->jabbermicroid);
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('save', _('Save')); $this->submit('save', _('Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
} }

View File

@ -79,11 +79,12 @@ top:2px;
left:0; left:0;
} }
#page_notice .error { #page_notice .error,
background-color:#F7E8E8; #page_notice .success {
padding:4px 7px; padding:4px 7px;
-moz-border-radius:4px; -moz-border-radius:4px;
} }
form label.submit { form label.submit {
display:none; display:none;
} }
@ -666,10 +667,6 @@ border-top:1px dashed #D1D9E4;
list-style-type:none; list-style-type:none;
/*margin-bottom:11px;*/ /*margin-bottom:11px;*/
} }
.notices li.over {
background-color:#fcfcfc;
}
/* NOTICES */ /* NOTICES */
#notices_primary { #notices_primary {

View File

@ -71,6 +71,12 @@ background-color:rgba(255, 255, 255, 0.7);
background-color:#fff; background-color:#fff;
} }
#page_notice .error {
background-color:#F7E8E8;
}
#page_notice .success {
background-color:#EFF3DC;
}
@ -135,6 +141,11 @@ color:#555;
/* NOTICES */ /* NOTICES */
.notices li.over {
background-color:#fcfcfc;
}
.notice div.entry-content a { .notice div.entry-content a {
} }