Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Rev 5439 | 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('.wpsg_form_help').tipTip();
81
 
82
	    jQuery("#normal-sortables, #side-sortables").sortable({
83
			connectWith: ".meta-box-sortables",
84
			placeholder: 'wpsg_placeholder',
85
			dropOnEmpty: true,
86
			cursor: 'move',
87
			handle: '.wpsg_handlediv',
88
			grid: [50, 20],
89
			forceHelperSize: true,
90
			forcePlaceholderSize: true,
91
			opacity: 0.8,
92
			stop: function(e,ui) {
93
 
94
				var ser = jQuery("#normal-sortables").sortable("serialize");
95
				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
96
 
97
				jQuery.cookie('wpsg_customergroup_view_normal', ser);
98
 
99
				var ser = jQuery("#side-sortables").sortable("serialize");
100
				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
101
 
102
				jQuery.cookie('wpsg_customergroup_view_side', ser);
103
 
104
			},
105
			receive: function(e, ui) {
106
			}
107
		});
108
 
109
	    if (jQuery.cookie('wpsg_customergroup_view_normal') != null)
110
		{
111
 
112
			var divs = jQuery.cookie('wpsg_customergroup_view_normal').split(',').reverse();
113
 
114
			for (index in divs)
115
			{
116
 
117
				jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
118
 
119
			}
120
 
121
		}
122
 
123
		if (jQuery.cookie('wpsg_customergroup_view_side') != null)
124
		{
125
 
126
			var divs = jQuery.cookie('wpsg_customergroup_view_side').split(',').reverse();
127
 
128
			for (index in divs)
129
			{
130
 
131
				jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
132
 
133
			}
134
 
135
		}
136
 
137
		jQuery('.wpsg_handlediv').bind('click', function() {
138
			jQuery(this).next().toggle();
139
 
140
			var arClose = new Array();
141
			jQuery('.wpsg_customergroup_view .postbox .inside:hidden').each(function() {
142
				arClose.push(jQuery(this).parent().attr("id"));
143
			} );
144
 
145
			jQuery.cookie('wpsg_customergroup_closed', arClose.join(','));
146
 
147
		} );
148
 
149
		if (jQuery.cookie('wpsg_customergroup_closed') != null)
150
		{
151
 
152
			var arClose = jQuery.cookie('wpsg_customergroup_closed').split(',');
153
 
154
			for (index in arClose)
155
			{
156
 
157
				jQuery('#' + arClose[index] + ' .inside').hide();
158
 
159
			}
160
 
161
		}
162
 
163
	} );
164
 
165
/* ]]> */</script>