Index: trunk/extensions/EducationProgram/EducationProgram.settings.php |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | 'ambassadorPictureDomains' => array( |
34 | 34 | 'wikimedia.org' |
35 | 35 | ), |
| 36 | + 'ambassadorCommonsUrl' => 'https://commons.wikimedia.org/wiki/Special:UploadWizard', |
36 | 37 | ); |
37 | 38 | } |
38 | 39 | |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -423,6 +423,9 @@ |
424 | 424 | 'scripts' => array( |
425 | 425 | 'ep.ambprofile.js', |
426 | 426 | ), |
| 427 | + 'styles' => array( |
| 428 | + 'ep.ambprofile.css', |
| 429 | + ), |
427 | 430 | 'dependencies' => array( |
428 | 431 | 'jquery.ui.button', |
429 | 432 | 'ep.imageinput', |
Index: trunk/extensions/EducationProgram/specials/SpecialAmbassadorProfile.php |
— | — | @@ -69,35 +69,12 @@ |
70 | 70 | 'id' => 'wpTextbox1', |
71 | 71 | 'default' => $ambassador->getField( 'bio' ), |
72 | 72 | ); |
73 | | - |
74 | | -// $lang = $this->getLanguage(); |
75 | | -// |
76 | | -// $prefix = $this->getMsgPrefix(); |
| 73 | + |
| 74 | + // FIXME: ambassadorCommonsUrl is not getting passed, this looks like a bug or regression in HTMLForm since nothing else passes args to help-message. |
77 | 75 | $fields['photo'] = array( |
78 | 76 | 'type' => 'text', |
79 | 77 | 'label-message' => $this->getMsgPrefix() . 'profile-photo', |
80 | | -// 'validation-callback' => function ( $value, array $alldata = null ) use ( $lang, $prefix ) { |
81 | | -// if ( trim( $value ) === '' ) { |
82 | | -// return true; |
83 | | -// } |
84 | | -// |
85 | | -// $domains = EPSettings::get( 'ambassadorPictureDomains' ); |
86 | | -// |
87 | | -// foreach ( $domains as $domain ) { |
88 | | -// $pattern = '@^https?://(([a-z0-9]+)\.)?' . str_replace( '.', '\.', $domain ) . '/.*$@i'; |
89 | | -// |
90 | | -// if ( preg_match( $pattern, $value ) ) { |
91 | | -// return true; |
92 | | -// } |
93 | | -// } |
94 | | -// |
95 | | -// return wfMsgExt( |
96 | | -// $prefix . 'profile-invalid-photo', |
97 | | -// 'parsemag', |
98 | | -// $lang->listToText( $domains ), |
99 | | -// count( $domains ) |
100 | | -// ); |
101 | | -// }, |
| 78 | + 'help-message' => array( $this->getMsgPrefix() . 'profile-photo-help', EPSettings::get( 'ambassadorCommonsUrl' ) ), |
102 | 79 | 'default' => $ambassador->getField( 'photo' ), |
103 | 80 | 'cssclass' => 'commons-input', |
104 | 81 | ); |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -619,6 +619,7 @@ |
620 | 620 | 'epoa-profile-invalid-photo' => 'The photo must be located on {{PLURAL:$2|this website: $1|one of these websites: $1}}', |
621 | 621 | 'epoa-profile-bio' => 'Short bio', |
622 | 622 | 'epoa-profile-photo' => 'Profile photo', |
| 623 | + 'epoa-profile-photo-help' => 'A picture of you that will be shown next to your bio. Enter the name of an image on Wikimedia Commons and a preview will appear. You can type the first few letters of the image name and then select your image from the suggestion list. If you do not have a picture of you on commons yet, [$1 go upload one]!', |
623 | 624 | 'epoa-profile-saved' => 'Your profile has been saved', |
624 | 625 | |
625 | 626 | // Special:CampusAmbassadorProfile |
— | — | @@ -628,6 +629,7 @@ |
629 | 630 | 'epca-profile-invalid-photo' => 'The photo must be located on {{PLURAL:$2|this website: $1|one of these websites: $1}}', |
630 | 631 | 'epca-profile-bio' => 'Short bio', |
631 | 632 | 'epca-profile-photo' => 'Profile photo', |
| 633 | + 'epca-profile-photo-help' => 'A picture of you that will be shown next to your bio. Enter the name of an image on Wikimedia Commons and a preview will appear. You can type the first few letters of the image name and then select your image from the suggestion list. If you do not have a picture of you on commons yet, [$1 go upload one]!', |
632 | 634 | 'epca-profile-saved' => 'Your profile has been saved', |
633 | 635 | ); |
634 | 636 | |
Index: trunk/extensions/EducationProgram/resources/ep.ambprofile.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: small; |
| 12 | + padding: .2em 2em; |
| 13 | + color: #666666; |
| 14 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/EducationProgram/resources/ep.ambprofile.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 15 | + native |