From 1eafb4e4c85212199e2cfecbcb5ae3d294723a4b Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 6 Feb 2014 15:32:42 +0100 Subject: [PATCH] bug #2660: Image wizard remembers some fields, but resets the others --- src/sunstone/public/js/plugins/images-tab.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index 20c3cdaf6c..592e0d99c7 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -1184,9 +1184,18 @@ function initialize_datastore_info_create_image_dialog(dialog) { true ); + var selected_datastore = $('#img_datastore',dialog).val(); + var selected_datastore_raw = $('#img_datastore_raw',dialog).val(); + $('#img_datastore',dialog).html(datastores_str); $('#img_datastore_raw',dialog).html(datastores_str); + if (selected_datastore) + $('#img_datastore',dialog).val(selected_datastore) + + if (selected_datastore_raw) + $('#img_datastore_raw',dialog).val(selected_datastore_raw) + $('select#img_datastore', dialog).children('option').each(function() { if ($(this).val() == "2") { $(this).attr('disabled', 'disabled');