Subversion Repositories wpShopGermany4

Rev

Rev 7025 | Rev 7490 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7025 Rev 7486
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
	/**
3
	/**
4
	 * Template für die Maske eines neuen Gutscheins
4
	 * Template für die Maske eines neuen Gutscheins
5
	 */
5
	 */
6
 
6
 
7
?>
7
?>
8
 
8
 
9
<div class="wpsg_voucher" id="wpsg-bs">
9
<div class="content form-horizontal">
10
 
10
 
11
    <nav class="navbar navbar-default">
11
	<form method="POST" id="wpsg_voucher_form" autocomplete="off">
12
 
12
 
13
		<div class="container-fluid">
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
		
14
			<div class="navbar-header">
17
			<div style="margin-top:-15px;"> 
15
				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
18
				<?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_coupon', __('Als Wertgutschein behandeln', 'wpsg'), $this->view['mod_gutschein']['coupon']); ?>
16
			</div>
19
			</div>
-
 
20
		
17
			<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
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(
18
				<ul class="nav navbar-nav">
23
					'w' => __('Absoluter Betrag', 'wpsg'),
19
					<li role="presentation" class="wpsg-voucher-tab-a active"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=index"><?php echo __("Gutscheinverwaltung", "wpsg"); ?></a></li>
-
 
20
                    <li role="presentation" class="active"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Neuer Gutschein", "wpsg"); ?></a></li>
-
 
21
				</ul>
24
					'p' => __('Prozentual', 'wpsg')
22
				<ul class="nav navbar-nav navbar-right">
25
				), $this->view['mod_gutschein']['calc']); ?>
23
 
-
 
24
				</ul>
-
 
25
			</div>
26
			</div>
26
		</div>
-
 
27
 
-
 
28
    </nav>
-
 
29
 
-
 
30
	<div class="wpsg_clear"></div>
-
 
31
 
-
 
32
	<div class="content form-horizontal">
-
 
33
 
27
 
34
        <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=save&noheader=1" enctype="multipart/form-data">
-
 
35
 
-
 
36
            <?php wpsg_drawForm_AdminboxStart(); ?>
-
 
37
                <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Wert', 'wpsg'), $this->view['mod_gutschein']['value']); ?>
-
 
38
                <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_calc', __('Berechnung', 'wpsg'), array(
-
 
39
                    'w' => __('Absoluter Betrag', 'wpsg'),
-
 
40
                    'p' => __('Prozentual', 'wpsg')
-
 
41
                ), $this->view['mod_gutschein']['calc']); ?>
-
 
42
 
-
 
43
                <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), $this->view['mod_gutschein']['start'], array('datepicker' => true)); ?>
-
 
44
                <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), $this->view['mod_gutschein']['end'], array('datepicker' => true)); ?>
-
 
45
 
-
 
46
                <?php if (!wpsg_isSizedInt($this->view['edit_id'])) { ?>
-
 
47
                
-
 
48
                    <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_gen', __('Code Generierung', 'wpsg'), array(
-
 
49
                        '0' => __('Automatisch', 'wpsg'),
-
 
50
                        '1' => __('Manuell', 'wpsg')
-
 
51
                    ), wpsg_getStr($this->view['mod_gutschein']['gen']), array('help' => 'wpsg_mod_gutschein_gen')); ?>
-
 
52
                    <div id="wpsg_mod_gutschein_layercode">
-
 
53
                        <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_code', __('Code', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['code']), array('help' => 'wpsg_mod_gutschein_code')); ?>
-
 
54
                    </div>
-
 
55
            
-
 
56
                <?php } else { ?>
-
 
57
 
-
 
58
                    <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_code', __('Code', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['code']), array('help' => 'wpsg_mod_gutschein_code')); ?>
-
 
59
                    
-
 
60
                <?php } ?>                
-
 
61
            
-
 
62
                <?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')); ?>
-
 
63
 
-
 
64
                <?php if (!wpsg_isSizedInt($this->view['edit_id'])) { ?>
-
 
65
                <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_count', __('Menge', 'wpsg'), $this->view['mod_gutschein']['count']); ?>
-
 
66
                <?php } ?>
-
 
67
                
-
 
68
                <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), $this->view['mod_gutschein']['multi']); ?>
-
 
69
                <?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), @$this->view['mod_gutschein']['comment']); ?>
-
 
70
                <?php if ($this->hasMod('wpsg_mod_productgroups') && wpsg_isSizedArray($this->view['wpsg_mod_gutschein']['arProductGroups'])) { ?>
-
 
71
                <?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')); ?>
28
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), $this->view['mod_gutschein']['start'], array('datepicker' => true)); ?>
72
                <?php } ?>
-
 
73
                <?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')); ?>
29
			<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), $this->view['mod_gutschein']['end'], array('datepicker' => true)); ?>
74
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
-
 
75
 
-
 
76
            <?php if (wpsg_isSizedInt($this->view['edit_id'])) { ?>
-
 
77
            
-
 
78
                <input type="hidden" name="edit_id" value="<?php echo $this->view['edit_id']; ?>" />
-
 
79
                <input type="submit" value="<?php echo __('Gutschein speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
-
 
80
                
-
 
81
            <?php } else { ?>
-
 
82
            
-
 
83
                <input type="submit" value="<?php echo __('Gutschein anlegen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
-
 
84
            
-
 
85
            <?php } ?>
-
 
86
 
30
 
-
 
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 { ?>
-
 
42
 
-
 
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')); ?>
-
 
48
 
-
 
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'])) { ?>
87
        </form>
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(); ?>
-
 
60
 
-
 
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 } ?>
88
 
66
 
89
    </div>
67
	</form>
90
 
68
 
91
</div>
69
</div>
92
 
70
 
93
<script type="text/javascript">/* <![CDATA[ */
71
<script>
94
 
72
 
95
    jQuery(document).ready(function() {
73
    jQuery(document).ready(function() {
96
 
74
 
-
 
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')) {
-
 
82
 
-
 
83
				jQuery('.wpsg_mod_gutschein_coupon_1').show();	
-
 
84
				
-
 
85
			} else {
-
 
86
 
-
 
87
				jQuery('.wpsg_mod_gutschein_coupon_0').show();
-
 
88
				
-
 
89
			}
-
 
90
			
-
 
91
		}).change();
-
 
92
    	
97
        jQuery('#wpsg_mod_gutschein_gen').bind('change', function() {
93
        jQuery('#wpsg_mod_gutschein_gen').bind('change', function() {
98
 
94
 
99
            if (jQuery(this).val() == '1')
95
            if (jQuery(this).val() == '1')
100
            {
96
            {
101
 
97
 
Line 111... Line 107...
111
 
107
 
112
        } ).change();
108
        } ).change();
113
 
109
 
114
    } );
110
    } );
115
 
111
 
116
/* ]]> */</script>
-
 
117
112
</script>
-
 
113
118
114