r93716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93715‎ | r93716 | r93717 >
Date:09:38, 2 August 2011
Author:kaldari
Status:ok
Tags:
Comment:
making message required again, per http://www.mediawiki.org/wiki/WikiLove/Idea_Log
Modified paths:
  • /trunk/extensions/WikiLove/WikiLove.i18n.php (modified) (history)
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/WikiLove.i18n.php
@@ -41,7 +41,7 @@
4242 'wikilove-type-makeyourown' => 'Make your own',
4343 'wikilove-err-header' => 'Please enter a header.',
4444 'wikilove-err-title' => 'Please enter a title.',
45 - 'wikilove-err-msg' => 'Please enter a message.',
 45+ 'wikilove-err-msg' => 'Please enter a personalized message.',
4646 'wikilove-err-image' => 'Please select an image.',
4747 'wikilove-err-image-bad' => 'Image does not exist.',
4848 'wikilove-err-image-api' => 'Something went wrong when retrieving the image. Please try again.',
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -414,6 +414,10 @@
415415 }
416416
417417 if( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 ) {
 418+ // Check for a message if it is required
 419+ if ( $( '#mw-wikilove-message' ).val().length <= 0 ) {
 420+ $.wikiLove.showAddDetailsError( 'wikilove-err-msg' ); return false;
 421+ }
418422 // If there's a signature already in the message, throw an error
419423 if ( $( '#mw-wikilove-message' ).val().indexOf( '~~~' ) >= 0 ) {
420424 $.wikiLove.showAddDetailsError( 'wikilove-err-sig' ); return false;

Status & tagging log