Subversion Repositories wpShopGermany4

Rev

Rev 7025 | Rev 7490 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1144 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Maske eines neuen Gutscheins
5
	 */
7486 daniel 6
 
1144 daniel 7
?>
8
 
7486 daniel 9
<div class="content form-horizontal">
5753 daniel 10
 
7486 daniel 11
	<form method="POST" id="wpsg_voucher_form" autocomplete="off">
5753 daniel 12
 
7486 daniel 13
		<?php wpsg_drawForm_AdminboxStart(); ?>
14
 
15
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Betrag', 'wpsg'), wpsg_ff($this->view['mod_gutschein']['value'])); ?>
16
 
17
			<div style="margin-top:-15px;">
18
				<?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_coupon', __('Als Wertgutschein behandeln', 'wpsg'), $this->view['mod_gutschein']['coupon']); ?>
5753 daniel 19
			</div>
7486 daniel 20
 
21
			<div class="wpsg_mod_gutschein_coupon wpsg_mod_gutschein_coupon_0">
22
				<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_calc', __('Berechnung', 'wpsg'), array(
23
					'w' => __('Absoluter Betrag', 'wpsg'),
24
					'p' => __('Prozentual', 'wpsg')
25
				), $this->view['mod_gutschein']['calc']); ?>
5753 daniel 26
			</div>
1144 daniel 27
 
7486 daniel 28
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), $this->view['mod_gutschein']['start'], array('datepicker' => true)); ?>
29
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), $this->view['mod_gutschein']['end'], array('datepicker' => true)); ?>
2888 daniel 30
 
7486 daniel 31
			<?php if (!wpsg_isSizedInt($this->view['edit_id'])) { ?>
32
 
33
				<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_gen', __('Code Generierung', 'wpsg'), array(
34
					'0' => __('Automatisch', 'wpsg'),
35
					'1' => __('Manuell', 'wpsg')
36
				), wpsg_getStr($this->view['mod_gutschein']['gen']), array('help' => 'wpsg_mod_gutschein_gen')); ?>
37
				<div id="wpsg_mod_gutschein_layercode">
38
					<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_code', __('Code', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['code']), array('help' => 'wpsg_mod_gutschein_code')); ?>
39
				</div>
40
 
41
			<?php } else { ?>
2888 daniel 42
 
7486 daniel 43
				<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_code', __('Code', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['code']), array('help' => 'wpsg_mod_gutschein_code')); ?>
44
 
45
			<?php } ?>
46
 
47
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_minvalue', __('Minimaler Warenwert', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['minvalue']), array('help' => 'wpsg_mod_gutschein_minvalue')); ?>
2793 daniel 48
 
7486 daniel 49
			<?php if (!wpsg_isSizedInt($this->view['edit_id'])) { ?>
50
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_count', __('Menge', 'wpsg'), $this->view['mod_gutschein']['count']); ?>
51
			<?php } ?>
52
 
53
			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), $this->view['mod_gutschein']['multi']); ?>
54
			<?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), @$this->view['mod_gutschein']['comment']); ?>
55
			<?php if ($this->hasMod('wpsg_mod_productgroups') && wpsg_isSizedArray($this->view['wpsg_mod_gutschein']['arProductGroups'])) { ?>
56
			<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_productgroups', __('Beschränkung auf Produktgruppen', 'wpsg'), $this->view['wpsg_mod_gutschein']['arProductGroups'], $this->view['mod_gutschein']['productgroups'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProductGroups']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProductGroups'])), 'help' => 'wpsg_mod_gutschein_productgroups')); ?>
57
			<?php } ?>
58
			<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_products', __('Beschränkung auf Produkte', 'wpsg'), @$this->view['wpsg_mod_gutschein']['arProducts'], @$this->view['mod_gutschein']['products'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProducts']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProducts'])), 'help' => 'wpsg_mod_gutschein_products')); ?>
59
		<?php echo wpsg_drawForm_AdminboxEnd(); ?>
5753 daniel 60
 
7486 daniel 61
		<?php if (wpsg_isSizedInt($this->view['edit_id'])) { ?>
62
 
63
			<input type="hidden" name="voucher_id" value="<?php echo $this->view['edit_id']; ?>" />
64
 
65
		<?php } ?>
5753 daniel 66
 
7486 daniel 67
	</form>
7025 daniel 68
 
7486 daniel 69
</div>
7025 daniel 70
 
7486 daniel 71
<script>
7025 daniel 72
 
7486 daniel 73
    jQuery(document).ready(function() {
5753 daniel 74
 
7486 daniel 75
		wpsg_ajaxBind();
76
 
77
		jQuery('#wpsg_mod_gutschein_coupon').on('change', function() {
78
 
79
			jQuery('.wpsg_mod_gutschein_coupon').hide();
80
 
81
			if (jQuery(this).prop('checked')) {
5753 daniel 82
 
7486 daniel 83
				jQuery('.wpsg_mod_gutschein_coupon_1').show();
84
 
85
			} else {
5753 daniel 86
 
7486 daniel 87
				jQuery('.wpsg_mod_gutschein_coupon_0').show();
88
 
89
			}
90
 
91
		}).change();
92
 
5753 daniel 93
        jQuery('#wpsg_mod_gutschein_gen').bind('change', function() {
94
 
95
            if (jQuery(this).val() == '1')
96
            {
97
 
98
                jQuery('#wpsg_mod_gutschein_layercode').show();
99
 
100
            }
101
            else
102
            {
103
 
104
                jQuery('#wpsg_mod_gutschein_layercode').hide();
105
 
106
            }
107
 
108
        } ).change();
109
 
110
    } );
111
 
7486 daniel 112
</script>