- 'action' => common_local_url('login')));
- common_element('label', array('for' => 'username'),
- _t('Name'));
- common_element('input', array('name' => 'username',
- 'type' => 'text',
- 'id' => 'username'));
- common_element('label', array('for' => 'password'),
- _t('Password'));
- common_element('input', array('name' => 'password',
- 'type' => 'password',
- 'id' => 'password'));
- common_element('label', array('for' => 'confirm'),
- _t('Confirm'));
- common_element('input', array('name' => 'confirm',
- 'type' => 'password',
- 'id' => 'confirm'));
- common_element('label', array('for' => 'email'),
- _t('Email'));
- common_element('input', array('name' => 'email',
- 'type' => 'text',
- 'id' => 'email'));
- common_element('input', array('name' => 'submit',
- 'type' => 'submit',
- 'id' => 'submit'),
- _t('Login'));
- common_element('input', array('name' => 'cancel',
- 'type' => 'button',
- 'id' => 'cancel'),
- _t('Cancel'));
+ 'action' => common_local_url('register')));
+
+ common_hidden('token', common_session_token());
+
+ if ($code) {
+ common_hidden('code', $code);
+ }
+
+ common_input('nickname', _('Nickname'), $this->trimmed('nickname'),
+ _('1-64 lowercase letters or numbers, no punctuation or spaces. Required.'));
+ common_password('password', _('Password'),
+ _('6 or more characters. Required.'));
+ common_password('confirm', _('Confirm'),
+ _('Same as password above. Required.'));
+ if ($invite && $invite->address_type == 'email') {
+ common_input('email', _('Email'), $invite->address,
+ _('Used only for updates, announcements, and password recovery'));
+ } else {
+ common_input('email', _('Email'), $this->trimmed('email'),
+ _('Used only for updates, announcements, and password recovery'));
+ }
+ common_input('fullname', _('Full name'),
+ $this->trimmed('fullname'),
+ _('Longer name, preferably your "real" name'));
+ common_input('homepage', _('Homepage'),
+ $this->trimmed('homepage'),
+ _('URL of your homepage, blog, or profile on another site'));
+ common_textarea('bio', _('Bio'),
+ $this->trimmed('bio'),
+ _('Describe yourself and your interests in 140 chars'));
+ common_input('location', _('Location'),
+ $this->trimmed('location'),
+ _('Where you are, like "City, State (or Region), Country"'));
+ common_checkbox('rememberme', _('Remember me'),
+ $this->boolean('rememberme'),
+ _('Automatically login in the future; not for shared computers!'));
+ common_element_start('p');
+ $attrs = array('type' => 'checkbox',
+ 'id' => 'license',
+ 'name' => 'license',
+ 'value' => 'true');
+ if ($this->boolean('license')) {
+ $attrs['checked'] = 'checked';
+ }
+ common_element('input', $attrs);
+ common_text(_('My text and files are available under '));
+ common_element('a', array('href' => $config['license']['url']),
+ $config['license']['title']);
+ common_text(_(' except this private data: password, email address, IM address, phone number.'));
+ common_element_end('p');
+ common_submit('submit', _('Register'));
+ common_element_end('form');
+ common_show_footer();