mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
12117 remove clone from cable (#12130)
* 12117 remove clone from cable * 12117 remove clone button if no params * Update clone.html * Update clone.html * Update clone.html --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
<a href="{{ url }}" class="btn btn-sm btn-success" role="button">
|
{% if url %}
|
||||||
<i class="mdi mdi-content-copy" aria-hidden="true"></i> Clone
|
<a href="{{ url }}" class="btn btn-sm btn-success" role="button">
|
||||||
</a>
|
<i class="mdi mdi-content-copy" aria-hidden="true"></i> Clone
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
@ -20,6 +20,8 @@ def clone_button(instance):
|
|||||||
param_string = prepare_cloned_fields(instance).urlencode()
|
param_string = prepare_cloned_fields(instance).urlencode()
|
||||||
if param_string:
|
if param_string:
|
||||||
url = f'{url}?{param_string}'
|
url = f'{url}?{param_string}'
|
||||||
|
else:
|
||||||
|
url = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'url': url,
|
'url': url,
|
||||||
|
Reference in New Issue
Block a user