* Improve codes format.
This commit is contained in:
@@ -4,7 +4,7 @@ $config->zahost->create->requiredFields = 'name,hostType,publicIP,cpuCores,memor
|
||||
$config->zahost->create->ipFields = 'publicIP';
|
||||
|
||||
$config->zahost->createTemplate = new stdclass();
|
||||
$config->zahost->createTemplate->requiredFields = 'name,cpuCoreNum,memorySize,diskSize,osCategory,osType,osVersion,osLang,imageFile';
|
||||
$config->zahost->createTemplate->requiredFields = 'name,cpuCoreNum,memorySize,diskSize,osCategory,osType,osVersion,osLang';
|
||||
|
||||
$config->zahost->os = new stdClass();
|
||||
$config->zahost->os->list = array();
|
||||
|
||||
@@ -92,7 +92,6 @@ class zahost extends control
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->zahost->createTemplate;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ $(function()
|
||||
$('#osType').empty();
|
||||
var types = zahostConfig.os.type[os];
|
||||
for(code in types) $('#osType').append('<option value="' + code + '">' + types[code] + '</option>');
|
||||
//if(template) $('#osType').val(template.osType);
|
||||
$('#osType').chosen().trigger('chosen:updated');
|
||||
$('#osType').change();
|
||||
});
|
||||
@@ -17,7 +16,6 @@ $(function()
|
||||
$('#osVersion').empty();
|
||||
var versions = zahostLang.versionList[type];
|
||||
for(code in versions) $('#osVersion').append('<option value="' + code + '">' + versions[code] + '</option>');
|
||||
//if(template) $('#osVersion').val(template.osVersion);
|
||||
$('#osVersion').chosen().trigger('chosen:updated');
|
||||
$('#osVersion').change();
|
||||
});
|
||||
|
||||
@@ -156,7 +156,6 @@ class zahostModel extends model
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$templateID = $this->dao->lastInsertID();
|
||||
|
||||
$this->loadModel('action')->create('vmtemplate', $templateID, 'Created');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user