]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/messageform.php
Notice form cleanup: removing hardcoded id from counter references; prep for reusable...
[quix0rs-gnu-social.git] / lib / messageform.php
index b116964da9d95e9200466f45f4674eeb6579787f..9a4dfbb0f53aff317c041476198c50409863b38e 100644 (file)
@@ -133,6 +133,8 @@ class MessageForm extends Form
         $mutual_users = $user->mutuallySubscribedUsers();
 
         $mutual = array();
+        // TRANS Label entry in drop-down selection box in direct-message inbox/outbox. This is the default entry in the drop-down box, doubling as instructions and a brake against accidental submissions with the first user in the list.
+        $mutual[0] = _('Select recipient:');
 
         while ($mutual_users->fetch()) {
             if ($mutual_users->id != $user->id) {
@@ -143,6 +145,11 @@ class MessageForm extends Form
         $mutual_users->free();
         unset($mutual_users);
 
+        if (count($mutual) == 1) {
+            // TRANS Entry in drop-down selection box in direct-message inbox/outbox when no one is available to message.
+            $mutual[0] = _('No mutual subscribers.');
+        }
+
         $this->out->dropdown('to', _('To'), $mutual, null, false,
                              ($this->to) ? $this->to->id : null);
 
@@ -155,11 +162,9 @@ class MessageForm extends Form
         $contentLimit = Message::maxContent();
 
         if ($contentLimit > 0) {
-            $this->out->elementStart('dl', 'form_note');
-            $this->out->element('dt', null, _('Available characters'));
-            $this->out->element('dd', array('id' => 'notice_text-count'),
+            $this->out->element('span',
+                                array('class' => 'count'),
                                 $contentLimit);
-            $this->out->elementEnd('dl');
         }
     }