PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.3
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.3
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 / back / Views / Automation / tmpl / info.php

info.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.3, at back/Views/Automation/tmpl/info.php

192 lines 11.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals.
3 defined('ABSPATH') || die('Restricted Access');
4 ?>
5 <form id="acym_form" action="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl'))); ?>" method="post" name="acyForm" data-abide novalidate>
6 <input type="hidden" name="id" value="<?php echo !empty($data['automation']->id) ? intval($data['automation']->id) : ''; ?>">
7 <input type="hidden" name="stepAutomationId" value="<?php echo empty($data['step']->id) ? '' : intval($data['step']->id); ?>">
8 <input type="hidden" name="automation[admin]" value="<?php echo empty($data['automation']->admin) ? '' : intval($data['automation']->admin); ?>">
9 <div class="acym__content cell grid-x" id="acym__automation__info">
10 <?php
11 if (empty($data['automation']->id)) {
12 $data['workflowHelper']->disabledAfter = 'info';
13 }
14 $data['workflowHelper']->display($this->steps, $this->step);
15 ?>
16 <div class="cell grid-x grid-margin-x">
17 <div class="medium-12 small-12 cell grid-x acym__content acym__automation__info__first margin-top-2 margin-y">
18 <div class="cell medium-6">
19 <label for="automation_name"><?php echo esc_html(acym_translation('ACYM_NAME')); ?></label>
20 <?php if (empty($data['automation']->admin)) { ?>
21 <input required
22 type="text"
23 id="automation_name"
24 name="automation[name]"
25 value="<?php echo !empty($data['automation']->name) ? esc_attr($data['automation']->name) : ''; ?>">
26 <?php } else { ?>
27 <input required
28 type="text"
29 id="automation_name"
30 name="automation[name]"
31 disabled
32 value="<?php echo esc_attr(acym_translation($data['automation']->name)); ?>">
33 <?php } ?>
34 </div>
35 <div class="cell medium-shrink grid-x acym_vcenter margin-left-2" <?php echo empty($data['automation']->id) ? 'style="display: none"' : ''; ?>>
36 <?php acym_switch([
37 'name' => 'automation[active]',
38 'value' => $data['automation']->active,
39 'label' => acym_translation('ACYM_ACTIVE'),
40 ]); ?>
41 </div>
42 <label class="cell">
43 <h6 id="acym__automation__info__desc__button" class="cursor-pointer">
44 <?php echo esc_html(acym_translation('ACYM_DESCRIPTION')); ?>
45 <i class="acymicon-keyboard-arrow-down"></i>
46 </h6>
47 <?php if (!empty($data['automation']->admin)) $data['automation']->description = esc_html(acym_translation($data['automation']->description)); ?>
48 <textarea style="display: none"
49 name="automation[description]" <?php echo empty($data['automation']->admin) ? '' : 'disabled'; ?> rows="6"
50 class="margin-top-1"><?php echo !empty($data['automation']->description) ? esc_html(
51 $data['automation']->description
52 ) : ''; ?></textarea>
53 </label>
54 </div>
55 <div class="medium-12 cell grid-x acym__content acym__automation__info__trigger margin-top-2">
56 <div class="cell grid-x margin-bottom-2" id="acym__automation__info__choose__trigger__type">
57 <input type="hidden"
58 name="type_trigger"
59 value="<?php echo !empty($data['type_trigger']) ? esc_attr($data['type_trigger']) : 'classic'; ?>"
60 id="acym__automation__trigger__type__input">
61 <div class="cell auto"></div>
62 <?php
63 $class = '';
64 if (!empty($data['type_trigger']) && $data['type_trigger'] == 'classic') {
65 $class = 'selected-trigger';
66 } elseif (empty($data['type_trigger'])) {
67 $class = 'selected-trigger';
68 }
69 ?>
70 <p id="acym__automation__info__group"
71 data-trigger-type="classic"
72 class="shrink cell <?php echo esc_attr($class); ?> margin-right-2">
73 <?php echo esc_html(acym_translation('ACYM_CLASSIC_TRIGGER')); ?>
74 </p>
75 <p id="acym__automation__info__one-user"
76 data-trigger-type="user"
77 class="shrink cell <?php echo (!empty($data['type_trigger']) && $data['type_trigger'] == 'user') ? 'selected-trigger' : ''; ?>"><?php echo esc_html(
78 acym_translation(
79 'ACYM_TRIGGER_BASED_ON_USER_ACTIONS'
80 )
81 ); ?></p>
82 <div class="cell auto"></div>
83 </div>
84 <div class="acym__automation__info__choose__trigger cell grid-x grid-margin-x grid-margin-y"
85 id="acym__automation__info__choose__trigger__classic" <?php echo (!empty($data['type_trigger']) && $data['type_trigger'] == 'classic') ? ''
86 : (empty($data['type_trigger']) ? '' : 'style="display: none"'); ?>>
87 <div class="cell large-6 acym__content grid-x acym__automation__draggable">
88 <h6 class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_ALL_TRIGGER')); ?></h6>
89 <div class="cell acym__automation__all-trigger__classic grid-x">
90 <!-- TODO : Handle the escape of ->option var in the addons themself -->
91 <?php
92 $allowedTriggerNameTags = [
93 'div' => ['class' => true],
94 'span' => ['class' => true],
95 ];
96 foreach ($data['classic'] as $key => $classic) {
97 echo '<div '.(in_array(
98 $key,
99 $data['defaultValues']
100 ) ? 'style="display: none"' : '').' class="acym__automation__trigger__droppable__classic margin-top-1 cell" data-trigger="'.esc_attr(
101 $key
102 ).'"><span class="acym__automation__trigger__name">'.wp_kses($classic->name, $allowedTriggerNameTags).'</span><span class="acym__automation__trigger__action">'.$classic->option.'</span></div>';
103 } ?>
104 </div>
105 </div>
106
107 <div class="cell large-6 acym__content grid-x acym__automation__droppable__classic">
108 <h6 class="acym__title acym__title__secondary cell"><?php echo esc_html(acym_translation('ACYM_EXECUTE_AUTOMATION')); ?></h6>
109 <div class="cell acym__automation__user-trigger__classic acym__automation__trigger__sortable">
110 <?php
111 if (count($data['defaultValues']) < 2) {
112 echo '<div class="cell margin-top-1 acym__automation__drag-here-text">'.esc_html(acym_translation('ACYM_DRAG_YOUR_TRIGGERS')).'</div>';
113 }
114 foreach ($data['classic'] as $key => $classic) {
115 if (!in_array($key, $data['defaultValues'])) continue;
116 ?>
117 <div class="acym__automation__droppable__trigger margin-top-1">
118 <div class="acym__automation__one__trigger">
119 <span class="acym__automation__trigger__name"><?php echo wp_kses($classic->name, $allowedTriggerNameTags); ?></span>
120 <span class="acym__automation__trigger__action"><?php echo $classic->option; ?></span>
121 </div>
122 <i data-trigger-show="<?php echo esc_attr($key); ?>"
123 class="acymicon-close acym__color__red acym__automation__delete__trigger cursor-pointer"></i>
124 </div>
125 <?php
126 }
127 ?>
128 </div>
129 </div>
130 </div>
131 <div class="acym__automation__info__choose__trigger cell grid-x grid-margin-x grid-margin-y"
132 id="acym__automation__info__choose__trigger__user" <?php echo (!empty($data['type_trigger']) && $data['type_trigger'] == 'user') ? ''
133 : 'style="display: none"'; ?>>
134 <div class="cell large-6 acym__content grid-x acym__automation__draggable">
135 <h6 class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_ALL_TRIGGER')); ?></h6>
136 <div class="cell acym__automation__all-trigger__action grid-x">
137 <?php
138 foreach ($data['user'] as $key => $triggerUser) {
139 echo '<div '.(in_array(
140 $key,
141 $data['defaultValues']
142 ) ? 'style="display: none"' : '').' class="acym__automation__trigger__droppable__action margin-top-1 cell" data-trigger="'.esc_attr(
143 $key
144 ).'"><span class="acym__automation__trigger__name">'.wp_kses($triggerUser->name, $allowedTriggerNameTags).'</span><span class="acym__automation__trigger__action">'.$triggerUser->option.'</span></div>';
145 }
146 ?>
147 </div>
148 </div>
149
150 <div class="cell large-6 acym__content grid-x acym__automation__droppable__action">
151 <h6 class="acym__title acym__title__secondary cell"><?php echo esc_html(acym_translation('ACYM_EXECUTE_AUTOMATION')); ?></h6>
152 <div class="cell acym__automation__user-trigger__action acym__automation__trigger__sortable">
153 <?php
154 if (count($data['defaultValues']) < 2) {
155 echo '<div class="cell margin-top-1 acym__automation__drag-here-text">'.esc_html(acym_translation('ACYM_DRAG_YOUR_TRIGGERS')).'</div>';
156 }
157 foreach ($data['user'] as $key => $triggerUser) {
158 if (!in_array($key, $data['defaultValues'])) continue;
159 ?>
160 <div class="acym__automation__droppable__trigger margin-top-1">
161 <div class="acym__automation__one__trigger"><span class="acym__automation__trigger__name"><?php echo wp_kses($triggerUser->name, $allowedTriggerNameTags); ?></span></b>
162 <span class="acym__automation__trigger__action"><?php echo $triggerUser->option; ?></span>
163 </div>
164 <i data-trigger-show="<?php echo esc_attr($key); ?>"
165 class="acymicon-close acym__color__red acym__automation__delete__trigger cursor-pointer"></i>
166 </div>
167 <?php
168 }
169 ?>
170 </div>
171 </div>
172 </div>
173 </div>
174 <div class="cell grid-x margin-top-2">
175 <div class="cell medium-shrink medium-margin-bottom-0 margin-bottom-1 text-left">
176 <?php acym_backToListing('automation'); ?>
177 </div>
178 <div class="cell medium-auto grid-x grid-margin-x text-right">
179 <div class="cell auto"></div>
180 <button class="cell medium-shrink button medium-margin-bottom-0 margin-bottom-1 acy_button_submit button-secondary"
181 type="button"
182 data-task="saveExitInfo"><?php echo esc_html(acym_translation('ACYM_SAVE_EXIT')); ?></button>
183 <button class="cell medium-shrink button margin-bottom-0 acy_button_submit" type="button" data-task="saveInfo">
184 <?php echo esc_html(acym_translation('ACYM_SAVE_CONTINUE')); ?>
185 </button>
186 </div>
187 </div>
188 </div>
189 </div>
190 <?php acym_formOptions(); ?>
191 </form>
192