mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-22 04:53:46 +09:00
fix SolusVM getTemplates()
This commit is contained in:
1 parent
86617377d7
commit
ce600b2829
2 files changed
+10
-3
No files matched your search
@@ -578,8 +578,15 @@ class Service implements InjectionAwareInterface
|
||||
public function getTemplates($type)
|
||||
{
|
||||
$templates = $this->_getApi()->listtemplates($type);
|
||||
$list = explode(',', $templates['templates']);
|
||||
$res = array();
|
||||
$list = explode(',', $templates['templates']);
|
||||
if($type == 'kvm' && isset($templates['templateskvm'])) {
|
||||
$list = explode(',', $templates['templateskvm']);
|
||||
}
|
||||
if($type == 'xen hvm' && isset($templates['templateshvm'])) {
|
||||
$list = explode(',', $templates['templateshvm']);
|
||||
}
|
||||
|
||||
$res = array();
|
||||
foreach ($list as $p) {
|
||||
$res[$p] = $p;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<label>{% trans 'OS template' %} </label>
|
||||
<div class="controls">
|
||||
<select name="template">
|
||||
{% for t in guest.servicesolusvm_get_templates %}
|
||||
{% for t in guest.servicesolusvm_get_templates({"type" : product.config.vtype}) %}
|
||||
<option value="{{t}}">{{ t|title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
Reference in new issue
Block a user