fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-09-22 04:44 am

[dw-free] add number of month to name of month on cc field

[commit: http://hg.dwscoalition.org/dw-free/rev/6ee1629925ee]

http://bugs.dwscoalition.org/show_bug.cgi?id=3927

Change months in dropdown when entering credit card from "January",
"February", etc to "January - 01", "February - 02", etc, as per discussion
in [site community profile] dw_accessibility

Patch by [personal profile] rb.

Files modified:
  • htdocs/shop/entercc.bml
--------------------------------------------------------------------------------
diff -r fec2678668be -r 6ee1629925ee htdocs/shop/entercc.bml
--- a/htdocs/shop/entercc.bml	Thu Sep 22 12:35:25 2011 +0800
+++ b/htdocs/shop/entercc.bml	Thu Sep 22 12:43:32 2011 +0800
@@ -102,7 +102,7 @@
             '--' => '',
             ccnum => LJ::html_text({ name => 'ccnum', id => 'ccnum', maxlength => 19 }) . $accepted_ccs,
             cvv2 => LJ::html_text({ name => 'cvv2', id => 'cvv2', maxlength => 4, size => 5 }),
-            expmon => LJ::html_select({ name => 'expmon', id => 'expmon', selected => $POST{expmon} }, map { $_ => LJ::Lang::month_long( $_ ) } 1..12 ),
+            expmon => LJ::html_select({ name => 'expmon', id => 'expmon', selected => $POST{expmon} }, map { $_ => LJ::Lang::month_long_ml( $_ ) . " - " . sprintf( '%0.2d', $_ ); } 1..12 ),
             expyear => LJ::html_select({ name => 'expyear', id => 'expyear', selected => $POST{expyear} }, map { $_ => $_ } 2011..2020 ),
         );
 
--------------------------------------------------------------------------------
pne: A 2-D barcode representing the URL http://pne.dreamwidth.org/ (DataMatrix Dreamwidth URL)

[personal profile] pne 2011-09-28 02:42 pm (UTC)(link)
$_ => LJ::Lang::month_long_ml( $_ ) . " - " . sprintf( '%0.2d', $_ );

:)

Makes me want to consider $_ => sprintf( '%s - %0.2d', $LJ::Lang::month_long_ml( $_ ), $_ ).
kareila: "PERL!" (perl)

[personal profile] kareila 2011-09-28 03:39 pm (UTC)(link)
I approve of this.