https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111987

Revision: 111987
Author:   jeroendedauw
Date:     2012-02-21 02:14:36 +0000 (Tue, 21 Feb 2012)
Log Message:
-----------
added help messages to form

Modified Paths:
--------------
    trunk/extensions/EducationProgram/EducationProgram.i18n.php
    trunk/extensions/EducationProgram/EducationProgram.php
    trunk/extensions/EducationProgram/actions/EditCourseAction.php
    trunk/extensions/EducationProgram/includes/EPFailForm.php

Added Paths:
-----------
    trunk/extensions/EducationProgram/resources/ep.formpage.css

Modified: trunk/extensions/EducationProgram/EducationProgram.i18n.php
===================================================================
--- trunk/extensions/EducationProgram/EducationProgram.i18n.php 2012-02-21 
01:49:10 UTC (rev 111986)
+++ trunk/extensions/EducationProgram/EducationProgram.i18n.php 2012-02-21 
02:14:36 UTC (rev 111987)
@@ -354,13 +354,16 @@
        'ep-course-edit-start' => 'Start date',
        'ep-course-edit-end' => 'End date',
        'ep-course-edit-token' => 'Enrollment token',
+       '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.',
        'ep-course-edit-description' => 'Description',
        'ep-course-edit-name-format' => '$1 ($2)',
        'ep-course-edit-name' => 'Page title',
+       'ep-course-help-name' => 'The title of the course page. By convention 
this should be the course name followed by the term in brackets.',
        'ep-course-edit-field' => 'Field of study',
        'ep-course-edit-level' => 'Course level',
        'ep-course-edit-term' => 'Academic term',
        'ep-course-edit-mc' => 'Course name',
+       '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.',
        'ep-course-edit-lang' => 'Course language',
        'ep-addcourse' => 'There is no course with this name yet, but you can 
add it.',
        'ep-editcourse' => 'You are editing an existing course.',

Modified: trunk/extensions/EducationProgram/EducationProgram.php
===================================================================
--- trunk/extensions/EducationProgram/EducationProgram.php      2012-02-21 
01:49:10 UTC (rev 111986)
+++ trunk/extensions/EducationProgram/EducationProgram.php      2012-02-21 
02:14:36 UTC (rev 111987)
@@ -402,6 +402,9 @@
        'scripts' => array(
                'ep.formpage.js',
        ),
+       'styles' => array(
+               'ep.formpage.css',
+       ),
        'dependencies' => array(
                'jquery.ui.button',
        ),

Modified: trunk/extensions/EducationProgram/actions/EditCourseAction.php
===================================================================
--- trunk/extensions/EducationProgram/actions/EditCourseAction.php      
2012-02-21 01:49:10 UTC (rev 111986)
+++ trunk/extensions/EducationProgram/actions/EditCourseAction.php      
2012-02-21 02:14:36 UTC (rev 111987)
@@ -128,6 +128,7 @@
                $fields['name'] = array (
                        'type' => 'text',
                        'label-message' => 'ep-course-edit-name',
+                       'help-message' => 'ep-course-help-name',
                        'required' => true,
                );
                
@@ -144,6 +145,7 @@
                $fields['mc'] = array (
                        'class' => 'EPHTMLCombobox',
                        'label-message' => 'ep-course-edit-mc',
+                       'help-message' => 'ep-course-help-mc',
                        'required' => true,
                        'options' => array_combine( $mcs, $mcs ),
                );
@@ -161,6 +163,7 @@
                $fields['token'] = array (
                        'type' => 'text',
                        'label-message' => 'ep-course-edit-token',
+                       'help-message' => 'ep-course-help-token',
                        'maxlength' => 255,
                        'size' => 20,
                        'validation-callback' => function ( $value, array 
$alldata = null ) {

Modified: trunk/extensions/EducationProgram/includes/EPFailForm.php
===================================================================
--- trunk/extensions/EducationProgram/includes/EPFailForm.php   2012-02-21 
01:49:10 UTC (rev 111986)
+++ trunk/extensions/EducationProgram/includes/EPFailForm.php   2012-02-21 
02:14:36 UTC (rev 111987)
@@ -20,15 +20,15 @@
         */
        function wrapForm( $html ) {
 
-               # Include a <fieldset> wrapper for style, if requested.
+               // Include a <fieldset> wrapper for style, if requested.
                if ( $this->mWrapperLegend !== false ) {
                        $html = Xml::fieldset( $this->mWrapperLegend, $html );
                }
-               # Use multipart/form-data
+               // Use multipart/form-data
                $encType = $this->mUseMultipart
                        ? 'multipart/form-data'
                        : 'application/x-www-form-urlencoded';
-               # Attributes
+               // Attributes
                $attribs = array(
                        'action'  => $this->getTitle()->getFullURL( 
$this->query ),
                        'method'  => $this->mMethod,

Added: trunk/extensions/EducationProgram/resources/ep.formpage.css
===================================================================
--- trunk/extensions/EducationProgram/resources/ep.formpage.css                 
        (rev 0)
+++ trunk/extensions/EducationProgram/resources/ep.formpage.css 2012-02-21 
02:14:36 UTC (rev 111987)
@@ -0,0 +1,13 @@
+/**
+ * CSS for the Education Program MediaWiki extension.
+ * @see https://www.mediawiki.org/wiki/Extension:Education_Program
+ * 
+ * @licence GNU GPL v3 or later
+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
+ */
+
+td.htmlform-tip {
+       font-size: x-small;
+       padding: .2em 2em;
+       color: #666666;
+}
\ No newline at end of file


Property changes on: trunk/extensions/EducationProgram/resources/ep.formpage.css
___________________________________________________________________
Added: svn:eol-style
   + native


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to