Ticket #31608: 31608.2.diff
| File 31608.2.diff, 7.4 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/css/forms.css
diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index 19ff006..b98b6d2 100644
a b table.form-table td .updated p { 864 864 margin: 25px; 865 865 } 866 866 867 .request-filesystem-credentials- dialog-contentinput[type="text"],868 .request-filesystem-credentials- dialog-contentinput[type="password"] {869 width: 85%;867 .request-filesystem-credentials-form input[type="text"], 868 .request-filesystem-credentials-form input[type="password"] { 869 display: block; 870 870 } 871 871 872 .request-filesystem-credentials-dialog input[type="text"], 873 .request-filesystem-credentials-dialog input[type="password"] { 874 width: 100%; 875 } 876 877 .request-filesystem-credentials-form .field-title { 878 font-weight: 600; 879 } 880 881 .request-filesystem-credentials-dialog label[for="hostname"], 882 .request-filesystem-credentials-dialog label[for="public_key"], 883 .request-filesystem-credentials-dialog label[for="private_key"] { 884 display: block; 885 margin-bottom: 1em; 886 } 887 888 .request-filesystem-credentials-dialog .ftp-username, 889 .request-filesystem-credentials-dialog .ftp-password { 890 float: left; 891 width: 48%; 892 } 893 894 .request-filesystem-credentials-dialog .ftp-password { 895 margin-left: 4%; 896 } 897 898 .request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons { 899 text-align: right; 900 } 901 902 .request-filesystem-credentials-dialog label[for="ftp"] { 903 margin-right: 10px; 904 } 905 906 #request-filesystem-credentials-dialog .button:not(:last-child) { 907 margin-right: 10px; 908 } 909 910 #request-filesystem-credentials-form .cancel-button { 911 display: none; 912 } 913 914 #request-filesystem-credentials-dialog .cancel-button { 915 display: inline; 916 } 917 918 872 919 /* =Media Queries 873 920 -------------------------------------------------------------- */ 874 921 -
src/wp-admin/includes/file.php
diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 9f3e6ba..216ab72 100644
a b jQuery(function($){ 1112 1112 --> 1113 1113 </script> 1114 1114 <form action="<?php echo esc_url( $form_post ) ?>" method="post"> 1115 <div >1115 <div id="request-filesystem-credentials-form" class="request-filesystem-credentials-form"> 1116 1116 <h3><?php _e('Connection Information') ?></h3> 1117 1117 <p><?php 1118 1118 $label_user = __('Username'); … … jQuery(function($){ 1133 1133 } 1134 1134 _e('If you do not remember your credentials, you should contact your web host.'); 1135 1135 ?></p> 1136 < table class="form-table">1137 <tr>1138 <th scope="row"><label for="hostname"><?php _e('Hostname') ?></label></th>1139 < td><input name="hostname" type="text" id="hostname" value="<?php echo esc_attr($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php disabled( defined('FTP_HOST') ); ?> size="40" /></td>1140 < /tr>1141 1142 <tr>1143 <th scope="row"><label for="username"><?php echo $label_user; ?></label></th>1144 <td><input name="username" type="text" id="username" value="<?php echo esc_attr($username) ?>"<?php disabled( defined('FTP_USER') ); ?> size="40" /></td>1145 </ tr>1146 1147 <tr>1148 <th scope="row"><label for="password"><?php echo $label_pass; ?></label></th>1149 <td><div><input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> size="40" /></div>1150 <div><em><?php if ( ! defined('FTP_PASS') ) _e( 'This password will not be stored on the server.' ); ?></em></div></td>1151 </tr>1152 1136 <label for="hostname"> 1137 <span class="field-title"><?php _e( 'Hostname' ) ?></span> 1138 <input name="hostname" type="text" id="hostname" class="code" placeholder="<?php esc_attr_e( __( 'e.g. www.mysite.com' ) ) ?>" value="<?php echo esc_attr($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php disabled( defined('FTP_HOST') ); ?> /> 1139 </label> 1140 <div class="ftp-username"> 1141 <label for="username"> 1142 <span class="field-title"><?php echo $label_user; ?></span> 1143 <input name="username" type="text" id="username" value="<?php echo esc_attr($username) ?>"<?php disabled( defined('FTP_USER') ); ?> /> 1144 </label> 1145 </div> 1146 <div class="ftp-password"> 1147 <label for="password"> 1148 <span class="field-title"><?php echo $label_pass; ?></span> 1149 <input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> /> 1150 <em><?php if ( ! defined('FTP_PASS') ) _e( 'This password will not be stored on the server.' ); ?></em> 1151 </label> 1152 </div> 1153 1153 <?php if ( isset($types['ssh']) ) : ?> 1154 < tr id="ssh_keys" style="<?php if ( 'ssh' != $connection_type ) echo 'display:none' ?>">1155 < th scope="row"><?php _e('Authentication Keys') ?>1156 <div class="key-labels textright">1157 <label for="public_key"><?php _e('Public Key:') ?></label ><br/>1158 < label for="private_key"><?php _e('Private Key:') ?></label>1159 < /div></th>1160 <td><br /><input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> size="40" />1161 < br /><input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> size="40"/>1162 < div><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></div></td>1163 < /tr>1154 <h4><?php _e('Authentication Keys') ?></h4> 1155 <label for="public_key"> 1156 <span class="field-title"><?php _e('Public Key:') ?></span> 1157 <input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> /> 1158 </label> 1159 <label for="private_key"> 1160 <span class="field-title"><?php _e('Private Key:') ?></span> 1161 <input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> /> 1162 </label> 1163 <span><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></span> 1164 1164 <?php endif; ?> 1165 1166 <tr> 1167 <th scope="row"><?php _e('Connection Type') ?></th> 1168 <td> 1165 <h4><?php _e('Connection Type') ?></h4> 1169 1166 <fieldset><legend class="screen-reader-text"><span><?php _e('Connection Type') ?></span></legend> 1170 1167 <?php 1171 1168 $disabled = disabled( (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH), true, false ); … … jQuery(function($){ 1176 1173 </label> 1177 1174 <?php endforeach; ?> 1178 1175 </fieldset> 1179 </td>1180 </tr>1181 </table>1182 1183 1176 <?php 1184 1177 foreach ( (array) $extra_fields as $field ) { 1185 1178 if ( isset( $_POST[ $field ] ) ) 1186 1179 echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( wp_unslash( $_POST[ $field ] ) ) . '" />'; 1187 1180 } 1188 submit_button( __( 'Proceed' ), 'button', 'upgrade' );1189 1181 ?> 1182 <p class="request-filesystem-credentials-action-buttons"> 1183 <button class="button cancel-button" data-js-action="close" type="button"><?php _e( 'Cancel' ); ?></button> 1184 <?php submit_button( __( 'Proceed' ), 'button', 'upgrade', false ); ?> 1185 </p> 1190 1186 </div> 1191 1187 </form> 1192 1188 <?php -
src/wp-admin/js/updates.js
diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index 77f0399..a6978f4 100644
a b window.wp = window.wp || {}; 429 429 return false; 430 430 }); 431 431 432 $( '#request-filesystem-credentials-dialog [data-js-action="close"]' ).on( 'click', function() { 433 $( '#request-filesystem-credentials-dialog' ).hide(); 434 $( 'body' ).removeClass( 'modal-open' ); 435 }); 436 432 437 // Click handler for plugin updates in List Table view. 433 438 $( '.plugin-update-tr .update-link' ).on( 'click', function( e ) { 434 439 e.preventDefault();