1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
<?php
/**
* Template für die Eingabe der Widerrufsbelehrung im Backend
* @version 4.6.1
*/
?>
<div class="wpsg_admin_submenu">
<div class="list-group">
<span class="list-group-head list-group-item"><?php echo __('Konfiguration', 'wpsg'); ?></span>
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
<a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
<?php } ?>
</div>
</div>
<div class="wpsg_admin_content form-horizontal">
<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=<?php echo $_REQUEST['subaction']; ?>&noheader=1">
<?php \wp_nonce_field('wpsg-save-revocation'); ?>
<?php echo wpsg_drawForm_AdminboxStart(__('Widerruf', 'wpsg')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_ps_mailwiderruf', __('Widerrufsbelehrung', 'wpsg'), $this->get_option('wpsg_ps_mailwiderruf'), array(
'hint' => 'nohspc_'.__('Dieser Text wird in die Mail eingebunden, die der Kunde als Bestellbestätigung erhält.', 'wpsg').'<br />'.__('Das Template für die Mail finden Sie unter: <b>views/mailtemplates/kundenmail.phtml</b> bzw. <b>views/mailtemplates/html/kundenmail.phtml</b>.', 'wpsg')
)); ?>
<?php echo wpsg_drawForm_Upload('wpsg_widerrufsformular', __('Widerrufsformular', 'wpsg')); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<?php if (wpsg_isSizedString($this->view['revocationform'])) { ?>
<a target="_blank" href="<?php
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php/?page=wpsg-Admin&subaction=widerrufsbelehrung&download&noheader=1', 'wpsg-admin-widerrufsbelehrung-download');
?>"><?php echo $this->view['revocationform']; ?></a>
<a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie das Widerrufsformular löschen möchten?', 'wpsg'); ?>')) return false;" style="float:right;" href="<?php
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=widerrufsbelehrung&noheader=1&do=removeWiderrufsformular', 'wpsg-admin-widerrufsbelehrung-delete');
?>"><?php echo __('Widerrufsformular löschen', 'wpsg'); ?></a>
<?php } else { ?>
<p><?php echo __('Bisher wurde kein Widerrufsformular hinterlegt.', 'wpsg'); ?></p>
<?php } ?>
<br /><br />
<a href="<?php
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=widerrufsbelehrung&noheader=1&do=generateWiderrufsformular', 'wpsg-admin-widerrufsbelehrung-generate');
?>" class="button"><?php echo __('Standardformular aus Shopinfo erstellen', 'wpsg'); ?></a>
<br /><br />
<?php echo wpsg_drawForm_TextEnd(); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_kundenmail', __('Anhang an Bestellbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_kundenmail')); ?>
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_invoice', __('Anhang an Rechnung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_invoice')); ?>
<?php } ?>
<?php if ($this->hasMod('wpsg_mod_auftragsbestaetigung')) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_orderconfirm', __('Anhang an Auftragsbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_orderconfirm')); ?>
<?php } ?>
<hr />
<?php echo wpsg_drawForm_Checkbox('wpsg_warranty_label', __('Gewährleistungslabel anzeigen wenn nötig', 'wpsg'), $this->get_option('wpsg_warranty_label'), ['id' => 'wpsg_warranty_label']); ?>
<div id="wpsg_warranty_label_layer" style="display:none;">
<?php echo wpsg_drawForm_Select('wpsg_warranty_layout', __('Darstellung vom Gewährleistungslabel', 'wpsg'), [
wpsg_ShopController::WARRANTYLABEL_POPUP => __('Als Popup vor Bestellabschluss', 'wpsg'),
wpsg_ShopController::WARRANTYLABEL_INLINE => __('vor "Zahlungspflichtig bestellen"', 'wpsg')
], wpsg_ShopController::getShop()->get_option('wpsg_warranty_layout')); ?>
</div>
<script>
const el_wpsg_warranty_label = document.getElementById('wpsg_warranty_label');
const el_wpsg_warranty_label_layer = document.getElementById('wpsg_warranty_label_layer');
el_wpsg_warranty_label.addEventListener('change', () => {
if (el_wpsg_warranty_label.checked) el_wpsg_warranty_label_layer.style.display = 'block';
else el_wpsg_warranty_label_layer.style.display = 'none';
});
el_wpsg_warranty_label.dispatchEvent(new Event('change'));
</script>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
</form>
</div>
|