SMS settings markup and styles. Minor check with twitter settings form_datas

This commit is contained in:
sarven 2009-01-18 21:14:47 +00:00
parent d46c2cc8a7
commit 061de33e57
3 changed files with 33 additions and 20 deletions

View File

@ -93,37 +93,42 @@ class SmssettingsAction extends ConnectSettingsAction
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
if ($user->sms) { if ($user->sms) {
$this->elementStart('p');
$carrier = $user->getCarrier(); $carrier = $user->getCarrier();
$this->element('span', 'address confirmed', $this->element('p', 'form_confirmed',
$user->sms . ' (' . $carrier->name . ')'); $user->sms . ' (' . $carrier->name . ')');
$this->element('span', 'input_instructions', $this->element('p', 'form_guide',
_('Current confirmed SMS-enabled phone number.')); _('Current confirmed SMS-enabled phone number.'));
$this->hidden('sms', $user->sms); $this->hidden('sms', $user->sms);
$this->hidden('carrier', $user->carrier); $this->hidden('carrier', $user->carrier);
$this->elementEnd('p');
$this->submit('remove', _('Remove')); $this->submit('remove', _('Remove'));
} else { } else {
$confirm = $this->getConfirmation(); $confirm = $this->getConfirmation();
if ($confirm) { if ($confirm) {
$carrier = Sms_carrier::staticGet($confirm->address_extra); $carrier = Sms_carrier::staticGet($confirm->address_extra);
$this->elementStart('p'); $this->element('p', 'form_unconfirmed',
$this->element('span', 'address unconfirmed',
$confirm->address . ' (' . $carrier->name . ')'); $confirm->address . ' (' . $carrier->name . ')');
$this->element('span', 'input_instructions', $this->element('p', 'form_guide',
_('Awaiting confirmation on this phone number.')); _('Awaiting confirmation on this phone number.'));
$this->hidden('sms', $confirm->address); $this->hidden('sms', $confirm->address);
$this->hidden('carrier', $confirm->address_extra); $this->hidden('carrier', $confirm->address_extra);
$this->elementEnd('p');
$this->submit('cancel', _('Cancel')); $this->submit('cancel', _('Cancel'));
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('code', _('Confirmation code'), null, $this->input('code', _('Confirmation code'), null,
_('Enter the code you received on your phone.')); _('Enter the code you received on your phone.'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('confirm', _('Confirm')); $this->submit('confirm', _('Confirm'));
} else { } else {
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('sms', _('SMS Phone number'), $this->input('sms', _('SMS Phone number'),
($this->arg('sms')) ? $this->arg('sms') : null, ($this->arg('sms')) ? $this->arg('sms') : null,
_('Phone number, no punctuation or spaces, '. _('Phone number, no punctuation or spaces, '.
'with area code')); 'with area code'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->carrierSelect(); $this->carrierSelect();
$this->submit('add', _('Add')); $this->submit('add', _('Add'));
} }
@ -131,14 +136,13 @@ class SmssettingsAction extends ConnectSettingsAction
$this->elementEnd('fieldset'); $this->elementEnd('fieldset');
if ($user->sms) { 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) { if ($user->incomingemail) {
$this->elementStart('p'); $this->element('p', 'form_unconfirmed', $user->incomingemail);
$this->element('span', 'address', $user->incomingemail); $this->element('p', 'form_note',
$this->element('span', 'input_instructions',
_('Send email to this address to post new notices.')); _('Send email to this address to post new notices.'));
$this->elementEnd('p');
$this->submit('removeincoming', _('Remove')); $this->submit('removeincoming', _('Remove'));
} }
@ -146,6 +150,7 @@ class SmssettingsAction extends ConnectSettingsAction
_('Make a new email address for posting to; '. _('Make a new email address for posting to; '.
'cancels the old one.')); 'cancels the old one.'));
$this->submit('newincoming', _('New')); $this->submit('newincoming', _('New'));
$this->elementEnd('fieldset');
} }
$this->elementStart('fieldset', array('id' => 'settings_sms_preferences')); $this->elementStart('fieldset', array('id' => 'settings_sms_preferences'));
@ -443,7 +448,7 @@ class SmssettingsAction extends ConnectSettingsAction
$cnt = $carrier->find(); $cnt = $carrier->find();
$this->elementStart('ul'); $this->elementStart('ul', 'form_datas');
$this->elementStart('li'); $this->elementStart('li');
$this->element('label', array('for' => 'carrier'), _('Mobile carrier')); $this->element('label', array('for' => 'carrier'), _('Mobile carrier'));
$this->elementStart('select', array('name' => 'carrier', $this->elementStart('select', array('name' => 'carrier',

View File

@ -133,7 +133,7 @@ class TwittersettingsAction extends ConnectSettingsAction
array('id' => 'settings_twitter_preferences')); array('id' => 'settings_twitter_preferences'));
$this->element('legend', null, _('Preferences')); $this->element('legend', null, _('Preferences'));
$this->elementStart('ul'); $this->elementStart('ul', 'form_datas');
$this->elementStart('li'); $this->elementStart('li');
$this->checkbox('noticesync', $this->checkbox('noticesync',
_('Automatically send my notices to Twitter.'), _('Automatically send my notices to Twitter.'),

View File

@ -116,15 +116,19 @@ width:100%;
float:left; float:left;
} }
.form_settings .form_datas label, .form_settings .form_datas label {
float:left;
}
.form_settings .form_datas textarea,
.form_settings .form_datas select,
.form_settings .form_datas input { .form_settings .form_datas input {
margin-right:11px; margin-left:11px;
float:left; float:left;
} }
.form_settings label { .form_settings label {
margin-top:7px; margin-top:7px;
width:123px; width:152px;
} }
.form_actions label { .form_actions label {
@ -144,7 +148,7 @@ display:none;
.form_settings .form_datas p.form_guide { .form_settings .form_datas p.form_guide {
clear:both; clear:both;
margin-left:134px; margin-left:163px;
margin-bottom:0; margin-bottom:0;
} }
@ -154,11 +158,15 @@ margin-bottom:11px;
.form_settings input.checkbox { .form_settings input.checkbox {
margin-top:3px; margin-top:3px;
margin-left:0;
} }
.form_settings label.checkbox { .form_settings label.checkbox {
font-weight:normal; font-weight:normal;
width:auto;
margin-top:0; margin-top:0;
margin-right:0;
margin-left:11px;
float:left;
width:90%;
} }
#form_login p.form_guide, #form_login p.form_guide,