Skip to content

A free open source IT asset/license management system

partials made, need to figure out all this jquery, button disabled

spencerrlongg3eefeec4ce82
diff --git a/resources/views/partials/category-bulk-actions.blade.php b/resources/views/partials/category-bulk-actions.blade.php
new file mode 100644
index 0000000000..dbe35bbd41
--- /dev/null
+++ b/resources/views/partials/category-bulk-actions.blade.php
@@ -0,0 +1,29 @@
+<div id="{{ (isset($id_divname)) ? $id_divname : 'assetsBulkEditToolbar' }}" style="min-width:400px">
+ <form
+ method="POST"
+ action="{{ route('hardware/bulkedit') }}"
+ accept-charset="UTF-8"
+ class="form-inline"
+ id="{{ (isset($id_formname)) ? $id_formname : 'assetsBulkForm' }}"
+ >
+ @csrf
+
+ {{-- The sort and order will only be used if the cookie is actually empty (like on first-use) --}}
+ <input name="sort" type="hidden" value="assets.id">
+ <input name="order" type="hidden" value="asc">
+ <label for="bulk_actions">
+ <span class="sr-only">
+ {{ trans('button.bulk_actions') }}
+ </span>
+ </label>
+ <select name="bulk_actions" class="form-control select2" aria-label="bulk_actions" style="min-width: 350px;">
+ @can('delete', \App\Models\Category::class)
+ <option value="delete">{{ trans('button.delete') }}</option>
+ @endcan
+ <option value="labels" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=l" : ''}}>{{ trans_choice('button.generate_labels', 2) }}</option>
+ </select>
+
+ <button class="btn btn-primary" id="{{ (isset($id_button)) ? $id_button : 'bulkAssetEditButton' }}"
+ disabled>{{ trans('button.go') }}</button>
+ </form>
+</div>
diff --git a/resources/views/partials/manufacturer-bulk-actions.blade.php b/resources/views/partials/manufacturer-bulk-actions.blade.php
new file mode 100644
index 0000000000..2a56dfef13
--- /dev/null
+++ b/resources/views/partials/manufacturer-bulk-actions.blade.php
@@ -0,0 +1,31 @@
+<div id="{{ (isset($id_divname)) ? $id_divname : 'manufacturersBulkEditToolbar' }}" style="min-width:400px">
+ <form
+ method="POST"
+ {{-- if we end up adding more than a single action we'll want to rethink this --}}
+ {{-- ...basically should end up being a big component, but felt too big an undertaking for this PR --}}
+ action="{{ route('manufacturers.bulk.delete') }}"
+ accept-charset="UTF-8"
+ class="form-inline"
+ id="{{ (isset($id_formname)) ? $id_formname : 'manufacturersBulkForm' }}"
+ >
+ @csrf
+
+ {{-- The sort and order will only be used if the cookie is actually empty (like on first-use) --}}
+ <input name="sort" type="hidden" value="assets.id">
+ <input name="order" type="hidden" value="asc">
+ <label for="bulk_actions">
+ <span class="sr-only">
+ {{ trans('button.bulk_actions') }}
+ </span>
+ </label>
+ <select name="bulk_actions" class="form-control select2" aria-label="bulk_actions" style="min-width: 350px;">
+ @can('delete', \App\Models\Manufacturer::class)
+ <option value="delete">{{ trans('button.delete') }}</option>
+ @endcan
+ <option value="labels" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=l" : ''}}>{{ trans_choice('button.generate_labels', 2) }}</option>
+ </select>
+
+ <button class="btn btn-primary" id="{{ (isset($id_button)) ? $id_button : 'bulkAssetEditButton' }}"
+ disabled>{{ trans('button.go') }}</button>
+ </form>
+</div>
diff --git a/resources/views/partials/supplier-bulk-actions.blade.php b/resources/views/partials/supplier-bulk-actions.blade.php
new file mode 100644
index 0000000000..9c3bf614ce
--- /dev/null
+++ b/resources/views/partials/supplier-bulk-actions.blade.php
@@ -0,0 +1,28 @@
+<div id="{{ (isset($id_divname)) ? $id_divname : 'supplierBulkEditToolbar' }}" style="min-width:400px">
+ <form
+ method="POST"
+ action="{{ route('suppliers.bulk.delete') }}"
+ accept-charset="UTF-8"
+ class="form-inline"
+ id="{{ (isset($id_formname)) ? $id_formname : 'supplierBulkForm' }}"
+ >
+ @csrf
+
+ {{-- The sort and order will only be used if the cookie is actually empty (like on first-use) --}}
+ <input name="sort" type="hidden" value="suppliers.id">
+ <input name="order" type="hidden" value="asc">
+ <label for="bulk_actions">
+ <span class="sr-only">
+ {{ trans('button.bulk_actions') }}
+ </span>
+ </label>
+ <select name="bulk_actions" class="form-control select2" aria-label="bulk_actions" style="min-width: 350px;">
+ @can('delete', \App\Models\Supplier::class)
+ <option value="delete">{{ trans('button.delete') }}</option>
+ @endcan
+ </select>
+
+ <button class="btn btn-primary" id="{{ (isset($id_button)) ? $id_button : 'bulkSupplierEditButton' }}"
+ disabled>{{ trans('button.go') }}</button>
+ </form>
+</div>
diff --git a/resources/views/suppliers/index.blade.php b/resources/views/suppliers/index.blade.php
index 866f918749..0d9e2a5878 100755
--- a/resources/views/suppliers/index.blade.php
+++ b/resources/views/suppliers/index.blade.php
@@ -23,8 +23,7 @@
<div class="row">
<div class="col-md-12">
- {{-- <x-tables.bulk-actions/>--}}
- @include('partials.asset-bulk-actions', ['delete_only' => true])
+ @include('partials.supplier-bulk-actions', ['delete_only' => true])
<table
data-columns="{{ \App\Presenters\SupplierPresenter::dataTableLayout() }}"