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

[livejournal] r17401: LJSV-1099

Committer: gprochaev
LJSV-1099

U   trunk/htdocs/community/pending.bml
U   trunk/htdocs/community/pending.bml.text
Modified: trunk/htdocs/community/pending.bml
===================================================================
--- trunk/htdocs/community/pending.bml	2010-09-17 02:49:25 UTC (rev 17400)
+++ trunk/htdocs/community/pending.bml	2010-09-17 07:23:32 UTC (rev 17401)
@@ -54,7 +54,7 @@
         unless @$pendids || LJ::did_post();
 
     # saving a form submission
-    my ($added, $rejected, $ignored, $previous, $banned, $ban_skipped);
+    my ($added, $rejected, $ignored, $previous, $banned, $ban_skipped, @not_validated);
     if (LJ::did_post()) {
         unless (LJ::check_form_auth()) {
             $ret .= "<?h1 $ML{'Error'} h1?><?p $ML{'error.invalidform'} p?>";
@@ -79,6 +79,10 @@
                     $ignored++;
                     next;
                 }
+                unless ($us->{$id}->is_validated) {
+                    push @not_validated, $us->{$id}->userid;
+                    next;
+                }
                 next unless $POST{"pending_$id"} eq 'on';
 
                 push @to_show, $us->{$id};
@@ -105,6 +109,7 @@
                 $ret .= '<p class="i-bubble b-bubble-alert b-bubble-noarrow">' . $ML{'.reason.reject.text'} . '</p>' ."\n";
                 $ret .= LJ::html_hidden('previous', $previous);
                 $ret .= LJ::html_hidden('ignored', $ignored);
+                $ret .= LJ::html_hidden('validated', join(",", @not_validated));
                 $ret .= "</form>";
             }
             $ret .= '</div>';
@@ -144,10 +149,13 @@
 
             $previous = $POST{'previous'};
             $ignored = $POST{'ignored'};
+            @not_validated = split /,/, $POST{'validated'};
+            my $not_valid_users = LJ::load_userids(@not_validated);
             $ret .= "<?p " . BML::ml('.success.rejected', { num => $rejected }) . " p?>" if $rejected;
             $ret .= "<?p " . BML::ml('.success.ignored', { num => $ignored }) . " p?>" if $ignored;
             $ret .= "<?p " . BML::ml('.success.previous', { num => $previous }) . " p?>" if $previous;
             $ret .= "<?p " . BML::ml('.success.banned', { num => $banned }) . " p?>" if $banned;
+            $ret .= "<?p " . BML::ml('.success.not_validated', { list => join ",", map { $_->ljuser_display } values %$not_valid_users }) . " p?>" if scalar @not_validated;
             $ret .= "<?p " . BML::ml('.success.ban_skipped', { num => $ban_skipped }) . " p?>" if $ban_skipped;
 
         }
@@ -220,12 +228,10 @@
         # rows for existing users
         my $rc = 0;
         foreach (@users) {
-            my $disabled = $_->is_validated ? {} : { disabled => 1 };
-            my $selected = $_->is_validated ? 1 : 0;
             my $rstyle = ($rc++ & 1) ? '#efefef' : '#fff';
             $ret .= "<tr style='background-color: $rstyle;'><td>";
             $ret .= LJ::html_check({ id => 'pending_' . $_->userid, name => 'pending_' . $_->userid, 
-                                     selected => $jumpto ? ($_->user eq $jumpto ? $selected : 0) : $selected, %$disabled });
+                                     selected => $jumpto ? ($_->user eq $jumpto ? 1 : 0) : 1 });
             $ret .= "</td><td>" . LJ::ljuser($_->{user}) . "</td></tr>\n";
         }
 

Modified: trunk/htdocs/community/pending.bml.text
===================================================================
--- trunk/htdocs/community/pending.bml.text	2010-09-17 02:49:25 UTC (rev 17400)
+++ trunk/htdocs/community/pending.bml.text	2010-09-17 07:23:32 UTC (rev 17401)
@@ -42,6 +42,8 @@
 
 .success.ignored=[[num]] [[?num|request is|requests are]] still on file pending decisions.
 
+.success.not_validated=Following users was not added: [[list]] because they emails are not validated.
+
 .success.previous=[[num]] [[?num|request has|requests have]] not been processed, as they were no longer pending.  Another maintainer might have already processed [[?num|it|them]].
 
 .success.rejected=You have rejected [[num]] [[?num|request|requests]] to join this community.

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