X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Femailsettings.php;h=08608348cdae1f79f077df2dc9b70581996485ed;hb=506c2d7491f7f229a1469ef176fee6c21d61a6c6;hp=af528a892ef877556b02dc05b173a1171f612d2e;hpb=df86aa721455fde537608d5faeaaf92075afb738;p=quix0rs-gnu-social.git diff --git a/actions/emailsettings.php b/actions/emailsettings.php index af528a892e..08608348cd 100644 --- a/actions/emailsettings.php +++ b/actions/emailsettings.php @@ -57,7 +57,7 @@ class EmailsettingsAction extends AccountSettingsAction function title() { - return _('Email Settings'); + return _('Email settings'); } /** @@ -71,6 +71,12 @@ class EmailsettingsAction extends AccountSettingsAction return _('Manage how you get email from %%site.name%%.'); } + function showScripts() + { + parent::showScripts(); + $this->autofocus('email'); + } + /** * Content area of the page * @@ -89,7 +95,7 @@ class EmailsettingsAction extends AccountSettingsAction 'class' => 'form_settings', 'action' => common_local_url('emailsettings'))); - + $this->elementStart('fieldset'); $this->elementStart('fieldset', array('id' => 'settings_email_address')); $this->element('legend', null, _('Address')); $this->hidden('token', common_session_token()); @@ -112,7 +118,7 @@ class EmailsettingsAction extends AccountSettingsAction } else { $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('email', _('Email Address'), + $this->input('email', _('Email address'), ($this->arg('email')) ? $this->arg('email') : null, _('Email address, like "UserName@example.org"')); $this->elementEnd('li'); @@ -124,7 +130,7 @@ class EmailsettingsAction extends AccountSettingsAction if (common_config('emailpost', 'enabled') && $user->email) { $this->elementStart('fieldset', array('id' => 'settings_email_incoming')); - $this->element('legend',_('Incoming email')); + $this->element('legend', null, _('Incoming email')); if ($user->incomingemail) { $this->elementStart('p'); $this->element('span', 'address', $user->incomingemail); @@ -188,6 +194,7 @@ class EmailsettingsAction extends AccountSettingsAction $this->elementEnd('ul'); $this->submit('save', _('Save')); $this->elementEnd('fieldset'); + $this->elementEnd('fieldset'); $this->elementEnd('form'); } @@ -320,8 +327,8 @@ class EmailsettingsAction extends AccountSettingsAction $this->showForm(_('Cannot normalize that email address')); return; } - if (!Validate::email($email, true)) { - $this->showForm(_('Not a valid email address')); + if (!Validate::email($email, common_config('email', 'check_domain'))) { + $this->showForm(_('Not a valid email address.')); return; } else if ($user->email == $email) { $this->showForm(_('That is already your email address.'));