1144 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Maske eines neuen Gutscheins
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
2793 |
daniel |
8 |
<div class="wrap columns-2">
|
1144 |
daniel |
9 |
<div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
|
|
|
10 |
<h2><?php echo __('Neuer Gutschein', 'wpsg'); ?></h2>
|
|
|
11 |
<br />
|
|
|
12 |
|
|
|
13 |
<?php echo $this->writeBackendMessage(); ?>
|
|
|
14 |
|
|
|
15 |
<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=save&noheader=1" enctype="multipart/form-data">
|
|
|
16 |
|
|
|
17 |
<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Wert', 'wpsg'), $this->view['mod_gutschein']['value']); ?>
|
|
|
18 |
<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_calc', __('Berechnung', 'wpsg'), array(
|
|
|
19 |
'w' => __('Absoluter Betrag', 'wpsg'),
|
|
|
20 |
'p' => __('Prozentual', 'wpsg')
|
|
|
21 |
), $this->view['mod_gutschein']['calc']); ?>
|
|
|
22 |
<?php echo wpsg_drawForm_Date('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), $this->view['mod_gutschein']['start']); ?>
|
|
|
23 |
<?php echo wpsg_drawForm_Date('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), $this->view['mod_gutschein']['end']); ?>
|
2888 |
daniel |
24 |
<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_gen', __('Code Generierung', 'wpsg'), array(
|
|
|
25 |
'0' => __('Automatisch', 'wpsg'),
|
|
|
26 |
'1' => __('Manuell', 'wpsg')
|
4224 |
daniel |
27 |
), wpsg_getStr($this->view['mod_gutschein']['gen']), array('help' => 'wpsg_mod_gutschein_gen')); ?>
|
2888 |
daniel |
28 |
<div id="wpsg_mod_gutschein_layercode">
|
4224 |
daniel |
29 |
<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_code', __('Code', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['code']), array('help' => 'wpsg_mod_gutschein_code')); ?>
|
2888 |
daniel |
30 |
</div>
|
4224 |
daniel |
31 |
<?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')); ?>
|
2888 |
daniel |
32 |
<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_count', __('Menge', 'wpsg'), $this->view['mod_gutschein']['count']); ?>
|
1144 |
daniel |
33 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), $this->view['mod_gutschein']['multi']); ?>
|
4224 |
daniel |
34 |
<?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), $this->view['mod_gutschein']['comment']); ?>
|
2793 |
daniel |
35 |
<?php if ($this->hasMod('wpsg_mod_productgroups') && wpsg_isSizedArray($this->view['wpsg_mod_gutschein']['arProductGroups'])) { ?>
|
|
|
36 |
<?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')); ?>
|
|
|
37 |
<?php } ?>
|
4224 |
daniel |
38 |
<?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')); ?>
|
2793 |
daniel |
39 |
|
1144 |
daniel |
40 |
<p class="submit">
|
|
|
41 |
<input type="submit" value="<?php echo __('Gutschein anlegen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
|
|
|
42 |
</p>
|
2793 |
daniel |
43 |
|
|
|
44 |
<script type="text/javascript">/* <![CDATA[ */
|
1144 |
daniel |
45 |
|
2793 |
daniel |
46 |
jQuery(document).ready(function() {
|
|
|
47 |
|
|
|
48 |
jQuery('.wpsg_form_help').tipTip();
|
2888 |
daniel |
49 |
|
|
|
50 |
jQuery('#wpsg_mod_gutschein_gen').bind('change', function() {
|
|
|
51 |
|
|
|
52 |
if (jQuery(this).val() == '1')
|
|
|
53 |
{
|
|
|
54 |
|
|
|
55 |
jQuery('#wpsg_mod_gutschein_layercode').show();
|
|
|
56 |
|
|
|
57 |
}
|
|
|
58 |
else
|
|
|
59 |
{
|
|
|
60 |
|
|
|
61 |
jQuery('#wpsg_mod_gutschein_layercode').hide();
|
|
|
62 |
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
} ).change();
|
2793 |
daniel |
66 |
|
|
|
67 |
} );
|
|
|
68 |
|
|
|
69 |
/* ]]> */</script>
|
|
|
70 |
|
1144 |
daniel |
71 |
</form>
|
|
|
72 |
</div>
|