Kaynağa Gözat

Ticket #2341 - Customizable min form placeholder message.

AntonLV 7 yıl önce
ebeveyn
işleme
d9b48a0e36

+ 2 - 1
inc/classes/BxDolCmts.php

@@ -261,7 +261,8 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
             'txt_sample_vote_single' => '_cmt_txt_sample_vote_single',
             'txt_sample_reaction_single' => '_cmt_txt_sample_reaction_single',
             'txt_sample_score_up_single' => '_cmt_txt_sample_score_up_single',
-            'txt_sample_score_down_single' => '_cmt_txt_sample_score_down_single'
+            'txt_sample_score_down_single' => '_cmt_txt_sample_score_down_single',
+            'txt_min_form_placeholder' => '_cmt_txt_min_form_placeholder'
         );
 
         if ($iInit)

+ 4 - 0
modules/boonex/convos/classes/BxCnvCmts.php

@@ -20,6 +20,10 @@ class BxCnvCmts extends BxTemplCmts
         $this->_oModule = BxDolModule::getInstance($this->_sModule);
 
         parent::__construct($sSystem, $iId, $iInit, $oTemplate);
+
+        $this->_aT = array_merge($this->_aT, array(
+            'txt_min_form_placeholder' => '_bx_cnv_txt_min_form_placeholder'
+        ));
     }
 
     public function getObjectTitle ($iObjectId = 0)

+ 2 - 0
modules/boonex/convos/install/langs/en.xml

@@ -119,6 +119,8 @@
     <string name="_bx_cnv_draft_saving_error"><![CDATA[Draft saving error!]]></string>
     <string name="_bx_cnv_draft_saved_success"><![CDATA[Draft saved.]]></string>
 
+    <string name="_bx_cnv_txt_min_form_placeholder"><![CDATA[{0}, leave your message here.]]></string>
+
     <string name="_bx_cnv_email_new_message"><![CDATA[New message]]></string>
     <string name="_bx_cnv_email_new_message_subject"><![CDATA[New message from {SenderDisplayName}]]></string>
     <string name="_bx_cnv_email_new_message_body"><![CDATA[{email_header}

+ 2 - 0
modules/boonex/russian/data/langs/bx_convos/ru.xml

@@ -119,6 +119,8 @@
     <string name="_bx_cnv_draft_saving_error"><![CDATA[Ошибка сохранения черновика!]]></string>
     <string name="_bx_cnv_draft_saved_success"><![CDATA[Черновик сохранён.]]></string>
 
+    <string name="_bx_cnv_txt_min_form_placeholder"><![CDATA[Напишите сообщение...]]></string>
+
     <string name="_bx_cnv_email_new_message"><![CDATA[Новое сообщение]]></string>
     <string name="_bx_cnv_email_new_message_subject"><![CDATA[Новое сообщение от {SenderDisplayName}]]></string>
     <string name="_bx_cnv_email_new_message_body"><![CDATA[{email_header}

+ 1 - 1
template/scripts/BxBaseCmts.php

@@ -764,7 +764,7 @@ class BxBaseCmts extends BxDolCmts
                 'caption' => '',
                 'attrs' => array(
                     'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtShowForm(this)',
-                    'placeholder' => _t('_cmt_txt_min_form_placeholder', $sAuthorName)
+                    'placeholder' => _t($this->_aT['txt_min_form_placeholder'], $sAuthorName)
                 ),
                 'value' => '',
             );