mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
bug #3421: VM Template update deletes user inputs
(cherry picked from commit ab4d5758fbb507a459e142de68a3cf16d7c384e7) Conflicts: src/sunstone/public/js/plugins/templates-tab.js
This commit is contained in:
parent
d969e98588
commit
b0f37b34a7
@ -3404,8 +3404,6 @@ function setup_context_tab_content(context_section) {
|
||||
</tr>');
|
||||
})
|
||||
|
||||
//$(".add_service_custom_attr", context_section).trigger("click");
|
||||
|
||||
context_section.on("click", ".service_custom_attrs i.remove-tab", function() {
|
||||
var tr = $(this).closest('tr');
|
||||
tr.remove();
|
||||
@ -4518,14 +4516,14 @@ var fillTemplatePopUp = function(template, dialog){
|
||||
var user_inputs = template.USER_INPUTS;
|
||||
if (user_inputs) {
|
||||
$.each(user_inputs, function(key, value){
|
||||
$(".add_service_custom_attr", context_section).trigger("click");
|
||||
|
||||
var context = $(".service_custom_attrs tbody tr", context_section).last();
|
||||
var parts = value.split("|");
|
||||
$(".user_input_name", context).val(key);
|
||||
$(".user_input_type", context).val(parts[1]);
|
||||
$(".user_input_description", context).val(escapeDoubleQuotes(htmlDecode(parts[2])));
|
||||
|
||||
$(".add_service_custom_attr", context_section).trigger("click");
|
||||
|
||||
if (context) {
|
||||
delete template.CONTEXT[key];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user