diff --git a/emhttp/plugins/dynamix.vm.manager/include/VMedit.php b/emhttp/plugins/dynamix.vm.manager/include/VMedit.php
index a03863995..059ba47d7 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/VMedit.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/VMedit.php
@@ -93,11 +93,11 @@ if (isset($_GET['uuid'])) {
}
$arrLoad['form'] = $arrAllTemplates[$strSelectedTemplate]['form'];
}
-$usertemplate = false;
+$usertemplate = 0;
$strSelectedTemplateUT = $strSelectedTemplate;
if (strpos($strSelectedTemplate,"User-") !== false) {
$strSelectedTemplateUT = str_replace("User-","",$strSelectedTemplateUT);
- $usertemplate = true;
+ $usertemplate = 1;
}
?>
diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
index 98aad9abf..663d145cd 100644
--- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
+++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
@@ -302,7 +302,11 @@
} else $arrClocks = $arrDefaultClocks['other'] ;
}
- if (strpos($arrConfig['template']['name'],"User-") !== false) $arrConfig['template']['name'] = str_replace("User-","",$arrConfig['template']['name']);
+ if (strpos($arrConfig['template']['name'],"User-") !== false) {
+ $arrConfig['template']['name'] = str_replace("User-","",$arrConfig['template']['name']);
+ unset($arrConfig['domain']['uuid']);
+ }
+ if ($usertemplate == 1) unset($arrConfig['domain']['uuid']);
?>
@@ -2550,7 +2554,8 @@ $(function() {
$('#vmform #domain_clock').val('localtime');
$("#vmform #domain_machine option").each(function(){
if ($(this).val().indexOf('i440fx') != -1) {
- if (!=$usertemplate?>) $('#vmform #domain_machine').val($(this).val()).change();
+ var usertemplate = =$usertemplate?>;
+ if (usertemplate = 0) $('#vmform #domain_machine').val($(this).val()).change();
return false;
}
});
@@ -2559,7 +2564,8 @@ $(function() {
$('#vmform #clockoffset').val('utc');
$("#vmform #domain_machine option").each(function(){
if ($(this).val().indexOf('q35') != -1) {
- $('#vmform #domain_machine').val($(this).val()).change();
+ var usertemplate = =$usertemplate?>;
+ if (usertemplate = 0) $('#vmform #domain_machine').val($(this).val()).change();
return false;
}
});