| @@ -1,252 +1,0 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -use AcyMailing\Helpers\CronHelper; | |
| 4 | - | |
| 5 | -?> | |
| 6 | - <div class="acym__content acym_area padding-vertical-1 padding-horizontal-2"> | |
| 7 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_CONFIGURATION_QUEUE'); ?></div> | |
| 8 | - <div class="grid-x grid-margin-x margin-y"> | |
| 9 | - <div class="cell medium-3"><?php echo acym_translation('ACYM_CONFIGURATION_QUEUE_PROCESSING'); ?></div> | |
| 10 | - <div class="cell medium-9"> | |
| 11 | - <?php | |
| 12 | - $disabledOptions = []; | |
| 13 | - if (!acym_level(ACYM_ESSENTIAL)) { | |
| 14 | - $disabledOptions = [ | |
| 15 | - 'auto' => ['tooltipTxt' => acym_translation('ACYM_PRO_ONLY'), 'disabledClass' => 'acym__disabled'], | |
| 16 | - 'automan' => ['tooltipTxt' => acym_translation('ACYM_PRO_ONLY'), 'disabledClass' => 'acym__disabled'], | |
| 17 | - ]; | |
| 18 | - } | |
| 19 | - echo acym_radio( | |
| 20 | - [ | |
| 21 | - 'auto' => acym_translation('ACYM_CONFIGURATION_QUEUE_AUTOMATIC'), | |
| 22 | - 'automan' => acym_translation('ACYM_CONFIGURATION_QUEUE_AUTOMAN'), | |
| 23 | - 'manual' => acym_translation('ACYM_CONFIGURATION_QUEUE_MANUAL'), | |
| 24 | - ], | |
| 25 | - 'config[queue_type]', | |
| 26 | - $this->config->get('queue_type', 'automan'), | |
| 27 | - [ | |
| 28 | - 'related' => [ | |
| 29 | - 'auto' => 'automatic_only', | |
| 30 | - 'automan' => 'automatic_manual', | |
| 31 | - 'manual' => 'manual_only', | |
| 32 | - ], | |
| 33 | - ], | |
| 34 | - [], | |
| 35 | - false, | |
| 36 | - $disabledOptions | |
| 37 | - ); | |
| 38 | - ?> | |
| 39 | - </div> | |
| 40 | - <div class="cell medium-3 automatic_only automatic_manual"> | |
| 41 | - <?php | |
| 42 | - echo acym_translation('ACYM_AUTO_SEND_PROCESS'); | |
| 43 | - echo acym_info(['textShownInTooltip' => 'ACYM_AUTO_SEND_PROCESS_DESC']); | |
| 44 | - ?> | |
| 45 | - </div> | |
| 46 | - <div class="cell medium-9 grid-x automatic_only automatic_manual"> | |
| 47 | - <div class="cell large-9 grid-x margin-y"> | |
| 48 | - <div class="cell"> | |
| 49 | - <?php | |
| 50 | - $cronFrequency = (int)$this->config->get('cron_frequency'); | |
| 51 | - $valueBatch = acym_level(ACYM_ENTERPRISE) ? $this->config->get('queue_batch_auto', 1) : 1; | |
| 52 | - if (!function_exists('curl_multi_exec') && ($cronFrequency < 900 || intval($valueBatch) > 1)) { | |
| 53 | - acym_display(acym_translation('ACYM_MULTI_CURL_DISABLED'), 'error', false); | |
| 54 | - } elseif (empty($cronFrequency) && !empty($this->config->get('active_cron', 0))) { | |
| 55 | - acym_display(acym_translation('ACYM_EMPTY_FREQUENCY'), 'error', false); | |
| 56 | - } | |
| 57 | - | |
| 58 | - $disabledBatch = acym_level(ACYM_ENTERPRISE) ? '' : 'disabled'; | |
| 59 | - $delayTypeAuto = $data['typeDelay']; | |
| 60 | - $delayHtml = '<span data-acym-tooltip="'.acym_translation('ACYM_CRON_TRIGGERED_DESC').'">'.$delayTypeAuto->display( | |
| 61 | - 'config[cron_frequency]', | |
| 62 | - $cronFrequency, | |
| 63 | - \AcyMailing\Types\DelayType::TYPE_MINUTES_HOURS, | |
| 64 | - '', | |
| 65 | - 'auto_sending_input' | |
| 66 | - ).'</span>'; | |
| 67 | - echo acym_translationSprintf( | |
| 68 | - 'ACYM_SEND_X_BATCH_OF_X_EMAILS_EVERY_Y', | |
| 69 | - '<input '.$disabledBatch.' class="intext_input auto_sending_input" type="number" min="1" max="10" name="config[queue_batch_auto]" value="'.intval( | |
| 70 | - $valueBatch | |
| 71 | - ).'" />', | |
| 72 | - '<input class="intext_input auto_sending_input" type="number" min="1" max="900" name="config[queue_nbmail_auto]" value="'.intval( | |
| 73 | - $this->config->get('queue_nbmail_auto') | |
| 74 | - ).'" />', | |
| 75 | - $delayHtml | |
| 76 | - ); | |
| 77 | - echo '<span id="automatic_sending_speed_too_many_batches">'; | |
| 78 | - echo acym_info(['textShownInTooltip' => 'ACYM_TOO_MANY_BATCHES', 'isWarning' => true]); | |
| 79 | - echo '</span>'; | |
| 80 | - ?> | |
| 81 | - </div> | |
| 82 | - <div class="cell"> | |
| 83 | - <?php | |
| 84 | - echo acym_translationSprintf( | |
| 85 | - 'ACYM_WAIT_X_SECONDS_BETWEEN_MAILS', | |
| 86 | - '<input class="intext_input auto_sending_input" type="number" min="0" name="config[email_frequency]" value="'.$this->config->get( | |
| 87 | - 'email_frequency', | |
| 88 | - 0 | |
| 89 | - ).'" />' | |
| 90 | - ); | |
| 91 | - ?> | |
| 92 | - </div> | |
| 93 | - </div> | |
| 94 | - </div> | |
| 95 | - <div class="cell medium-3 automatic_only automatic_manual"></div> | |
| 96 | - <div class="cell medium-9 automatic_only automatic_manual margin-bottom-2"> | |
| 97 | - <?php echo acym_translationSprintf('ACYM_SEND_X_EMAILS_PER_HOUR', '<span id="automatic_sending_speed_preview">280</span>'); ?> | |
| 98 | - <span id="automatic_sending_speed_too_much"> | |
| 99 | - <?php | |
| 100 | - echo acym_info( | |
| 101 | - [ | |
| 102 | - 'textShownInTooltip' => acym_translation('ACYM_ONE_SECOND_PER_EMAIL_WARNING'), | |
| 103 | - ] | |
| 104 | - ); | |
| 105 | - ?> | |
| 106 | - </span> | |
| 107 | - <span id="automatic_sending_speed_no_wait"> | |
| 108 | - <?php | |
| 109 | - echo acym_info( | |
| 110 | - [ | |
| 111 | - 'textShownInTooltip' => acym_translation('ACYM_SEND_FASTER_DECREASE_WAIT'), | |
| 112 | - ] | |
| 113 | - ); | |
| 114 | - ?> | |
| 115 | - </span> | |
| 116 | - </div> | |
| 117 | - <div class="cell medium-3 automatic_only automatic_manual"><?php echo acym_translation('ACYM_SEND_RESTRICTIONS'); ?></div> | |
| 118 | - <div class="cell medium-9 grid-x margin-y automatic_only automatic_manual acym_auto_send_time"> | |
| 119 | - <div class="cell"> | |
| 120 | - <?php | |
| 121 | - $hoursFrom = acym_select( | |
| 122 | - $data['listHours'], | |
| 123 | - 'config[queue_send_from_hour]', | |
| 124 | - $this->config->get('queue_send_from_hour', '00'), | |
| 125 | - ['class' => 'intext_select'] | |
| 126 | - ); | |
| 127 | - $minutesFrom = acym_select( | |
| 128 | - $data['listAllMinutes'], | |
| 129 | - 'config[queue_send_from_minute]', | |
| 130 | - $this->config->get('queue_send_from_minute', '00'), | |
| 131 | - ['class' => 'intext_select'] | |
| 132 | - ); | |
| 133 | - $hoursTo = acym_select( | |
| 134 | - $data['listHours'], | |
| 135 | - 'config[queue_send_to_hour]', | |
| 136 | - $this->config->get('queue_send_to_hour', '23'), | |
| 137 | - ['class' => 'intext_select'] | |
| 138 | - ); | |
| 139 | - $minutesTo = acym_select( | |
| 140 | - $data['listAllMinutes'], | |
| 141 | - 'config[queue_send_to_minute]', | |
| 142 | - $this->config->get('queue_send_to_minute', '59'), | |
| 143 | - ['class' => 'intext_select'] | |
| 144 | - ); | |
| 145 | - echo acym_translationSprintf('ACYM_SEND_FROM_TO', $hoursFrom, $minutesFrom, $hoursTo, $minutesTo); | |
| 146 | - ?> | |
| 147 | - </div> | |
| 148 | - <div class="cell grid-x"> | |
| 149 | - <div class="cell shrink margin-right-1"> | |
| 150 | - <?php echo acym_translation('ACYM_DONT_SEND_WEEKEND'); ?> | |
| 151 | - </div> | |
| 152 | - <div class="cell shrink"> | |
| 153 | - <?php echo acym_switch('config[queue_stop_weekend]', $this->config->get('queue_stop_weekend', 0)); ?> | |
| 154 | - </div> | |
| 155 | - <div class="cell auto"></div> | |
| 156 | - </div> | |
| 157 | - </div> | |
| 158 | - <div class="cell medium-3 manual_only automatic_manual"><?php echo acym_translation('ACYM_MANUAL_SEND_PROCESS'); ?></div> | |
| 159 | - <div class="cell medium-9 manual_only automatic_manual"> | |
| 160 | - <?php | |
| 161 | - echo acym_translationSprintf( | |
| 162 | - 'ACYM_SEND_X_EMAILS_WAIT_Y_SECONDS', | |
| 163 | - '<input class="intext_input" type="number" min="1" name="config[queue_nbmail]" value="'.intval($this->config->get('queue_nbmail')).'" />', | |
| 164 | - '<input class="intext_input" type="number" min="0" name="config[queue_pause]" value="'.intval($this->config->get('queue_pause')).'" />' | |
| 165 | - ); | |
| 166 | - ?> | |
| 167 | - </div> | |
| 168 | - <div class="cell medium-3"><?php echo '<span>'.acym_translation('ACYM_MAX_NB_TRY').'</span>'.acym_info(['textShownInTooltip' => 'ACYM_MAX_NB_TRY_DESC']); ?></div> | |
| 169 | - <div class="cell medium-9"> | |
| 170 | - <?php echo acym_translationSprintf( | |
| 171 | - 'ACYM_CONFIG_TRY', | |
| 172 | - '<input class="intext_input" type="number" min="0" name="config[queue_try]" value="'.intval($this->config->get('queue_try')).'">' | |
| 173 | - ); | |
| 174 | - | |
| 175 | - $failaction = $data['failaction']; | |
| 176 | - echo ' '.acym_translationSprintf('ACYM_CONFIG_TRY_ACTION', $failaction->display('maxtry', $this->config->get('bounce_action_maxtry', 'noaction'))); ?> | |
| 177 | - </div> | |
| 178 | - <div class="cell medium-3"> | |
| 179 | - <?php | |
| 180 | - echo acym_translation('ACYM_NUMBER_OF_DAYS_TO_CLEAN_QUEUE'); | |
| 181 | - echo acym_info( | |
| 182 | - [ | |
| 183 | - 'textShownInTooltip' => 'ACYM_NUMBER_OF_DAYS_TO_CLEAN_QUEUE_DESC', | |
| 184 | - ] | |
| 185 | - ); | |
| 186 | - ?> | |
| 187 | - </div> | |
| 188 | - <div class="cell medium-9 grid-x"> | |
| 189 | - <div class="cell medium-6 large-4 xlarge-3 xxlarge-2"> | |
| 190 | - <?php | |
| 191 | - $queueDelete = $this->config->get('queue_delete_days', 0); | |
| 192 | - if (!acym_level(ACYM_ESSENTIAL)) { | |
| 193 | - $inputContent = '<input type="number" class="intext_input" disabled min="0" name="config[queue_delete_days]" value="'.acym_escape($queueDelete).'">'; | |
| 194 | - $inputContent = acym_tooltip( | |
| 195 | - [ | |
| 196 | - 'hoveredText' => $inputContent, | |
| 197 | - 'textShownInTooltip' => acym_translation('ACYM_PRO_ONLY'), | |
| 198 | - ] | |
| 199 | - ); | |
| 200 | - } else { | |
| 201 | - $inputContent = '<input type="number" class="intext_input" min="0" name="config[queue_delete_days]" value="'.acym_escape($queueDelete).'">'; | |
| 202 | - } | |
| 203 | - echo $inputContent; | |
| 204 | - ?> | |
| 205 | - </div> | |
| 206 | - </div> | |
| 207 | - <div class="cell medium-3"> | |
| 208 | - <?php | |
| 209 | - echo acym_translation('ACYM_RECORD_STATS_EACH_EMAIL'); | |
| 210 | - echo acym_info(['textShownInTooltip' => 'ACYM_RECORD_STATS_EACH_EMAIL_DESC']); ?> | |
| 211 | - </div> | |
| 212 | - <div class="cell medium-9 grid-x"> | |
| 213 | - <div class="cell medium-6 large-4 xlarge-3 xxlarge-2"> | |
| 214 | - <?php echo acym_switch('config[queue_statistics_by_batch]', $this->config->get('queue_statistics_by_batch', 1)); ?> | |
| 215 | - </div> | |
| 216 | - </div> | |
| 217 | - <?php if (acym_level(ACYM_ENTERPRISE)) { ?> | |
| 218 | - <div class="cell medium-3"> | |
| 219 | - <?php | |
| 220 | - echo acym_translation('ACYM_SET_FOLLOWUP_PRIORITY'); | |
| 221 | - echo acym_info(['textShownInTooltip' => 'ACYM_SET_FOLLOWUP_PRIORITY_DESC']); ?> | |
| 222 | - </div> | |
| 223 | - <div class="cell medium-9 grid-x"> | |
| 224 | - <div class="cell medium-6 large-4 xlarge-3 xxlarge-2"> | |
| 225 | - <?php echo acym_switch('config[followup_max_priority]', $this->config->get('followup_max_priority', 0)); ?> | |
| 226 | - </div> | |
| 227 | - </div> | |
| 228 | - <div class="cell medium-3 automatic_only automatic_manual"> | |
| 229 | - <?php | |
| 230 | - echo acym_translation('ACYM_USE_DEDICATED_SENDING_PROCESS'); | |
| 231 | - echo acym_info(['textShownInTooltip' => 'ACYM_USE_DEDICATED_SENDING_PROCESS_DESC']); ?> | |
| 232 | - </div> | |
| 233 | - <div class="cell medium-9 grid-x automatic_only automatic_manual"> | |
| 234 | - <div class="cell medium-6 large-4 xlarge-3 xxlarge-2"> | |
| 235 | - <?php | |
| 236 | - echo acym_switch( | |
| 237 | - 'config[dedicated_send_process]', | |
| 238 | - $this->config->get('dedicated_send_process', 0) | |
| 239 | - ); | |
| 240 | - ?> | |
| 241 | - </div> | |
| 242 | - </div> | |
| 243 | - <?php } ?> | |
| 244 | - </div> | |
| 245 | - </div> | |
| 246 | -<?php | |
| 247 | -if (!acym_level(ACYM_ESSENTIAL)) { | |
| 248 | - echo '<div class="acym_area"> | |
| 249 | - <div class="acym__title acym__title__secondary">'.acym_translation('ACYM_CRON').'</div>'; | |
| 250 | - include acym_getView('configuration', 'upgrade_license'); | |
| 251 | - echo '</div>'; | |
| 252 | -} | |