diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 8bebd92041..698f923f4b 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -20,84 +20,107 @@ var HOST_HISTORY_LENGTH = 40; var create_host_tmpl = '
\ -
\ -

'+tr("Create Host")+'

\ -
\ +
\ +

'+tr("Create Host")+'

\
\ -
\ +
\ +
\
\
\ -
\ - \ - \ -
\ -
\ - \ -
\ -
\ +
\ + \ + \ +
\ +
\ + \ +
\
\ +
\
\ -
\ - '+tr("Drivers")+'\
\ -
\ -
\ -
\ - \ - \ -
\ -
\ - \ - \ -
\ +
\ + \ + \
\ -
\ -
\ - \ - \ + \ + \ + \ + \ + \ + \ \ - \ -
\ -
\ - \ - \ + \ +
\ +
\ + \ + \ +
\
\
\ +
\ +
\ +
\ + '+tr("Drivers")+'\ +
\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + \ +
\ +
\ +
\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + \ +
\ +
\ +
\
\ -
\ -
\ -
\ - \ - \ -
\ -
\ - \ - \ -
\ -
\ -
\ -
\ -
\ + \ +
\
\
\ \ @@ -908,6 +931,19 @@ function setupCreateHostDialog(){ $create_host_dialog.addClass("reveal-modal medium").attr("data-reveal", ""); $create_host_dialog.foundation() + $(".drivers", $create_host_dialog).hide(); + + $("#host_type_mad", $create_host_dialog).on("change", function(){ + $("#vmm_mad", $create_host_dialog).val(this.value).change(); + $("#im_mad", $create_host_dialog).val(this.value).change(); + + if (this.value == "custom") { + $(".drivers", $create_host_dialog).show(); + } else { + $(".drivers", $create_host_dialog).hide(); + } + }) + // Show custom driver input only when custom is selected in selects $('input[name="custom_vmm_mad"],'+ 'input[name="custom_im_mad"],'+