wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18703: LJSUP-8344. incorrect text

Committer: gprochaev
LJSUP-8344. incorrect text

U   trunk/htdocs/admin/browse/edit_community.bml
U   trunk/htdocs/admin/browse/manage_category.bml
U   trunk/htdocs/admin/browse/remove_category.bml
U   trunk/htdocs/admin/browse/remove_community.bml
Modified: trunk/htdocs/admin/browse/edit_community.bml
===================================================================
--- trunk/htdocs/admin/browse/edit_community.bml	2011-03-24 10:41:14 UTC (rev 18702)
+++ trunk/htdocs/admin/browse/edit_community.bml	2011-03-24 10:59:05 UTC (rev 18703)
@@ -40,6 +40,10 @@
     my $vert_id = $POST{"vert_id_$i"} || $GET{"vert_id"};
     push @vert_, $vert_id ? LJ::Vertical->load_by_id ($vert_id) : undef;
 
+    if (LJ::did_post() and $POST{'select_v'}) {
+        $cat_[$j] = undef;
+    }
+
     if (LJ::did_post && $POST{'action:update'}) {
         # validate form auth
         return "<?h1 $ML{'Error'} h1?><?p $ML{'error.invalidform'} p?>"

Modified: trunk/htdocs/admin/browse/manage_category.bml
===================================================================
--- trunk/htdocs/admin/browse/manage_category.bml	2011-03-24 10:41:14 UTC (rev 18702)
+++ trunk/htdocs/admin/browse/manage_category.bml	2011-03-24 10:59:05 UTC (rev 18703)
@@ -39,6 +39,14 @@
         push @vert_, $vert_id ? LJ::Vertical->load_by_id ($vert_id) : undef;
     }
 
+    if (LJ::did_post() and $POST{'select_v1'}) {
+        $catid_[0] = $cat_[0] = undef;
+    }
+
+    if (LJ::did_post() and $POST{'select_v2'}) {
+        $catid_[1] = $cat_[1] = undef;
+    }
+
     if (LJ::did_post() && $POST{'move'}) {
         push @errors, "Invalid category FROM"
             unless $cat_[0];
@@ -87,7 +95,7 @@
                 @verticals
             );
 
-    $ret .= "</td><td>".LJ::html_submit('select_v', LJ::Lang::ml('vertical.admin.select_vertical.btn'));
+    $ret .= "</td><td>".LJ::html_submit('select_v1', LJ::Lang::ml('vertical.admin.select_vertical.btn'));
     $ret .= "</td></tr>\n";
 
     my @children = $cat_[0] ? $cat_[0]->children : ();
@@ -110,7 +118,7 @@
             );
 
     $ret .= "&nbsp;";
-    $ret .= LJ::html_submit('select_v', LJ::Lang::ml('vertical.admin.select_vertical.btn'));
+    $ret .= LJ::html_submit('select_v2', LJ::Lang::ml('vertical.admin.select_vertical.btn'));
     $ret .= "</td></tr>\n";
 
     if ($vert_[1]) {

Modified: trunk/htdocs/admin/browse/remove_category.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_category.bml	2011-03-24 10:41:14 UTC (rev 18702)
+++ trunk/htdocs/admin/browse/remove_category.bml	2011-03-24 10:59:05 UTC (rev 18703)
@@ -31,6 +31,12 @@
         $vertical = LJ::Vertical->load_by_id($vert_id);
     }
 
+    if (LJ::did_post() and $POST{'select_v'}) {
+        $cat_id = undef;
+        @ids = ();
+        $category = undef;
+    }
+
     if (LJ::did_post() and $POST{'remove'}) {
         my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_0$/ && $POST{$_} } keys %POST;
         my $cat_id = $POST{$ids[0]};
@@ -88,7 +94,7 @@
                 );
         $ret .= "</td><td>\n";
 
-        $ret .= LJ::html_submit('select', 'Select Vertical') . "</td></tr>";
+        $ret .= LJ::html_submit('select_v', 'Select Vertical') . "</td></tr>";
     }
 
     my @children = $category ? $category->children : ();

Modified: trunk/htdocs/admin/browse/remove_community.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_community.bml	2011-03-24 10:41:14 UTC (rev 18702)
+++ trunk/htdocs/admin/browse/remove_community.bml	2011-03-24 10:59:05 UTC (rev 18703)
@@ -38,6 +38,12 @@
         $vertical = LJ::Vertical->load_by_id($vert_id);
     }
 
+    if (LJ::did_post() and $POST{'select_v'}) {
+        $cat_id = undef;
+        @ids = ();
+        $category = undef;
+    }
+
     if (LJ::did_post() and $POST{'remove'}) {
         my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_0$/ && $POST{$_} } keys %POST;
         my $cat_id = $POST{$ids[0]};
@@ -104,7 +110,7 @@
                 );
         $ret .= "</td><td>\n";
 
-        $ret .= LJ::html_submit('select', 'Select Vertical') . "</td></tr>";
+        $ret .= LJ::html_submit('select_v', 'Select Vertical') . "</td></tr>";
     }
 
     my @children = $category ? $category->children : ();

Tags: bml, livejournal, wisest-owl
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