diff --git a/ChangeLog b/ChangeLog index 36b8a5e4cc..586ac0906e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,7 +32,8 @@ phpMyAdmin - ChangeLog - issue #12512 Fixed rendering BBCode links in setup - issue #12518 Fixed copy of table with generated columns - issue #12221 Fixed export of table with generated columns -- issue #12320 Copying a user does not copy usergroup +- issue #12320 Copying a user does not copy usergroup +- issue #12272 Adding a new row with default enum goes to no selection when you want to add more then 2 rows 4.6.4 (2016-08-16) - issue [security] Weaknesses with cookie encryption, see PMASA-2016-29 diff --git a/js/tbl_change.js b/js/tbl_change.js index eeba3b51d7..6ae5948aa6 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -553,6 +553,7 @@ AJAX.registerOnload('tbl_change.js', function () { // handle input text fields and textareas if ($this_element.is('.textfield') || $this_element.is('.char')) { // do not remove the 'value' attribute for ENUM columns + // special handling for radio fields after updating ids to unique - see below if ($this_element.closest('tr').find('span.column_type').html() != 'enum') { $this_element.val($this_element.closest('tr').find('span.default_value').html()); } @@ -675,6 +676,15 @@ AJAX.registerOnload('tbl_change.js', function () { $(this).attr('tabindex', tabindex); // update the IDs of textfields to ensure that they are unique $(this).attr('id', "field_" + tabindex + "_3"); + + // special handling for radio fields after updating ids to unique + if ($(this).closest('tr').find('span.column_type').html() === 'enum') { + if ($(this).val() === $(this).closest('tr').find('span.default_value').html()) { + $(this).prop('checked', true); + } else { + $(this).prop('checked', false); + } + } }); $('.control_at_footer') .each(function () {