Skip to content

Commit 5bf39a9

Browse files
author
Wouter van Heijst
committed
Hide DeviceModel and DeviceVariant form inputs from the user
1 parent 89ef81b commit 5bf39a9

2 files changed

Lines changed: 3 additions & 18 deletions

File tree

src/img_web/app/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ class ImageJobForm(forms.Form):
254254
devicemodel = forms.CharField(
255255
label="Device model",
256256
required=False,
257-
widget=forms.TextInput(attrs={'readonly': 'readonly'}),
257+
widget=forms.HiddenInput(attrs={'readonly': 'readonly'}),
258258
)
259259
devicevariant = forms.CharField(
260260
label="Device variant",
261261
required=False,
262-
widget=forms.TextInput(attrs={'readonly': 'readonly'}),
262+
widget=forms.HiddenInput(attrs={'readonly': 'readonly'}),
263263
)
264264

265265
def __init__(self, *args, **kwargs):

src/img_web/templates/app/upload.html

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,8 @@
111111
{{ jobform.architecture }}
112112
</td>
113113
</tr>
114-
<tr>
115-
<td>
116-
{{ jobform.devicemodel.label_tag }}
117-
</td>
118-
<td>
119-
{{ jobform.devicemodel }}
120-
</td>
121-
</tr>
122-
<tr>
123-
<td>
124-
{{ jobform.devicevariant.label_tag }}
125-
</td>
126-
<td>
127-
{{ jobform.devicevariant }}
128-
</td>
129-
</tr>
130114
</table>
115+
{{ jobform.devicemodel }} {{ jobform.devicevariant }}
131116
</fieldset>
132117
</table>
133118
<fieldset>

0 commit comments

Comments
 (0)