Ticket #2508: edit-comments.php.diff
File edit-comments.php.diff, 1.6 KB (added by , 19 years ago) |
---|
-
edit-comments.php
23 23 } 24 24 } 25 25 } 26 27 function getNumChecked(form) 28 { 29 var num = 0; 30 for (i = 0, n = form.elements.length; i < n; i++) { 31 if(form.elements[i].type == "checkbox") { 32 if(form.elements[i].checked == true) 33 num++; 34 } 35 } 36 return num; 37 } 26 38 //--> 27 39 </script> 28 40 <div class="wrap"> … … 168 180 } // end foreach 169 181 ?></table> 170 182 <p><a href="javascript:;" onclick="checkAll(document.getElementById('deletecomments')); return false; "><?php _e('Invert Checkbox Selection') ?></a></p> 171 <p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick=" return confirm('<?php _e("You are about to delete these comments permanently \\n \'Cancel\' to stop, \'OK\' to delete.")?>')" />183 <p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" /> 172 184 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p> 173 185 </form> 174 186 <?php