diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2022-11-02 07:27:18 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2022-11-02 07:27:18 +0000 |
| commit | dd1f02d16eba809b1839418276a953f8158b69d0 (patch) | |
| tree | 7d9555167c6a5a98bc1675d4146bac987698c3f5 /views/mods | |
| parent | a6cd31a06784373ff37b32bdce055f01bbfcbb44 (diff) | |
- Feature: Exportprofile: XML Erstellung verbessert
- Feature: Exportprofile: Automatischer Export bei Bestellung
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8131 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
| -rw-r--r-- | views/mods/mod_export/fields.phtml | 37 | ||||
| -rw-r--r-- | views/mods/mod_export/profil.phtml | 26 |
2 files changed, 49 insertions, 14 deletions
diff --git a/views/mods/mod_export/fields.phtml b/views/mods/mod_export/fields.phtml index 38fe41e..c731984 100644 --- a/views/mods/mod_export/fields.phtml +++ b/views/mods/mod_export/fields.phtml @@ -36,14 +36,11 @@ </td>
<td class="wpsg_mod_export_col_field"><div class="wpsg_editable" id="field_typ_<?php echo $f_id; ?>"><?php
- foreach ($this->view['fields'] as $fieldgroup)
- {
+ foreach ($this->view['fields'] as $fieldgroup) {
- foreach ($fieldgroup['fields'] as $field_key => $field)
- {
+ foreach ($fieldgroup['fields'] as $field_key => $field) {
- if ($field_key == $f['value_key'])
- {
+ if ($field_key == $f['value_key']) {
echo $field;
@@ -74,8 +71,18 @@ </td>
</tr>
- <tr id="userformatrow_<?php echo $f_id; ?>" style="<?php echo (($f['format'] != 700)?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <tr id="staticformat_<?php echo $f_id; ?>" style="<?php echo (($f['value_key'] != 'general_static')?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_mod_export_col_format_user" colspan="4">
+
+ <?php echo __('Statischer Wert', 'wpsg'); ?>:
+
+ <div class="wpsg_editable" id="field_static_<?php echo $f_id; ?>"><?php echo wpsg_hspc(wpsg_getStr($f['static'])); ?></div>
+
+ </td>
+ <td></td>
+ </tr>
+ <tr id="userformatrow_<?php echo $f_id; ?>" style="<?php echo (($f['format'] != 700)?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_mod_export_col_format_user" colspan="4">
<?php echo __('Format', 'wpsg'); ?>:
@@ -94,7 +101,13 @@ jQuery('#field_typ_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
'type': 'multiarray',
- 'data': '<?php echo addslashes(json_encode($this->view['fields'], JSON_UNESCAPED_SLASHES)); ?>'
+ 'data': '<?php echo addslashes(json_encode($this->view['fields'], JSON_UNESCAPED_SLASHES)); ?>',
+ 'callback': function(response, newValue) {
+
+ if (newValue === 'general_static') jQuery('#staticformat_<?php echo $f_id; ?>').show();
+ else jQuery('#staticformat_<?php echo $f_id; ?>').hide();
+
+ }
} );
jQuery('#field_format_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
@@ -110,6 +123,8 @@ jQuery('#field_userformat_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
+ jQuery('#field_static_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
+
} );
/* ]]> */</script>
@@ -149,3 +164,9 @@ ).disableSelection();
/* ]]> */</script>
+
+<style>
+
+ .wpsg_mod_export_col_format { min-width:100px; }
+
+</style>
\ No newline at end of file diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml index 5a946c3..4709b9c 100644 --- a/views/mods/mod_export/profil.phtml +++ b/views/mods/mod_export/profil.phtml @@ -89,10 +89,13 @@ <?php echo wpsg_drawForm_Text(__('Pfad', 'wpsg'), $this->view['profil']['cron_path'], 'cron_path', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php echo wpsg_drawForm_Text(__('Letzte Ausführung', 'wpsg'), (($this->view['profil']['cron_lastrun'] == '0000-00-00')?__('Noch nie', 'wpsg'):wpsg_formatTimestamp($this->view['profil']['cron_lastrun'], true)), false, array('noP' => false)); ?>
- <?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 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 if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
- <fieldset id="wpsg_mod_export_orderfilter">
+ <fieldset id="wpsg_mod_export_orderfilter" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
<legend><div class="col-sm-offset-6"><?php echo __('Bestellfilter', 'wpsg'); ?></div></legend>
@@ -233,9 +236,20 @@ <script type="text/javascript">/* <