Skip to content

A free open source IT asset/license management system

differentiate createURLs for cloning custom and base labels

Godfrey M0f8863523b20
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php
index 68d74922dd..1aa5fe8eca 100644
--- a/resources/views/partials/bootstrap-table.blade.php
+++ b/resources/views/partials/bootstrap-table.blade.php
@@ -1898,7 +1898,15 @@
const createUrl = '{{ route('settings.labels.create') }}';
// Clone Button
- let actions = '<a href="' + createUrl + '?custom_label_id=' + row.custom_label_id + '" '
+ let cloneHref;
+
+ if (row.source === 'custom') {
+ cloneHref = createUrl + '?custom_label_id=' + row.custom_label_id;
+ } else {
+ cloneHref = createUrl + '?label=' + encodeURIComponent(row.name);
+ }
+
+ let actions = '<a href="' + cloneHref + '" '
+ 'class="actions btn btn-sm btn-primary hidden-print" '
+ 'data-tooltip="true" '
+ 'title="{{ trans('general.clone') }}">'