Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
3656 daniel 1
<?php
2
 
3
	/**
4
	 * Template für das Anlegen und Bearbeiten einer Kundengruppe im Backend
5
	 */
6
 
7
?>
8
<div class="wrap wpsg_mod_kundenverwaltung_customergroup_addedit wpsg_customergroup_view wpsg_produkt_addedit wrap columns-2">
9
	<div class="icon32 icon32-posts-post" id="icon-add"><br /></div>
10
 
11
	<h2>
12
		<?php if ($this->view['mode'] == 'edit') { ?>
13
			<?php echo __('Kundengruppe bearbeiten', 'wpsg'); ?>
14
		<?php } else { ?>
15
			<?php echo __('Kundengruppe anlegen', 'wpsg'); ?>
16
		<?php } ?>
17
	</h2>
18
	<br />
19
 
20
	<?php echo $this->writeBackendMessage(); ?>
21
 
22
	<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=save&noheader=1" enctype="multipart/form-data">
23
 
24
		<?php if ($this->view['mode'] == 'edit') { ?>
25
		<input type="hidden" name="edit_id" value="<?php echo $this->view['data']->id; ?>" />
26
		<?php } ?>
27
 
28
		<div id="postbox" class="metabox-holder has-right-sidebar">
29
 
30
			<div id="side-info-column" class="inner-sidebar" style="width:386px;">
31
 
32
				<div id="side-sortables" class="meta-box-sortables ui-sortable" style="width:380px;">
33
 
34
					<?php $this->callMods('customergroup_edit', array(&$this->view['data'])); ?>
35
 
36
				</div>
37
 
38
			</div>
39
 
40
			<div id="post-body">
41
 
42
				<div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
43
 
44
					<div id="wpsg_customergroup_general" class="postbox">
45
						<h3 class="wpsg_handlediv">
46
							<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
47
							<span><?php echo __('Allgemein', 'wpsg'); ?></span>
48
						</h3>
49
						<div class="inside">
50
 
51
							<?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung[name]', __('Name', 'wpsg'), $this->view['data']->name); ?>
52
							<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung[calculation]', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(
3657 daniel 53
								-1 => __('Standard', 'wpsg'),
3656 daniel 54
								WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'),
55
								WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')
56
							), $this->view['data']->calculation); ?>
57
 
58
						</div>
59
					</div>
60
 
61
				</div>
62
 
63
				<p class="submit">
64
					<input type="submit" value="<?php echo __('Kundengruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
65
					<input type="submit" value="<?php echo __('Kundengruppe speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
66
				</p>
67
 
68
			</div>
69
 
70
		</div>
71
 
72
	</form>
73
 
74
</div>
75
 
76
<script type="text/javascript">/* <![CDATA[ */
77
 
78
	jQuery(document).ready( function() {
79
 
80
	    jQuery("#normal-sortables, #side-sortables").sortable({
81
			connectWith: ".meta-box-sortables",
82
			placeholder: 'wpsg_placeholder',
83
			dropOnEmpty: true,
84
			cursor: 'move',
85
			handle: '.wpsg_handlediv',
86
			grid: [50, 20],
87
			forceHelperSize: true,
88
			forcePlaceholderSize: true,
89
			opacity: 0.8,
90
			stop: function(e,ui) {
91
 
92
				var ser = jQuery("#normal-sortables").sortable("serialize");
93
				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
94
 
95
				jQuery.cookie('wpsg_customergroup_view_normal', ser);
96
 
97
				var ser = jQuery("#side-sortables").sortable("serialize");
98
				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
99
 
100
				jQuery.cookie('wpsg_customergroup_view_side', ser);
101
 
102
			},
103
			receive: function(e, ui) {
104
			}
105
		});
106
 
107
	    if (jQuery.cookie('wpsg_customergroup_view_normal') != null)
108
		{
109
 
110
			var divs = jQuery.cookie('wpsg_customergroup_view_normal').split(',').reverse();
111
 
112
			for (index in divs)
113
			{
114
 
115
				jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
116
 
117
			}
118
 
119
		}
120
 
121
		if (jQuery.cookie('wpsg_customergroup_view_side') != null)
122
		{
123
 
124
			var divs = jQuery.cookie('wpsg_customergroup_view_side').split(',').reverse();
125
 
126
			for (index in divs)
127
			{
128
 
129
				jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
130
 
131
			}
132
 
133
		}
134
 
135
		jQuery('.wpsg_handlediv').bind('click', function() {
136
			jQuery(this).next().toggle();
137
 
138
			var arClose = new Array();
139
			jQuery('.wpsg_customergroup_view .postbox .inside:hidden').each(function() {
140
				arClose.push(jQuery(this).parent().attr("id"));
141
			} );
142
 
143
			jQuery.cookie('wpsg_customergroup_closed', arClose.join(','));
144
 
145
		} );
146
 
147
		if (jQuery.cookie('wpsg_customergroup_closed') != null)
148
		{
149
 
150
			var arClose = jQuery.cookie('wpsg_customergroup_closed').split(',');
151
 
152
			for (index in arClose)
153
			{
154
 
155
				jQuery('#' + arClose[index] + ' .inside').hide();
156
 
157
			}
158
 
159
		}
160
 
161
	} );
162
 
163
/* ]]> */</script>