Making WordPress.org

Ticket #305: 305.patch

File 305.patch, 933 bytes (added by SergeyBiryukov, 8 years ago)
  • wordpress.org/public_html/style/trac/wp-trac.js

     
    401401                                });
    402402                        }
    403403
     404                        // Prevent marking a ticket as a duplicate of itself
     405                        $('#propertyform').submit( function() {
     406                                var action = $('input[name="action"]:checked').val(),
     407                                        currentTicket = parseInt( $('.trac-id').text().replace('#', '') ),
     408                                        duplicateTicket = parseInt( $('#action_dupe').val() );
     409
     410                                if ( 'duplicate' === action && ( ! duplicateTicket || currentTicket === duplicateTicket ) ) {
     411                                        $('#action_dupe').val('')
     412                                        return false;
     413                                }
     414                        });
     415
    404416                        // Add a 'Show only commits/attachments' view option to tickets
    405417                        $('label[for="trac-comments-only-toggle"]').text('Show only comment text');
    406418                        $('form#prefs')