X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fregister.php;h=5d7a8ce690d5fa88655f2a6c0f5fa2596c6c478e;hb=96982477220316ee7af0326dc6ff42d2438b540e;hp=b15aea08edd8ed76514375445601fb0fdbe8542e;hpb=4163f450040d92f417a2481e65cada97f77d74f2;p=quix0rs-gnu-social.git diff --git a/actions/register.php b/actions/register.php index b15aea08ed..5d7a8ce690 100644 --- a/actions/register.php +++ b/actions/register.php @@ -167,13 +167,13 @@ class RegisterAction extends Action array('http', 'https')))) { $this->showForm(_('Homepage is not a valid URL.')); return; - } else if (!is_null($fullname) && strlen($fullname) > 255) { + } else if (!is_null($fullname) && mb_strlen($fullname) > 255) { $this->showForm(_('Full name is too long (max 255 chars).')); return; - } else if (!is_null($bio) && strlen($bio) > 140) { + } else if (!is_null($bio) && mb_strlen($bio) > 140) { $this->showForm(_('Bio is too long (max 140 chars).')); return; - } else if (!is_null($location) && strlen($location) > 255) { + } else if (!is_null($location) && mb_strlen($location) > 255) { $this->showForm(_('Location is too long (max 255 chars).')); return; } else if (strlen($password) < 6) { @@ -248,6 +248,25 @@ class RegisterAction extends Action return ($user !== false); } + // overrrided to add entry-title class + function showPageTitle() { + $this->element('h1', array('class' => 'entry-title'), $this->title()); + } + + // overrided to add hentry, and content-inner class + function showContentBlock() + { + $this->elementStart('div', array('id' => 'content', 'class' => 'hentry')); + $this->showPageTitle(); + $this->showPageNoticeBlock(); + $this->elementStart('div', array('id' => 'content_inner', + 'class' => 'entry-content')); + // show the actual content (forms, lists, whatever) + $this->showContent(); + $this->elementEnd('div'); + $this->elementEnd('div'); + } + /** * Instructions or a notice for the page * @@ -332,22 +351,32 @@ class RegisterAction extends Action } $this->elementStart('form', array('method' => 'post', - 'id' => 'login', + 'id' => 'form_register', + 'class' => 'form_settings', 'action' => common_local_url('register'))); - + $this->elementStart('fieldset'); + $this->element('legend', null, 'Account settings'); $this->hidden('token', common_session_token()); if ($code) { $this->hidden('code', $code); } + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); $this->input('nickname', _('Nickname'), $this->trimmed('nickname'), _('1-64 lowercase letters or numbers, '. 'no punctuation or spaces. Required.')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->password('password', _('Password'), _('6 or more characters. Required.')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->password('confirm', _('Confirm'), _('Same as password above. Required.')); + $this->elementEnd('li'); + $this->elementStart('li'); if ($invite && $invite->address_type == 'email') { $this->input('email', _('Email'), $invite->address, _('Used only for updates, announcements, '. @@ -357,41 +386,57 @@ class RegisterAction extends Action _('Used only for updates, announcements, '. 'and password recovery')); } + $this->elementEnd('li'); + $this->elementStart('li'); $this->input('fullname', _('Full name'), $this->trimmed('fullname'), _('Longer name, preferably your "real" name')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->input('homepage', _('Homepage'), $this->trimmed('homepage'), _('URL of your homepage, blog, '. 'or profile on another site')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->textarea('bio', _('Bio'), $this->trimmed('bio'), _('Describe yourself and your '. 'interests in 140 chars')); + $this->elementEnd('li'); + $this->elementStart('li'); $this->input('location', _('Location'), $this->trimmed('location'), _('Where you are, like "City, '. 'State (or Region), Country"')); + $this->elementEnd('li'); + $this->elementStart('li', array('id' => 'settings_rememberme')); $this->checkbox('rememberme', _('Remember me'), $this->boolean('rememberme'), _('Automatically login in the future; '. 'not for shared computers!')); - $this->elementStart('p'); + $this->elementEnd('li'); $attrs = array('type' => 'checkbox', 'id' => 'license', + 'class' => 'checkbox', 'name' => 'license', 'value' => 'true'); if ($this->boolean('license')) { $attrs['checked'] = 'checked'; } + $this->elementStart('li'); $this->element('input', $attrs); + $this->elementStart('label', array('class' => 'checkbox', 'for' => 'license')); $this->text(_('My text and files are available under ')); $this->element('a', array('href' => common_config('license', 'url')), - $config['license']['title']); + common_config('license', 'title'), _("Creative Commons Attribution 3.0")); $this->text(_(' except this private data: password, '. - 'email address, IM address, phone number.')); - $this->elementEnd('p'); + 'email address, IM address, and phone number.')); + $this->elementEnd('label'); + $this->elementEnd('li'); + $this->elementEnd('ul'); $this->submit('submit', _('Register')); + $this->elementEnd('fieldset'); $this->elementEnd('form'); }