Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -372,6 +372,14 @@ |
373 | 373 | $wgOut->addInlineScript( <<<EOT |
374 | 374 | jQuery(document).ready(function() { |
375 | 375 | jQuery("#storystate option[value='$story->story_state']").attr('selected', 'selected'); |
| 376 | + |
| 377 | + jQuery("#storyform").validate({ |
| 378 | + messages: { |
| 379 | + storytitle: { |
| 380 | + remote: jQuery.validator.format("<b>{0}</b> is already taken, please choose a different title.") // TODO: i18n |
| 381 | + } |
| 382 | + } |
| 383 | + }); |
376 | 384 | }); |
377 | 385 | |
378 | 386 | addOnloadHook( |
— | — | @@ -382,14 +390,6 @@ |
383 | 391 | jQuery(document).ready(function(){ |
384 | 392 | jQuery("#storyform").validate(); |
385 | 393 | }); |
386 | | -jQuery("#storyform").validate({ |
387 | | - messages: { |
388 | | - storytitle: { |
389 | | - required: " ", |
390 | | - remote: jQuery.validator.format("{0} is already taken, please choose a different title.") |
391 | | - } |
392 | | - } |
393 | | -}); |
394 | 394 | EOT |
395 | 395 | ); |
396 | 396 | } |