r96903 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96902‎ | r96903 | r96904 >
Date:20:59, 12 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
removed required option for now
Modified paths:
  • /trunk/extensions/Survey/resources/ext.survey.special.survey.js (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/specials/SpecialSurvey.php
@@ -151,7 +151,7 @@
152152 'removed' => 0,
153153 'text' => $wgRequest->getText( "survey-question-text-$questionId" ),
154154 'type' => $wgRequest->getInt( "survey-question-type-$questionId" ),
155 - 'required' => $wgRequest->getCheck( "survey-question-required-$questionId" ),
 155+ 'required' => 0, // $wgRequest->getCheck( "survey-question-required-$questionId" ),
156156 'answers' => $answers
157157 ) );
158158
Index: trunk/extensions/Survey/resources/ext.survey.special.survey.js
@@ -115,23 +115,24 @@
116116 answerSelector.setVisible( survey.question.typeHasAnswers( parseInt( newValue ) ) );
117117 }
118118 ) );
 119+
 120+ // Not implemented in actual survey yet, so don't show for now.
 121+// $required = $( '<input />' ).attr( {
 122+// 'id': 'survey-question-required-' + question.id,
 123+// 'name': 'survey-question-required-' + question.id,
 124+// 'type': 'checkbox',
 125+// } );
 126+//
 127+// if ( question.required ) {
 128+// $required.attr( 'checked', 'checked' );
 129+// }
 130+//
 131+// $input.append( $required );
 132+//
 133+// $input.append( $( '<label />' ).attr( {
 134+// 'for': 'survey-question-required-' + question.id
 135+// } ).text( mw.msg( 'survey-special-label-required' ) ) );
119136
120 - $required = $( '<input />' ).attr( {
121 - 'id': 'survey-question-required-' + question.id,
122 - 'name': 'survey-question-required-' + question.id,
123 - 'type': 'checkbox',
124 - } );
125 -
126 - if ( question.required ) {
127 - $required.attr( 'checked', 'checked' );
128 - }
129 -
130 - $input.append( $required );
131 -
132 - $input.append( $( '<label />' ).attr( {
133 - 'for': 'survey-question-required-' + question.id
134 - } ).text( mw.msg( 'survey-special-label-required' ) ) );
135 -
136137 $input.append( answerSelector.getHtml() );
137138
138139 return $input;

Status & tagging log