From fc549e1a5ea9905ff592777eb0ad45ce1cf5661f Mon Sep 17 00:00:00 2001 From: Ransom Roberson Date: Tue, 21 Jun 2022 14:28:41 -0400 Subject: [PATCH] Tidy up a bit --- src/controllers/BulkEditController.php | 3 -- .../elementactions/BulkEdit/_fields.twig | 47 +------------------ 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/src/controllers/BulkEditController.php b/src/controllers/BulkEditController.php index 39634cf..7e68edc 100644 --- a/src/controllers/BulkEditController.php +++ b/src/controllers/BulkEditController.php @@ -81,14 +81,11 @@ public function actionGetFields(): Response $service = Plugin::getInstance()->bulkEdit; $customFields = $service->getFieldWrappersForElementQuery($this->getElementQuery()); -// $attributes = $service->getAttributeWrappersForElementQuery($this->getElementQuery()); - $attributes = []; $view = Craft::$app->getView(); $view->setNamespace($namespace); $modalHtml = $view->renderTemplate('venveo-bulk-edit/elementactions/BulkEdit/_fields', [ 'fieldWrappers' => $customFields, - 'attributeWrappers' => [], 'bulkedit' => $service, 'selectedTotal' => $this->getElementQuery()->count(), 'selectAllTotal' => $this->getElementQuery()->id(null)->count(), diff --git a/src/templates/elementactions/BulkEdit/_fields.twig b/src/templates/elementactions/BulkEdit/_fields.twig index b2b24e9..76463eb 100644 --- a/src/templates/elementactions/BulkEdit/_fields.twig +++ b/src/templates/elementactions/BulkEdit/_fields.twig @@ -4,7 +4,7 @@

{{ "Select Fields"|t('venveo-bulk-edit') }}

Editing {{ selectedTotal }} elements on site {{ site.name }} ({{ site.language }})

- {% if fieldWrappers|length or attributeWrappers|length %} + {% if fieldWrappers|length %}
{{ forms.checkbox({ @@ -84,51 +84,6 @@ {% else %}

These elements have no associated fields.

{% endif %} - - {% if attributeWrappers|length %} - - - - - - - {# fieldWrapper #} - {% for attributeWrapper in attributeWrappers %} - - - - - - {% endfor %} -
- - Attribute - - - - Edit - - - - Strategy - -
- - {{ attributeWrapper.name|t('site') }} - - - - {{ forms.lightswitchField({ - id: 'attributeEnabled-'~attributeWrapper.handle, - name: 'attributes['~attributeWrapper.handle~'][enabled]', - on: false, - value: true, - }) }} - - - -
- {% endif %}
Cancel