Subversion Repositories wpShopGermany4

Rev

Rev 8161 | 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
 
8163 daniel 57
			if (password.length < 8) {
5382 daniel 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>
8161 daniel 201
			<input
202
                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':''); ?>"
203
                type="email" id="email"
204
                name="wpsg[register][email]"
205
                value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['email'])); ?>"
206
                autocomplete="off"
207
            />
1460 david 208
		</div>
6874 hartmut 209
		<?php } ?>
1460 david 210
 
6874 hartmut 211
		<?php if ($this->view['pflicht']['email'] != '2') { ?>
3447 daniel 212
		<div class="wpsg_checkoutblock">
7666 daniel 213
			<label for="email2" class="wpsg_register"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
1460 david 214
			<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
215
			</label>
8161 daniel 216
			<input
217
                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':''); ?>"
218
                type="email"
219
                id="email2"
220
                name="wpsg[register][email2]"
221
                value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['register']['email2'])); ?>"
222
                autocomplete="off"
223
            />
1460 david 224
		</div>
6874 hartmut 225
		<?php } ?>
1460 david 226
 
3447 daniel 227
		<div class="wpsg_checkoutblock">
3649 daniel 228
			<label for="pwd1" class="wpsg_register"><?php echo __("Passwort", "wpsg"); ?>
6081 hartmut 229
			<?php if (wpsg_getStr($this->view['pflicht']['pwd1']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 230
			</label>
8161 daniel 231
			<input
232
                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':''); ?>"
233
                type="password"
234
                id="pwd1"
235
                name="wpsg[register][register_pwd1]"
236
                autocomplete="off"
237
                value=""
238
            /><span id="wpsg_checkoutblock_password_result"></span>
1460 david 239
		</div>
240
 
3447 daniel 241
		<div class="wpsg_checkoutblock">
3649 daniel 242
			<label for="pwd2" class="wpsg_register"><?php echo __("Passwort (Wiederholung)", "wpsg"); ?>
6081 hartmut 243
			<?php if (wpsg_getStr($this->view['pflicht']['pwd2']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 244
			</label>
8161 daniel 245
			<input
246
                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':''); ?>"
247
                type="password"
248
                id="pwd2"
249
                name="wpsg[register][register_pwd2]"
250
                value=""
251
                autocomplete="off"
252
            />
1460 david 253
		</div>
254
 
5382 daniel 255
		<div id="wpsg_pwd_info">
256
			<h4><?php echo __('Passwort sollte folgende Regeln befolgen:','wpsg') ?></h4>
257
			<ul>
6671 thomas 258
				<li id="wpsg_pwd_length" class="invalid"><?php echo __('Mit mindestens 8 Zeichen wird das Passwort noch sicherer','wpsg')?></li>
5382 daniel 259
				<li id="wpsg_pwd_letter" class="invalid"><?php echo __('Mit mindestens einem Kleinbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
260
				<li id="wpsg_pwd_capital" class="invalid"><?php echo __('Mit mindestens einem Großbuchstaben wird das Passwort noch sicherer','wpsg') ?></li>
261
				<li id="wpsg_pwd_number" class="invalid"><?php echo __('Mit mindestens einer Zahl wird das Passwort noch sicherer','wpsg') ?></li>
262
				<li id="wpsg_pwd_speziell" class="invalid"><?php echo __('Mit mindestens einem Sonderzeichen wird das Passwort noch sicherer','wpsg') ?></li>
263
			</ul>
264
		</div>
265
 
6874 hartmut 266
		<?php if ($this->view['pflicht']['geb'] != '2') { ?>
3447 daniel 267
		<div class="wpsg_checkoutblock">
4918 thomas 268
			<label for="geb" class="wpsg_register"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
1460 david 269
			<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
270
			</label>
6081 hartmut 271
			<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 272
		</div>
6874 hartmut 273
		<?php } ?>
274
 
275
		<?php if ($this->view['pflicht']['fax'] != '2') { ?>
3447 daniel 276
		<div class="wpsg_checkoutblock">
1460 david 277
			<label for="fax" class="wpsg_register"><?php echo __("Fax.", "wpsg"); ?>
278
			<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
279
			</label>
6081 hartmut 280
			<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 281
		</div>
6874 hartmut 282
		<?php } ?>
1460 david 283
 
6874 hartmut 284
		<?php if ($this->view['pflicht']['tel'] != '2') { ?>
3447 daniel 285
		<div class="wpsg_checkoutblock">
1460 david 286
			<label for="tel" class="wpsg_register"><?php echo __("Tel.", "wpsg"); ?>
287
			<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
288
			</label>
6081 hartmut 289
			<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 290
		</div>
6874 hartmut 291
		<?php } ?>
1460 david 292
 
6874 hartmut 293
		<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
7247 daniel 294
 
7944 daniel 295
			<?php if (($this->view['pflicht']['wpsg_showNr']??0) === '1') { ?>
7247 daniel 296
 
297
				<div class="wpsg_checkoutblock" id="wpsg_streetnr">
7316 thomas 298
					<label for="strasse" class="street wpsg_checkout"><?php echo __('Straße:', 'wpsg'); ?>
7247 daniel 299
						<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
300
						<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'])); ?>" />
301
					</label>
302
					<label for="nr" class="nr wpsg_checkout"><?php echo __('Nr:', 'wpsg'); ?>
303
						<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
304
						<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'])); ?>" />
305
					</label>
306
				</div>
307
 
308
			<?php } else { ?>
309
 
310
				<div class="wpsg_checkoutblock">
311
					<label for="strasse" class="wpsg_register"><?php echo __("Straße Nr.", "wpsg"); ?>
312
						<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
313
					</label>
314
					<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'])); ?>" />
315
				</div>
316
 
317
			<?php } ?>
318
 
6874 hartmut 319
		<?php } ?>
8123 karl 320
 
6874 hartmut 321
		<?php if ($this->view['pflicht']['plz'] != '2') { ?>
3447 daniel 322
		<div class="wpsg_checkoutblock">
3649 daniel 323
			<label for="plz" class="wpsg_register"><?php echo __("Postleitzahl", "wpsg"); ?>
8123 karl 324
				<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 325
			</label>
8123 karl 326
			<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 327
		</div>
6874 hartmut 328
		<?php } ?>
1460 david 329
 
6874 hartmut 330
		<?php if ($this->view['pflicht']['ort'] != '2') { ?>
3447 daniel 331
		<div class="wpsg_checkoutblock">
3649 daniel 332
			<label for="ort" class="wpsg_register"><?php echo __("Ort", "wpsg"); ?>
8123 karl 333
				<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 334
			</label>
6081 hartmut 335
			<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 336
		</div>
6874 hartmut 337
		<?php } ?>
1460 david 338
 
6874 hartmut 339
		<?php if ($this->view['pflicht']['land'] != '2') { ?>
3447 daniel 340
		<div class="wpsg_checkoutblock">
3649 daniel 341
			<label for="wpsg_land" class="wpsg_register"><?php echo __("Land", "wpsg"); ?>
8123 karl 342
				<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 343
			</label>
344
			<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">
345
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
346
				<?php foreach ($this->view['laender'] as $l) { ?>
347
				<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 348
				<?php } ?>
1460 david 349
			</select>
350
		</div>
6874 hartmut 351
		<?php } ?>
1067 daniel 352
 
6874 hartmut 353
		<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
3447 daniel 354
		<div class="wpsg_checkoutblock">
3649 daniel 355
			<label for="wpsg_ustidnr" class="wpsg_register"><?php echo __("UStIdNr.", "wpsg"); ?>
8123 karl 356
				<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
1460 david 357
			</label>
6081 hartmut 358
			<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 359
		</div>
6874 hartmut 360
		<?php } ?>
1067 daniel 361
 
2323 daniel 362
		<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
363
		<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
364
		<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
3447 daniel 365
		<div class="wpsg_checkoutblock">
2323 daniel 366
			<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
367
				<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
368
				<?php if ($c['typ'] == '0') { // Textfeld ?>
6874 hartmut 369
				<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 370
				<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
371
				<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; ?>]">
372
					<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
373
					<?php foreach ((array)$arAuswahl as $a) { ?>
6874 hartmut 374
					<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 375
					<?php } ?>
376
				</select>
377
				<?php } else if ($c['typ'] == '2') { // Checkbox ?>
378
				<input type="hidden" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="0" />
6874 hartmut 379
				<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 380
				<span class="wpsg_clear"></span>
2323 daniel 381
				<?php } ?>
382
			</label>
383
		</div>
384
		<?php } } ?>
385
		<?php } ?>
386
		<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
387
		<div class="wpsg_clear"></div>
7140 daniel 388
 
8123 karl 389
		<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register') === '1') { ?>
390
			<div class="wpsg_checkoutblock">
391
				<label class="recaptcha_v2_checkout ">
392
 
393
					<?php echo __('SPAM Schutz Abfrage'); ?> <span class="wpsg_required">*</span>:
394
 
395
					<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer') != '1') { ?>
396
						<div class="g-recaptcha" data-sitekey="<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>"></div>
397
					<?php } else { ?>
398
						<div class="wpsg_recaptcha placeholder"> <!-- Platzhalter für das Google ReCAPTCHA --> </div>
399
						<div class="m1_dsgvo_layer ">
400
							<div class="placeholder_text">
401
								<strong>Datenschutz ist uns wichtig!</strong>
402
								Daher wird das Google ReCAPTCHA erst geladen, wenn sie der Verwendung des Drittanbieters "Google LLC" zustimmen durch den möglicherweise Cookies gesetzt werden.<br />
403
								<button class="layer_link wpsg_required">Ich bin damit einverstanden.</button>
404
							</div>
405
						</div>
406
					<?php } ?>
407
 
408
				</label>
409
			</div>
410
			<div class="wpsg_clear"></div>
411
		<?php } ?>
412
 
413
		<?php if ($this->get_option('wpsg_mod_kundenverwaltung_mathcaptcha') === '1') {
414
 
415
			$number1 = rand(0, 9);
416
			$number2 = rand(0, 10);
417
			$arOperator = ['+', '-', '*']; $operator = $arOperator[array_rand($arOperator)];
418
 
419
			$time = time();
420
 
421
			switch ($operator) {
422
 
423
				case '+': $captcha_result = $number1 + $number2; break;
424
				case '-': $captcha_result = $number1 - $number2; break;
425
				case '*': $captcha_result = $number1 * $number2; break;
426
 
427
				default: throw new \Exception();
428
 
429
			}
430
 
431
			\set_transient('wpsg_mod_kundenverwaltung_mathcaptcha_result', $captcha_result);
432
 
433
			?>
434
 
435
			<div class="wpsg_checkoutblock">
436
				<label for="wpsg_mod_kundenverwaltung_mathcaptcha" class="wpsg_register"><?php echo wpsg_translate(
437
					__("Ergebnis aus #1# #2# #3#", "wpsg"),
438
						$number1, $operator, $number2
439
				); ?>:
440
					<span class="wpsg_required">*</span>
441
				</label>
442
				<input
443
						class="validate[required] wpsg_register <?php echo ((in_array("wpsg_mod_kundenverwaltung_mathcaptcha", (array)$this->view['error']))?'wpsg_error':''); ?>"
444
						type="text" id="wpsg_mod_kundenverwaltung_mathcaptcha" name="wpsg_mod_kundenverwaltung_mathcaptcha"
445
						placeholder="SPAM Schutz"
446
						value="" />
447
			</div>
448
 
449
		<?php } ?>
450
 
2780 daniel 451
		<div class="wpsg_mandatoryfield_hint">
452
			<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
453
		</div>
454
 
5013 daniel 455
		<?php /* versteckte Sicherheitsabfrage als Bot-Schutz START*/ ?>
456
			<span style="display:none">
8123 karl 457
				<label for="wpsg_spam_email">Das Feld muss frei bleiben:</label>
458
				<input type="text" name="wpsg_spam_email" id="wpsg_spam_email" title=" dieses Feld muss frei bleiben " />
5013 daniel 459
			</span>
460
		<?php /* versteckte Sicherheitsabfrage als Bot-Schutz ENDE*/ ?>
8123 karl 461
 
2308 daniel 462
		<br />
463
 
1067 daniel 464
		<input type="submit" class="wpsg_button wpsg_registerButton" value="<?php echo __('Registrieren', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_register" />
465
 
466
		<?php $this->ClearSessionErrors(); ?>
467
 
468
		<div class="wpsg_clear"></div>
469
	</form>
8123 karl 470
 
471
    <script>
472
		// DSGVO Layer Script
473
        document.querySelector('.layer_link').addEventListener('click', function() {
474
 
475
			const recaptcha = document.createElement("div");
476
			const a = document.createAttribute("data-sitekey");
477
			const b = document.createAttribute("style");
478
			a.value = "<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>";
479
			b.value = "float: left !important;";
480
			recaptcha.classList.add("g-recaptcha");
481
			recaptcha.setAttributeNode(a);
482
			recaptcha.setAttributeNode(b);
483
 
484
			document.querySelector('.wpsg_recaptcha').appendChild(recaptcha);
485
            (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);})();
486
 
487
			document.querySelector('.m1_dsgvo_layer').classList.add('placeholder');
488
            document.querySelector('.wpsg_recaptcha').classList.remove('placeholder');
489
 
490
			event.preventDefault();
491
 
492
        });
493
    </script>
494
 
1067 daniel 495
</div>