Subversion Repositories wpShopGermany4

Rev

Rev 6671 | Rev 7108 | 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
 
6874 hartmut 126
		<?php if ($this->view['pflicht']['firma'] != '2') { ?>
3444 daniel 127
		<div class="wpsg_checkoutblock">
1457 robert 128
			<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
129
			<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
130
			</label>
1461 robert 131
			<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 132
		</div>
6874 hartmut 133
		<?php } ?>
1457 robert 134
 
6874 hartmut 135
		<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
3444 daniel 136
		<div class="wpsg_checkoutblock">
1457 robert 137
			<label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
138
			<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
139
			<select class="wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[profil][title]">
140
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
6107 hartmut 141
				<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
142
				<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
6874 hartmut 143
				<?php } ?>
144
			</select>
1457 robert 145
		</div>
6874 hartmut 146
		<?php } ?>
1457 robert 147
 
6874 hartmut 148
		<?php if ($this->view['pflicht']['vname'] != '2') { ?>
3444 daniel 149
		<div class="wpsg_checkoutblock">
1457 robert 150
			<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
151
			<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
152
			</label>
1461 robert 153
			<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 154
		</div>
6874 hartmut 155
		<?php } ?>
1457 robert 156
 
6874 hartmut 157
		<?php if ($this->view['pflicht']['name'] != '2') { ?>
3444 daniel 158
		<div class="wpsg_checkoutblock">
1457 robert 159
			<label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
1464 robert 160
			<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 161
			</label>
1461 robert 162
			<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 163
		</div>
6874 hartmut 164
		<?php } ?>
1457 robert 165
 
6874 hartmut 166
		<?php if ($this->view['pflicht']['geb'] != '2') { ?>
3444 daniel 167
		<div class="wpsg_checkoutblock">
4918 thomas 168
			<label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
1457 robert 169
			<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
170
			</label>
4941 daniel 171
			<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 172
		</div>
6874 hartmut 173
		<?php } ?>
1457 robert 174
 
6874 hartmut 175
		<?php if ($this->view['pflicht']['email'] != '2') { ?>
3444 daniel 176
		<div class="wpsg_checkoutblock">
1457 robert 177
			<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
178
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
179
			</label>
4904 daniel 180
			<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 181
		</div>
6874 hartmut 182
		<?php } ?>
1457 robert 183
 
1461 robert 184
		<?php if ($this->view['pflicht']['emailconfirm'] == '1') { ?>
3444 daniel 185
		<div class="wpsg_checkoutblock">
1457 robert 186
			<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
187
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
188
			</label>
4904 daniel 189
			<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 190
		</div>
1461 robert 191
		<?php } ?>
192
 
6874 hartmut 193
		<?php if ($this->view['pflicht']['fax'] != '2') { ?>
3444 daniel 194
		<div class="wpsg_checkoutblock">
4904 daniel 195
			<label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
196
			<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 197
			</label>
4904 daniel 198
			<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 199
		</div>
6874 hartmut 200
		<?php } ?>
1457 robert 201
 
6874 hartmut 202
		<?php if ($this->view['pflicht']['tel'] != '2') { ?>
3444 daniel 203
		<div class="wpsg_checkoutblock">
4904 daniel 204
			<label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
205
			<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 206
			</label>
4904 daniel 207
			<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 208
		</div>
6874 hartmut 209
		<?php } ?>
4904 daniel 210
 
6874 hartmut 211
		<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
3444 daniel 212
		<div class="wpsg_checkoutblock">
6053 hartmut 213
			<label for="strasse" class="wpsg_checkout"><?php echo __("Straße Nr.", "wpsg"); ?>
1457 robert 214
			<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
215
			</label>
3444 daniel 216
			<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 217
		</div>
6874 hartmut 218
		<?php } ?>
1457 robert 219
 
6874 hartmut 220
		<?php if ($this->view['pflicht']['plz'] != '2') { ?>
3444 daniel 221
		<div class="wpsg_checkoutblock">
1457 robert 222
			<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
223
			<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
224
			</label>
5253 thomas 225
			<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 226
		</div>
6874 hartmut 227
		<?php } ?>
1457 robert 228
 
6874 hartmut 229
		<?php if ($this->view['pflicht']['ort'] != '2') { ?>
3444 daniel 230
		<div class="wpsg_checkoutblock">
2728 daniel 231
			<label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
1464 robert 232
			<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 233
			</label>
3444 daniel 234
			<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 235
		</div>
6874 hartmut 236
		<?php } ?>
1457 robert 237
 
6874 hartmut 238
		<?php if ($this->view['pflicht']['land'] != '2') { ?>
3444 daniel 239
		<div class="wpsg_checkoutblock">
1457 robert 240
			<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
241
			<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
242
			</label>
243
			<select name="wpsg[profil][land]" class="wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
244
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
245
				<?php foreach ($this->view['laender'] as $l) { ?>
246
				<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 247
				<?php } ?>
3444 daniel 248
			</select>
1457 robert 249
		</div>
6874 hartmut 250
		<?php } ?>
1457 robert 251
 
6874 hartmut 252
		<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
3444 daniel 253
		<div class="wpsg_checkoutblock">
2728 daniel 254
			<label for="wpsg_ustidnr" class="wpsg_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
1464 robert 255
			<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 256
			</label>
3444 daniel 257
			<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 258
		</div>
6874 hartmut 259
		<?php } ?>
1457 robert 260
 
2323 daniel 261
		<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
262
		<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
263
		<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
3444 daniel 264
		<div class="wpsg_checkoutblock">
2323 daniel 265
			<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
266
				<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
5382 daniel 267
			</label>
268
			<?php if ($c['typ'] == '0') { // Textfeld ?>
269
			<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]); ?>" />
270
			<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
271
			<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; ?>]">
272
				<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
273
				<?php foreach ((array)$arAuswahl as $a) { ?>
274
				<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 275
				<?php } ?>
5382 daniel 276
			</select>
277
			<?php } else if ($c['typ'] == '2') { // Checkbox ?>
278
			<input type="hidden" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="0" />
279
			<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"':''); ?> />
280
			<span class="wpsg_clear"></span>
281
			<?php } ?>
2323 daniel 282
		</div>
283
		<?php } } ?>
284
		<?php } ?>
285
		<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
286
		<div class="wpsg_clear"></div>
1457 robert 287
 
3444 daniel 288
		<div class="wpsg_checkoutblock">
1457 robert 289
			<label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
5934 hartmut 290
			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 291
			</label>
5382 daniel 292
			<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 293
		</div>
294
 
3444 daniel 295
		<div class="wpsg_checkoutblock">
1457 robert 296
			<label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
5934 hartmut 297
			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1457 robert 298
			</label>
299
			<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="" />
300
		</div>
301
 
5382 daniel 302
		<div id="wpsg_pwd_info">
303
		<h4><?php echo __('Passwort sollte folgende Regeln befolgen:','wpsg') ?></h4>
304
			<ul>
6671 thomas 305
				<li id="wpsg_pwd_length" class="invalid"><?php echo __('Mit mindestens 8 Zeichen wird das Passwort noch sicherer','wpsg')?></li>
5382 daniel 306
				<li id="wpsg_pwd_letter" class="invalid"><?php echo __('Mit mindestens einem Kleinbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
307
				<li id="wpsg_pwd_capital" class="invalid"><?php echo __('Mit mindestens einem Großbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
308
				<li id="wpsg_pwd_number" class="invalid"><?php echo __('Mit mindestens einer Zahl wird das Passwort noch sicherer','wpsg') ?></li>
309
				<li id="wpsg_pwd_speziell" class="invalid"><?php echo __('Mit mindestens einem Sonderzeichen wird das Passwort noch sicherer','wpsg') ?></li>
310
			</ul>
311
		</div>
312
 
2989 daniel 313
		<div class="wpsg_clear"></div><br />
1067 daniel 314
 
3444 daniel 315
		<div class="wpsg_mandatoryfield_hint">
2780 daniel 316
			<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
317
		</div>
2989 daniel 318
 
319
		<div class="wpsg_clear"></div><br />
320
 
5382 daniel 321
		<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 322
 
1067 daniel 323
		<?php $this->ClearSessionErrors(); ?>
324
 
325
	</form>
326
 
327
</div>