mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-19 20:02:22 -06:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -34,8 +34,8 @@ class CommentField(forms.CharField):
|
||||
Markdown</a> syntax is supported
|
||||
"""
|
||||
|
||||
def __init__(self, *, label='', help_text=help_text, required=False, **kwargs):
|
||||
super().__init__(label=label, help_text=help_text, required=required, **kwargs)
|
||||
def __init__(self, *, help_text=help_text, required=False, **kwargs):
|
||||
super().__init__(help_text=help_text, required=required, **kwargs)
|
||||
|
||||
|
||||
class SlugField(forms.SlugField):
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<a href="{{ url }}" class="btn btn-sm btn-success" role="button">
|
||||
<i class="mdi mdi-content-copy" aria-hidden="true"></i> Clone
|
||||
</a>
|
||||
{% if url %}
|
||||
<a href="{{ url }}" class="btn btn-sm btn-success" role="button">
|
||||
<i class="mdi mdi-content-copy" aria-hidden="true"></i> Clone
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
<div class="row mb-3{% if field.errors %} has-errors{% endif %}">
|
||||
|
||||
{# Render the field label, except for: #}
|
||||
{# 1. Checkboxes (label appears to the right of the field #}
|
||||
{# 2. Textareas with no label set (will expand across entire row) #}
|
||||
{# Render the field label (if any), except for checkboxes #}
|
||||
{% if label and not field|widget_type == 'checkboxinput' %}
|
||||
<label for="{{ field.id_for_label }}" class="col-sm-3 col-form-label text-lg-end{% if field.field.required %} required{% endif %}">
|
||||
{{ label }}
|
||||
|
||||
@@ -20,6 +20,8 @@ def clone_button(instance):
|
||||
param_string = prepare_cloned_fields(instance).urlencode()
|
||||
if param_string:
|
||||
url = f'{url}?{param_string}'
|
||||
else:
|
||||
url = None
|
||||
|
||||
return {
|
||||
'url': url,
|
||||
|
||||
Reference in New Issue
Block a user