Last modified: 2012-04-05 19:43:15 UTC
It's not possible to style the email in Special:Preferences differently depending on whether it's verified or not. Currently it shows <table id="mw-htmlform-email">, would be nice to have eg. <table id="mw-htmlform-email" class="email-verified">
I have added a basic placeholder to test this bug with r113016 Please note the bug is being fixed by nischayn22.
Created attachment 10174 [details] adds new css classes based on email verification The css design has been given a simple redish look and can be modified as desired
Great! Firstly, you have to add the css to the mediawiki.special.preferences module: Index: resources/Resources.php =================================================================== --- resources/Resources.php (revision 113031) +++ resources/Resources.php (working copy) @@ -786,6 +786,7 @@ ), 'mediawiki.special.preferences' => array( 'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js', + 'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css', ), 'mediawiki.special.recentchanges' => array( 'scripts' => 'resources/mediawiki.special/mediawiki.special.recentchanges.js', You probably forgot resources/Resources.php when making the patch. I don't think we should change the text color, you probably want to keep it black. Have a look at resources/mediawiki.special/mediawiki.special.changeemail.css which apply to a similar case, you can even reuse the colors from there. I don't think you should change the background color of the label but only the input. The CSS should be something like: .mw-email-notverified .mw-input That will leave the label as is. Then the PHP variable holding the css class is using the term "verify" whereas the rest of the code talk about "authentication". Please rephrase $emailverificationclass to $emailAuthClass (we use camel case). Finally the class names are: - mw-email-verified - mw-email-notverified - mw-noemailprefs As above, please considerate using the "authentication" term. Maybe use: - mw-email-authenticated - mw-email-not-authenticated - mw-email-none
Created attachment 10175 [details] Edited as per direction given in above comment I hope this one serves the purpose!
If HTML5 is allowed, this could be solved more generally by using the HTML5 data attributes.
Antoine, could you review this patch, please? Thanks.
rephrasing summary
You had a minor issue in the patch, one string was missing quotes. Anyway, I have made some trivial additions, amended existing tests and sent that as r113221 Please note this is not going to be deployed yet on Wikimedia website. Thanks for the patch, you will have to find a new bug to fix now :-]]]