1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

Bug #586: Fixed the source field show/hide.

This commit is contained in:
Hector Sanjuan 2011-04-29 19:49:59 +02:00 committed by Daniel Molina
parent 3f0b0b75e8
commit af70d862ac

View File

@ -1349,6 +1349,11 @@ function setupCreateTemplateDialog(){
//format hidden
$('#FORMAT',section_disks).parent().hide();
$('#FORMAT',section_disks).parent().attr("disabled","disabled");
//source hidden
$('#SOURCE',section_disks).parent().hide();
$('#SOURCE',section_disks).parent().
attr("disabled","disabled");
break;
case "fs":
//size mandatory
@ -1367,6 +1372,10 @@ function setupCreateTemplateDialog(){
$('#FORMAT',section_disks).parent().removeClass(opt_class);
$('#FORMAT',section_disks).parent().addClass(man_class);
//source hidden
$('#SOURCE',section_disks).parent().hide();
$('#SOURCE',section_disks).parent().
attr("disabled","disabled");
break;
case "block":
//size shown and optional
@ -1382,6 +1391,11 @@ function setupCreateTemplateDialog(){
//format hidden
$('#FORMAT',section_disks).parent().hide();
$('#FORMAT',section_disks).parent().attr("disabled","disabled");
//source hidden
$('#SOURCE',section_disks).parent().hide();
$('#SOURCE',section_disks).parent().
attr("disabled","disabled");
break;
case "floppy":
case "disk":
@ -1398,6 +1412,11 @@ function setupCreateTemplateDialog(){
//format optional
$('#FORMAT',section_disks).parent().hide();
$('#FORMAT',section_disks).parent().attr("disabled","disabled");
//source shown
$('#SOURCE',section_disks).parent().show();
$('#SOURCE',section_disks).parent().
removeAttr("disabled");
}
//hide_disabled(section_disks);
});