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

193 lines 11.3 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 foreach ($data['classic'] as $key => $classic) {
92 echo '<div '.(in_array(
93 $key,
94 $data['defaultValues']
95 ) ? 'style="display: none"' : '').' class="acym__automation__trigger__droppable__classic margin-top-1 cell" data-trigger="'.esc_attr(
96 $key
97 ).'"><span class="acym__automation__trigger__name">'.esc_html(
98 $classic->name
99 ).'</span><span class="acym__automation__trigger__action">'.$classic->option.'</span></div>';
100 } ?>
101 </div>
102 </div>
103
104 <div class="cell large-6 acym__content grid-x acym__automation__droppable__classic">
105 <h6 class="acym__title acym__title__secondary cell"><?php echo esc_html(acym_translation('ACYM_EXECUTE_AUTOMATION')); ?></h6>
106 <div class="cell acym__automation__user-trigger__classic acym__automation__trigger__sortable">
107 <?php
108 if (count($data['defaultValues']) < 2) {
109 echo '<div class="cell margin-top-1 acym__automation__drag-here-text">'.esc_html(acym_translation('ACYM_DRAG_YOUR_TRIGGERS')).'</div>';
110 }
111 foreach ($data['classic'] as $key => $classic) {
112 if (!in_array($key, $data['defaultValues'])) continue;
113 ?>
114 <div class="acym__automation__droppable__trigger margin-top-1">
115 <div class="acym__automation__one__trigger">
116 <span class="acym__automation__trigger__name"><?php echo esc_html($classic->name); ?></span>
117 <span class="acym__automation__trigger__action"><?php echo $classic->option; ?></span>
118 </div>
119 <i data-trigger-show="<?php echo esc_attr($key); ?>"
120 class="acymicon-close acym__color__red acym__automation__delete__trigger cursor-pointer"></i>
121 </div>
122 <?php
123 }
124 ?>
125 </div>
126 </div>
127 </div>
128 <div class="acym__automation__info__choose__trigger cell grid-x grid-margin-x grid-margin-y"
129 id="acym__automation__info__choose__trigger__user" <?php echo (!empty($data['type_trigger']) && $data['type_trigger'] == 'user') ? ''
130 : 'style="display: none"'; ?>>
131 <div class="cell large-6 acym__content grid-x acym__automation__draggable">
132 <h6 class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_ALL_TRIGGER')); ?></h6>
133 <div class="cell acym__automation__all-trigger__action grid-x">
134 <?php
135 foreach ($data['user'] as $key => $triggerUser) {
136 echo '<div '.(in_array(
137 $key,
138 $data['defaultValues']
139 ) ? 'style="display: none"' : '').' class="acym__automation__trigger__droppable__action margin-top-1 cell" data-trigger="'.esc_attr(
140 $key
141 ).'"><span class="acym__automation__trigger__name">'.esc_html(
142 $triggerUser->name
143 ).'</span><span class="acym__automation__trigger__action">'.$triggerUser->option.'</span></div>';
144 }
145 ?>
146 </div>
147 </div>
148
149 <div class="cell large-6 acym__content grid-x acym__automation__droppable__action">
150 <h6 class="acym__title acym__title__secondary cell"><?php echo esc_html(acym_translation('ACYM_EXECUTE_AUTOMATION')); ?></h6>
151 <div class="cell acym__automation__user-trigger__action acym__automation__trigger__sortable">
152 <?php
153 if (count($data['defaultValues']) < 2) {
154 echo '<div class="cell margin-top-1 acym__automation__drag-here-text">'.esc_html(acym_translation('ACYM_DRAG_YOUR_TRIGGERS')).'</div>';
155 }
156 foreach ($data['user'] as $key => $triggerUser) {
157 if (!in_array($key, $data['defaultValues'])) continue;
158 ?>
159 <div class="acym__automation__droppable__trigger margin-top-1">
160 <div class="acym__automation__one__trigger"><span class="acym__automation__trigger__name"><?php echo esc_html(
161 $triggerUser->name
162 ); ?></span></b>
163 <span class="acym__automation__trigger__action"><?php echo $triggerUser->option; ?></span>
164 </div>
165 <i data-trigger-show="<?php echo esc_attr($key); ?>"
166 class="acymicon-close acym__color__red acym__automation__delete__trigger cursor-pointer"></i>
167 </div>
168 <?php
169 }
170 ?>
171 </div>
172 </div>
173 </div>
174 </div>
175 <div class="cell grid-x margin-top-2">
176 <div class="cell medium-shrink medium-margin-bottom-0 margin-bottom-1 text-left">
177 <?php acym_backToListing('automation'); ?>
178 </div>
179 <div class="cell medium-auto grid-x grid-margin-x text-right">
180 <div class="cell auto"></div>
181 <button class="cell medium-shrink button medium-margin-bottom-0 margin-bottom-1 acy_button_submit button-secondary"
182 type="button"
183 data-task="saveExitInfo"><?php echo esc_html(acym_translation('ACYM_SAVE_EXIT')); ?></button>
184 <button class="cell medium-shrink button margin-bottom-0 acy_button_submit" type="button" data-task="saveInfo">
185 <?php echo esc_html(acym_translation('ACYM_SAVE_CONTINUE')); ?>
186 </button>
187 </div>
188 </div>
189 </div>
190 </div>
191 <?php acym_formOptions(); ?>
192 </form>
193