X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Femailsettings.php;h=6eff06c0d667b66fc6056ed706a83a7141efb89a;hb=277b464054b24f8d680ddbe762c9e438f6679592;hp=3554708156431468c72793c4cfaf3f8d41060377;hpb=b9fb70ee70ecd465f5843241b308f2b8680120f6;p=quix0rs-gnu-social.git diff --git a/actions/emailsettings.php b/actions/emailsettings.php index 3554708156..6eff06c0d6 100644 --- a/actions/emailsettings.php +++ b/actions/emailsettings.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @author Zach Copley - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @author Zach Copley + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/settingsaction.php'; +require_once INSTALLDIR.'/lib/accountsettingsaction.php'; /** * Settings for email * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @author Zach Copley + * @package StatusNet + * @author Evan Prodromou + * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see Widget */ -class EmailsettingsAction extends SettingsAction +class EmailsettingsAction extends AccountSettingsAction { /** * Title of the page @@ -71,6 +71,12 @@ class EmailsettingsAction extends SettingsAction return _('Manage how you get email from %%site.name%%.'); } + function showScripts() + { + parent::showScripts(); + $this->autofocus('email'); + } + /** * Content area of the page * @@ -95,22 +101,22 @@ class EmailsettingsAction extends SettingsAction $this->hidden('token', common_session_token()); if ($user->email) { - $this->element('p', array('id' => 'email_confirmed', $user->email)); + $this->element('p', array('id' => 'form_confirmed'), $user->email); $this->element('p', array('class' => 'form_note'), _('Current confirmed email address.')); $this->hidden('email', $user->email); $this->submit('remove', _('Remove')); } else { $confirm = $this->getConfirmation(); if ($confirm) { - $this->element('p', array('id' => 'email_unconfirmed'), $confirm->address); - $this->element('p', array('class' => 'form_note'), + $this->element('p', array('id' => 'form_unconfirmed'), $confirm->address); + $this->element('p', array('class' => 'form_note'), _('Awaiting confirmation on this address. '. 'Check your inbox (and spam box!) for a message '. 'with further instructions.')); $this->hidden('email', $confirm->address); $this->submit('cancel', _('Cancel')); } else { - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->input('email', _('Email Address'), ($this->arg('email')) ? $this->arg('email') : null, @@ -122,7 +128,7 @@ class EmailsettingsAction extends SettingsAction } $this->elementEnd('fieldset'); - if ($user->email) { + if (common_config('emailpost', 'enabled') && $user->email) { $this->elementStart('fieldset', array('id' => 'settings_email_incoming')); $this->element('legend',_('Incoming email')); if ($user->incomingemail) { @@ -143,11 +149,10 @@ class EmailsettingsAction extends SettingsAction $this->elementEnd('fieldset'); } - $this->elementStart('fieldset', array('id' => 'settings_email_preferences')); $this->element('legend', null, _('Preferences')); - $this->elementStart('ul', 'form_datas'); + $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->checkbox('emailnotifysub', _('Send me notices of new subscriptions through email.'), @@ -165,15 +170,22 @@ class EmailsettingsAction extends SettingsAction $user->emailnotifymsg); $this->elementEnd('li'); $this->elementStart('li'); + $this->checkbox('emailnotifyattn', + _('Send me email when someone sends me an "@-reply".'), + $user->emailnotifyattn); + $this->elementEnd('li'); + $this->elementStart('li'); $this->checkbox('emailnotifynudge', _('Allow friends to nudge me and send me an email.'), $user->emailnotifynudge); $this->elementEnd('li'); - $this->elementStart('li'); - $this->checkbox('emailpost', - _('I want to post notices by email.'), - $user->emailpost); - $this->elementEnd('li'); + if (common_config('emailpost', 'enabled')) { + $this->elementStart('li'); + $this->checkbox('emailpost', + _('I want to post notices by email.'), + $user->emailpost); + $this->elementEnd('li'); + } $this->elementStart('li'); $this->checkbox('emailmicroid', _('Publish a MicroID for my email address.'), @@ -256,6 +268,7 @@ class EmailsettingsAction extends SettingsAction $emailnotifyfav = $this->boolean('emailnotifyfav'); $emailnotifymsg = $this->boolean('emailnotifymsg'); $emailnotifynudge = $this->boolean('emailnotifynudge'); + $emailnotifyattn = $this->boolean('emailnotifyattn'); $emailmicroid = $this->boolean('emailmicroid'); $emailpost = $this->boolean('emailpost'); @@ -271,6 +284,7 @@ class EmailsettingsAction extends SettingsAction $user->emailnotifyfav = $emailnotifyfav; $user->emailnotifymsg = $emailnotifymsg; $user->emailnotifynudge = $emailnotifynudge; + $user->emailnotifyattn = $emailnotifyattn; $user->emailmicroid = $emailmicroid; $user->emailpost = $emailpost;