WordPress.org

Make WordPress Core

Ticket #3534: patch.diff

File patch.diff, 2.2 KB (added by r0uter, 7 years ago)

Changed the input text values to placeholders, so they look tidy. changed password type to password. Added a show password link. JQuery is imported from http-must be fixed

  • wp-admin/setup-config.php

    diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php
    index 2b5b7f8..a44f267 100644
    a b function setup_config_display_header() { 
    100100<title><?php _e( 'WordPress &rsaquo; Setup Configuration File' ); ?></title>
    101101<link rel="stylesheet" href="css/install.css?ver=<?php echo preg_replace( '/[^0-9a-z\.-]/i', '', $wp_version ); ?>" type="text/css" />
    102102<link rel="stylesheet" href="../wp-includes/css/buttons.css?ver=<?php echo preg_replace( '/[^0-9a-z\.-]/i', '', $wp_version ); ?>" type="text/css" />
    103 
     103<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></script>
    104104</head>
    105105<body class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>">
    106106<h1 id="logo"><a href="<?php esc_attr_e( 'https://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    switch($step) { 
    140140                </tr>
    141141                <tr>
    142142                        <th scope="row"><label for="uname"><?php _e( 'User Name' ); ?></label></th>
    143                         <td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
     143                        <td><input name="uname" id="uname" type="text" size="25" placeholder="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
    144144                        <td><?php _e( 'Your MySQL username' ); ?></td>
    145145                </tr>
    146146                <tr>
    147147                        <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
    148                         <td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" /></td>
     148                        <td><input name="pwd" id="pwd" type="password" autocomplete="off" size="25" placeholder="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>"/></td>
    149149                        <td><?php _e( '&hellip;and your MySQL password.' ); ?></td>
     150                <tr>
     151                        <th scop="row"><label for="pwd-checkbox"></th></label>
     152                        <td><input type="checkbox"  onchange="tick(this)" id="showPassword"/>
     153                        <script>
     154                                function tick( e )  {
     155                                $( '#pwd' ).attr( 'type', e.checked ? 'text' : 'password' );
     156                                }
     157                        </script>
     158                        <?php _e( 'Show password' ); ?>
     159                        </td>
    150160                </tr>
    151161                <tr>
    152162                        <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>