~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-admin/js/updates.js

  • Committer: Jamon Camisso
  • Date: 2017-01-12 15:30:45 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: jamon.camisso@canonical.com-20170112153045-dekfwsu8mcsdxa7x
New upstream release 4.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1516
1516
         * @param {string} message Error message.
1517
1517
         */
1518
1518
        wp.updates.showErrorInCredentialsForm = function( message ) {
1519
 
                var $modal = $( '#request-filesystem-credentials-form' );
 
1519
                var $filesystemForm = $( '#request-filesystem-credentials-form' );
1520
1520
 
1521
1521
                // Remove any existing error.
1522
 
                $modal.find( '.notice' ).remove();
1523
 
                $modal.find( '#request-filesystem-credentials-title' ).after( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' );
 
1522
                $filesystemForm.find( '.notice' ).remove();
 
1523
                $filesystemForm.find( '#request-filesystem-credentials-title' ).after( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' );
1524
1524
        };
1525
1525
 
1526
1526
        /**
1670
1670
        $( function() {
1671
1671
                var $pluginFilter        = $( '#plugin-filter' ),
1672
1672
                        $bulkActionForm      = $( '#bulk-action-form' ),
 
1673
                        $filesystemForm      = $( '#request-filesystem-credentials-form' ),
1673
1674
                        $filesystemModal     = $( '#request-filesystem-credentials-dialog' ),
1674
1675
                        $pluginSearch        = $( '.plugins-php .wp-filter-search' ),
1675
1676
                        $pluginInstallSearch = $( '.plugin-install-php .wp-filter-search' );
1725
1726
                 *
1726
1727
                 * @since 4.2.0
1727
1728
                 */
1728
 
                $filesystemModal.on( 'change', 'input[name="connection_type"]', function() {
 
1729
                $filesystemForm.on( 'change', 'input[name="connection_type"]', function() {
1729
1730
                        $( '#ssh-keys' ).toggleClass( 'hidden', ( 'ssh' !== $( this ).val() ) );
1730
1731
                } ).change();
1731
1732