r111987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111986‎ | r111987 | r111988 >
Date:02:14, 21 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added help messages to form
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/actions/EditCourseAction.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPFailForm.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/ep.formpage.css (added) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -402,6 +402,9 @@
403403 'scripts' => array(
404404 'ep.formpage.js',
405405 ),
 406+ 'styles' => array(
 407+ 'ep.formpage.css',
 408+ ),
406409 'dependencies' => array(
407410 'jquery.ui.button',
408411 ),
Index: trunk/extensions/EducationProgram/actions/EditCourseAction.php
@@ -128,6 +128,7 @@
129129 $fields['name'] = array (
130130 'type' => 'text',
131131 'label-message' => 'ep-course-edit-name',
 132+ 'help-message' => 'ep-course-help-name',
132133 'required' => true,
133134 );
134135
@@ -144,6 +145,7 @@
145146 $fields['mc'] = array (
146147 'class' => 'EPHTMLCombobox',
147148 'label-message' => 'ep-course-edit-mc',
 149+ 'help-message' => 'ep-course-help-mc',
148150 'required' => true,
149151 'options' => array_combine( $mcs, $mcs ),
150152 );
@@ -161,6 +163,7 @@
162164 $fields['token'] = array (
163165 'type' => 'text',
164166 'label-message' => 'ep-course-edit-token',
 167+ 'help-message' => 'ep-course-help-token',
165168 'maxlength' => 255,
166169 'size' => 20,
167170 'validation-callback' => function ( $value, array $alldata = null ) {
Index: trunk/extensions/EducationProgram/includes/EPFailForm.php
@@ -20,15 +20,15 @@
2121 */
2222 function wrapForm( $html ) {
2323
24 - # Include a <fieldset> wrapper for style, if requested.
 24+ // Include a <fieldset> wrapper for style, if requested.
2525 if ( $this->mWrapperLegend !== false ) {
2626 $html = Xml::fieldset( $this->mWrapperLegend, $html );
2727 }
28 - # Use multipart/form-data
 28+ // Use multipart/form-data
2929 $encType = $this->mUseMultipart
3030 ? 'multipart/form-data'
3131 : 'application/x-www-form-urlencoded';
32 - # Attributes
 32+ // Attributes
3333 $attribs = array(
3434 'action' => $this->getTitle()->getFullURL( $this->query ),
3535 'method' => $this->mMethod,
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -354,13 +354,16 @@
355355 'ep-course-edit-start' => 'Start date',
356356 'ep-course-edit-end' => 'End date',
357357 'ep-course-edit-token' => 'Enrollment token',
 358+ 'ep-course-help-token' => 'Optional. When filled in, students will need to provide this token in order to enroll. This prevents non-students from signing up.',
358359 'ep-course-edit-description' => 'Description',
359360 'ep-course-edit-name-format' => '$1 ($2)',
360361 'ep-course-edit-name' => 'Page title',
 362+ 'ep-course-help-name' => 'The title of the course page. By convention this should be the course name followed by the term in brackets.',
361363 'ep-course-edit-field' => 'Field of study',
362364 'ep-course-edit-level' => 'Course level',
363365 'ep-course-edit-term' => 'Academic term',
364366 'ep-course-edit-mc' => 'Course name',
 367+ 'ep-course-help-mc' => 'The name of the course. If this course has already run in a previous term, it should have the same name.',
365368 'ep-course-edit-lang' => 'Course language',
366369 'ep-addcourse' => 'There is no course with this name yet, but you can add it.',
367370 'ep-editcourse' => 'You are editing an existing course.',
Index: trunk/extensions/EducationProgram/resources/ep.formpage.css
@@ -0,0 +1,13 @@
 2+/**
 3+ * CSS for the Education Program MediaWiki extension.
 4+ * @see https://www.mediawiki.org/wiki/Extension:Education_Program
 5+ *
 6+ * @licence GNU GPL v3 or later
 7+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 8+ */
 9+
 10+td.htmlform-tip {
 11+ font-size: x-small;
 12+ padding: .2em 2em;
 13+ color: #666666;
 14+}
\ No newline at end of file
Property changes on: trunk/extensions/EducationProgram/resources/ep.formpage.css
___________________________________________________________________
Added: svn:eol-style
115 + native

Status & tagging log