Markup and styles for the Register page

This commit is contained in:
sarven 2009-01-18 19:42:08 +00:00
parent 2c4db393f5
commit 5da9511c31
2 changed files with 31 additions and 6 deletions

View File

@ -332,22 +332,32 @@ class RegisterAction extends Action
} }
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'login', 'id' => 'form_register',
'class' => 'form_settings',
'action' => common_local_url('register'))); 'action' => common_local_url('register')));
$this->elementStart('fieldset');
$this->element('legend', null, 'Account settings');
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
if ($code) { if ($code) {
$this->hidden('code', $code); $this->hidden('code', $code);
} }
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('nickname', _('Nickname'), $this->trimmed('nickname'), $this->input('nickname', _('Nickname'), $this->trimmed('nickname'),
_('1-64 lowercase letters or numbers, '. _('1-64 lowercase letters or numbers, '.
'no punctuation or spaces. Required.')); 'no punctuation or spaces. Required.'));
$this->elementEnd('li');
$this->elementStart('li');
$this->password('password', _('Password'), $this->password('password', _('Password'),
_('6 or more characters. Required.')); _('6 or more characters. Required.'));
$this->elementEnd('li');
$this->elementStart('li');
$this->password('confirm', _('Confirm'), $this->password('confirm', _('Confirm'),
_('Same as password above. Required.')); _('Same as password above. Required.'));
$this->elementEnd('li');
$this->elementStart('li');
if ($invite && $invite->address_type == 'email') { if ($invite && $invite->address_type == 'email') {
$this->input('email', _('Email'), $invite->address, $this->input('email', _('Email'), $invite->address,
_('Used only for updates, announcements, '. _('Used only for updates, announcements, '.
@ -357,26 +367,36 @@ class RegisterAction extends Action
_('Used only for updates, announcements, '. _('Used only for updates, announcements, '.
'and password recovery')); 'and password recovery'));
} }
$this->elementEnd('li');
$this->elementStart('li');
$this->input('fullname', _('Full name'), $this->input('fullname', _('Full name'),
$this->trimmed('fullname'), $this->trimmed('fullname'),
_('Longer name, preferably your "real" name')); _('Longer name, preferably your "real" name'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('homepage', _('Homepage'), $this->input('homepage', _('Homepage'),
$this->trimmed('homepage'), $this->trimmed('homepage'),
_('URL of your homepage, blog, '. _('URL of your homepage, blog, '.
'or profile on another site')); 'or profile on another site'));
$this->elementEnd('li');
$this->elementStart('li');
$this->textarea('bio', _('Bio'), $this->textarea('bio', _('Bio'),
$this->trimmed('bio'), $this->trimmed('bio'),
_('Describe yourself and your '. _('Describe yourself and your '.
'interests in 140 chars')); 'interests in 140 chars'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('location', _('Location'), $this->input('location', _('Location'),
$this->trimmed('location'), $this->trimmed('location'),
_('Where you are, like "City, '. _('Where you are, like "City, '.
'State (or Region), Country"')); 'State (or Region), Country"'));
$this->elementEnd('li');
$this->elementStart('li', array('id' => 'settings_rememberme'));
$this->checkbox('rememberme', _('Remember me'), $this->checkbox('rememberme', _('Remember me'),
$this->boolean('rememberme'), $this->boolean('rememberme'),
_('Automatically login in the future; '. _('Automatically login in the future; '.
'not for shared computers!')); 'not for shared computers!'));
$this->elementStart('p'); $this->elementEnd('li');
$attrs = array('type' => 'checkbox', $attrs = array('type' => 'checkbox',
'id' => 'license', 'id' => 'license',
'name' => 'license', 'name' => 'license',
@ -384,14 +404,17 @@ class RegisterAction extends Action
if ($this->boolean('license')) { if ($this->boolean('license')) {
$attrs['checked'] = 'checked'; $attrs['checked'] = 'checked';
} }
$this->elementStart('li');
$this->element('input', $attrs); $this->element('input', $attrs);
$this->text(_('My text and files are available under ')); $this->text(_('My text and files are available under '));
$this->element('a', array('href' => common_config('license', 'url')), $this->element('a', array('href' => common_config('license', 'url')),
$config['license']['title']); $config['license']['title']);
$this->text(_(' except this private data: password, '. $this->text(_(' except this private data: password, '.
'email address, IM address, phone number.')); 'email address, IM address, phone number.'));
$this->elementEnd('p'); $this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', _('Register')); $this->submit('submit', _('Register'));
$this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
} }

View File

@ -136,7 +136,8 @@ font-weight:bold;
} }
#form_settings_profile legend, #form_settings_profile legend,
#form_login legend { #form_login legend,
#form_register legend {
display:none; display:none;
} }
@ -159,7 +160,8 @@ width:auto;
margin-top:0; margin-top:0;
} }
#form_login p.form_guide { #form_login p.form_guide,
#form_register #settings_rememberme p.form_guide {
margin-left:0; margin-left:0;
} }