afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-05-16 06:32 am

[dw-free] Only show both button sets on manage/circle/add.bml if there are filters to list

[commit: http://hg.dwscoalition.org/dw-free/rev/2e3952840e21]

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

Add check so that the second set of buttons don't show for communities and
syndicated accounts

Patch by [personal profile] wyntarvox.

Files modified:
  • htdocs/manage/circle/add.bml
--------------------------------------------------------------------------------
diff -r ad399b7250f0 -r 2e3952840e21 htdocs/manage/circle/add.bml
--- a/htdocs/manage/circle/add.bml	Sat May 16 06:00:55 2009 +0000
+++ b/htdocs/manage/circle/add.bml	Sat May 16 06:32:06 2009 +0000
@@ -183,8 +183,13 @@
 
     my $trust_groups = $remote->trust_groups;
 
-    ## extra add and cancel buttons only if there are filters to list
-    if ( keys %$trust_groups ) {
+    ## let them pick friend groups
+    # FIXME: Add support for reading groups once those exist
+    my $err;
+
+    if ( $remote->can_trust( $u ) && keys %$trust_groups ) {
+
+        ## extra add and cancel buttons
         $body .= "<br /><br />";
         if ($u->is_visible) {
             my $btn = ( $watched || $trusted ) ? $ML{'.btn.modify'} :  BML::ml( '.btn.add', { user => $u->display_name } );
@@ -199,14 +204,7 @@
        document.write(\"<input type='button' value='$cancel_btn' onclick='history.go(-1); return false;'>\");
         \n // -->\n ";
         $body .= '</script>';
-    }
 
-
-    ## let them pick friend groups
-    # FIXME: Add support for reading groups once those exist
-    my $err;
-
-    if ( $remote->can_trust( $u ) && keys %$trust_groups ) {
         $body .= "<?p &nbsp;<br />";
         $body .= "$ML{'.groups.text1'} " . LJ::help_icon('customgroups', '&nbsp;') . "p?>\n";
         $body .= "<blockquote>\n";
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org