Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -330,12 +330,7 @@ |
331 | 331 | } |
332 | 332 | |
333 | 333 | if( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 ) { |
334 | | - // Check for a message if it is required |
335 | | - if ( $( '#mw-wikilove-message' ).val().length <= 0 ) { |
336 | | - $.wikiLove.showAddDetailsError( 'wikilove-err-msg' ); return false; |
337 | | - } |
338 | | - |
339 | | - // If there isn't a signature already in the message, throw an error |
| 334 | + // If there's a signature already in the message, throw an error |
340 | 335 | if ( $( '#mw-wikilove-message' ).val().indexOf( '~~~' ) >= 0 ) { |
341 | 336 | $.wikiLove.showAddDetailsError( 'wikilove-err-sig' ); return false; |
342 | 337 | } |
— | — | @@ -501,6 +496,10 @@ |
502 | 497 | submitSend: function( e ) { |
503 | 498 | e.preventDefault(); |
504 | 499 | $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove(); |
| 500 | + // Check for a header if it is required |
| 501 | + if( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 && $( '#mw-wikilove-header' ).val().length <= 0 ) { |
| 502 | + $.wikiLove.showAddDetailsError( 'wikilove-err-header' ); return false; |
| 503 | + } |
505 | 504 | var submitData = { |
506 | 505 | 'header': $( '#mw-wikilove-header' ).val(), |
507 | 506 | 'text': $.wikiLove.prepareMsg( currentTypeOrSubtype.text || options.defaultText ), |