mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
Fixes #13362: Limit displayed choice set list to 50 choices
This commit is contained in:
parent
eaa3212a56
commit
e09f99d2bf
@ -55,12 +55,17 @@
|
|||||||
<th>Label</th>
|
<th>Label</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for value, label in object.choices %}
|
{% for value, label in object.choices|slice:":50" %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ value }}</td>
|
<td>{{ value }}</td>
|
||||||
<td>{{ label }}</td>
|
<td>{{ label }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if object.choices|length > 50 %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="text-muted">(Additional choices not displayed)</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user