feat(generator/biomes): generate input for biome models

This commit is contained in:
Mahdi Dibaiee
2019-05-16 09:56:13 +04:30
parent 0d348b6276
commit f79c63abf8
3 changed files with 82 additions and 6 deletions

View File

@ -26,10 +26,16 @@
{% for k, v in parameters.items() %}
<div class='form-group'>
<label name='{{ k }}'>{{ k | replace('_', ' ') | title }}</label>
<input id='{{ k }}' name='{{ k }}'
type="number"
class='form-control'
min='{{ v["min"] }}' value='{{ v["default"] }}' max='{{ v["max"] }}' step='{{ v["step"] }}'>
{% if v["type"] == "bool" %}
<input id='{{ k }}' name='{{ k }}'
type='checkbox'
class='form-control'>
{% else %}
<input id='{{ k }}' name='{{ k }}'
type="number"
class='form-control'
min='{{ v["min"] }}' value='{{ v["default"] }}' max='{{ v["max"] }}' step='{{ v["step"] }}'>
{% endif %}
{% if v["description"] %}
<small class="form-text text-muted">{{ v["description"] }}</small>
{% endif %}