Sort templates alphabetically

And also select the chosen template as the default one
This commit is contained in:
PCoder 2018-09-27 22:12:04 +02:00
commit a02c3c6973
2 changed files with 7 additions and 3 deletions

View file

@ -91,7 +91,8 @@
<label for="config">OS</label>
<select name="config">
{% for template in templates %}
<option value="{{template.opennebula_vm_template_id}}">{{template.name}}</option>
<option value="{{template.opennebula_vm_template_id}}" {% if template.name|lower == default_selected_template|lower %}selected="selected"{% endif %}>{{template.name}}</option>
{% endfor %}
</select>
</div>