]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/lib/qnashowanswerform.php
More info for a proper, fancy-url lighttpd setup
[quix0rs-gnu-social.git] / plugins / QnA / lib / qnashowanswerform.php
index 54f3f8fcac1f99261bb8af14d536c4c54e67aa42..8ca573c1c1e0ca89b0b417531d5cd6ea9493a882 100644 (file)
@@ -46,14 +46,14 @@ require_once INSTALLDIR . '/lib/form.php';
 class QnashowanswerForm extends Form
 {
     /**
-     * The answer to revise
+     * The answer to show
      */
-    var $answer = null;
+    protected $answer   = null;
 
     /**
      * The question this is an answer to
      */
-    var $question = null;
+    protected $question = null;
 
     /**
      * Constructor
@@ -76,7 +76,7 @@ class QnashowanswerForm extends Form
      */
     function id()
     {
-        return 'revise-' . $this->answer->id;
+        return 'show-' . $this->answer->id;
     }
 
     /**
@@ -109,8 +109,8 @@ class QnashowanswerForm extends Form
      */
     function formLegend()
     {
-        // TRANS: Form legend for revising the answer.
-        $this->out->element('legend', null, _('Revise your answer'));
+        // TRANS: Form legend for showing the answer.
+        $this->out->element('legend', null, _m('Answer'));
     }
 
     /**
@@ -121,9 +121,11 @@ class QnashowanswerForm extends Form
     function formData()
     {
         $this->out->hidden(
-            'id',
-            'revise-' . $this->answer->id
+            'qna-answer-id',
+            'answer-' . $this->answer->id,
+            'id'
         );
+
         $this->out->raw($this->answer->asHTML());
     }
 
@@ -141,31 +143,38 @@ class QnashowanswerForm extends Form
 
         if (empty($this->question->closed)) {
             if ($user->id == $this->question->profile_id) {
-                common_debug("I am the question asker!");
                 if (empty($this->answer->best)) {
                     $this->out->submit(
-                        'best',
-                        // TRANS: Button text for marking an answer as "best"
+                        'qna-best-answer',
+                        // TRANS: Button text for marking an answer as "best".
                         _m('BUTTON', 'Best'),
                         'submit',
-                        null,
-                        // TRANS: Title for button text marking an answer as "best"
-                        _('Mark as best answer')
+                        'best',
+                        // TRANS: Title for button text marking an answer as "best".
+                        _m('Mark this answer as the best answer.')
                     );
-        
+
                 }
             }
+
+            /*
+             * @todo FIXME: Revise is disabled until we figure out the
+             *         Ostatus bits This comment is just a reminder
+             *         that the UI for this works.
+             */
+            /*
             if ($user->id == $this->answer->profile_id) {
                 $this->out->submit(
                     'revise',
-                    // TRANS: Button text for revising an answer
+                    // TRANS: Button text for revising an answer.
                     _m('BUTTON', 'Revise'),
                     'submit',
                     null,
-                    // TRANS: Title for button text for revising an answer
-                    _('Revise your answer')
+                    // TRANS: Title for button text for revising an answer.
+                    _m('Revise your answer.')
                 );
             }
+             */
         }
     }
 
@@ -176,6 +185,6 @@ class QnashowanswerForm extends Form
      */
     function formClass()
     {
-        return 'form_revise ajax';
+        return 'form_answer_show ajax';
     }
 }