When inline editing a post, reset password field to be editable by default.

The Quick Edit form is cloned and then populated with post-specific data. If the 
previous post was private, the password field would continue to be disabled for
the next post.

Props afercia.
Fixes #32259.



git-svn-id: https://develop.svn.wordpress.org/trunk@32716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland 2015-06-09 22:01:06 +00:00
parent b095afe2db
commit c7a40c6847
1 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,7 @@ inlineEditPost = {
},
edit : function(id) {
var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, cur_format, f, val;
var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, cur_format, f, val, pw;
t.revert();
if ( typeof(id) === 'object' ) {
@ -209,9 +209,10 @@ inlineEditPost = {
$('select[name="_status"] option[value="future"]', editRow).remove();
}
pw = $( '.inline-edit-password-input' ).prop( 'disabled', false );
if ( 'private' === status ) {
$('input[name="keep_private"]', editRow).prop('checked', true);
$('input.inline-edit-password-input').val('').prop('disabled', true);
pw.val( '' ).prop( 'disabled', true );
}
// remove the current page and children from the parent dropdown