PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | front/Params/fields.php +0 -54 10.11.1 → 11.1.1 View file →
@@ -1,54 +1,0 @@
1 -<?php
2 -
3 -use AcyMailing\Classes\FieldClass;
4 -
5 -include_once __DIR__.DIRECTORY_SEPARATOR.'AcymJFormField.php';
6 -
7 -class JFormFieldFields extends AcymJFormField
8 -{
9 - public function __construct($form = null)
10 - {
11 - $this->type = 'fields';
12 - parent::__construct($form);
13 - }
14 -
15 - public function getInput()
16 - {
17 -
18 - $fieldsClass = new FieldClass();
19 - $allFields = $fieldsClass->getAllFieldsForModuleFront();
20 - $fields = [];
21 - foreach ($allFields as $field) {
22 - $fields[$field->id] = acym_translation($field->name);
23 - }
24 -
25 -
26 - if (ACYM_CMS == 'joomla' && $this->value == '1') {
27 - $formId = $this->form->getData()->get('id');
28 - if (!empty($formId)) {
29 - $this->value = '';
30 - }
31 - }
32 -
33 - if (is_string($this->value)) {
34 - $this->value = explode(',', $this->value);
35 - }
36 -
37 - if (in_array('None', $this->value)) {
38 - $this->value = [];
39 - }
40 - if (in_array('All', $this->value)) {
41 - $this->value = array_keys($fields);
42 - }
43 -
44 - return acym_selectMultiple(
45 - $fields,
46 - $this->name,
47 - $this->value,
48 - [
49 - 'class' => 'acym_simple_select2',
50 - 'id' => $this->name,
51 - ]
52 - );
53 - }
54 -}