Make WordPress Core

Ticket #33699: 33699.3.diff

File 33699.3.diff, 1.6 KB (added by flixos90, 10 years ago)

fixed further JS issues during installation / lostpassword form

  • src/wp-admin/install.php

     
    371371?>
    372372<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
    373373<?php } ?>
    374 <?php wp_print_scripts( 'user-profile' ); ?>
    375 <?php wp_print_scripts( 'language-chooser' ); ?>
     374<?php
     375if ( 1 == $step ) {
     376        wp_print_scripts( 'user-profile' );
     377} else if ( 0 == $step ) {
     378        wp_print_scripts( 'language-chooser' );
     379} else {
     380        wp_print_scripts( 'jquery' );
     381} ?>
    376382<script type="text/javascript">
    377383jQuery( function( $ ) {
    378384        $( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
  • src/wp-admin/js/user-profile.js

     
    195195                        }
    196196                } );
    197197
     198                $toggleButton = $pass1Row.find('.wp-hide-pw');
     199
    198200                // Disable the hidden inputs to prevent autofill and submission.
    199                 $pass1.prop( 'disabled', true );
    200                 $pass2.prop( 'disabled', true );
    201                 $pass1Text.prop( 'disabled', true );
     201                if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) {
     202                        $pass1.prop( 'disabled', false );
     203                        $pass2.prop( 'disabled', false );
     204                        $pass1Text.prop( 'disabled', false );
     205                } else {
     206                        $pass1.prop( 'disabled', true );
     207                        $pass2.prop( 'disabled', true );
     208                        $pass1Text.prop( 'disabled', true );
     209                }
    202210
    203211                $passwordWrapper = $pass1Row.find( '.wp-pwd' );
    204212                $generateButton  = $pass1Row.find( 'button.wp-generate-pw' );