Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed old code #916

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions resources/js/attributes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
let maxFields = false;
const maxFieldAlert = document.querySelector('.alert-too-many-fields');

let liveEditURL, liveEditModal;

const init = () => {
Expand All @@ -15,22 +13,6 @@ const init = () => {
}
};

const initAddAttribute = () => {
if (maxFields !== false) {
// Todo: migrate to vue and vanila js.
// This is also wrong, as it looks for all form inputs (search, logout, bulk) instead of the current form)
const fieldCount = $('form :input').length + 4;
//console.log('checking', fieldCount, 'vs', maxFields);
if (fieldCount > maxFields) {
maxFieldAlert.classList.remove('hidden');
return;
} else {
maxFieldAlert.classList.add('hidden');
}
}
};


const initLiveAttributes = () => {
const config = document.querySelector('[name="live-attribute-config"]');
if (!config) {
Expand Down
6 changes: 0 additions & 6 deletions resources/views/cruds/forms/attributes/_buttons.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
{{ __('entities/attributes.actions.remove_all') }}
</button>
</div>

<x-alert type="warning" class="alert-too-many-fields mt-6" :hidden="true">
{!! __('entities/attributes.errors.too_many', [
'max' => number_format(ini_get('max_input_vars'))
]) !!}
</x-alert>
<!-- Modal -->


Expand Down
7 changes: 0 additions & 7 deletions resources/views/entities/pages/attributes/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ class="entity-form flex flex-col gap-5"
<attributes-manager api="{{ route('attributes.api-entity', [$campaign, $entity]) }}" />
</div>

<x-alert type="warning" class="alert-too-many-fields mt-6" :hidden="true">
{!! __('entities/attributes.errors.too_many', [
'max' => number_format(ini_get('max_input_vars'))
]) !!}
</x-alert>


@if (auth()->user()->isAdmin() && $entity->is_attributes_private)
@php
$role = \App\Facades\CampaignCache::adminRole();
Expand Down
Loading