Index: trunk/extensions/Poll/Poll_body.php |
— | — | @@ -22,6 +22,10 @@ |
23 | 23 | if ( $action == "vote" ) { |
24 | 24 | $this->vote(); |
25 | 25 | } |
| 26 | + |
| 27 | + if ( $action == "submit" ) { |
| 28 | + $this->submit(); |
| 29 | + } |
26 | 30 | } |
27 | 31 | |
28 | 32 | public function create() { |
— | — | @@ -38,7 +42,18 @@ |
39 | 43 | $wgOut->addWikiMsg( 'poll-create-block-error' ); |
40 | 44 | } |
41 | 45 | else { |
42 | | - |
| 46 | + $wgOut->addHtml( '<form action="index.php?action=submit" method="post">' ); |
| 47 | + $wgOut->addHtml( '<table style="border: 0px;">' ); |
| 48 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-question' ).':</td><td><input type="text" name="poll_name"></td></tr>' ); |
| 49 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 1:</td><td><input type="text" name="poll_alternative_1"></td></tr>' ); |
| 50 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 2:</td><td><input type="text" name="poll_alternative_2"></td></tr>' ); |
| 51 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 3:</td><td><input type="text" name="poll_alternative_3"></td></tr>' ); |
| 52 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 4:</td><td><input type="text" name="poll_alternative_4"></td></tr>' ); |
| 53 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 5:</td><td><input type="text" name="poll_alternative_5"></td></tr>' ); |
| 54 | + $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 6:</td><td><input type="text" name="poll_alternative_6"></td></tr>' ); |
| 55 | + $wgOut->addHtml( '<tr><td><input type="submit" value="'.wfMsg( 'poll-submit' ).'"></td></tr>' ); |
| 56 | + $wgOut->addHtml( '</table>' ); |
| 57 | + $wgOut->addHtml( '</form>' ); |
43 | 58 | } |
44 | 59 | } |
45 | 60 | |
— | — | @@ -59,4 +74,8 @@ |
60 | 75 | |
61 | 76 | } |
62 | 77 | } |
| 78 | + |
| 79 | + public function submit() { |
| 80 | + global $wgRequest, $wgOut, $wgUser; |
| 81 | + } |
63 | 82 | } |
Index: trunk/extensions/Poll/Poll.i18n.php |
— | — | @@ -10,8 +10,8 @@ |
11 | 11 | |
12 | 12 | |
13 | 13 | $messages['en'] = array( |
14 | | - 'poll' => 'Polls', |
15 | | - 'poll-desc' => 'Add a [[Special:Poll|special page]] for using polls', |
| 14 | + 'poll' => 'List of the Polls', |
| 15 | + 'poll-desc' => 'Add a [[Special:Poll|special page]] for using polls', |
16 | 16 | 'poll-title-create' => 'Create a new poll', |
17 | 17 | 'poll-title-vote' => 'Voting page', |
18 | 18 | 'poll-title-score' => 'Score', |
— | — | @@ -19,16 +19,22 @@ |
20 | 20 | 'poll-create-block-error' => 'You are not allowed to create a new poll because you use a blocked user', |
21 | 21 | 'poll-vote-right-error' => 'You are not allowed to vote(needed right: poll-vote)', |
22 | 22 | 'poll-vote-block-error' => 'You are not allowed to vote because you use a blocked user', |
| 23 | + 'poll-alternative' => 'Alternative', |
| 24 | + 'poll-question' => 'Question', |
| 25 | + 'poll-submit' => 'Submit', |
23 | 26 | ); |
24 | 27 | |
25 | 28 | $messages['de'] = array( |
26 | | - 'poll' => 'Umfragen', |
| 29 | + 'poll' => 'Liste der Umfragen', |
27 | 30 | 'poll-desc' => 'Erstellt eine [[Special:Poll|Spezialsite]], um Umfragen zu nutzen', |
28 | 31 | 'poll-title-create' => 'Eine neue Umfrage erstellen', |
29 | 32 | 'poll-title-vote' => 'Abstimmen', |
30 | 33 | 'poll-title-score' => 'Auswertung', |
31 | | - 'poll-create-right-error' => 'Leider darfst du keine neue Umfrage erstellen(ben�tige Gruppenberechttigung: poll-create)', |
| 34 | + 'poll-create-right-error' => 'Leider darfst du keine neue Umfrage erstellen(benötige Gruppenberechttigung: poll-create)', |
32 | 35 | 'poll-create-block-error' => 'Leider darfst du keine neue Umfrage erstellen, weil du einen gesperten Benutzer benutzt', |
33 | | - 'poll-vote-right-error' => 'Leider darfst du nicht abstimmen(ben�tige Gruppenberechttigung: poll-vote)', |
| 36 | + 'poll-vote-right-error' => 'Leider darfst du nicht abstimmen(benötige Gruppenberechttigung: poll-vote)', |
34 | 37 | 'poll-vote-block-error' => 'Leider darfst du nicht abstimmen, weil du einen gesperten Benutzer benutzt', |
| 38 | + 'poll-alternative' => 'Antwortmöglichkeit', |
| 39 | + 'poll-question' => 'Frage', |
| 40 | + 'poll-submit' => 'Absenden', |
35 | 41 | ); |