Шурик (fortl) wrote in changelog,
Шурик
fortl
changelog

[livejournal] r18431: LJSUP-8006 Don't use sms-verification fo...

Committer: aurbanowich
LJSUP-8006 Don't use sms-verification forms for community
U   trunk/htdocs/manage/profile/index.bml
Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2011-03-02 04:51:32 UTC (rev 18430)
+++ trunk/htdocs/manage/profile/index.bml	2011-03-02 08:32:50 UTC (rev 18431)
@@ -488,16 +488,16 @@
                 
         ## TEXT MESSAGING
         my $country = LJ::country_of_remote_ip();
-        my $text_messaging_country = ($country eq 'RU') || ($country eq 'KZ');
+        my $ru_text_messaging = (($country eq 'RU') || ($country eq 'KZ')) & !$u->is_community;
         $ret .= "<a name='txtmsg'></a><div class='section_head'>" . 
-            ($text_messaging_country ? $ML{'.section.phone'} : $ML{'.section.textmsg'}) . "\n";
+            ($ru_text_messaging ? $ML{'.section.phone'} : $ML{'.section.textmsg'}) . "\n";
             
-        if ($text_messaging_country || LJ::get_cap($u, "textmessaging")) {
+        if ($ru_text_messaging || LJ::get_cap($u, "textmessaging")) {
             my $tminfo = LJ::TextMessage->tm_info($u, remap_result => 1);
             foreach (values %$tminfo) { LJ::text_out(\$_); }
             $tminfo->{'security'} = "N" if ($u->{'txtmsg_status'} eq 'off' || $u->{'txtmsg_status'} eq 'none');
 
-            if ($LJ::DISABLED{smsru} || !$text_messaging_country) {
+            if ($LJ::DISABLED{smsru} || !$ru_text_messaging) {
                 $ret .= "<span id='phone_view_options' class='view_options'>$ML{'.fn.txtmsg'}&nbsp;";
                 $ret .= LJ::html_select({ 'name' => 'txtmsg_security', 'selected' => $tminfo->{'security'} },
                                           "all" => BML::ml(".security.visibility.everybody"),
@@ -510,9 +510,9 @@
             }
 
             my $block_id = 'phone_verification';
-               $block_id = '' if $LJ::DISABLED{smsru} || !$text_messaging_country; ## empty block_id disables JS script
+               $block_id = '' if $LJ::DISABLED{smsru} || !$ru_text_messaging; ## empty block_id disables JS script
             $ret .= "<table class='field_block' id='$block_id'>\n";
-            if ($LJ::DISABLED{smsru} || !$text_messaging_country) {
+            if ($LJ::DISABLED{smsru} || !$ru_text_messaging) {
                 foreach (values %$tminfo) { LJ::text_out(\$_); }
                 ##
                 $ret .= "<tr><td class='field_name'>$ML{'.fn.servprov'}</td><td>";
@@ -522,7 +522,7 @@
                         my $info = LJ::TextMessage::provider_info($p);
                         push @opts, ($p, $info->{'name'});
                     }
-
+                    
                     $ret .= LJ::html_select({ 'name' => 'txtmsg_provider',
                                               'selected' => $tminfo->{'provider'}, },
                                               @opts);
@@ -534,7 +534,6 @@
             $ret .= '<li class="b-manage-smsn-sms">';
             #$ret .= '<select name="txtmsg_number_code" class="b-manage-smsn-code" disabled="disabled"><option value="+7">+7</option></select>' . ' ';
             $ret .= LJ::html_text({ 'name' => 'txtmsg_number', 'value' => $tminfo->{'number'}, 'size' => '16', 'maxlength' => '16', 'class' => 'b-manage-smsn-phone' });
-            $ret .= '<br /><span class="helper">' . $ML{'.section.textmsg.example_' . ($text_messaging_country?'ru':'us')} . '</span></li>';
             if($country eq 'KZ'){
                 $ret .= '<br /><span class="helper">' . $ML{'.section.textmsg.example_kz'} . '</span></li>';                
             }elsif($country eq 'RU'){
@@ -553,7 +552,7 @@
             }
 			$ret .= "</td></tr>\n";
 			
-            if( $text_messaging_country && LJ::NotificationMethod::SMSru->configured_for_user($u) ){
+            if( $ru_text_messaging && LJ::NotificationMethod::SMSru->configured_for_user($u) ){
                 my($start, $end) = split /-/, $u->prop( 'smsru_interval' );
                 $ret .= "<tr id=\"sms_time\"><td class='field_name'>$ML{'.fn.smsinterval'}</td><td>";
                 $ret .= BML::ml(".fn.smsinterval.info", {url=>'manage'}) . "<br />";

Tags: bml, fortl, 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