Subversion Repositories wpShopGermany4

Rev

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

Rev 7258 Rev 7264
Line 6... Line 6...
6
 
6
 
7
?>
7
?>
8
	
8
	
9
<?php echo wpsg_drawForm_AdminboxStart(__('Anschreiben', 'wpsg'));?>
9
<?php echo wpsg_drawForm_AdminboxStart(__('Anschreiben', 'wpsg'));?>
10
 
10
 
11
	<?php if (sizeof($this->view['mod_anschreiben']['aranschreiben']) == 0 ) { ?>
11
	<?php if (sizeof($this->view['mod_coverletter']['arCoverLetter']) == 0 ) { ?>
12
	   
12
	   
13
	   <p><?php echo __('Bisher kein Anschreiben geschrieben.', 'wpsg'); ?></p>
13
		<p><?php echo __('Bisher kein Anschreiben für diese Bestellung geschrieben.', 'wpsg'); ?></p>
14
	   
14
	   
15
	   <?php } else { ?>
15
	<?php } else { ?>
16
	   	<table>
-
 
17
	        <?php foreach ($this->view['mod_anschreiben']['aranschreiben_gesamt'] as $a) { ?>
-
 
18
	            <tr>
-
 
19
	                <td>#<?php echo ($a['anr'] != ''); ?>
-
 
20
						
16
 
21
						<?php if ($a['anr'] != "") { ?>
17
		<?php foreach ($this->view['mod_coverletter']['arCoverLetter'] as $a) { ?>
22
	                    	<?php echo wpsg_translate(__('Anschreiben gespeichert am #1#', 'wpsg'), date("d.m.Y", $a['ts_datum'])); ?>
-
 
23
	                    <?php } ?>
-
 
24
	
-
 
25
	                </td>
-
 
26
	                <td style="text-align:right;">
-
 
27
	
-
 
28
	                    <?php if ($a['anr'] != "") {
-
 
29
 
-
 
30
	                    	$rfile = $this->callMod('wpsg_mod_anschreiben', 'getFilePath', array($this->view['data']['id'], true)).'A'.$r['anr'].'.pdf';
-
 
31
	                        
-
 
32
	                    } ?>
-
 
33
 
-
 
34
	            	</td>
-
 
35
	        	</tr>
-
 
36
	    	<?php } ?>
-
 
37
	 	</table>
-
 
38
	 <?php } ?>
-
 
39
	
18
	
-
 
19
			<div class="wpsg_flex wpsg_flex_justify_content_space_between">
-
 
20
				<span>
-
 
21
					<?php echo wpsg_translate(__('#2#: Anschreiben ##1#', 'wpsg'), $a['id'], wpsg_formatTimestamp(strtotime($a['cdate']))); ?>: <?php echo ((strlen($a['text']) > 50)?substr($a['text'],0,50).' ...':$a['text']); ?>
-
 
22
				</span>
-
 
23
				<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_coverletter&noheader=1&action=ajax&order_id=<?php echo $a['order_id']; ?>&cl_id=<?php echo $a['id']; ?>&wpsg_mod_coverletter_get" target="_new">
-
 
24
					<?php echo __('Download', 'wpsg'); ?>
-
 
25
				</a>
-
 
26
			</div>
-
 
27
		
-
 
28
		<?php } ?>
-
 
29
		
-
 
30
	<?php } ?>
-
 
31
		
40
	<br>
32
	<br />
41
	
33
	
42
	<div class="wpsg_clear"></div>
34
	<div class="wpsg_clear"></div>
43
	
35
	
44
	<hr />
36
	<hr />
45
	
37
	
Line 64... Line 56...
64
				<?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),'', ['noLabel' => true, 'fullLabel' => __('Text für das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
56
				<?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),'', ['noLabel' => true, 'fullLabel' => __('Text für das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
65
				
57
				
66
				<br />
58
				<br />
67
				
59
				
68
				<input type="submit" name="wpsg_mod_coverletter_write" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:left;" class="button button-primary" />
60
				<input type="submit" name="wpsg_mod_coverletter_write" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:left;" class="button button-primary" />
-
 
61
				<input type="submit" name="wpsg_mod_coverletter_preview" onclick="wpsg_form_refresh = false;" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:left; margin-left:15px;" class="button" />
69
				
62
				
70
				<div class="wpsg_clear"></div>
63
				<div class="wpsg_clear"></div>
71
				
64
				
72
			</form>
65
			</form>
73
			
66
			
Line 76... Line 69...
76
 
69
 
77
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
70
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
78
 
71
 
79
<script>
72
<script>
80
	
73
	
-
 
74
	var wpsg_form_refresh = true;
-
 
75
	
81
	jQuery('#wpsg_mod_coverletter_form').on('submit', function() {
76
	jQuery('#wpsg_mod_coverletter_form').on('submit', function() {
82
		
77
		
-
 
78
		if (wpsg_form_refresh) {
-
 
79
		
83
		setTimeout(function() {
80
			setTimeout(function() {
84
			
81
			
85
			location.reload();
82
				location.reload();
-
 
83
				
-
 
84
			}, 1000);
86
			
85
			
87
		}, 1000);
86
		}
-
 
87
 
-
 
88
		wpsg_form_refresh = true;
88
				
89
				
89
	} );
90
	} );
90
	
91
	
91
</script>
92
</script>