PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 10.1.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v10.1.4
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
acymailing / front / Params / fields.php

fields.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 10.1.4, at front/Params/fields.php

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 var $type = 'fields';
10 public $value;
11
12 public function getInput()
13 {
14
15 $fieldsClass = new FieldClass();
16 $allFields = $fieldsClass->getAllFieldsForModuleFront();
17 $fields = [];
18 foreach ($allFields as $field) {
19 $fields[$field->id] = acym_translation($field->name);
20 }
21
22
23 if (ACYM_CMS == 'joomla' && $this->value == '1') {
24 $formId = $this->form->getData()->get('id');
25 if (!empty($formId)) {
26 $this->value = '';
27 }
28 }
29
30 if (is_string($this->value)) {
31 $this->value = explode(',', $this->value);
32 }
33
34 if (in_array('None', $this->value)) {
35 $this->value = [];
36 }
37 if (in_array('All', $this->value)) {
38 $this->value = array_keys($fields);
39 }
40
41 return acym_selectMultiple(
42 $fields,
43 $this->name,
44 $this->value,
45 [
46 'class' => 'acym_simple_select2',
47 'id' => $this->name,
48 ]
49 );
50 }
51 }
52