Merge pull request #456 from eReuse/bugfix/4418-datastorage-placeholder
fix bug
This commit is contained in:
commit
48604e1a8f
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Reference in a new issue