From e6932ed3982d3f7d524c7ca65a776a43b7a2d394 Mon Sep 17 00:00:00 2001 From: lorilee Date: Thu, 24 Jun 2010 16:57:28 -0400 Subject: [PATCH] Causes the correct radio button to be selected in the import file location form --- js/import.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/js/import.js b/js/import.js index 0e3af7ce6..b2c502989 100644 --- a/js/import.js +++ b/js/import.js @@ -61,5 +61,18 @@ $(document).ready(function() { $("#select_local_import_file").change(function() { matchFile($(this).attr("value")); - }) + }); + + /* + * When the "Browse the server" form is clicked or the "Select from the web server upload directory" + * form is clicked, the radio button beside it becomes selected and the other form becomes disabled. + */ + $("#input_import_file").focus(function() { + $("#radio_import_file").attr('checked', 'checked'); + $("#radio_local_import_file").removeAttr('checked'); + }); + $("#select_local_import_file").focus(function() { + $("#radio_local_import_file").attr('checked', 'checked'); + $("#radio_import_file").removeAttr('checked'); + }); }); \ No newline at end of file