r96462 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96461‎ | r96462 | r96463 >
Date:17:59, 7 September 2011
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
added cancel button to survey edit page and added default header and thanks messages
Modified paths:
  • /trunk/extensions/Survey/includes/Survey.class.php (modified) (history)
  • /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
@@ -246,6 +246,15 @@
247247 $form = new HTMLForm( $fields );
248248 }
249249
 250+ $form->addButton(
 251+ 'cancelEdit',
 252+ wfMsg( 'cancel' ),
 253+ 'cancelEdit',
 254+ array(
 255+ 'onclick' => 'window.location="' . SpecialPage::getTitleFor( 'Surveys' )->getFullURL() . '";return false;'
 256+ )
 257+ );
 258+
250259 $form->show();
251260 }
252261
Index: trunk/extensions/Survey/includes/Survey.class.php
@@ -59,9 +59,9 @@
6060 return array(
6161 'name' => '',
6262 'enabled' => '0',
63 - 'header' => '',
 63+ 'header' => 'Thank you for taking this short survey. Please fill out the following questions:',
6464 'footer' => '',
65 - 'thanks' => '',
 65+ 'thanks' => 'Thank you for your responses.',
6666 'user_type' => self::$USER_ALL,
6767 'namespaces' => array(),
6868 );
Index: trunk/extensions/Survey/resources/ext.survey.special.survey.js
@@ -153,6 +153,8 @@
154154 } );
155155
156156 $( '.mw-htmlform-submit' ).button();
 157+ $( '#cancelEdit' ).button();
 158+
157159 };
158160
159161 setup();

Comments

#Comment by Siebrand (talk | contribs)   18:02, 7 September 2011

Changes in trunk/extensions/Survey/includes/Survey.class.php look like non-localisable UI text. Is that correct? In that case: FIXME.

#Comment by Jeroen De Dauw (talk | contribs)   18:25, 7 September 2011

It's not UI text. It's the default value for some text field. i18n'able text would still be better, but this project is already taking to long, and implementing this is harder then placing some wfMsg, so I'm leaving it like this unless my client complains about it. Might implement later, higher priorities now.

#Comment by 😂 (talk | contribs)   20:35, 8 September 2011
#Comment by Jeroen De Dauw (talk | contribs)   17:13, 10 September 2011

It would not. This text is then saved in one language, and shown to everyone, inc people w/ some other language.

#Comment by 😂 (talk | contribs)   17:15, 10 September 2011

Ok fair enough. It's your extension :)

#Comment by Jeroen De Dauw (talk | contribs)   13:03, 8 September 2011

Why FIXME? It's not UI text, it doesn't cause problems on non-English wikis, and i18n'ing this would not even make much sense. If you insist, I'll i18n it, but it seems like a waste of translator time.

Status & tagging log