Rahul21 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/85425
Change subject: Added a basic user interface to gather information for the
"Information Template"
......................................................................
Added a basic user interface to gather information for the "Information
Template"
Bug: 54409
Change-Id: I554d4e20687c7ff5906f61cb8e96d30875871c55
---
M PronunciationRecording.i18n.php
M SpecialPronunciationRecording.php
M resources/css/ext.pronunciationRecordingToolbar.css
3 files changed, 27 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PronunciationRecording
refs/changes/25/85425/1
diff --git a/PronunciationRecording.i18n.php b/PronunciationRecording.i18n.php
index 50d0ce4..72d5fbc 100644
--- a/PronunciationRecording.i18n.php
+++ b/PronunciationRecording.i18n.php
@@ -24,6 +24,10 @@
'pronunciationrecording-specialpage-error-nologin' => 'You must be [$1
logged in] to record and upload pronunciations.',
'pronunciationrecording-upload-publish-succeeded' => 'Recording
uploaded successfully',
'pronunciationrecording-upload-publish-failed' => 'Recording was not
uploaded',
+ 'pronunciationrecording-information-label' => 'Information',
+ 'pronunciationrecording-information-word-label' => 'Word:',
+ 'pronunciationrecording-information-language-label' => 'Language:',
+ 'pronunciationrecording-information-submit-label' => 'Submit',
);
/** Message documentation (Message documentation)
diff --git a/SpecialPronunciationRecording.php
b/SpecialPronunciationRecording.php
index 97f65fe..7b96d5a 100644
--- a/SpecialPronunciationRecording.php
+++ b/SpecialPronunciationRecording.php
@@ -29,6 +29,19 @@
$output->addHTML( '<button
class="mw-pronunciationrecording-clear" id="mw-pronunciationrecording-clear"
disabled >' .wfMessage( 'pronunciationrecording-toolbar-clear-label'
)->escaped().'</button>' );
$output->addHTML( '<div
class="mw-pronunciationrecording-preview-div"
id="mw-pronunciationrecording-preview-div" disabled ></div>' );
$output->addHTML( '</div>' );
+ $output->addHTML( '<form>' );
+ $output->addHTML( '<fieldset>' );
+ $output->addHTML( '<legend>'.wfMessage(
'pronunciationrecording-information-label' )->escaped().'</legend>' );
+ $output->addHTML( wfMessage(
'pronunciationrecording-information-word-label' )->escaped().'<input
type="text" class="mw-pronunciationrecording-information-word"><br><br>' );
+ $languages = Language::fetchLanguageNames( null, 'mw' );
+ $output->addHTML( wfMessage(
'pronunciationrecording-information-language-label' )->escaped().'<select
class="mw-pronunciationrecording-information-language">' );
+ foreach( $languages as $x => $x_value) {
+ $output->addHTML(
'<option>'.$x.''.'-'.''.$x_value.'</option>' );
+ }
+ $output->addHTML( '</select>' );
+ $output->addHTML( '<br><br><button
class="mw-pronunciationrecording-information-submit"
id="mw-pronunciationrecording-record" >' .wfMessage(
'pronunciationrecording-information-submit-label' )->escaped().'</button>' );
+ $output->addHTML( '</fieldset>' );
+ $output->addHTML( '</form>' );
}
/**
diff --git a/resources/css/ext.pronunciationRecordingToolbar.css
b/resources/css/ext.pronunciationRecordingToolbar.css
index 0f1d4de..1ca4fe3 100644
--- a/resources/css/ext.pronunciationRecordingToolbar.css
+++ b/resources/css/ext.pronunciationRecordingToolbar.css
@@ -3,3 +3,13 @@
.mw-pronunciationrecording-toolbar {
display: none;
}
+
+.mw-pronunciationrecording-information-word {
+ margin-left: 10em;
+ padding-left: 4.5em;
+}
+
+.mw-pronunciationrecording-information-language {
+ margin-left: 8em;
+
+}
--
To view, visit https://gerrit.wikimedia.org/r/85425
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I554d4e20687c7ff5906f61cb8e96d30875871c55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PronunciationRecording
Gerrit-Branch: master
Gerrit-Owner: Rahul21 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits