1
Fork 0
mirror of https://github.com/Steffo99/estus.git synced 2024-11-21 15:14:19 +00:00

Convert OS and Type fields into datasets

This commit is contained in:
Lorenzo 2017-09-20 08:37:05 +02:00 committed by Stefano Pigozzi
parent 28ad87d914
commit 6ac9dab0fa
2 changed files with 9 additions and 7 deletions

View file

@ -15,7 +15,7 @@ app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
sistemioperativi = [" ", "CentOS", "Fedora", "OpenSUSE", "Red Hat", "Ubuntu", "Debian", "Windows Server 2003",
sistemioperativi = ["CentOS", "Fedora", "OpenSUSE", "Red Hat", "Ubuntu", "Debian", "Windows Server 2003",
"Windows Server 2007", "Windows Server 2010", "Windows Server 2012", "Windows Server 2016",
"Windows 98", "Windows ME", "Windows 2000", "Windows XP", "Windows Vista", "Windows 7", "Windows 8",
"Windows 8.1", "Windows 10", "Altro"]

View file

@ -66,11 +66,12 @@
<div class="form-group">
<label class="col-xs-2" for="form-tipo">Tipo dispositivo</label>
<div class="col-xs-10">
<select id="form-tipo" class="form-control" name="tipo">
<input type="text" class="form-control" name="tipo" list="form-tipo" {% if dispositivo %}value="{{ dispositivo.tipo }}"{% endif %}>
<datalist id="form-tipo" name="tipo">
{% for opzione in opzioni %}
<option value="{{ opzione }}" {% if dispositivo and opzione == dispositivo.tipo %}selected{% endif %}>{{ opzione }}</option>
<option value="{{ opzione }}">{{ opzione }}</option>
{% endfor %}
</select>
</datalist>
</div>
</div>
<div class="form-group">
@ -87,11 +88,12 @@
<div class="form-group">
<label class="col-xs-2" for="form-so">Sistema operativo</label>
<div class="col-xs-10">
<select id="form-so" class="form-control" name="so">
<input type="text" class="form-control" name="so" list="form-so" {% if dispositivo %}value="{{ dispositivo.so }}"{% endif %}>
<datalist id="form-so" name="so">
{% for sistema in sistemi %}
<option value="{{ sistema }}" {% if dispositivo and sistema == dispositivo.so %}selected{% endif %}>{{ sistema }}</option>
<option value="{{ sistema }}">{{ sistema }}</option>
{% endfor %}
</select>
</datalist>
</div>
</div>
<div class="form-group">