Subversion Repositories wpShopGermany4

Rev

Rev 7267 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7267 Rev 7349
Line 173... Line 173...
173
		</div>
173
		</div>
174
	</div>
174
	</div>
175
 
175
 
176
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
176
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
177
 
177
 
-
 
178
<?php if ($this->get_option('wpsg_mod_kundenkontakt_smsflatrate_active') === '1') { ?>
178
<?php echo wpsg_drawForm_AdminboxStart(__('SMS Versand', 'wpsg'));?>
179
	<?php echo wpsg_drawForm_AdminboxStart(__('SMS Versand', 'wpsg'));?>
179
 
-
 
180
	<div class="inside">
-
 
181
		<div style="padding:5px;">
-
 
182
	
-
 
183
			<form id="sms_form" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&edit_id=<?php echo $this->view['data']['id']; ?>&do=sms_submit&noheader=1">
-
 
184
	
180
	
-
 
181
		<div class="inside">
185
				<input type="hidden" name="_wpnonce" value="<?php echo \wp_create_nonce('wpsg_mod_kundenkontakt_sms_form_'.$this->view['data']['id']); ?>" />
182
			<div style="padding:5px;">
186
				
183
		
187
				<p>Mit diesem Formular kann eine SMS an den Kunden versendet werden.</p>
184
				<form id="sms_form" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&edit_id=<?php echo $this->view['data']['id']; ?>&do=sms_submit&noheader=1">
188
									
-
 
189
				<br />
-
 
190
			
185
		
191
				<div id="numbercheck">
-
 
192
					<?php if ($this->view['valid'] === true) { ?>
186
					<input type="hidden" name="_wpnonce" value="<?php echo \wp_create_nonce('wpsg_mod_kundenkontakt_sms_form_'.$this->view['data']['id']); ?>" />
193
					
187
					
194
						<div class="alert alert-success">
-
 
195
							<?php echo wpsg_translate(__('Die Telefonnummer #1# ist gültig.', 'wpsg'), $this->view['phone']); ?>
188
					<p>Mit diesem Formular kann eine SMS an den Kunden versendet werden.</p>
-
 
189
										
196
						</div>
190
					<br />
-
 
191
				
-
 
192
					<div id="numbercheck">
-
 
193
						<?php if ($this->view['valid'] === true) { ?>
197
						
194
						
-
 
195
							<div class="alert alert-success">
-
 
196
								<?php echo wpsg_translate(__('Die Telefonnummer #1# ist gültig.', 'wpsg'), $this->view['phone']); ?>
-
 
197
							</div>
-
 
198
							
198
					<?php } else { ?>
199
						<?php } else { ?>
-
 
200
		
-
 
201
							<div class="alert alert-danger">
-
 
202
								<?php echo wpsg_translate(__('Die Telefonnummer #1# ist nicht gültig.', 'wpsg'), $this->view['phone']); ?>
-
 
203
							</div>
-
 
204
						
-
 
205
						<?php } ?>
-
 
206
					</div>			
199
	
207
	
200
						<div class="alert alert-danger">
-
 
201
							<?php echo wpsg_translate(__('Die Telefonnummer #1# ist nicht gültig.', 'wpsg'), $this->view['phone']); ?>
-
 
202
						</div>
208
					<br />
203
					
209
					
204
					<?php } ?>
210
					<?php echo wpsg_drawForm_Input('phone', __('Empfänger', 'wpsg'), $this->view['phone']); ?>
205
				</div>			
-
 
206
 
211
					
207
				<br />
212
					<br />
208
				
213
		
209
				<?php echo wpsg_drawForm_Input('phone', __('Empfänger', 'wpsg'), $this->view['phone']); ?>
214
					<textarea id="text" name="text" <?php echo (($this->view['valid'] === true)?'':'disabled="disabled"'); ?> style="width:100%; height:100px;"></textarea>
-
 
215
		
-
 
216
					<input type="submit" id="sms_submit" <?php echo (($this->view['valid'] === true)?'':'disabled="disabled"'); ?> value="<?php echo __('SMS Senden', 'wpsg'); ?>" class="button" style="float:right; margin-top:15px;" />
210
				
217
		
211
				<br />
218
					<script>
-
 
219
						
-
 
220
						jQuery('#phone').on('input', function() {
212
	
221
	
213
				<textarea id="text" name="text" <?php echo (($this->view['valid'] === true)?'':'disabled="disabled"'); ?> style="width:100%; height:100px;"></textarea>
222
							jQuery('#numbercheck').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
223
							
-
 
224
							jQuery('#text').prop('disabled', true);
-
 
225
							jQuery('#sms_submit').prop('disabled', true);
-
 
226
							
-
 
227
							jQuery.ajax( {
-
 
228
								url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>&do=validateNumber',
-
 
229
								data: {
-
 
230
									'phone': jQuery('#phone').val()
-
 
231
								},
-
 
232
								success: function(data) {
214
	
233
	
-
 
234
									if (data.valid) {
-
 
235
									
-
 
236
										jQuery('#text').prop('disabled', false);
215
				<input type="submit" id="sms_submit" <?php echo (($this->view['valid'] === true)?'':'disabled="disabled"'); ?> value="<?php echo __('SMS Senden', 'wpsg'); ?>" class="button" style="float:right; margin-top:15px;" />
237
										jQuery('#sms_submit').prop('disabled', false);
-
 
238
										
-
 
239
									}
216
	
240
	
217
				<script>
-
 
218
					
-
 
219
					jQuery('#phone').on('input', function() {
-
 
220
 
-
 
221
						jQuery('#numbercheck').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
222
						
-
 
223
						jQuery('#text').prop('disabled', true);
-
 
224
						jQuery('#sms_submit').prop('disabled', true);
-
 
225
						
-
 
226
						jQuery.ajax( {
-
 
227
							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>&do=validateNumber',
-
 
228
							data: {
-
 
229
								'phone': jQuery('#phone').val()
-
 
230
							},
-
 
231
							success: function(data) {
-
 
232
 
-
 
233
								if (data.valid) {
-
 
234
								
-
 
235
									jQuery('#text').prop('disabled', false);
241
									jQuery('#numbercheck').html(data.text);
236
									jQuery('#sms_submit').prop('disabled', false);
-
 
237
									
242
									
238
								}
243
								}
239
 
-
 
240
								jQuery('#numbercheck').html(data.text);
244
							} );
241
								
245
							
242
							}
-
 
243
						} );
246
						} );
244
						
247
						
245
					} );
248
					</script>
246
					
249
					
247
				</script>
250
				</form>		
248
				
251
			
249
			</form>		
252
			</div>
250
		
-
 
251
		</div>
253
		</div>
252
	</div>
-
 
253
 
-
 
254
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
-
 
255
254
	
-
 
255
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
-
 
256
<?php } ?>
-
 
257