This commit is contained in:
Cayo Puigdefabregas 2023-06-13 11:07:24 +02:00
parent 7c032a2d27
commit 314e944208
2 changed files with 7 additions and 1 deletions

View File

@ -622,7 +622,7 @@ class NewDeviceForm(FlaskForm):
if self.type.data in ['HardDrive', 'SolidStateDrive']: if self.type.data in ['HardDrive', 'SolidStateDrive']:
if self.data_storage_size.data: if self.data_storage_size.data:
self._obj.size = self.data_storage_size.data * 1000 device.size = self.data_storage_size.data * 1000
device.image = URL(self.image.data) device.image = URL(self.image.data)

View File

@ -56,6 +56,12 @@
<option value="Cellphone" <option value="Cellphone"
{% if form.type.data == 'Cellphone' %} selected="selected"{% endif %}>Cellphone</option> {% if form.type.data == 'Cellphone' %} selected="selected"{% endif %}>Cellphone</option>
</optgroup> </optgroup>
<optgroup label="Data Storage">
<option value="HardDrive"
{% if form.type.data == 'HardDrive' %} selected="selected"{% endif %}>HardDrive</option>
<option value="SolidStateDrive"
{% if form.type.data == 'SolidStateDrive' %} selected="selected"{% endif %}>SolidStateDrive</option>
</optgroup>
<optgroup label="Computer Accessory"> <optgroup label="Computer Accessory">
<option value="Mouse" <option value="Mouse"
{% if form.type.data == 'Mouse' %} selected="selected"{% endif %}>Mouse</option> {% if form.type.data == 'Mouse' %} selected="selected"{% endif %}>Mouse</option>