]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/invite.php
Fixes minor remote subscription profile layout
[quix0rs-gnu-social.git] / actions / invite.php
index 9f9368701cbcb1ec279c1ba981671c60cf8b32b3..d0ed64ec9079449ec3d9013973aab5e912257a6b 100644 (file)
@@ -68,7 +68,7 @@ class InviteAction extends CurrentUserDesignAction
 
         foreach ($addresses as $email) {
             $email = trim($email);
-            if (!Validate::email($email, true)) {
+            if (!Validate::email($email, common_config('email', 'check_domain'))) {
                 $this->showForm(sprintf(_('Invalid email address: %s'), $email));
                 return;
             }
@@ -98,6 +98,12 @@ class InviteAction extends CurrentUserDesignAction
         $this->showPage();
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('addresses');
+    }
+
     function title()
     {
         if ($this->mode == 'sent') {
@@ -122,7 +128,7 @@ class InviteAction extends CurrentUserDesignAction
             $this->element('p', null, _('You are already subscribed to these users:'));
             $this->elementStart('ul');
             foreach ($this->already as $other) {
-                $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+                $this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email));
             }
             $this->elementEnd('ul');
         }
@@ -130,7 +136,7 @@ class InviteAction extends CurrentUserDesignAction
             $this->element('p', null, _('These people are already users and you were automatically subscribed to them:'));
             $this->elementStart('ul');
             foreach ($this->subbed as $other) {
-                $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+                $this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email));
             }
             $this->elementEnd('ul');
         }