]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/emailsettings.php
A different search pagination fix (see ticket #1333) that doesn't require fixing...
[quix0rs-gnu-social.git] / actions / emailsettings.php
index d03d5ff84264d9822739dcbc3d14c8f328b7877f..634388fdddbdf41acae10d679719d45148c5d869 100644 (file)
@@ -32,7 +32,7 @@ if (!defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/settingsaction.php';
+require_once INSTALLDIR.'/lib/accountsettingsaction.php';
 
 /**
  * Settings for email
@@ -47,7 +47,7 @@ require_once INSTALLDIR.'/lib/settingsaction.php';
  * @see      Widget
  */
 
-class EmailsettingsAction extends SettingsAction
+class EmailsettingsAction extends AccountSettingsAction
 {
     /**
      * Title of the page
@@ -89,30 +89,28 @@ class EmailsettingsAction extends SettingsAction
                                           'class' => 'form_settings',
                                           'action' =>
                                           common_local_url('emailsettings')));
-        $this->elementStart('fieldset');
-        $this->element('legend', null, _('Email settings'));
-        $this->hidden('token', common_session_token());
 
-        $this->elementStart('div', array('id' => 'settings_email_address'));
-        $this->element('h2', null, _('Address'));
+        $this->elementStart('fieldset', array('id' => 'settings_email_address'));
+        $this->element('legend', null, _('Address'));
+        $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,12 +120,11 @@ class EmailsettingsAction extends SettingsAction
                 $this->submit('add', _('Add'));
             }
         }
-        $this->elementEnd('div');
-
-        $this->elementStart('div', array('id' => 'settings_email_incoming'));
-        if ($user->email) {
-            $this->element('h2', null, _('Incoming email'));
+        $this->elementEnd('fieldset');
 
+       if ($user->email) {
+            $this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
+            $this->element('legend',_('Incoming email'));
             if ($user->incomingemail) {
                 $this->elementStart('p');
                 $this->element('span', 'address', $user->incomingemail);
@@ -143,13 +140,13 @@ class EmailsettingsAction extends SettingsAction
                              'cancels the old one.'));
             $this->elementEnd('p');
             $this->submit('newincoming', _('New'));
+            $this->elementEnd('fieldset');
         }
-        $this->elementEnd('div');
 
-        $this->elementStart('div', array('id' => 'settings_email_preferences'));
-        $this->element('h2', null, _('Preferences'));
+        $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.'),
@@ -167,6 +164,11 @@ 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);
@@ -182,10 +184,7 @@ class EmailsettingsAction extends SettingsAction
                         $user->emailmicroid);
         $this->elementEnd('li');
         $this->elementEnd('ul');
-        $this->elementEnd('div');
-
         $this->submit('save', _('Save'));
-
         $this->elementEnd('fieldset');
         $this->elementEnd('form');
     }
@@ -261,6 +260,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');
 
@@ -276,6 +276,7 @@ class EmailsettingsAction extends SettingsAction
         $user->emailnotifyfav   = $emailnotifyfav;
         $user->emailnotifymsg   = $emailnotifymsg;
         $user->emailnotifynudge = $emailnotifynudge;
+        $user->emailnotifyattn  = $emailnotifyattn;
         $user->emailmicroid     = $emailmicroid;
         $user->emailpost        = $emailpost;