Profile settings styles

This commit is contained in:
sarven 2009-01-17 23:49:12 +00:00
parent 99a4daa501
commit 0ecdd5363d
2 changed files with 56 additions and 7 deletions

View File

@ -84,52 +84,72 @@ class ProfilesettingsAction extends AccountSettingsAction
$profile = $user->getProfile(); $profile = $user->getProfile();
$this->elementStart('form', array('method' => 'POST', $this->elementStart('form', array('method' => 'POST',
'id' => 'profilesettings', 'id' => 'form_settings_profile',
'class' => 'form_settings',
'action' => common_local_url('profilesettings'))); 'action' => common_local_url('profilesettings')));
$this->elementStart('fieldset');
$this->element('legend', null, _('Profile information'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
# too much common patterns here... abstractable? # too much common patterns here... abstractable?
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('nickname', _('Nickname'), $this->input('nickname', _('Nickname'),
($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname,
_('1-64 lowercase letters or numbers, no punctuation or spaces')); _('1-64 lowercase letters or numbers, no punctuation or spaces'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('fullname', _('Full name'), $this->input('fullname', _('Full name'),
($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname); ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname);
$this->elementEnd('li');
$this->elementStart('li');
$this->input('homepage', _('Homepage'), $this->input('homepage', _('Homepage'),
($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage, ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage,
_('URL of your homepage, blog, or profile on another site')); _('URL of your homepage, blog, or profile on another site'));
$this->elementEnd('li');
$this->elementStart('li');
$this->textarea('bio', _('Bio'), $this->textarea('bio', _('Bio'),
($this->arg('bio')) ? $this->arg('bio') : $profile->bio, ($this->arg('bio')) ? $this->arg('bio') : $profile->bio,
_('Describe yourself and your interests in 140 chars')); _('Describe yourself and your interests in 140 chars'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('location', _('Location'), $this->input('location', _('Location'),
($this->arg('location')) ? $this->arg('location') : $profile->location, ($this->arg('location')) ? $this->arg('location') : $profile->location,
_('Where you are, like "City, State (or Region), Country"')); _('Where you are, like "City, State (or Region), Country"'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('tags', _('Tags'), $this->input('tags', _('Tags'),
($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()),
_('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated'));
$this->elementEnd('li');
$this->elementStart('li');
$language = common_language(); $language = common_language();
$this->dropdown('language', _('Language'), $this->dropdown('language', _('Language'),
get_nice_language_list(), _('Preferred language'), get_nice_language_list(), _('Preferred language'),
true, $language); true, $language);
$this->elementEnd('li');
$timezone = common_timezone(); $timezone = common_timezone();
$timezones = array(); $timezones = array();
foreach(DateTimeZone::listIdentifiers() as $k => $v) { foreach(DateTimeZone::listIdentifiers() as $k => $v) {
$timezones[$v] = $v; $timezones[$v] = $v;
} }
$this->elementStart('li');
$this->dropdown('timezone', _('Timezone'), $this->dropdown('timezone', _('Timezone'),
$timezones, _('What timezone are you normally in?'), $timezones, _('What timezone are you normally in?'),
true, $timezone); true, $timezone);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('autosubscribe', $this->checkbox('autosubscribe',
_('Automatically subscribe to whoever '. _('Automatically subscribe to whoever '.
'subscribes to me (best for non-humans)'), 'subscribes to me (best for non-humans)'),
($this->arg('autosubscribe')) ? ($this->arg('autosubscribe')) ?
$this->boolean('autosubscribe') : $user->autosubscribe); $this->boolean('autosubscribe') : $user->autosubscribe);
$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

@ -109,9 +109,23 @@ margin-bottom:29px;
font-style:italic; font-style:italic;
} }
.form_settings .form_datas li {
width:100%;
float:left;
}
.form_login label, .form_login label,
.form_settings label { .form_settings .form_datas label,
.form_login input,
.form_settings .form_datas input {
margin-right:11px; margin-right:11px;
float:left;
}
.form_settings label {
margin-top:7px;
width:123px;
} }
.form_actions label { .form_actions label {
@ -123,16 +137,31 @@ display:inline;
font-weight:bold; font-weight:bold;
} }
#form_settings_profile legend {
display:none;
}
.form_settings .form_datas p.form_guide {
clear:both;
margin-left:134px;
margin-bottom:0;
}
.form_settings p { .form_settings p {
margin-bottom:18px; margin-bottom:11px;
} }
#settings_email_address { #settings_email_address {
margin-bottom:29px; margin-bottom:29px;
} }
.form_settings input.checkbox {
margin-top:3px;
}
.form_settings label.checkbox { .form_settings label.checkbox {
font-weight:normal; font-weight:normal;
width:auto;
margin-top:0;
} }
/* FORM SETTINGS */ /* FORM SETTINGS */