summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkarl <noreply@maennchen1.de>2023-07-17 12:47:02 +0000
committerkarl <noreply@maennchen1.de>2023-07-17 12:47:02 +0000
commitde4d3a4feb05934a2e8500be1214781959bc34d1 (patch)
treeb39e65c4fa3f2b6e9c90a0d7db910aa55c6f30fd
parent6059af30609e5155e6d1a0362d57886b4907f76c (diff)
- Bugfix: Modul Trusted Shops: Backend UI von Moduleinstellungen überarbeitet
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8322 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/mods/mod_trustedshops/settings_edit.phtml185
1 files changed, 97 insertions, 88 deletions
diff --git a/views/mods/mod_trustedshops/settings_edit.phtml b/views/mods/mod_trustedshops/settings_edit.phtml
index 667a297..1bd650f 100644
--- a/views/mods/mod_trustedshops/settings_edit.phtml
+++ b/views/mods/mod_trustedshops/settings_edit.phtml
@@ -27,32 +27,32 @@
<div class="tab-content">
<div id="tab1" role="tabpanel" class="tab-pane active" >
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_siegelcache', __('Bewertungsbild zwischenspeichern (empfohlen)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegelcache'), array('help' => 'wpsg_mod_trustedshops_siegelcache')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_siegeltitle', __('Titel des Bewertungsbildes', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegeltitle'), array('help' => 'wpsg_mod_trustedshops_siegeltitle')); ?>
-
- <?php if (wpsg_isSizedString($this->view['siegelURL'])) { ?>
- <br />
- <div class="wpsg_hinweis"><?php echo wpsg_translate(__('Das Trusted Shops Widget muss in einen <a href="#1#">Widgetbereich</a> eingefügt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/widgets.php'); ?></div><br />
- <?php echo __('Vorschau:', 'wpsg'); ?><br />
- <img class="bewertung" alt="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>" border="0" src="<?php echo $this->view['siegelURL']; ?>"/>
- <?php } ?>
-
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_siegelcache', __('Bewertungsbild zwischenspeichern (empfohlen)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegelcache'), array('help' => 'wpsg_mod_trustedshops_siegelcache')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_siegeltitle', __('Titel des Bewertungsbildes', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegeltitle'), array('help' => 'wpsg_mod_trustedshops_siegeltitle')); ?>
+
+ <?php if (wpsg_isSizedString($this->view['siegelURL'])) { ?>
+ <br />
+ <div class="wpsg_hinweis"><?php echo wpsg_translate(__('Das Trusted Shops Widget muss in einen <a href="#1#">Widgetbereich</a> eingefügt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/widgets.php'); ?></div><br />
+ <?php echo __('Vorschau:', 'wpsg'); ?><br />
+ <img class="bewertung" alt="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>" border="0" src="<?php echo $this->view['siegelURL']; ?>"/>
+ <?php } ?>
+
</div>
<div id="tab2" role="tabpanel" class="tab-pane" >
- <?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_orderdone', __('Link zur Bewertung', 'wpsg'), array(
- '0' => __('Nicht anzeigen', 'wpsg'),
- '1' => __('Immer anzeigen', 'wpsg'),
- '2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
- ), $this->get_option('wpsg_mod_trustedshops_orderdone'), array('help' => 'wpsg_mod_trustedshops_orderdone')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonetitle', __('Titel des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonetitle'), array('help' => 'wpsg_mod_trustedshops_orderdonetitle')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonelogo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonelogo'), array('help' => 'wpsg_mod_trustedshops_orderdonelogo')); ?>
-
- <br />
-
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_warranty', __('Trusted Shops Käuferschutz (Garantie)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_warranty'), array('help' => 'wpsg_mod_trustedshops_warranty')); ?>
-
+ <?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_orderdone', __('Link zur Bewertung', 'wpsg'), array(
+ '0' => __('Nicht anzeigen', 'wpsg'),
+ '1' => __('Immer anzeigen', 'wpsg'),
+ '2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
+ ), $this->get_option('wpsg_mod_trustedshops_orderdone'), array('help' => 'wpsg_mod_trustedshops_orderdone')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonetitle', __('Titel des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonetitle'), array('help' => 'wpsg_mod_trustedshops_orderdonetitle')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonelogo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonelogo'), array('help' => 'wpsg_mod_trustedshops_orderdonelogo')); ?>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_warranty', __('Trusted Shops Käuferschutz (Garantie)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_warranty'), array('help' => 'wpsg_mod_trustedshops_warranty')); ?>
+
</div>
<div id="tab3" role="tabpanel" class="tab-pane" >
@@ -82,60 +82,52 @@
<div id="tab4" role="tabpanel" class="tab-pane" >
- <?php echo wpsg_drawForm_TextStart(); ?>
- <input type="hidden" name="wpsg_mod_trustedshops_reminder" value="0">
- <input id="wpsg_mod_trustedshops_reminder" type="checkbox" class="checkbox" <?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_trustedshops_reminder')))?'checked="checked"':''); ?> tabindex="14" name="wpsg_mod_trustedshops_reminder" value="1">
-
- <div id="wpsg_mod_trustedshops_reminder_layer" class="wpsg_form_trustedshops_reminderDays">
-
- <p><?php echo __('Nach', 'wpsg'); ?></p>
- <input id="wpsg_mod_trustedshops_reminderDays" type="text" class="text" tabindex="15" name="wpsg_mod_trustedshops_reminderDays" value="<?php echo $this->get_option('wpsg_mod_trustedshops_reminderDays'); ?>">
- <p><?php echo __('Tagen', 'wpsg'); ?></p>
-
- </div>
-
- <?php echo wpsg_drawForm_TextEnd(__('Erinnerung', 'wpsg'), array('noP' => true)); ?>
-
- <?php echo wpsg_drawForm_TextStart(); ?>
- <?php foreach ($this->arStatus as $state_id => $state_label) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_reminder', __('Erinnerung', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminder'), array('help' => 'wpsg_mod_trustedshops_reminder')); ?>
+ <div id="wpsg_mod_trustedshops_reminder_layer" style="display:none;">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_reminderDays', __('Zeitspanne zum versenden der Erinnerunsmail in Tagen', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminderDays'), array('help' => 'wpsg_mod_trustedshops_reminderDays')); ?>
+ </div>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Link('wpsg_mod_trustedshops_link', __('Auslöser bei Statuswechsel', 'wpsg'),
+ __('Bearbeiten', 'wpsg'), array('help' => 'wpsg_mod_trustedshops_link', 'class' => 'wpsg_mod_trustedshops_state')); ?>
+
+ <div class="wpsg_mod_trustedshops_reminderstate_layer" style="display:none;">
+
+ <?php foreach ($this->arStatus as $state_id => $state_label) { ?>
<?php
- $arr1 = $this->get_option('wpsg_mod_trustedshops_state');
- $chk = ((in_array($state_id, (array)$this->get_option('wpsg_mod_trustedshops_state')))?1:0);
- echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_state[]', __($state_label, 'wpsg'),
- $chk, array('help1' => 'wpsg_shippay_mwstland',
- 'value' => wpsg_hspc($state_id),
- 'noHidden' => true,
- 'fullWidth' => true
- ));
+ $arr1 = $this->get_option('wpsg_mod_trustedshops_state');
+ $chk = ((in_array($state_id, (array)$this->get_option('wpsg_mod_trustedshops_state')))?1:0);
+ echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_state[]', __($state_label, 'wpsg'),
+ $chk, array('help1' => 'wpsg_shippay_mwstland', 'value' => wpsg_hspc($state_id), 'labelright' => true));
?>
- <br />
- <?php } ?>
-
- <?php echo wpsg_drawForm_TextEnd(__('Bestellzustände', 'wpsg'), array('noP' => true)); ?>
+ <?php } ?>
-
-
- <?php echo wpsg_drawForm_Input('', __('Letzter Export', 'wpsg'), $this->view['lastExport'], array('text' => true)); ?>
-
<br />
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">&nbsp;</div>
- <div class="wpsg_form_right wpsg_form_right_unit">
- <?php $temp = $this->callMod('wpsg_mod_trustedshops', 'getExportData');
- if (wpsg_isSizedArray($temp)) { ?>
- <a target="_blank" onclick="location.href=location.href;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_trustedshops&do=export&noheader=1" class="button"><?php echo __('CSV-Export-Datei erstellen', 'wpsg'); ?></a>
- <?php } else { ?>
- <p><?php echo __('Derzeit keine Daten zum Export verfügbar.', 'wpsg'); ?></p>
- <?php } ?>
- </div>
- <div class="wpsg_clear"></div>
+
+ </div>
+
+ <?php echo wpsg_drawForm_Input('', __('Letzter Export', 'wpsg'), $this->view['lastExport'], array('text' => true)); ?>
+
+ <br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right wpsg_form_right_unit">
+ <?php $temp = $this->callMod('wpsg_mod_trustedshops', 'getExportData');
+ if (wpsg_isSizedArray($temp)) { ?>
+ <a target="_blank" onclick="location.href=location.href;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_trustedshops&do=export&noheader=1" class="button"><?php echo __('CSV-Export-Datei erstellen', 'wpsg'); ?></a>
+ <?php } else { ?>
+ <p><?php echo __('Derzeit keine Daten zum Export verfügbar.', 'wpsg'); ?></p>
+ <?php } ?>
</div>
-
- <br />
-
- <a href="https://www.trustedshops.com/tsb2b/sa/ratings/batchRatingRequest.seam"><?php echo __('Trusted Shops Review Collector', 'wpsg'); ?></a>
-
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <br />
+
+ <a href="https://www.trustedshops.com/tsb2b/sa/ratings/batchRatingRequest.seam"><?php echo __('Trusted Shops Review Collector', 'wpsg'); ?></a>
+
</div>
</div>
@@ -144,23 +136,6 @@
<script type="text/javascript">/* <![CDATA[ */
jQuery(document).ready(function() {
-
- jQuery('#wpsg_mod_trustedshops_reminder').bind('change', function() {
-
- if (jQuery('#wpsg_mod_trustedshops_reminder').is(':checked'))
- {
-
- jQuery('#wpsg_mod_trustedshops_reminder_layer').show(250);
-
- }
- else
- {
-
- jQuery('#wpsg_mod_trustedshops_reminder_layer').hide(250);
-
- }
-
- } ).change();
jQuery('#wpsg_tab').wpsg_tab( {
'cookiename': 'wpsg_trustedshop_tab',
@@ -185,7 +160,41 @@
}
} ).change();
+
+ jQuery('.wpsg_mod_trustedshops_state').bind('click', function() {
+
+ jQuery('.wpsg_mod_trustedshops_reminderstate_layer').toggle();
+
+ if (jQuery('.wpsg_mod_trustedshops_reminderstate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
+ else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
+
+ return false;
+
+ } );
} );
+ document.addEventListener("DOMContentLoaded", function() {
+
+ var reminderCheckbox = document.getElementById('wpsg_mod_trustedshops_reminder');
+ var reminderDiv = document.getElementById('wpsg_mod_trustedshops_reminder_layer');
+
+ function toggleDivVisibility(checkbox, div)
+ {
+
+ if (checkbox.checked) div.style.display = "block";
+ else div.style.display = "none";
+
+ }
+
+ // Event Listener für die Checkboxen
+ reminderCheckbox.addEventListener("change", function() {
+ toggleDivVisibility(reminderCheckbox, reminderDiv);
+ });
+
+ // Überprüfen und Initialisieren des Anfangszustands der Checkboxen
+ toggleDivVisibility(reminderCheckbox, reminderDiv);
+
+ });
+
/* ]]> */</script> \ No newline at end of file