Index: trunk/extensions/Storyboard/Storyboard.i18n.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | 'storyboard-needtoagree' => 'You need to agree to the publication of your story to submit it.', |
73 | 73 | 'storyboard-createdsucessfully' => 'Thank you for sharing your story with us! |
74 | 74 | We will review it shortly. |
75 | | -Published stories are visible at $1.', |
| 75 | +Published stories are visible [$1 here].', |
76 | 76 | ); |
77 | 77 | |
78 | 78 | /** Afrikaans (Afrikaans) |
Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php |
— | — | @@ -52,6 +52,9 @@ |
53 | 53 | global $wgUser, $wgStyleVersion, $wgJsMimeType, $wgScriptPath, $wgStylePath; |
54 | 54 | global $egStoryboardScriptPath, $egStorysubmissionWidth, $egStoryboardMaxStoryLen, $egStoryboardMinStoryLen; |
55 | 55 | |
| 56 | + $maxLen = array_key_exists( 'maxlength', $args ) && is_int( $args['maxlength'] ) ? $args['maxlength'] : $egStoryboardMaxStoryLen; |
| 57 | + $minLen = array_key_exists( 'minlength', $args ) && is_int( $args['minlength'] ) ? $args['minlength'] : $egStoryboardMinStoryLen; |
| 58 | + |
56 | 59 | // Loading a seperate JS file would be overkill for just these 3 lines, and be bad for performance. |
57 | 60 | $parser->getOutput()->addHeadItem( |
58 | 61 | <<<EOT |
— | — | @@ -62,6 +65,7 @@ |
63 | 66 | <script type="$wgJsMimeType"> /*<![CDATA[*/ |
64 | 67 | addOnloadHook( function() { |
65 | 68 | document.getElementById( 'storysubmission-button' ).disabled = true; |
| 69 | + stbValidateStory( document.getElementById('storytext'), $minLen, $maxLen, 'storysubmission-charlimitinfo', 'storysubmission-button' ) |
66 | 70 | } ); |
67 | 71 | jQuery(document).ready(function() { |
68 | 72 | jQuery("#storyform").validate({ |
— | — | @@ -79,8 +83,6 @@ |
80 | 84 | $fieldSize = 50; |
81 | 85 | |
82 | 86 | $width = StoryboardUtils::getDimension( $args, 'width', $egStorysubmissionWidth ); |
83 | | - $maxLen = array_key_exists( 'maxlength', $args ) && is_int( $args['maxlength'] ) ? $args['maxlength'] : $egStoryboardMaxStoryLen; |
84 | | - $minLen = array_key_exists( 'minlength', $args ) && is_int( $args['minlength'] ) ? $args['minlength'] : $egStoryboardMinStoryLen; |
85 | 87 | |
86 | 88 | $formBody = "<table width='$width'>"; |
87 | 89 | |
Index: trunk/extensions/Storyboard/specials/StorySubmission/StorySubmission_body.php |
— | — | @@ -63,13 +63,13 @@ |
64 | 64 | } |
65 | 65 | |
66 | 66 | private function displayResult() { |
67 | | - global $wgOut; |
| 67 | + global $wgOut, $wgTitle; |
68 | 68 | |
69 | 69 | $wgOut->setPageTitle( wfMsg( 'storyboard-submissioncomplete' ) ); |
70 | 70 | |
71 | | - $storyboardLink = ''; // TODO: create html link to the page containing stories. |
| 71 | + $storyboardLink = $wgTitle->getFullURL(); // TODO: magically get location of the page containing stories |
72 | 72 | |
73 | | - $wgOut->addWikiText( wfMsgExt( 'storyboard-createdsucessfully', 'parsemag', $storyboardLink ) ); |
| 73 | + $wgOut->addWikiMsg( 'storyboard-createdsucessfully', $storyboardLink ); |
74 | 74 | } |
75 | 75 | |
76 | 76 | } |
\ No newline at end of file |