Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/160434

Change subject: Fix to not display free text label if free text input is not 
displayed
......................................................................

Fix to not display free text label if free text input is not displayed

Change-Id: I084e0584f1dcb5f1fa9afb53540e07991d7e837e
---
M includes/SF_Form.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/34/160434/1

diff --git a/includes/SF_Form.php b/includes/SF_Form.php
index be34673..f74274a 100644
--- a/includes/SF_Form.php
+++ b/includes/SF_Form.php
@@ -109,11 +109,11 @@
                if ( is_null( $freeTextLabel ) ) {
                        $freeTextLabel = wfMessage( 'sf_form_freetextlabel' 
)->inContentLanguage()->text();
                }
-               $text .= "'''$freeTextLabel:'''\n\n";
 
                // Add in standard inputs if they were specified.
                if ( count( $standardInputs ) > 0 ) {
                        if ( array_key_exists( 'free text', $standardInputs ) ) 
{
+                               $text .= "'''$freeTextLabel:'''\n\n";
                                $text .= $standardInputs['free text'] . 
"\n\n\n";
                        }
                        if ( array_key_exists( 'summary', $standardInputs ) ) {
@@ -142,6 +142,8 @@
                        }
                } else {
                        $text .= <<<END
+'''$freeTextLabel:'''
+
 {{{standard input|free text|rows=10}}}
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/160434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I084e0584f1dcb5f1fa9afb53540e07991d7e837e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to