ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[ljcom] r10150: LJSUP-8014: Credit card payment process ...

Committer: ssafronova
LJSUP-8014: Credit card payment process refactoring
[tags: skomarov]
U   trunk/cgi-bin/LJ/Widget/CreditCard.pm
Modified: trunk/cgi-bin/LJ/Widget/CreditCard.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreditCard.pm	2011-03-02 09:06:26 UTC (rev 10149)
+++ trunk/cgi-bin/LJ/Widget/CreditCard.pm	2011-03-02 09:33:51 UTC (rev 10150)
@@ -40,7 +40,11 @@
             tabindex => 1,
             style => 'width:230px'
             }, map { $_ => $_ } LJ::Pay::RecBill->valid_cards);
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardtype.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardtype.bubble-warning') ."</span>
+    </li>";
 
     # card #
     $ret .= "<li><dl><dt><label for='cc_num'>" . LJ::Lang::ml('pay.cc.form.cardnumber.label') . "</label></dt><dd>";
@@ -55,7 +59,15 @@
             style => 'width:225px'
         }
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardnumber.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardnumber.bubble-lite.americanexpress') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardnumber.bubble-warning.visa') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardnumber.bubble-warning.mastercard') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardnumber.bubble-warning.americanexpress') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardnumber.bubble-warning.discover') ."</span>
+    </li>";
 
     if ($opts->{cvv2}) {
         # card verification #
@@ -72,9 +84,17 @@
             }
         );
         $ret .= ' <span class="i-ccform-cvv2">';
-        $ret .= LJ::Lang::ml('pay.cc.form.cvv2.info', {'aopts' => "href='$LJ::SSLROOT/pay/cvv2.bml' target='_blank'"});
+        $ret .= '<a href="' . $LJ::SSLROOT . '/pay/cvv2.bml"><img src="' . $LJ::SITEROOT . '/img/help.gif" alt="Help" title="Help" width="14" height="14" border="0" /></a>';
         $ret .= '</span>';
-        $ret .= '</dd></dl></li>';
+        $ret .= "
+        </dd></dl>
+        <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cvv2.bubble-lite', {aopts => "href='$LJ::SSLROOT/pay/cvv2.bml'"}) ."</span>
+        <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cvv2.bubble-lite.americanexpress', {aopts => "href='$LJ::SSLROOT/pay/cvv2.bml'"}) ."</span>
+        <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cvv2.bubble-warning.visa') ."</span>
+        <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cvv2.bubble-warning.mastercard') ."</span>
+        <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cvv2.bubble-warning.americanexpress') ."</span>
+        <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cvv2.bubble-warning.discover') ."</span>
+        </li>";
     }
 
     # card expiration
@@ -99,7 +119,11 @@
         }, map { $_ => $_ } @exp_yrs
     ) . "&nbsp;";
 
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardexpires.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.cardexpires.bubble-warning') ."</span>
+    </li>";
 
     # name on card
     $ret .= "<li><dl><dt><label for='name_full'>" . LJ::Lang::ml('pay.cc.form.name.label') . "</label></dt><dd>";
@@ -114,11 +138,17 @@
             style => 'width:225px'
         }
     );
-    $ret .= '</dd></dl></li>';
-
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.name.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.name.bubble-warning') ."</span>
+    <span class='b-bubble b-bubble-alert'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.bubble-alert') ."</span>
+    </li>";
+    
+    # country
     my $profile_country = $remote && $remote->prop('country');
     my $countryval = ($card ? $card->get_country : $POST->{country}) || $profile_country;
-
+    
     $ret .= "<li><dl><dt><label for='country'>" . LJ::Lang::ml('pay.cc.form.country.label') . "</label></dt><dd>";
     $ret .= LJ::html_select(
         {
@@ -130,9 +160,11 @@
             style => 'width:230px'
         }, map { $_ => $countries->{$_} } sort { $countries->{$a} cmp $countries->{$b} } keys %$countries
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.country.bubble-lite') ."</span>
+    </li>";
 
-
     # address
     $ret .= "<li><dl><dt><label for='addr'>" . LJ::Lang::ml('pay.cc.form.address.label') . "</label></dt><dd>";
     $ret .= LJ::html_text(
@@ -146,8 +178,13 @@
             style => 'width:225px'
         }
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.address.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.address.bubble-warning') ."</span>
+    </li>";
 
+    # city
     $ret .= "<li><dl><dt><label for='city'>" . LJ::Lang::ml('pay.cc.form.city.label') . "</label></dt><dd>";
     $ret .= LJ::html_text(
         {
@@ -160,7 +197,11 @@
             style => 'width:225px'
         }
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.city.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.city.bubble-warning') ."</span>
+    </li>";
 
     $ret .= "<li><dl><dt><label for='state'>" . LJ::Lang::ml('pay.cc.form.state.label') . "</label></dt><dd class='b-ccform-state'>";
 
@@ -195,9 +236,14 @@
             style     => 'width:175px'
         }
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.state.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-lite b-bubble-other'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.state.bubble-lite.other') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.state.bubble-warning') ."</span>
+    </li>";
 
-
+    # postal code
     $ret .= "<li><dl><dt><label for='postal_code'>" . LJ::Lang::ml('pay.cc.form.postalcode.label') . "</label></dt><dd>";
     $ret .= LJ::html_text(
         {
@@ -211,8 +257,13 @@
             style     => 'width:130px'
         }
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.postalcode.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.postalcode.bubble-warning') ."</span>
+    </li>";
 
+    # email
     $ret .= "<li><dl><dt><label for='email'>" . LJ::Lang::ml('pay.cc.form.email.label') . "</label></dt><dd>";
     $ret .= LJ::html_text(
         {
@@ -226,7 +277,12 @@
             maxlength => 50,
         }
     );
-    $ret .= '</dd></dl></li>';
+    $ret .= "
+    </dd></dl>
+    <span class='b-bubble b-bubble-lite'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.email.bubble-lite') ."</span>
+    <span class='b-bubble b-bubble-warning'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.email.bubble-warning') ."</span>
+    <span class='b-bubble b-bubble-alert'><i class='i-bubble-arrow-border'></i><i class='i-bubble-arrow'></i>". LJ::Lang::ml('pay.cc.form.bubble-alert') ."</span>
+    </li>";
 
     unless ($opts->{'has_coppa'}) {
         $ret .= "<li class='b-ccform-note'>";

Tags: ljcom, pm, skomarov, ssafronova
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments