Skip to content

Commit 694e750

Browse files
committed
Add a "show targets" toggle button
1 parent 56c6d9f commit 694e750

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎gocam_app/forms.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
class IdForm(forms.Form):
44
ids = forms.CharField(label=False, widget=forms.Textarea(attrs={'class': 'ids-field'}))
55
dag = forms.BooleanField(label="Use top-down layout", required=False)
6+
targets = forms.BooleanField(label="Include targets", required=False)

‎gocam_app/views.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ def index(request):
2828

2929
url = f"{app_path}/view/{ids}:show_models"
3030

31+
if form.cleaned_data["targets"]:
32+
url += ',show_inputs'
33+
else:
34+
url += ',no_inputs'
35+
3136
return HttpResponseRedirect(url)
3237

3338
else:

0 commit comments

Comments
 (0)