diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2023-01-27 08:12:54 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2023-01-27 08:12:54 +0000 |
| commit | f962f206bfd5fce78003385b1917291acb1c8da3 (patch) | |
| tree | 623496b880b3e37e651fa37b4bd4c52b0d00caa9 /views/mods/mod_export/profil.phtml | |
| parent | ae8c2901c9ee417761fcdfe4a41f9362ffb6685e (diff) | |
- Feature: Exportprofil kann nun stündlich mit dem Wordpress Cron ausgeführt werden
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8212 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_export/profil.phtml')
| -rw-r--r-- | views/mods/mod_export/profil.phtml | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml index 4709b9c..b471e0d 100644 --- a/views/mods/mod_export/profil.phtml +++ b/views/mods/mod_export/profil.phtml @@ -93,7 +93,27 @@ <fieldset id="wpsg_mod_export_cron_url" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
<?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.site_url().'/?wpsg_cron=1">'.site_url().'/?wpsg_cron=1</a>', false, array('noP' => false)); ?>
</fieldset>
-
+
+ <?php echo wpsg_drawForm_Checkbox('wp_cron', __('Stündlich mit Wordpress Cron ausführen', 'wpsg'), ($this->view['profil']['wp_cron']??'0') === '1'); ?>
+
+ <script>
+
+ document.getElementById('wp_cron').addEventListener('change', (event) => {
+
+ jQuery.ajax({
+ url: '<?php echo $inlineEdit_url; ?>',
+ data: {
+ name: 'wp_cron',
+ value: ((event.target.checked === true)?'1':'0')
+ }
+ })
+
+ // console.log('<?php echo $inlineEdit_url; ?>');
+
+ });
+
+ </script>
+
<?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
<fieldset id="wpsg_mod_export_orderfilter" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
@@ -108,7 +128,7 @@ <?php echo wpsg_drawForm_Text(__('Bestellstatus', 'wpsg'), $arOrderStatus[wpsg_getStr($this->view['profil']['orderfilter']['status'], '-1')], 'orderfilter_status', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arOrderStatus)); ?>
<?php $arMonth = array('-1' => __('Alle', 'wpsg')); ?>
- <?php for ($i = 1; $i <= 12; $i ++) { $arMonth[str_pad($i, 2, '0', STR_PAD_LEFT)] = strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); } ?>
+ <?php for ($i = 1; $i <= 12; $i ++) { $arMonth[str_pad($i, 2, '0', STR_PAD_LEFT)] = wpsg_strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); } ?>
<?php $arYearCdate = array('-1' => __('Alle', 'wpsg')); ?>
<?php foreach ($this->view['cdate_years'] as $y) { $arYearCdate[$y] = $y; } ?>
|
