From a588880750b50764217f3379af7beac9f9201769 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Fri, 16 Sep 2016 18:33:28 +0530 Subject: [PATCH 1/2] Special handling for radio fields after cloning on tbl insert page Fix #12272 Signed-off-by: Deven Bansod --- js/tbl_change.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 () { From 14340f9c31977bbd19763f573a1c20366f22d089 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Fri, 16 Sep 2016 18:37:03 +0530 Subject: [PATCH 2/2] ChangeLog entry for #12272 Signed-off-by: Deven Bansod --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 703d330f71..4aa479788b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ phpMyAdmin - ChangeLog - issue #12473 Code can throw unhandled exception - issue #12550 Do not try to keep alive session even after expiry - issue #12512 Fixed rendering BBCode links in setup +- 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