1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

M #~: Fix error pop in vnet instantiate form (#405)

(cherry picked from commit 821ecfaf4bd7ce35be7d16b3f1197f6b6b879cb9)
This commit is contained in:
Sergio Betanzos 2020-11-10 13:21:10 +01:00 committed by Tino Vazquez
parent b8372e3806
commit 5bc0eb5d47
No known key found for this signature in database
GPG Key ID: 14201E424D02047E

View File

@ -70,14 +70,18 @@ define(function(require) {
this.templatesTable.initialize();
this.templatesTable.idInput().on("change", function(){
$(".nameContainer", context).show();
var template_id = $(this).val();
var showRestForm = template_id !== "";
var templatesContext = $(".list_of_vntemplates", context);
templatesContext.html("");
templatesContext.show();
$(".nameContainer", context).toggle(showRestForm);
var template_id = $(this).val();
var templatesContext = $(".list_of_vntemplates", context);
templatesContext.html("");
templatesContext.toggle(showRestForm);
if (showRestForm) {
that.setTemplateIds(context, [template_id]);
}
});
Tips.setup(context);
@ -86,5 +90,7 @@ define(function(require) {
function _onShow(context) {
this.templatesTable.resetResourceTableSelect();
InstantiateTemplateFormPanel.prototype.onShow.call(this, context);
$(".nameContainer", context).hide();
}
});