jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/369822 )

Change subject: Add class field to input type in Answer.mustache
......................................................................


Add class field to input type in Answer.mustache

The class attribute is used to give class value (numbers/words) to
textfield object in the template.The patch adds the missing value
to the input type.

Bug:T172355
Change-Id: Ib28b88950d2c6566a8fec2c9ff723e5772ca034b
---
M templates/Answer.mustache
M tests/phpunit/QuestionTest.php
2 files changed, 11 insertions(+), 10 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mvolz: Looks good to me, approved



diff --git a/templates/Answer.mustache b/templates/Answer.mustache
index 9f1082e..1025a13 100644
--- a/templates/Answer.mustache
+++ b/templates/Answer.mustache
@@ -4,7 +4,7 @@
                        <span class="correction">{{{ possibility }}}
                        </span>
        {{/if}}         <span style="{{ style }}">
-                               <input type="text" name="{{ name }}" title="{{ 
title }}" {{ disabled }} size="{{ size }}" maxlength="{{ maxlength }}" 
autocomplete="off" value="{{ value }}" />
+                               <input type="text" name="{{ name }}" class="{{ 
class }}" title="{{ title }}" {{ disabled }} size="{{ size }}" maxlength="{{ 
maxlength }}" autocomplete="off" value="{{ value }}" />
                                        <em style="{{ bigDisplay }}">{{ big }}
                                        </em>
                        </span>
diff --git a/tests/phpunit/QuestionTest.php b/tests/phpunit/QuestionTest.php
index a5c6975..4f90b9f 100644
--- a/tests/phpunit/QuestionTest.php
+++ b/tests/phpunit/QuestionTest.php
@@ -175,7 +175,7 @@
                         . "\n\t\t\t" . '<span class="correction"> Stageira<br 
/>Plato<br />Greece<br />'
                         . "\n\t\t\t" . '</span>' . "\n\t\t\t" . '<span 
style="border-left:3px solid #2834FF;">'
                         . "\n\t\t\t\t"
-                        . '<input type="text" name="1" title="Not answered"  
size="" '
+                        . '<input type="text" name="1" class="words" 
title="Not answered"  size="" '
                         . 'maxlength="" autocomplete="off" value="" />'
                         . "\n\t\t\t\t\t" . '<em style=" ">▼' . "\n\t\t\t\t\t" 
. '</em>' . "\n\t\t\t"
                         . '</span>' . "\n\t\n" . '</div>' . "\n",
@@ -187,9 +187,10 @@
                         '<div style="display:inline-block">' . "\n\t\n\t\t" . 
'<a class="input" href="#nogo">'
                         . "\n\t\t\t" . '<span class="correction">' . " 
\n\t\t\t" . '</span>' . "\n\t\t\t"
                         . '<span style="">' . "\n\t\t\t\t"
-                        . '<input type="text" name="2" title=""  size="" 
maxlength="" autocomplete="off" value="" />'
-                        . "\n\t\t\t\t\t" . '<em style="display: none">' . 
"\n\t\t\t\t\t" . '</em>' . "\n\t\t\t"
-                        . '</span>' . "\n\t\n" . '</div>' . "\n",
+                        . '<input type="text" name="2" class="words" title=""  
size="" maxlength="" '
+                        . 'autocomplete="off" value="" />' . "\n\t\t\t\t\t" . 
'<em style="display: none">'
+                        . "\n\t\t\t\t\t" . '</em>' . "\n\t\t\t" . '</span>' . 
"\n\t\n" . '</div>' . "\n"
+                        ,
                         ''
                        ],
                        // test case when no user input is provided to case 
insensitive answer
@@ -198,7 +199,7 @@
                          '<div style="display:inline-block">' . "\n\t\n\t\t" . 
'<a class="input" href="#nogo">'
                         . "\n\t\t\t" . '<span class="correction"> Plato<br />' 
. "\n\t\t\t" . '</span>' . "\n\t\t\t"
                         . '<span style="border-left:3px solid #2834FF;">' . 
"\n\t\t\t\t"
-                        . '<input type="text" name="3" title="Not answered"  
size="4" '
+                        . '<input type="text" name="3" class="words" 
title="Not answered"  size="4" '
                         . 'maxlength="6" autocomplete="off" value="" />'
                         . "\n\t\t\t\t\t" . '<em style=" ">▼' . "\n\t\t\t\t\t" 
. '</em>'
                         . "\n\t\t\t" . '</span>' . "\n\t\n" . '</div>' . "\n",
@@ -209,7 +210,7 @@
                         '<div style="display:inline-block">' . "\n\t\n\t\t" . 
'<a class="input" href="#nogo">'
                         . "\n\t\t\t" . '<span class="correction"> Stageira<br 
/>Plato<br />Greece<br />'. "\n\t\t\t"
                         . '</span>' . "\n\t\t\t" . '<span 
style="border-left:3px solid #1FF72D;">' . "\n\t\t\t\t"
-                        . '<input type="text" name="4" title="Right"  size="" '
+                        . '<input type="text" name="4" class="words" 
title="Right"  size="" '
                         . 'maxlength="" autocomplete="off" value="Greece" />'
                         . "\n\t\t\t\t\t" . '<em style=" ">▼' . "\n\t\t\t\t\t" 
. '</em>' . "\n\t\t\t" . '</span>'
                         . "\n\t\n" . '</div>' . "\n",
@@ -221,7 +222,7 @@
                         '<div style="display:inline-block">' . "\n\t\n\t\t" . 
'<a class="input" href="#nogo">'
                         . "\n\t\t\t" . '<span class="correction"> Plato<br />' 
. "\n\t\t\t" . '</span>' . "\n\t\t\t"
                         . '<span style="border-left:3px solid #F74245;">' . 
"\n\t\t\t\t"
-                        . '<input type="text" name="5" title="Wrong"  size="4" 
'
+                        . '<input type="text" name="5" class="words" 
title="Wrong"  size="4" '
                         . 'maxlength="6" autocomplete="off" 
value="morethansix" />'
                         . "\n\t\t\t\t\t" . '<em style=" ">▼' . "\n\t\t\t\t\t" 
. '</em>'
                         . "\n\t\t\t" . '</span>' . "\n\t\n" . '</div>' . "\n",
@@ -233,7 +234,7 @@
                         '<div style="display:inline-block">' . "\n\t\n\t\t" . 
'<a class="input" href="#nogo">'
                         . "\n\t\t\t" . '<span class="correction">' . 
"\n\t\t\t" . '</span>' . "\n\t\t\t"
                         . '<span style="border-left:3px solid #D700D7;">' . 
"\n\t\t\t\t"
-                        . '<input type="text" name="6" title="Syntax error" 
disabled size="" '
+                        . '<input type="text" name="6" class="" title="Syntax 
error" disabled size="" '
                         . 'maxlength="" autocomplete="off" 
value="value=&quot;???&quot;" />'
                         . "\n\t\t\t\t\t" . '<em style="">' . "\n\t\t\t\t\t" . 
'</em>'
                         . "\n\t\t\t" . '</span>' . "\n\t\n" . '</div>' . "\n",
@@ -245,7 +246,7 @@
                         '<div style="display:inline-block">' . "\n\t\n\t\t" . 
'<a class="input" href="#nogo">'
                         . "\n\t\t\t" . '<span class="correction"> 0<br />' . 
"\n\t\t\t" . '</span>' . "\n\t\t\t"
                         . '<span style="border-left:3px solid #1FF72D;">' . 
"\n\t\t\t\t"
-                        . '<input type="text" name="7" title="Right"  size="" '
+                        . '<input type="text" name="7" class="numbers" 
title="Right"  size="" '
                         . 'maxlength="" autocomplete="off" value="0" />'
                         . "\n\t\t\t\t\t" . '<em style=" ">▼' . "\n\t\t\t\t\t" 
. '</em>'
                         . "\n\t\t\t" . '</span>' . "\n\t\n" . '</div>' . "\n",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib28b88950d2c6566a8fec2c9ff723e5772ca034b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh <harjo...@ymail.com>
Gerrit-Reviewer: Mvolz <mv...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to