Create buttons for easily selecting or deselecting everything during imports
MODIFY
resources/views/imports/complete.blade.php
resources/views/imports/complete.blade.php
<option value="Ymd" {{ old('date_format') == 'Ymd' ? 'selected' : '' }}>YYYYMMDD</option>
</select>
</div>
+ <div class="row mt-2">
+ <button id="selectAll" style="padding: 5px 10px;" class="button">Select all</button>
+ <button id="deselectAll" style="padding: 5px 10px;" class="button ml-1">Deselect all</button>
+ </div>
</div>
<div class="box__section box__section--header">
<div class="row row--gutter">
</div>
</div>
@endsection
+
+@section('scripts')
+ <script>
+ function selectAll() {
+ var checkboxes = document.querySelectorAll('input[type="checkbox"][name^="rows"]');
+
+ checkboxes.forEach(checkbox => {
+ checkbox.checked = true;
+ });
+ }
+
+ function deselectAll() {
+ var checkboxes = document.querySelectorAll('input[type="checkbox"][name^="rows"]');
+
+ checkboxes.forEach(checkbox => {
+ checkbox.checked = false;
+ });
+ }
+
+ document.querySelector('#selectAll').addEventListener('click', function (e) {
+ e.preventDefault();
+
+ selectAll();
+ });
+
+ document.querySelector('#deselectAll').addEventListener('click', function (e) {
+ e.preventDefault();
+
+ deselectAll();
+ });
+ </script>
+@endsection

Create buttons for easily selecting or deselecting everything during imports