r109274 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109273‎ | r109274 | r109275 >
Date:01:01, 18 January 2012
Author:awjrichards
Status:ok
Tags:sopa 
Comment:
Adding explanatory note for users who will be displayed contact information for > 1 representative
Modified paths:
  • /trunk/extensions/CongressLookup/CongressLookup.i18n.php (modified) (history)
  • /trunk/extensions/CongressLookup/SpecialCongressLookup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CongressLookup/CongressLookup.i18n.php
@@ -25,6 +25,7 @@
2626 'congresslookup-no-senators' => 'No senators were found for your zip code.',
2727 'congresslookup-report-errors' => 'Report an error',
2828 'congresslookup-zipcode-error' => 'Please enter your zipcode in the format "12345" or "12345-1234".',
 29+ 'congresslookup-multiple-house-reps' => 'Note: In some cases, there is more than one representative district assigned to a particular zip code. Please select the representative appropriate for your particular district.',
2930 );
3031
3132 /** Message documentation (Message documentation)
@@ -44,4 +45,5 @@
4546 'congresslookup-no-senators' => 'Error message for when no Senators are found',
4647 'congresslookup-report-errors' => 'Label for a link to the error reporting page',
4748 'congresslookup-zipcode-error' => 'Error message for when an invalid zip code is entered to the form.',
 49+ 'congresslookup-multiple-house-reps' => 'A note for people who see more than one representative listed for them. Many folks would find this unusual, but we are not looking up representatives at a granular-enough level to necessarily return their one specific rep. So in the event that there are more than one representatives returned to the user, we explain why.',
4850 );
Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php
@@ -119,6 +119,10 @@
120120 p.error {
121121 color: red;
122122 }
 123+p.note {
 124+ font-size: 12px;
 125+ font-style: italic;
 126+}
123127 </style>
124128 </head>
125129 <body>
@@ -219,6 +223,9 @@
220224
221225 $congressTable .= "\n" . Html::closeElement( 'table' );
222226 }
 227+ if ( count( $myRepresentatives ) > 1 ) {
 228+ $congressTable .= HTML::element( 'p', array( 'class' => 'note' ), wfMsg( 'congresslookup-multiple-house-reps' ));
 229+ }
223230 } else {
224231 $congressTable .= Html::element( 'p', array(), wfMsg( 'congresslookup-no-house-rep' ) );
225232 }

Status & tagging log