holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22544: LJSUP-12885: SMS notification - Add Taji...

Committer: akanashin
LJSUP-12885: SMS notification - Add Tajikistan
U   trunk/htdocs/manage/profile/index.bml
Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2012-08-01 13:09:52 UTC (rev 22543)
+++ trunk/htdocs/manage/profile/index.bml	2012-08-01 13:51:09 UTC (rev 22544)
@@ -556,6 +556,8 @@
             $ret .= LJ::html_text({ 'name' => 'txtmsg_number', 'value' => $tminfo->{'number'}, 'size' => '16', 'maxlength' => '16', 'class' => 'b-manage-smsn-phone' });
             if($country eq 'KZ'){
                 $ret .= '<br /><span class="helper">' . $ML{'.section.textmsg.example_kz'} . '</span></li>';                
+            }elsif($country eq 'TJ'){
+                $ret .= '<br /><span class="helper">' . $ML{'.section.textmsg.example_tj'} . '</span></li>';                
             }elsif($country eq 'RU'){
                 $ret .= '<br /><span class="helper">' . $ML{'.section.textmsg.example_ru'} . '</span></li>';                
             }else{
@@ -635,15 +637,19 @@
             my $phone = LJ::SMS::API::RU::Phone->normalize($tminfo->{'number'});
             my $status = LJ::SMS::API::RU::Phone->get_status($u->{'userid'}, $phone);
             $ret .= "smsNotifyInitialState = \"".$status."\";";
-            $ret .= "var supportedDEF = [" . join(',', keys %{$LJ::SMSRU{provider_by_def}}) . "];";
+            $ret .= "var supportedDEF = [" . join(',', keys %{$LJ::SMSRU{provider_by_code_def}}) . "];";
             $ret .= "var smsCountry = '$country';";
 
+            my $prefix = '';
+            $prefix = '.kz' if $country eq 'KZ';
+            $prefix = '.tj' if $country eq 'TJ';
+
             my $dict_out = LJ::JSON->to_json({
                 'sendsmsbut'        => $ML{'.section.textmsg.button'},
                 'resendsmsbut'      => $ML{'.section.textmsg.button.resend'},
-                'initial'           => $ML{'.section.textmsg.info' . ($country eq 'KZ' ? '.kz':'')},
-                'badNum'            => $ML{'.section.textmsg.info.badnum' . ($country eq 'KZ' ? '.kz':'')},
-                'unsupporteddef'    => $ML{'.section.textmsg.info.unsupporteddef' . ($country eq 'KZ' ? '.kz':'')},
+                'initial'           => $ML{'.section.textmsg.info' . $prefix},
+                'badNum'            => $ML{'.section.textmsg.info.badnum' . $prefix},
+                'unsupporteddef'    => $ML{'.section.textmsg.info.unsupporteddef' . $prefix},
 
                 map { $_ => $ML{".section.textmsg.info.$_"} }
                     qw( already_use correctNum requestsent smssent

Tags: akanashin, bml, holyandrew, livejournal
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