diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js
index 24742bf89e..a69e8defe6 100644
--- a/src/sunstone/public/js/plugins/templates-tab.js
+++ b/src/sunstone/public/js/plugins/templates-tab.js
@@ -3712,6 +3712,73 @@ function setupCreateTemplateDialog(){
}
+ /**************************************************************************
+ OTHER TAB
+
+ **************************************************************************/
+
+ var add_otherTab = function() {
+ var html_tab_content = '
'+
+ ''+
+ ''
+
+ $(""+tr("Other")+"").appendTo($("dl#template_create_tabs"));
+ $(html_tab_content).appendTo($("ul#template_create_tabs_content"));
+
+ }
+
+
+
+
//***CREATE VM DIALOG MAIN BODY***
dialogs_context.append('');
@@ -3771,6 +3838,10 @@ function setupCreateTemplateDialog(){
add_schedulingTab();
}
+ if (Config.isTemplateCreationTabEnabled('other')){
+ add_otherTab();
+ }
+
//tabs.tabs("option", "active", 0);
$(".ui-tabs-vertical .ui-tabs-nav", dialog).first().removeClass("ui-tabs-nav").addClass("ui-tabs-nav-vert")
// Re-Setup tips
@@ -3928,10 +3999,24 @@ function setupCreateTemplateDialog(){
addSectionJSON(vm_json,$('li#schedulingTab',dialog));
+ //
+ // RAW
+ //
+ function addslashes( str ) {
+ return (str + '').replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0');
+ }
+
+ vm_json["RAW"] = {}
+ t = addslashes($('#raw_type', dialog).val());
+ if (t) { vm_json["RAW"]['TYPE'] = t; }
+ t = addslashes($('#raw_data', dialog).val());
+ if (t) { vm_json["RAW"]['DATA'] = t; }
+ t = addslashes($('#raw_data_vmx', dialog).val());
+ if (t) { vm_json["RAW"]['DATA_VMX'] = t; }
+
// remove empty elements
vm_json = removeEmptyObjects(vm_json);
return vm_json;
-
}
//Process form
@@ -4603,6 +4688,23 @@ function fillTemplatePopUp(request, response){
$('input#RANK', req_section).val(rank);
}
+ //
+ // RAW
+ //
+
+ var raw = template.RAW;
+ var raw_section = $('li#rawTab', $create_template_dialog);
+
+ if (raw) {
+ function htmlDecode(value){
+ return $('').html(value).text();
+ }
+
+ $('#raw_type').val(htmlDecode(raw['TYPE']));
+ $('#raw_data').val(htmlDecode(raw['DATA']));
+ $('#raw_data_vmx').val(htmlDecode(raw['DATA_VMX']));
+ }
+
popUpUpdateTemplateDialog();
}