Subversion Repositories wpShopGermany4

Rev

Rev 8123 | Rev 8161 | 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
	 * Template für die Registrierungsseite
5
	 */
6
 
7
?>
1460 david 8
<?php //wpsg_debug($this->view['error']) ?>
9
<script type="text/javascript">
10
 
11
	jQuery(document).ready(function() {
3602 daniel 12
 
13
		<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
14
 
8123 karl 15
			if (typeof jQuery.validationEngine == "object")
16
			{
17
 
18
				jQuery("#form-step2").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
19
 
20
				jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
21
					jQuery("#form-step2").validationEngine('detach');
22
				});
3602 daniel 23
 
8123 karl 24
			}
1460 david 25
 
3602 daniel 26
		<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
27
 
8123 karl 28
			jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
29
			jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
30
			jQuery("#form-step2").validate( {
31
				ignore: '',
32
				errorClass: 'wpsg_error',
33
				onsubmit: false,
34
				showErrors: function(errorMap, errorList) {
3602 daniel 35
 
8123 karl 36
					this.defaultShowErrors();
3602 daniel 37
 
8123 karl 38
				}
39
			} );
3602 daniel 40
 
8123 karl 41
			jQuery('.wpsg_registerButton').bind('click', function() {
3602 daniel 42
 
8123 karl 43
				var bReturn = jQuery('#form-step2').validate().form();
44
				if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
45
				return bReturn;
46
 
47
			} );
3602 daniel 48
 
49
		<?php } ?>
50
 
5382 daniel 51
 
8123 karl 52
		// Visualisierung der Passwortstärke
5382 daniel 53
		jQuery('input[type=password]').keyup(function(){
54
 
55
			var password = jQuery(this).val();
56
 
57
			if (password.length < 6) {
58
 
59
				jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
60
 
61
			}else{
62
 
63
				jQuery('#wpsg_pwd_length').removeClass('invalid').addClass('valid');
64
 
65
			}
66
 
67
			if (password.match(/([a-z])/)) {
68
 
69
				jQuery('#wpsg_pwd_letter').removeClass('invalid').addClass('valid');
70
 
71
			}else{
72
 
73
				jQuery('#wpsg_pwd_letter').removeClass('valid').addClass('invalid');
74
 
75
			}
76
 
77
			if (password.match(/([A-Z])/)) {
78
 
79
				jQuery('#wpsg_pwd_capital').removeClass('invalid').addClass('valid');
80
 
81
			}else{
82
 
83
				jQuery('#wpsg_pwd_capital').removeClass('valid').addClass('invalid');
84
 
85
			}
86
 
87
			if (password.match(/([0-9])/)) {
88
 
89
				jQuery('#wpsg_pwd_number').removeClass('invalid').addClass('valid');
90
 
91
			}else{
92
 
93
				jQuery('#wpsg_pwd_number').removeClass('valid').addClass('invalid');
94
 
95
			}
96
 
97
			if (password.match(/([~,!,%,@,&,#,°,^,$,?,_,*,§])/)) {
98
 
99
				jQuery('#wpsg_pwd_speziell').removeClass('invalid').addClass('valid');
100
 
101
			}else{
102
 
103
				jQuery('#wpsg_pwd_speziell').removeClass('valid').addClass('invalid');
104
 
105
			}
106
 
107
			jQuery('#wpsg_pwd_info').show();
108
 
109
			jQuery(this).blur(function(){
110
 
111
				jQuery('#wpsg_pwd_info').hide();
112
 
113
			});
114
 
115
		});
1460 david 116
 
8123 karl 117
		// Validierung Spam
118
		<?php
119
			if (isset($_GET["wpsg_spam_email"]) && $_GET["wpsg_spam_email"] != "") {
120
				echo "<p>Sie haben ein Feld ausgefüllt, das frei bleiben muss.</p>";
121
				exit;
122
			}
123
		?>
5382 daniel 124
 
125
	});
7184 thomas 126
 
127
	<?php /* Copy&Paste für das Eingabefeld "E-Mail-Wiederholung sperren */ ?>
128
	window.onload = function() {
129
 
7247 daniel 130
		var email2 = document.getElementById('email2');
7184 thomas 131
 
132
		email2.onpaste = function(e) {
133
 
134
			e.preventDefault();
135
 
136
		}
137
	}
5382 daniel 138
 
1460 david 139
</script>
140
 
3445 daniel 141
<div class="wpsg wpsg_checkout wpsg_register">
1067 daniel 142
 
8123 karl 143
	<style>
144
        .placeholder { display: none !important; }
145
        .m1_dsgvo_layer { position:relative; width:100%; height:100px; margin-bottom: 30px; }
146
        .m1_dsgvo_layer > .placeholder_text { height:100px; font-size: small; position:relative; left:0; top:0; z-index:2; background-color:rgba(0, 0, 0, 0.75); display:flex; justify-content:center; align-items:center; color:#FFFFFF; flex-direction:column; padding:1rem; text-align:center; }
147
        .m1_dsgvo_layer > .placeholder_text > button { color: rgba(0, 0, 0, 0.75); margin-top: 1rem;}
148
    </style>
1067 daniel 149
 
1460 david 150
	<form id="form-step2" method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
8123 karl 151
 
152
		<?php echo $this->writeFrontendMessage(); ?>
153
 
154
		<h2><?php echo __('Registrierung', 'sto'); ?></h2>
1067 daniel 155
 
6874 hartmut 156
		<?php if ($this->view['pflicht']['firma'] != '2') { ?>
3447 daniel 157
		<div class="wpsg_checkoutblock">
1460 david 158
			<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
159
			<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
160
			</label>
6081 hartmut 161
			<input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[register][firma]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['firma'])); ?>" />
1460 david 162
		</div>
6874 hartmut 163
		<?php } ?>
1460 david 164
 
6874 hartmut 165
		<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
3447 daniel 166
		<div class="wpsg_checkoutblock">
1460 david 167
			<label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
168
			<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
169
			<select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[register][title]">
170
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
6107 hartmut 171
				<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
172
				<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
1460 david 173
			<?php } ?>
174
			</select>
175
		</div>
6874 hartmut 176
		<?php } ?>
1460 david 177
 
6874 hartmut 178
		<?php if ($this->view['pflicht']['vname'] != '2') { ?>
3447 daniel 179
		<div class="wpsg_checkoutblock">
3649 daniel 180
			<label for="vname" class="wpsg_register"><?php echo __("Vorname", "wpsg"); ?>
1460 david 181
			<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
182
			</label>
6081 hartmut 183
			<input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[register][vname]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['vname'])); ?>" />
1460 david 184
		</div>
6874 hartmut 185
		<?php } ?>
1460 david 186
 
6874 hartmut 187
		<?php if ($this->view['pflicht']['name'] != '2') { ?>
3447 daniel 188
		<div class="wpsg_checkoutblock">
1460 david 189
			<label for="name" class="wpsg_register"><?php echo __("Name", "wpsg"); ?>
6081 hartmut 190
			<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 191
			</label>
6081 hartmut 192
			<input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[register][name]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['name'])); ?>" />
1460 david 193
		</div>
6874 hartmut 194
		<?php } ?>
1460 david 195
 
6874 hartmut 196
		<?php if ($this->view['pflicht']['email'] != '2') { ?>
3447 daniel 197
		<div class="wpsg_checkoutblock">
3649 daniel 198
			<label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse", "wpsg"); ?>
1460 david 199
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
200
			</label>
6081 hartmut 201
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[register][email]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['email'])); ?>" />
1460 david 202
		</div>
6874 hartmut 203
		<?php } ?>
1460 david 204
 
6874 hartmut 205
		<?php if ($this->view['pflicht']['email'] != '2') { ?>
3447 daniel 206
		<div class="wpsg_checkoutblock">
7666 daniel 207
			<label for="email2" class="wpsg_register"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
1460 david 208
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
209
			</label>
6081 hartmut 210
			<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[register][email2]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['register']['email2'])); ?>" />
1460 david 211
		</div>
6874 hartmut 212
		<?php } ?>
1460 david 213
 
3447 daniel 214
		<div class="wpsg_checkoutblock">
3649 daniel 215
			<label for="pwd1" class="wpsg_register"><?php echo __("Passwort", "wpsg"); ?>
6081 hartmut 216
			<?php if (wpsg_getStr($this->view['pflicht']['pwd1']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 217
			</label>
6081 hartmut 218
			<input class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd1']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd1" name="wpsg[register][register_pwd1]" value="" /><span id="wpsg_checkoutblock_password_result"></span>
1460 david 219
		</div>
220
 
3447 daniel 221
		<div class="wpsg_checkoutblock">
3649 daniel 222
			<label for="pwd2" class="wpsg_register"><?php echo __("Passwort (Wiederholung)", "wpsg"); ?>
6081 hartmut 223
			<?php if (wpsg_getStr($this->view['pflicht']['pwd2']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 224
			</label>
6081 hartmut 225
			<input class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd2']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd2" name="wpsg[register][register_pwd2]" value="" />
1460 david 226
		</div>
227
 
5382 daniel 228
		<div id="wpsg_pwd_info">
229
			<h4><?php echo __('Passwort sollte folgende Regeln befolgen:','wpsg') ?></h4>
230
			<ul>
6671 thomas 231
				<li id="wpsg_pwd_length" class="invalid"><?php echo __('Mit mindestens 8 Zeichen wird das Passwort noch sicherer','wpsg')?></li>
5382 daniel 232
				<li id="wpsg_pwd_letter" class="invalid"><?php echo __('Mit mindestens einem Kleinbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
233
				<li id="wpsg_pwd_capital" class="invalid"><?php echo __('Mit mindestens einem Großbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
234
				<li id="wpsg_pwd_number" class="invalid"><?php echo __('Mit mindestens einer Zahl wird das Passwort noch sicherer','wpsg') ?></li>
235
				<li id="wpsg_pwd_speziell" class="invalid"><?php echo __('Mit mindestens einem Sonderzeichen wird das Passwort noch sicherer','wpsg') ?></li>
236
			</ul>
237
		</div>
238
 
6874 hartmut 239
		<?php if ($this->view['pflicht']['geb'] != '2') { ?>
3447 daniel 240
		<div class="wpsg_checkoutblock">
4918 thomas 241
			<label for="geb" class="wpsg_register"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
1460 david 242
			<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
243
			</label>
6081 hartmut 244
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[register][geb]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['geb'])); ?>" />
1460 david 245
		</div>
6874 hartmut 246
		<?php } ?>
247
 
248
		<?php if ($this->view['pflicht']['fax'] != '2') { ?>
3447 daniel 249
		<div class="wpsg_checkoutblock">
1460 david 250
			<label for="fax" class="wpsg_register"><?php echo __("Fax.", "wpsg"); ?>
251
			<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
252
			</label>
6081 hartmut 253
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[register][fax]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['fax'])); ?>" />
1460 david 254
		</div>
6874 hartmut 255
		<?php } ?>
1460 david 256
 
6874 hartmut 257
		<?php if ($this->view['pflicht']['tel'] != '2') { ?>
3447 daniel 258
		<div class="wpsg_checkoutblock">
1460 david 259
			<label for="tel" class="wpsg_register"><?php echo __("Tel.", "wpsg"); ?>
260
			<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
261
			</label>
6081 hartmut 262
			<input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[register][tel]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['tel'])); ?>" />
1460 david 263
		</div>
6874 hartmut 264
		<?php } ?>
1460 david 265
 
6874 hartmut 266
		<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
7247 daniel 267
 
7944 daniel 268
			<?php if (($this->view['pflicht']['wpsg_showNr']??0) === '1') { ?>
7247 daniel 269
 
270
				<div class="wpsg_checkoutblock" id="wpsg_streetnr">
7316 thomas 271
					<label for="strasse" class="street wpsg_checkout"><?php echo __('Straße:', 'wpsg'); ?>
7247 daniel 272
						<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
273
						<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[register][strasse]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['strasse'])); ?>" />
274
					</label>
275
					<label for="nr" class="nr wpsg_checkout"><?php echo __('Nr:', 'wpsg'); ?>
276
						<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
277
						<input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("nr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="nr" name="wpsg[register][nr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['nr'])); ?>" />
278
					</label>
279
				</div>
280
 
281
			<?php } else { ?>
282
 
283
				<div class="wpsg_checkoutblock">
284
					<label for="strasse" class="wpsg_register"><?php echo __("Straße Nr.", "wpsg"); ?>
285
						<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
286
					</label>
287
					<input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[register][strasse]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['strasse'])); ?>" />
288
				</div>
289
 
290
			<?php } ?>
291
 
6874 hartmut 292
		<?php } ?>
8123 karl 293
 
6874 hartmut 294
		<?php if ($this->view['pflicht']['plz'] != '2') { ?>
3447 daniel 295
		<div class="wpsg_checkoutblock">
3649 daniel 296
			<label for="plz" class="wpsg_register"><?php echo __("Postleitzahl", "wpsg"); ?>
8123 karl 297
				<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 298
			</label>
8123 karl 299
			<input class="<?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['plz'])); ?>" />
1460 david 300
		</div>
6874 hartmut 301
		<?php } ?>
1460 david 302
 
6874 hartmut 303
		<?php if ($this->view['pflicht']['ort'] != '2') { ?>
3447 daniel 304
		<div class="wpsg_checkoutblock">
3649 daniel 305
			<label for="ort" class="wpsg_register"><?php echo __("Ort", "wpsg"); ?>
8123 karl 306
				<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 307
			</label>
6081 hartmut 308
			<input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[register][ort]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['ort'])); ?>" />
1460 david 309
		</div>
6874 hartmut 310
		<?php } ?>
1460 david 311
 
6874 hartmut 312
		<?php if ($this->view['pflicht']['land'] != '2') { ?>
3447 daniel 313
		<div class="wpsg_checkoutblock">
3649 daniel 314
			<label for="wpsg_land" class="wpsg_register"><?php echo __("Land", "wpsg"); ?>
8123 karl 315
				<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 316
			</label>
317
			<select name="wpsg[register][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
318
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
319
				<?php foreach ($this->view['laender'] as $l) { ?>
320
				<option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['data']['land'])?'selected="selected"':(($this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc($l['name']); ?></option>
1067 daniel 321
				<?php } ?>
1460 david 322
			</select>
323
		</div>
6874 hartmut 324
		<?php } ?>
1067 daniel 325
 
6874 hartmut 326
		<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
3447 daniel 327
		<div class="wpsg_checkoutblock">
3649 daniel 328
			<label for="wpsg_ustidnr" class="wpsg_register"><?php echo __("UStIdNr.", "wpsg"); ?>
8123 karl 329
				<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 330
			</label>
6081 hartmut 331
			<input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[register][ustidnr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['ustidnr'])); ?>" />
1460 david 332
		</div>
6874 hartmut 333
		<?php } ?>
1067 daniel 334
 
2323 daniel 335
		<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
336
		<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
337
		<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
3447 daniel 338
		<div class="wpsg_checkoutblock">
2323 daniel 339
			<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
340
				<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
341
				<?php if ($c['typ'] == '0') { // Textfeld ?>
6874 hartmut 342
				<input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[register][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc(@$this->view['data']['custom'][$c_id]); ?>" />
2323 daniel 343
				<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
344
				<select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[register][custom][<?php echo $c_id; ?>]">
345
					<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
346
					<?php foreach ((array)$arAuswahl as $a) { ?>
6874 hartmut 347
					<option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == wpsg_getStr($this->view['data']['custom'][$c_id]))?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
2323 daniel 348
					<?php } ?>
349
				</select>
350
				<?php } else if ($c['typ'] == '2') { // Checkbox ?>
351
				<input type="hidden" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="0" />
6874 hartmut 352
				<input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc((@$this->view['data']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
4925 thomas 353
				<span class="wpsg_clear"></span>
2323 daniel 354
				<?php } ?>
355
			</label>
356
		</div>
357
		<?php } } ?>
358
		<?php } ?>
359
		<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
360
		<div class="wpsg_clear"></div>
7140 daniel 361
 
8123 karl 362
		<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register') === '1') { ?>
363
			<div class="wpsg_checkoutblock">
364
				<label class="recaptcha_v2_checkout ">
365
 
366
					<?php echo __('SPAM Schutz Abfrage'); ?> <span class="wpsg_required">*</span>:
367
 
368
					<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer') != '1') { ?>
369
						<div class="g-recaptcha" data-sitekey="<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>"></div>
370
					<?php } else { ?>
371
						<div class="wpsg_recaptcha placeholder"> <!-- Platzhalter für das Google ReCAPTCHA --> </div>
372
						<div class="m1_dsgvo_layer ">
373
							<div class="placeholder_text">
374
								<strong>Datenschutz ist uns wichtig!</strong>
375
								Daher wird das Google ReCAPTCHA erst geladen, wenn sie der Verwendung des Drittanbieters "Google LLC" zustimmen durch den möglicherweise Cookies gesetzt werden.<br />
376
								<button class="layer_link wpsg_required">Ich bin damit einverstanden.</button>
377
							</div>
378
						</div>
379
					<?php } ?>
380
 
381
				</label>
382
			</div>
383
			<div class="wpsg_clear"></div>
384
		<?php } ?>
385
 
386
		<?php if ($this->get_option('wpsg_mod_kundenverwaltung_mathcaptcha') === '1') {
387
 
388
			$number1 = rand(0, 9);
389
			$number2 = rand(0, 10);
390
			$arOperator = ['+', '-', '*']; $operator = $arOperator[array_rand($arOperator)];
391
 
392
			$time = time();
393
 
394
			switch ($operator) {
395
 
396
				case '+': $captcha_result = $number1 + $number2; break;
397
				case '-': $captcha_result = $number1 - $number2; break;
398
				case '*': $captcha_result = $number1 * $number2; break;
399
 
400
				default: throw new \Exception();
401
 
402
			}
403
 
404
			\set_transient('wpsg_mod_kundenverwaltung_mathcaptcha_result', $captcha_result);
405
 
406
			?>
407
 
408
			<div class="wpsg_checkoutblock">
409
				<label for="wpsg_mod_kundenverwaltung_mathcaptcha" class="wpsg_register"><?php echo wpsg_translate(
410
					__("Ergebnis aus #1# #2# #3#", "wpsg"),
411
						$number1, $operator, $number2
412
				); ?>:
413
					<span class="wpsg_required">*</span>
414
				</label>
415
				<input
416
						class="validate[required] wpsg_register <?php echo ((in_array("wpsg_mod_kundenverwaltung_mathcaptcha", (array)$this->view['error']))?'wpsg_error':''); ?>"
417
						type="text" id="wpsg_mod_kundenverwaltung_mathcaptcha" name="wpsg_mod_kundenverwaltung_mathcaptcha"
418
						placeholder="SPAM Schutz"
419
						value="" />
420
			</div>
421
 
422
		<?php } ?>
423
 
2780 daniel 424
		<div class="wpsg_mandatoryfield_hint">
425
			<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
426
		</div>
427
 
5013 daniel 428
		<?php /* versteckte Sicherheitsabfrage als Bot-Schutz START*/ ?>
429
			<span style="display:none">
8123 karl 430
				<label for="wpsg_spam_email">Das Feld muss frei bleiben:</label>
431
				<input type="text" name="wpsg_spam_email" id="wpsg_spam_email" title=" dieses Feld muss frei bleiben " />
5013 daniel 432
			</span>
433
		<?php /* versteckte Sicherheitsabfrage als Bot-Schutz ENDE*/ ?>
8123 karl 434
 
2308 daniel 435
		<br />
436
 
1067 daniel 437
		<input type="submit" class="wpsg_button wpsg_registerButton" value="<?php echo __('Registrieren', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_register" />
438
 
439
		<?php $this->ClearSessionErrors(); ?>
440
 
441
		<div class="wpsg_clear"></div>
442
	</form>
8123 karl 443
 
444
    <script>
445
		// DSGVO Layer Script
446
        document.querySelector('.layer_link').addEventListener('click', function() {
447
 
448
			const recaptcha = document.createElement("div");
449
			const a = document.createAttribute("data-sitekey");
450
			const b = document.createAttribute("style");
451
			a.value = "<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>";
452
			b.value = "float: left !important;";
453
			recaptcha.classList.add("g-recaptcha");
454
			recaptcha.setAttributeNode(a);
455
			recaptcha.setAttributeNode(b);
456
 
457
			document.querySelector('.wpsg_recaptcha').appendChild(recaptcha);
458
            (function(){var w=window,C='___grecaptcha_cfg',cfg=w[C]=w[C]||{},N='grecaptcha';var gr=w[N]=w[N]||{};gr.ready=gr.ready||function(f){(cfg['fns']=cfg['fns']||[]).push(f);};w['__recaptcha_api']='https://www.google.com/recaptcha/api2/';(cfg['render']=cfg['render']||[]).push('onload');w['__google_recaptcha_client']=true;var d=document,po=d.createElement('script');po.type='text/javascript';po.async=true;po.src='https://www.gstatic.com/recaptcha/releases/vP4jQKq0YJFzU6e21-BGy3GP/recaptcha__de.js';po.crossOrigin='anonymous';po.integrity='sha384-xxpEMChSTl1oMpSrXrILE1mQOlVQNv6OGibce0r0HX1HeHF72bSDheOIehafBC9Y';var e=d.querySelector('script[nonce]'),n=e&&(e['nonce']||e.getAttribute('nonce'));if(n){po.setAttribute('nonce',n);}var s=d.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();
459
 
460
			document.querySelector('.m1_dsgvo_layer').classList.add('placeholder');
461
            document.querySelector('.wpsg_recaptcha').classList.remove('placeholder');
462
 
463
			event.preventDefault();
464
 
465
        });
466
    </script>
467
 
1067 daniel 468
</div>