Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Seite für das Profil eines Kunden
5
	 */
6
 
7
?>
1461 robert 8
 
9
<script type="text/javascript">
10
 
11
	jQuery(document).ready(function() {
5382 daniel 12
 
13
		<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
14
 
15
		if (typeof jQuery.validationEngine == "object")
16
		{
17
 
18
			jQuery("#form-profil").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
19
 
20
		}
21
 
22
		<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
23
 
24
		jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
25
		jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
26
		jQuery("#form-profil").validate( {
27
			ignore: '',
28
			errorClass: 'wpsg_error',
29
			onsubmit: false,
30
			showErrors: function(errorMap, errorList) {
31
 
32
				this.defaultShowErrors();
33
 
34
			}
35
		} );
36
 
37
		jQuery('#wpsg_mod_kundenverwaltung_save').bind('click', function() {
38
 
39
			var bReturn = jQuery('#form-profil').validate().form();
40
			if (jQuery('#form-profil input.wpsg_error').length > 0) jQuery('#form-profil input.wpsg_error')[0].focus();
41
			return bReturn;
42
 
43
		} );
1461 robert 44
 
5382 daniel 45
		<?php } ?>
1461 robert 46
 
5382 daniel 47
// Visualisierung der Passwortstärke
48
 
49
		jQuery('input[type=password]').keyup(function(){
50
 
51
			var password = jQuery(this).val();
52
 
53
			if (password.length < 6) {
54
 
55
				jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
56
 
57
			}else{
58
 
59
				jQuery('#wpsg_pwd_length').removeClass('invalid').addClass('valid');
60
 
61
			}
62
 
63
			if (password.match(/([a-z])/)) {
64
 
65
				jQuery('#wpsg_pwd_letter').removeClass('invalid').addClass('valid');
66
 
67
			}else{
68
 
69
				jQuery('#wpsg_pwd_letter').removeClass('valid').addClass('invalid');
70
 
71
			}
72
 
73
			if (password.match(/([A-Z])/)) {
74
 
75
				jQuery('#wpsg_pwd_capital').removeClass('invalid').addClass('valid');
76
 
77
			}else{
78
 
79
				jQuery('#wpsg_pwd_capital').removeClass('valid').addClass('invalid');
80
 
81
			}
82
 
83
			if (password.match(/([0-9])/)) {
84
 
85
				jQuery('#wpsg_pwd_number').removeClass('invalid').addClass('valid');
86
 
87
			}else{
88
 
89
				jQuery('#wpsg_pwd_number').removeClass('valid').addClass('invalid');
90
 
91
			}
92
 
93
			if (password.match(/([~,!,%,@,&,#,°,^,$,?,_,*,§])/)) {
94
 
95
				jQuery('#wpsg_pwd_speziell').removeClass('invalid').addClass('valid');
96
 
97
			}else{
98
 
99
				jQuery('#wpsg_pwd_speziell').removeClass('valid').addClass('invalid');
100
 
101
			}
102
 
103
 
104
			jQuery('#wpsg_pwd_info').show();
105
 
106
			jQuery(this).blur(function(){
107
 
108
				jQuery('#wpsg_pwd_info').hide();
109
 
110
			});
111
 
112
		});
113
 
114
	});
1461 robert 115
 
116
</script>
117
 
3444 daniel 118
<div class="wpsg wpsg_profil wpsg_checkout">
1463 robert 119
 
1067 daniel 120
	<?php echo $this->writeFrontendMessage(); ?>
121
 
1461 robert 122
	<form method="post" id="form-profil" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getProfilURL'); ?>">
1457 robert 123
 
124
		<h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
125
 
3444 daniel 126
		<div class="wpsg_checkoutblock">
1457 robert 127
			<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
128
			<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
129
			</label>
1461 robert 130
			<input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[profil][firma]" value="<?php echo htmlspecialchars($this->view['data']['firma']); ?>" />
1457 robert 131
		</div>
132
 
3444 daniel 133
		<div class="wpsg_checkoutblock">
1457 robert 134
			<label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
135
			<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
136
			<select class="wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[profil][title]">
137
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
138
				<?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
139
				<option value="<?php echo $t; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
140
				<?php } ?>
3444 daniel 141
			</select>
1457 robert 142
		</div>
143
 
3444 daniel 144
		<div class="wpsg_checkoutblock">
1457 robert 145
			<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
146
			<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
147
			</label>
1461 robert 148
			<input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[profil][vname]" value="<?php echo htmlspecialchars($this->view['data']['vname']); ?>" />
1457 robert 149
		</div>
150
 
3444 daniel 151
		<div class="wpsg_checkoutblock">
1457 robert 152
			<label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
1464 robert 153
			<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 154
			</label>
1461 robert 155
			<input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[profil][name]" value="<?php echo htmlspecialchars($this->view['data']['name']); ?>" />
1457 robert 156
		</div>
157
 
3444 daniel 158
		<div class="wpsg_checkoutblock">
4918 thomas 159
			<label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
1457 robert 160
			<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
161
			</label>
4941 daniel 162
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[profil][geb]" value="<?php echo htmlspecialchars($this->view['data']['geb']); ?>" />
1457 robert 163
		</div>
164
 
3444 daniel 165
		<div class="wpsg_checkoutblock">
1457 robert 166
			<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
167
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
168
			</label>
4904 daniel 169
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[profil][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
1457 robert 170
		</div>
171
 
1461 robert 172
		<?php if ($this->view['pflicht']['emailconfirm'] == '1') { ?>
173
 
3444 daniel 174
		<div class="wpsg_checkoutblock">
1457 robert 175
			<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
176
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
177
			</label>
4904 daniel 178
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[profil][email2]" value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>" />
1457 robert 179
		</div>
180
 
1461 robert 181
		<?php } ?>
182
 
3444 daniel 183
		<div class="wpsg_checkoutblock">
4904 daniel 184
			<label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
185
			<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 186
			</label>
4904 daniel 187
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[profil][fax]" value="<?php echo htmlspecialchars($this->view['data']['fax']); ?>" />
1457 robert 188
		</div>
189
 
3444 daniel 190
		<div class="wpsg_checkoutblock">
4904 daniel 191
			<label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
192
			<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 193
			</label>
4904 daniel 194
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[profil][tel]" value="<?php echo htmlspecialchars($this->view['data']['tel']); ?>" />
1457 robert 195
		</div>
4904 daniel 196
 
3444 daniel 197
		<div class="wpsg_checkoutblock">
1457 robert 198
			<label for="strasse" class="wpsg_checkout"><?php echo __("Strasse Nr.", "wpsg"); ?>
199
			<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
200
			</label>
3444 daniel 201
			<input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[profil][strasse]" value="<?php echo htmlspecialchars($this->view['data']['strasse']); ?>" />
1457 robert 202
		</div>
203
 
3444 daniel 204
		<div class="wpsg_checkoutblock">
1457 robert 205
			<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
206
			<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
207
			</label>
5253 thomas 208
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[profil][plz]" value="<?php echo htmlspecialchars($this->view['data']['plz']); ?>" />
1457 robert 209
		</div>
210
 
3444 daniel 211
		<div class="wpsg_checkoutblock">
2728 daniel 212
			<label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
1464 robert 213
			<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 214
			</label>
3444 daniel 215
			<input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[profil][ort]" value="<?php echo htmlspecialchars($this->view['data']['ort']); ?>" />
1457 robert 216
		</div>
217
 
3444 daniel 218
		<div class="wpsg_checkoutblock">
1457 robert 219
			<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
220
			<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
221
			</label>
222
			<select name="wpsg[profil][land]" class="wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
223
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
224
				<?php foreach ($this->view['laender'] as $l) { ?>
225
				<option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['data']['land'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($l['name']); ?></option>
1067 daniel 226
				<?php } ?>
3444 daniel 227
			</select>
1457 robert 228
		</div>
229
 
3444 daniel 230
		<div class="wpsg_checkoutblock">
2728 daniel 231
			<label for="wpsg_ustidnr" class="wpsg_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
1464 robert 232
			<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 233
			</label>
3444 daniel 234
			<input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[profil][ustidnr]" value="<?php echo htmlspecialchars($this->view['data']['ustidnr']); ?>" />
1457 robert 235
		</div>
236
 
2323 daniel 237
		<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
238
		<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
239
		<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
3444 daniel 240
		<div class="wpsg_checkoutblock">
2323 daniel 241
			<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
242
				<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
5382 daniel 243
			</label>
244
			<?php if ($c['typ'] == '0') { // Textfeld ?>
245
			<input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[profil][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc($this->view['data']['custom'][$c_id]); ?>" />
246
			<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
247
			<select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[profil][custom][<?php echo $c_id; ?>]">
248
				<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
249
				<?php foreach ((array)$arAuswahl as $a) { ?>
250
				<option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['data']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
2323 daniel 251
				<?php } ?>
5382 daniel 252
			</select>
253
			<?php } else if ($c['typ'] == '2') { // Checkbox ?>
254
			<input type="hidden" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="0" />
255
			<input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc(($this->view['data']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
256
			<span class="wpsg_clear"></span>
257
			<?php } ?>
2323 daniel 258
		</div>
259
		<?php } } ?>
260
		<?php } ?>
261
		<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
262
		<div class="wpsg_clear"></div>
1457 robert 263
 
3444 daniel 264
		<div class="wpsg_checkoutblock">
1457 robert 265
			<label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
266
			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
267
			</label>
5382 daniel 268
			<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pw1" name="wpsg[mod_kundenverwaltung][register_pwd1]" value="" /><span id="wpsg_mod_kundenverwaltung_password_result"></span>
1457 robert 269
		</div>
270
 
3444 daniel 271
		<div class="wpsg_checkoutblock">
1457 robert 272
			<label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
273
			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
274
			</label>
275
			<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][register_pwd2]" value="" />
276
		</div>
277
 
5382 daniel 278
		<div id="wpsg_pwd_info">
279
		<h4><?php echo __('Passwort sollte folgende Regeln befolgen:','wpsg') ?></h4>
280
			<ul>
281
				<li id="wpsg_pwd_length" class="invalid"><?php echo __('Das Passwort ist zu kurz!','wpsg')?></li>
282
				<li id="wpsg_pwd_letter" class="invalid"><?php echo __('Mit mindestens einem Kleinbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
283
				<li id="wpsg_pwd_capital" class="invalid"><?php echo __('Mit mindestens einem Großbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
284
				<li id="wpsg_pwd_number" class="invalid"><?php echo __('Mit mindestens einer Zahl wird das Passwort noch sicherer','wpsg') ?></li>
285
				<li id="wpsg_pwd_speziell" class="invalid"><?php echo __('Mit mindestens einem Sonderzeichen wird das Passwort noch sicherer','wpsg') ?></li>
286
			</ul>
287
		</div>
288
 
2989 daniel 289
		<div class="wpsg_clear"></div><br />
1067 daniel 290
 
3444 daniel 291
		<div class="wpsg_mandatoryfield_hint">
2780 daniel 292
			<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
293
		</div>
2989 daniel 294
 
295
		<div class="wpsg_clear"></div><br />
296
 
5382 daniel 297
		<input type="submit" class="wpsg_button wpsg_saveButton" id="wpsg_mod_kundenverwaltung_save" value="<?php echo __('Speichern', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_save" />
2780 daniel 298
 
1067 daniel 299
		<?php $this->ClearSessionErrors(); ?>
300
 
301
	</form>
302
 
303
</div>