\
+
\
\
'+tr("Predefined")+'\
\
@@ -1406,7 +1411,7 @@ function setupCreateTemplateDialog(){
$('#image_vs_disk input',section_disks).click(function(){
//$('fieldset',section_disks).show();
$('.vm_param', section_disks).show();
- var select = $('#image_vs_disk :checked',section_disks).val();
+ var select = $(this).val();
switch (select)
{
case "disk":
@@ -1540,7 +1545,11 @@ function setupCreateTemplateDialog(){
box_remove_element(section_disks,'#disks_box');
return false;
});
- };
+
+ //preselect now hidden option
+ $('#image_vs_disk input#add_image',section_disks).trigger('click');
+
+ };
// Sets up the network section
var networks_setup = function(){
@@ -1570,7 +1579,7 @@ function setupCreateTemplateDialog(){
$('.firewall_select',section_networks).show();
$('.firewall_select select option',section_networks).removeAttr('selected');
- select = $('#network_vs_niccfg :checked',section_networks).val();
+ select = $(this).val();
switch (select) {
case "network":
$('.niccfg',section_networks).hide();
@@ -1648,6 +1657,8 @@ function setupCreateTemplateDialog(){
return false;
});
+ //preselect now hidden option
+ $('#network_vs_niccfg input#add_network',section_networks).trigger('click');
};
//Sets up the input section - basicly enabling adding and removing from box