Index: trunk/extensions/Survey/Survey.i18n.php |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | 'surveys-special-newname' => 'New survey name:', |
56 | 56 | 'surveys-special-add' => 'Add survey', |
57 | 57 | 'surveys-special-existing' => 'Existing surveys', |
58 | | - 'surveys-special-name' => 'Name', |
| 58 | + 'surveys-special-title' => 'Title', |
59 | 59 | 'surveys-special-status' => 'Status', |
60 | 60 | 'surveys-special-stats' => 'Statistics', |
61 | 61 | 'surveys-special-edit' => 'Edit', |
Index: trunk/extensions/Survey/specials/SpecialSurvey.php |
— | — | @@ -178,11 +178,16 @@ |
179 | 179 | ); |
180 | 180 | |
181 | 181 | $fields[] = array( |
| 182 | + 'type' => 'hidden', |
| 183 | + 'default' => $survey->getField( 'name' ), |
| 184 | + 'name' => 'survey-name', |
| 185 | + 'id' => 'survey-name', |
| 186 | + ); |
| 187 | + |
| 188 | + $fields[] = array( |
182 | 189 | 'class' => 'SurveyNameField', |
183 | 190 | 'default' => $survey->getField( 'name' ), |
184 | 191 | 'label-message' => 'survey-special-label-name', |
185 | | - 'id' => 'survey-name', |
186 | | - 'name' => 'survey-name', |
187 | 192 | 'style' => 'font-weight: bold;' |
188 | 193 | ); |
189 | 194 | |
— | — | @@ -303,8 +308,6 @@ |
304 | 309 | return Html::element( |
305 | 310 | 'span', |
306 | 311 | array( |
307 | | - 'id' => $this->mParams['id'], |
308 | | - 'name' => $this->mParams['name'], |
309 | 312 | 'style' => $this->mParams['style'] |
310 | 313 | ), |
311 | 314 | $value |
Index: trunk/extensions/Survey/specials/SpecialSurveys.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | protected function displaySurveys() { |
53 | 53 | $this->displayAddNewControl(); |
54 | 54 | |
55 | | - $surveys = Survey::select( array( 'id', 'name', 'enabled' ) ); |
| 55 | + $surveys = Survey::select( array( 'id', 'name', 'enabled', 'title' ) ); |
56 | 56 | |
57 | 57 | if ( count( $surveys ) > 0 ) { |
58 | 58 | $this->displaySurveysTable( $surveys ); |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | |
119 | 119 | $out->addHTML( |
120 | 120 | '<thead><tr>' . |
121 | | - Html::element( 'th', array(), wfMsg( 'surveys-special-name' ) ) . |
| 121 | + Html::element( 'th', array(), wfMsg( 'surveys-special-title' ) ) . |
122 | 122 | Html::element( 'th', array(), wfMsg( 'surveys-special-status' ) ) . |
123 | 123 | Html::element( 'th', array( 'class' => 'unsortable' ), wfMsg( 'surveys-special-stats' ) ) . |
124 | 124 | Html::element( 'th', array( 'class' => 'unsortable' ), wfMsg( 'surveys-special-edit' ) ) . |
— | — | @@ -130,13 +130,13 @@ |
131 | 131 | foreach ( $surveys as $survey ) { |
132 | 132 | $out->addHTML( |
133 | 133 | '<tr>' . |
134 | | - '<td>' . |
| 134 | + '<td data-sort-value="' . htmlspecialchars( $survey->getField( 'title' ) ) . '">' . |
135 | 135 | Html::element( |
136 | 136 | 'a', |
137 | 137 | array( |
138 | 138 | 'href' => SpecialPage::getTitleFor( 'TakeSurvey', $survey->getField( 'name' ) )->getLocalURL() |
139 | 139 | ), |
140 | | - $survey->getField( 'name' ) |
| 140 | + $survey->getField( 'title' ) |
141 | 141 | ) . |
142 | 142 | '</td>' . |
143 | 143 | Html::element( 'td', array(), wfMsg( 'surveys-special-' . ( $survey->getField( 'enabled' ) ? 'enabled' : 'disabled' ) ) ) . |
Index: trunk/extensions/Survey/resources/ext.survey.special.survey.js |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | }; |
204 | 204 | |
205 | 205 | function setup() { |
206 | | - $table = $( '#survey-name' ).closest( 'tbody' ); |
| 206 | + $table = $( '#survey-title' ).closest( 'tbody' ); |
207 | 207 | |
208 | 208 | $table.append( '<tr><td colspan="2"><hr /></td></tr>' ); |
209 | 209 | |