-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed issue 132: user don't need to choose a plot if there's only one… #156
base: master
Are you sure you want to change the base?
Fixed issue 132: user don't need to choose a plot if there's only one… #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Please indent the conditionals with 4 spaces. Am about to test it.
@@ -18,9 +18,13 @@ | |||
Select a Plot | |||
</div> | |||
<div class="menu"> | |||
{% if form.plot.field.queryset.count == 1 %} | |||
<div class="item" data-value="{{ plot.id }}">{{ form.plot.field.queryset.0.title}}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent
{% for plot in form.plot.field.queryset %} | ||
<div class="item" data-value="{{ plot.id }}">{{ plot }}</div> | ||
{% endfor%} | ||
{%endif%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include spaces around endif
<div class="item" data-value="{{ plot.id }}">{{ plot }}</div> | ||
{% endfor%} | ||
{% if form.plot.field.queryset.count == 1 %} | ||
<div class="item" data-value="{{ plot.id }}">{{ form.plot.field.queryset.0.title}}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here plot
is not set. It's only set in the next part because it's within the for loop, so you need to set the data-value
similar to how you're creating the title.
So we don't forget, we discovered in our search that adding Therefore, we can set the value as the first item in the list under the condition that the list contains multiple items. |
… plot available